Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tune Grammar to disambiguish . and ..

  • Loading branch information...
commit 23cc2aa46f1bc37da2b2f176898b6a70b7d23429 1 parent d65c833
@bacek authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 XQuery/Parser/Grammar.pm
View
7 XQuery/Parser/Grammar.pm
@@ -202,8 +202,8 @@ grammar XQueryGrammar {
# LTM
rule StepExpr {
- | <AxisStep>
| <FilterExpr>
+ | <AxisStep>
};
rule AxisStep {
@@ -212,8 +212,8 @@ grammar XQueryGrammar {
# LTM
rule ForwardStep {
+ | <ForwardAxis> <NodeTest>
| <AbbrevForwardStep>
- | [ <ForwardAxis> <NodeTest> ]
};
##[73] ForwardAxis ::= ("child" "::")
@@ -320,7 +320,8 @@ grammar XQueryGrammar {
rule ParenthesizedExpr { '(' <Expr>? ')' };
- rule ContextItemExpr { '.' };
+ # Don't mix ContextItem and '..'
+ rule ContextItemExpr { '.' <!before '.'> };
rule OrderedExpr {
'ordered' '{' <Expr> '}'
Please sign in to comment.
Something went wrong with that request. Please try again.