Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 

README.md

A Parser for ODATA URI

This project builds a parser for subset of ODATA URI. Main objective is to parse a URI such as http://odata.io/odata.svc/Schema(231)/Customer?$top=2&$filter=concat(City, Country) eq 'Berlin, Germany' and builds an AST as follows:

ODataQuery(
    URL("http://odata.io/odata.svc"),
    ResourcePath("Schema",Number("231"),ResourcePath("Customer",EmptyExp(),EmptyExp())),
    QueryOperations(
      List(Top(Number("2")),
      Filter(
        EqualToExp(
          CallExp(
              Property("concat")
            , List(Property("City"), Property("Country"))
          )
          , StringLiteral("'Berlin, Germany'"))))))

It uses Scala Parser Combinators to parse the URI string and builds an AST for that for further processing.

For more example, see unit tests included in the project (e.g., see OdataUriParseTests.scala).

See http://www.odata.org/documentation/odata-version-2-0/uri-conventions/ for more details regarding the URI specification.

About

A Scala Parser Combinators Implementation for ODATA URI

Resources

License

Releases

No releases published

Languages

You can’t perform that action at this time.