Skip to content
This repository has been archived by the owner on Sep 29, 2021. It is now read-only.

Commit

Permalink
Fix not matching * as nodetest
Browse files Browse the repository at this point in the history
In a peculiar manner, should figure out how to do properly...
  • Loading branch information
akaIDIOT committed Jul 6, 2012
1 parent 594652d commit 681a173
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions Source/nl/utwente/cs/pxml/transform/xpath/XPathTransformer.jj
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class XPathTransformer {
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 2; i++) jj_la1[i] = -1;
for (int i = 0; i < 1; i++) jj_la1[i] = -1;
}

/**
Expand Down Expand Up @@ -175,18 +175,14 @@ TOKEN : {
// separator between axis name and node test
| < SEPARATOR : "::" >

// node names, required to start with a letter or _, followed by a word character (A-z, 0-9 or _)
| < NODENAME : (["A"-"z", "_"])(["0"-"9", "A"-"z", "_"])* >

// XPath expression for 'any'
| < NODEANY : "*" >

// XPath node types (copied from http://www.w3.org/TR/xpath/ section 3.7)
| < NODETYPE :
"comment()"
| < NODETEST :
(["A"-"z", "_"])(["0"-"9", "A"-"z", "_"])*
| "*"
| "comment()"
| "text()"
| "processing-instruction()"
| "node()" >

}

String parseInput() :
Expand Down Expand Up @@ -301,7 +297,7 @@ AxisStep axisStep() :
< STEP >
axis = < AXIS >
< SEPARATOR >
( nodeTest = < NODENAME > | < NODEANY > | < NODETYPE > )
nodeTest = < NODETEST >
{
// return the input, an XPath axis step
return new AxisStep(axis.image, nodeTest.image);
Expand Down

0 comments on commit 681a173

Please sign in to comment.