You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Fang Yimeng (JIRA)" <ji...@apache.org> on 2015/07/09 04:58:04 UTC
[jira] [Created] (OLINGO-730) UriLexer.g4 and UriParser.g4 grammar
mistake
Fang Yimeng created OLINGO-730:
----------------------------------
Summary: UriLexer.g4 and UriParser.g4 grammar mistake
Key: OLINGO-730
URL: https://issues.apache.org/jira/browse/OLINGO-730
Project: Olingo
Issue Type: Bug
Components: odata4-server
Affects Versions: (Java) V4 4.0.0-beta-03
Environment: MAC OSX 10.8
ANTLR 4.1
Reporter: Fang Yimeng
Priority: Minor
1. UriLexer.g4 line 74-79:
//JSON support
BEGIN_OBJECT : WS* ( '{' / '%7B' ) WS*;
END_OBJECT : WS* ( '}' / '%7D' ) WS*;
BEGIN_ARRAY : WS* ( '[' / '%5B' ) WS*;
END_ARRAY : WS* ( ']' / '%5D' ) WS*;
I think '/' here means alternative, should '/' is replaced with '|'?
2. UriParser.g4 line 66:
pathSegment : vNS=namespace? vODI=odataIdentifier vlNVO+=nameValueOptList*;
I read the ABNF of OData4(http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/abnf/odata-abnf-construction-rules.txt), and find out each pathSegment should only has one nameValueOptList, for the reason that:
collectionNavPath = keyPredicate [ singleNavigation ]
so should line 66 be like this:
pathSegment : vNS=namespace? vODI=odataIdentifier vlNVO=nameValueOptList?;
3. When I trying odata string like this: User?$expand=Friends($search=a), I got error showing me that "$search" is invalid. This is caused by needing SEARCH while presenting SEARCHINLINE. We can modify UriParser.g4 like this:
expandCountOption : filter
| searchInline
;
and modify UriLexer.g4 like this:
SEARCHWORD : ('a'..'z'|'A'..'Z')+ ->popMode;
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)