You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2014/10/08 06:13:21 UTC
[3/4] git commit: [OLINGO-434] Added optional WSP between MINUS and
property
[OLINGO-434] Added optional WSP between MINUS and property
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/5c237fbe
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/5c237fbe
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/5c237fbe
Branch: refs/heads/master
Commit: 5c237fbe57510e40806e24bb3bbc3cd21b3c324b
Parents: 4a4b110
Author: Michael Bolz <mi...@sap.com>
Authored: Tue Oct 7 15:43:04 2014 +0200
Committer: Michael Bolz <mi...@sap.com>
Committed: Tue Oct 7 15:43:04 2014 +0200
----------------------------------------------------------------------
.../antlr4/org/apache/olingo/server/core/uri/antlr/UriParser.g4 | 2 +-
.../org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/5c237fbe/lib/server-core/src/main/antlr4/org/apache/olingo/server/core/uri/antlr/UriParser.g4
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/antlr4/org/apache/olingo/server/core/uri/antlr/UriParser.g4 b/lib/server-core/src/main/antlr4/org/apache/olingo/server/core/uri/antlr/UriParser.g4
index 404c04f..1ff5839 100644
--- a/lib/server-core/src/main/antlr4/org/apache/olingo/server/core/uri/antlr/UriParser.g4
+++ b/lib/server-core/src/main/antlr4/org/apache/olingo/server/core/uri/antlr/UriParser.g4
@@ -191,7 +191,7 @@ contextFragment : REST; // the context fragment is only required on the clie
commonExpr : OPEN commonExpr CLOSE #altPharenthesis
| vE1=commonExpr (WSP HAS WSP) vE2=commonExpr #altHas
| methodCallExpr #altMethod
- | ( unary WSP ) commonExpr #altUnary
+ | ( unary WSP? ) commonExpr #altUnary
| anyExpr #altAny
| allExpr #altAll
| memberExpr #altMember
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/5c237fbe/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
index 30e1b0d..1dce3df 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
@@ -570,6 +570,7 @@ public class TestUriParserImpl {
public void testUnary() throws UriParserException {
testFilter.runESabc("not a").isCompr("<not <a>>");
testFilter.runESabc("- a eq a").isCompr("<<- <a>> eq <a>>");
+ testFilter.runESabc("-a eq a").isCompr("<<- <a>> eq <a>>");
}
@Test