/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. xpath-src/org/w3c/xqparser\xpath-grammar.jj */ /*@egen*/options { STATIC = false; FORCE_LA_CHECK=false; } PARSER_BEGIN(XPath) package org.w3c.xqparser; import org.w3c.xqparser.Node; import org.w3c.xqparser.SimpleNode; import java.io.*; import java.util.Stack; import java.util.Vector; import org.w3c.dom.Element; import org.w3c.dom.Document; import javax.xml.parsers.*; import org.w3c.dom.traversal.DocumentTraversal; import org.w3c.dom.traversal.NodeFilter; import org.w3c.dom.traversal.NodeIterator; import org.w3c.dom.traversal.TreeWalker; public class XPath/*@bgen(jjtree)*/implements XPathTreeConstants/*@egen*/ {/*@bgen(jjtree)*/ protected JJTXPathState jjtree = new JJTXPathState(); /*@egen*/ boolean m_isMatchPattern = false; boolean isStep = false; Stack _elementStack = new Stack(); Stack binaryTokenStack = new Stack(); public Node createNode(int id) { return null; } void processToken(SimpleNode n, Token t) { if(t.kind == XPathConstants.Slash && n.id != XPathTreeConstants.JJTSLASH) return; n.processToken(t); } public static void main(String args[]) throws Exception { int numberArgsLeft = args.length; int argsStart = 0; boolean isMatchParser = false; boolean dumpTree = false; while (numberArgsLeft > 0) { try { if (args[argsStart].equals("-dumptree")) { dumpTree = true; argsStart++; numberArgsLeft--; } else if (args[argsStart].equals("-match")) { isMatchParser = true; System.out.println("Match Pattern Parser"); argsStart++; numberArgsLeft--; } else if ("-file".equalsIgnoreCase(args[argsStart])) { argsStart++; numberArgsLeft--; System.out.println("Running test for: " + args[argsStart]); File file = new File(args[argsStart]); argsStart++; numberArgsLeft--; Reader fis = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8")); XPath parser = new XPath(fis); SimpleNode tree = parser.XPath2(); if (dumpTree) tree.dump("|"); } else if (args[argsStart].endsWith(".xquery")) { System.out.println("Running test for: " + args[argsStart]); File file = new File(args[argsStart]); argsStart++; numberArgsLeft--; Reader fis = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8")); XPath parser = new XPath(fis); SimpleNode tree = parser.XPath2(); if (dumpTree) tree.dump("|"); } else if ("-catalog".equalsIgnoreCase(args[argsStart])) { argsStart++; numberArgsLeft--; String catalogFileName = args[argsStart]; argsStart++; numberArgsLeft--; System.out.println("Running catalog for: " + catalogFileName); DocumentBuilderFactory dbf = DocumentBuilderFactory .newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(catalogFileName); NodeIterator testCases = ((DocumentTraversal) doc) .createNodeIterator(doc, NodeFilter.SHOW_ELEMENT, new NodeFilter() { public short acceptNode( org.w3c.dom.Node node) { String nm = node.getNodeName(); return (nm.equals("test-case")) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }, true); org.w3c.dom.Element testCase; int totalCount = 0; Vector failedList = new Vector(); while ((testCase = (org.w3c.dom.Element) testCases .nextNode()) != null) { NodeIterator queryies = ((DocumentTraversal) doc) .createNodeIterator(testCase, NodeFilter.SHOW_ELEMENT, new NodeFilter() { public short acceptNode( org.w3c.dom.Node node) { String nm = node.getNodeName(); return (nm.equals("query")) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }, true); org.w3c.dom.Element query; while ((query = (org.w3c.dom.Element) queryies .nextNode()) != null) { String fileString = query.getAttribute("name"); String locString = testCase .getAttribute("FilePath").replace('/', File.separatorChar); File catFile = new File(catalogFileName); String locCatFile = catFile.getParent(); String absFileName = locCatFile + File.separator + "Queries" + File.separator + "XQuery" + File.separator + locString + fileString; if (dumpTree) { System.out.print("== "); System.out.print(absFileName); System.out.println(" =="); } else System.out.print("."); boolean isParseError = false; String scenario = testCase.getAttribute("scenario"); if (scenario.equals("parse-error")) isParseError = true; totalCount++; try { File file = new File(absFileName); Reader fis = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8")); XPath parser = new XPath(fis); SimpleNode tree = parser.XPath2(); if(isParseError) failedList.addElement(fileString); if (dumpTree) tree.dump("|"); } catch (Exception e) { if(!isParseError) failedList.addElement(fileString); } catch (Error e2) { if(!isParseError) failedList.addElement(fileString); } } } System.out.println(); if(failedList.size() > 0) { System.out.print("FAILED: "); for(int i = 0; i < failedList.size(); i++) { String fname = (String)failedList.elementAt(i); System.out.print(fname); if((i+1) != failedList.size()) System.out.print(", "); } System.out.println(); System.out.print("Failed "+failedList.size()+" out of "); } else { System.out.print("Total Success!! "); } System.out.println(totalCount+" cases"); } else { for(int i = argsStart; i < args.length; i++) { System.out.println(); System.out.println("Test["+i+"]: "+args[i]); Reader fis = new BufferedReader(new InputStreamReader(new java.io.StringBufferInputStream(args[i]), "UTF-8")); XPath parser = new XPath(fis); SimpleNode tree; if(isMatchParser) { tree = parser.XPath2(); } else { tree = parser.XPath2(); } ((SimpleNode)tree.jjtGetChild(0)).dump("|") ; break; } System.out.println("Success!!!!"); } } catch(ParseException pe) { System.err.println(pe.getMessage()); } catch(Error e) { String msg = e.getMessage(); if(msg == null || msg.equals("")) msg = "Unknown Error: "+e.getClass().getName(); System.err.println(msg); } return; } java.io.DataInputStream dinput = new java.io.DataInputStream(System.in); while(true) { try { System.err.println("Type Expression: "); String input = dinput.readLine(); if(null == input || input.trim().length() == 0) break; XPath parser = new XPath(new BufferedReader(new InputStreamReader(new java.io.StringBufferInputStream(input), "UTF-8"))); SimpleNode tree; if(isMatchParser) { tree = parser.XPath2(); } else { tree = parser.XPath2(); } ((SimpleNode)tree.jjtGetChild(0)).dump("|") ; } catch(ParseException pe) { System.err.println(pe.getMessage()); } catch(Exception e) { System.err.println(e.getMessage()); } catch(Error e) { String msg = e.getMessage(); if(msg == null || msg.equals("")) msg = "Unknown Error: "+e.getClass().getName(); System.err.println(msg); } } } } PARSER_END(XPath) TOKEN_MGR_DECLS : { public Stack stateStack = new Stack(); // private Vector persistentLexStates = new Vector(); static final int PARENMARKER = 2000; public int offset = 0; void CommonTokenAction(Token t) {} /** * Push the current state onto the state stack. */ private void pushState() { stateStack.addElement(new Integer(curLexState)); } /** * Push the given state onto the state stack. * @param state Must be a valid state. */ private void pushState(int state) { stateStack.push(new Integer(state)); } /** * Pop the state on the state stack, and switch to that state. */ private void popState() { if (stateStack.size() == 0) { printLinePos(); } int nextState = ((Integer) stateStack.pop()).intValue(); if(nextState == PARENMARKER) printLinePos(); SwitchTo(nextState); } /** * Push the given state onto the state stack. * @param state Must be a valid state. */ private boolean isState(int state) { for (int i = 0; i < stateStack.size(); i++) { if(((Integer) stateStack.elementAt(i)).intValue() == state) { return true; } } return false; } /** * Push a parenthesis state. This pushes, in addition to the * lexical state value, a special marker that lets * resetParenStateOrSwitch(int state) * know if it should pop and switch. Used for the comma operator. */ private void pushParenState(int commaState, int rparState) { stateStack.push(new Integer(rparState)); stateStack.push(new Integer(commaState)); stateStack.push(new Integer(PARENMARKER)); SwitchTo(commaState); } /** * Print the current line position. */ public void printLinePos() { System.err.println("Line: " + input_stream.getEndLine()); } } SimpleNode XPath2() : {/*@bgen(jjtree) XPath2 */ SimpleNode jjtn000 = new SimpleNode(this, JJTXPATH2); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) XPath2 */ try { /*@egen*/ XPath()/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/ { if(this.token_source.curLexState == XPathConstants.EXPR_COMMENT) throw new ParseException("Unterminated comment."); return jjtn000 ; }/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void XPath() : {/*@bgen(jjtree) XPath */ SimpleNode jjtn000 = new SimpleNode(this, JJTXPATH); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) XPath */ try { /*@egen*/ Expr()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void Expr() : {/*@bgen(jjtree) Expr */ SimpleNode jjtn000 = new SimpleNode(this, JJTEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) Expr */ try { /*@egen*/ ExprSingle() ("," ExprSingle())*/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void ExprSingle() : {} { (LOOKAHEAD(2) ForExpr() | LOOKAHEAD(2) QuantifiedExpr() | LOOKAHEAD(2) IfExpr() | OrExpr()) } void ForExpr() : {/*@bgen(jjtree) ForExpr */ SimpleNode jjtn000 = new SimpleNode(this, JJTFOREXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) ForExpr */ try { /*@egen*/ SimpleForClause() "return" ExprSingle()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void SimpleForClause() : {} { "for" "$" VarName() "in" ExprSingle() ("," "$" VarName() "in" ExprSingle())* } void QuantifiedExpr() : {/*@bgen(jjtree) QuantifiedExpr */ SimpleNode jjtn000 = new SimpleNode(this, JJTQUANTIFIEDEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) QuantifiedExpr */ try { /*@egen*/ ("some"{jjtn000.processValue("some");} | "every"{jjtn000.processValue("every");}) "$" VarName() "in" ExprSingle() ("," "$" VarName() "in" ExprSingle())* "satisfies" ExprSingle()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void IfExpr() : {/*@bgen(jjtree) IfExpr */ SimpleNode jjtn000 = new SimpleNode(this, JJTIFEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) IfExpr */ try { /*@egen*/ "if" "(" Expr() ")" "then" ExprSingle() "else" ExprSingle()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void OperatorExpr() : {} { OrExpr() } void OrExpr() : {/*@bgen(jjtree) #OrExpr(> 1) */ SimpleNode jjtn000 = new SimpleNode(this, JJTOREXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) #OrExpr(> 1) */ try { /*@egen*/ AndExpr() ("or"{ binaryTokenStack.push(token); } AndExpr()/*@bgen(jjtree) #OrExpr( 2) */ { SimpleNode jjtn001 = new SimpleNode(this, JJTOREXPR); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn001, 2); jjtc001 = false; } /*@egen*/ { try { processToken(jjtn001, (Token)binaryTokenStack.pop()); } catch(java.util.EmptyStackException e) { token_source.printLinePos(); e.printStackTrace(); throw e; } }/*@bgen(jjtree)*/ } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, 2); } } /*@egen*/)*/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); } } /*@egen*/ } void AndExpr() : {/*@bgen(jjtree) #AndExpr(> 1) */ SimpleNode jjtn000 = new SimpleNode(this, JJTANDEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) #AndExpr(> 1) */ try { /*@egen*/ ComparisonExpr() ("and"{ binaryTokenStack.push(token); } ComparisonExpr()/*@bgen(jjtree) #AndExpr( 2) */ { SimpleNode jjtn001 = new SimpleNode(this, JJTANDEXPR); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn001, 2); jjtc001 = false; } /*@egen*/ { try { processToken(jjtn001, (Token)binaryTokenStack.pop()); } catch(java.util.EmptyStackException e) { token_source.printLinePos(); e.printStackTrace(); throw e; } }/*@bgen(jjtree)*/ } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, 2); } } /*@egen*/)*/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); } } /*@egen*/ } void ComparisonExpr() : {/*@bgen(jjtree) #ComparisonExpr(> 1) */ SimpleNode jjtn000 = new SimpleNode(this, JJTCOMPARISONEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) #ComparisonExpr(> 1) */ try { /*@egen*/ RangeExpr() ((ValueComp() | GeneralComp() | NodeComp()) RangeExpr()/*@bgen(jjtree) #ComparisonExpr( 2) */ { SimpleNode jjtn001 = new SimpleNode(this, JJTCOMPARISONEXPR); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn001, 2); jjtc001 = false; } /*@egen*/ { try { processToken(jjtn001, (Token)binaryTokenStack.pop()); } catch(java.util.EmptyStackException e) { token_source.printLinePos(); e.printStackTrace(); throw e; } }/*@bgen(jjtree)*/ } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, 2); } } /*@egen*/)?/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); } } /*@egen*/ } void RangeExpr() : {/*@bgen(jjtree) #RangeExpr(> 1) */ SimpleNode jjtn000 = new SimpleNode(this, JJTRANGEEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) #RangeExpr(> 1) */ try { /*@egen*/ AdditiveExpr() ("to"{ binaryTokenStack.push(token); } AdditiveExpr()/*@bgen(jjtree) #RangeExpr( 2) */ { SimpleNode jjtn001 = new SimpleNode(this, JJTRANGEEXPR); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn001, 2); jjtc001 = false; } /*@egen*/ { try { processToken(jjtn001, (Token)binaryTokenStack.pop()); } catch(java.util.EmptyStackException e) { token_source.printLinePos(); e.printStackTrace(); throw e; } }/*@bgen(jjtree)*/ } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, 2); } } /*@egen*/)?/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); } } /*@egen*/ } void AdditiveExpr() : {/*@bgen(jjtree) #AdditiveExpr(> 1) */ SimpleNode jjtn000 = new SimpleNode(this, JJTADDITIVEEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) #AdditiveExpr(> 1) */ try { /*@egen*/ MultiplicativeExpr() (( {binaryTokenStack.push(token);} | {binaryTokenStack.push(token);} ) MultiplicativeExpr()/*@bgen(jjtree) #AdditiveExpr( 2) */ { SimpleNode jjtn001 = new SimpleNode(this, JJTADDITIVEEXPR); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn001, 2); jjtc001 = false; } /*@egen*/ { try { processToken(jjtn001, (Token)binaryTokenStack.pop()); } catch(java.util.EmptyStackException e) { token_source.printLinePos(); e.printStackTrace(); throw e; } }/*@bgen(jjtree)*/ } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, 2); } } /*@egen*/)*/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); } } /*@egen*/ } void MultiplicativeExpr() : {/*@bgen(jjtree) #MultiplicativeExpr(> 1) */ SimpleNode jjtn000 = new SimpleNode(this, JJTMULTIPLICATIVEEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) #MultiplicativeExpr(> 1) */ try { /*@egen*/ UnionExpr() (("*"{ binaryTokenStack.push(token); } | "div"{ binaryTokenStack.push(token); } | "idiv"{ binaryTokenStack.push(token); } | "mod"{ binaryTokenStack.push(token); }) UnionExpr()/*@bgen(jjtree) #MultiplicativeExpr( 2) */ { SimpleNode jjtn001 = new SimpleNode(this, JJTMULTIPLICATIVEEXPR); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn001, 2); jjtc001 = false; } /*@egen*/ { try { processToken(jjtn001, (Token)binaryTokenStack.pop()); } catch(java.util.EmptyStackException e) { token_source.printLinePos(); e.printStackTrace(); throw e; } }/*@bgen(jjtree)*/ } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, 2); } } /*@egen*/)*/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); } } /*@egen*/ } void UnionExpr() : {/*@bgen(jjtree) #UnionExpr(> 1) */ SimpleNode jjtn000 = new SimpleNode(this, JJTUNIONEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) #UnionExpr(> 1) */ try { /*@egen*/ IntersectExceptExpr() (("union"{ binaryTokenStack.push(token); } | "|"{ binaryTokenStack.push(token); }) IntersectExceptExpr()/*@bgen(jjtree) #UnionExpr( 2) */ { SimpleNode jjtn001 = new SimpleNode(this, JJTUNIONEXPR); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn001, 2); jjtc001 = false; } /*@egen*/ { try { processToken(jjtn001, (Token)binaryTokenStack.pop()); } catch(java.util.EmptyStackException e) { token_source.printLinePos(); e.printStackTrace(); throw e; } }/*@bgen(jjtree)*/ } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, 2); } } /*@egen*/)*/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); } } /*@egen*/ } void IntersectExceptExpr() : {/*@bgen(jjtree) #IntersectExceptExpr(> 1) */ SimpleNode jjtn000 = new SimpleNode(this, JJTINTERSECTEXCEPTEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) #IntersectExceptExpr(> 1) */ try { /*@egen*/ InstanceofExpr() (("intersect"{ binaryTokenStack.push(token); } | "except"{ binaryTokenStack.push(token); }) InstanceofExpr()/*@bgen(jjtree) #IntersectExceptExpr( 2) */ { SimpleNode jjtn001 = new SimpleNode(this, JJTINTERSECTEXCEPTEXPR); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn001, 2); jjtc001 = false; } /*@egen*/ { try { processToken(jjtn001, (Token)binaryTokenStack.pop()); } catch(java.util.EmptyStackException e) { token_source.printLinePos(); e.printStackTrace(); throw e; } }/*@bgen(jjtree)*/ } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, 2); } } /*@egen*/)*/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); } } /*@egen*/ } void InstanceofExpr() : {/*@bgen(jjtree) #InstanceofExpr(> 1) */ SimpleNode jjtn000 = new SimpleNode(this, JJTINSTANCEOFEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) #InstanceofExpr(> 1) */ try { /*@egen*/ TreatExpr() ( "instance" "of" SequenceType())?/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); } } /*@egen*/ } void TreatExpr() : {/*@bgen(jjtree) #TreatExpr(> 1) */ SimpleNode jjtn000 = new SimpleNode(this, JJTTREATEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) #TreatExpr(> 1) */ try { /*@egen*/ CastableExpr() ( "treat" "as" SequenceType())?/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); } } /*@egen*/ } void CastableExpr() : {/*@bgen(jjtree) #CastableExpr(> 1) */ SimpleNode jjtn000 = new SimpleNode(this, JJTCASTABLEEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) #CastableExpr(> 1) */ try { /*@egen*/ CastExpr() ( "castable" "as" SingleType())?/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); } } /*@egen*/ } void CastExpr() : {/*@bgen(jjtree) #CastExpr(> 1) */ SimpleNode jjtn000 = new SimpleNode(this, JJTCASTEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) #CastExpr(> 1) */ try { /*@egen*/ UnaryExpr() ( "cast" "as" SingleType())?/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); } } /*@egen*/ } void UnaryExpr() : {/*@bgen(jjtree) #UnaryExpr( keepUnary) */ SimpleNode jjtn000 = new SimpleNode(this, JJTUNARYEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/boolean keepUnary=false;} {/*@bgen(jjtree) #UnaryExpr( keepUnary) */ try { /*@egen*/ (/*@bgen(jjtree) #Minus( true) */ { SimpleNode jjtn001 = new SimpleNode(this, JJTMINUS); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn001, true); jjtc001 = false; } /*@egen*/{keepUnary=true;processToken(jjtn001, token);}/*@bgen(jjtree)*/ } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, true); } } /*@egen*/ | /*@bgen(jjtree) #Plus( true) */ { SimpleNode jjtn002 = new SimpleNode(this, JJTPLUS); boolean jjtc002 = true; jjtree.openNodeScope(jjtn002); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn002, true); jjtc002 = false; } /*@egen*/{keepUnary=true;processToken(jjtn002, token);}/*@bgen(jjtree)*/ } finally { if (jjtc002) { jjtree.closeNodeScope(jjtn002, true); } } /*@egen*/)* ValueExpr()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, keepUnary); } } /*@egen*/ } void ValueExpr() : {} { PathExpr() } void GeneralComp() : {} { ("="{ binaryTokenStack.push(token); } | "!="{ binaryTokenStack.push(token); } | {/* Careful! */ token_source.SwitchTo(DEFAULT); token_source.stateStack.pop(); } {binaryTokenStack.push(token);} | "<="{ binaryTokenStack.push(token); } | ">"{ binaryTokenStack.push(token); } | ">="{ binaryTokenStack.push(token); }) } void ValueComp() : {} { ("eq"{ binaryTokenStack.push(token); } | "ne"{ binaryTokenStack.push(token); } | "lt"{ binaryTokenStack.push(token); } | "le"{ binaryTokenStack.push(token); } | "gt"{ binaryTokenStack.push(token); } | "ge"{ binaryTokenStack.push(token); }) } void NodeComp() : {} { ("is"{ binaryTokenStack.push(token); } | "<<"{ binaryTokenStack.push(token); } | ">>"{ binaryTokenStack.push(token); }) } void PathExpr() : {/*@bgen(jjtree) #PathExpr(> 1) */ SimpleNode jjtn000 = new SimpleNode(this, JJTPATHEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) #PathExpr(> 1) */ try { /*@egen*/ ( ( /*@bgen(jjtree) #Slash( true) */ { SimpleNode jjtn001 = new SimpleNode(this, JJTSLASH); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn001, true); jjtc001 = false; } /*@egen*/{processToken(jjtn001, token);}/*@bgen(jjtree)*/ } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, true); } } /*@egen*/ [LOOKAHEAD(1) RelativePathExpr()]) | ( /*@bgen(jjtree) #SlashSlash( true) */ { SimpleNode jjtn002 = new SimpleNode(this, JJTSLASHSLASH); boolean jjtc002 = true; jjtree.openNodeScope(jjtn002); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn002, true); jjtc002 = false; } /*@egen*/{processToken(jjtn002, token);}/*@bgen(jjtree)*/ } finally { if (jjtc002) { jjtree.closeNodeScope(jjtn002, true); } } /*@egen*/ RelativePathExpr()) | RelativePathExpr())/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); } } /*@egen*/ } void RelativePathExpr() : {} { StepExpr() (({processToken(((SimpleNode)jjtree.peekNode()), token);} | /*@bgen(jjtree) #SlashSlash( true) */ { SimpleNode jjtn001 = new SimpleNode(this, JJTSLASHSLASH); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn001, true); jjtc001 = false; } /*@egen*/{processToken(jjtn001, token);}/*@bgen(jjtree)*/ } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, true); } } /*@egen*/) StepExpr())* } void StepExpr() : {/*@bgen(jjtree) #StepExpr(> 1 || isStep) */ SimpleNode jjtn000 = new SimpleNode(this, JJTSTEPEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/boolean savedIsStep = isStep; isStep=false;} {/*@bgen(jjtree) #StepExpr(> 1 || isStep) */ try { /*@egen*/ (LOOKAHEAD(3) FilterExpr()/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1 || isStep); jjtc000 = false; } /*@egen*/{isStep = savedIsStep;} | {isStep=true;}AxisStep()/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1 || isStep); jjtc000 = false; } /*@egen*/{isStep = savedIsStep;})/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1 || isStep); } } /*@egen*/ } void AxisStep() : {} { (LOOKAHEAD(2) ReverseStep() | ForwardStep()) PredicateList() } void ForwardStep() : {} { (LOOKAHEAD(2) ( ForwardAxis() NodeTest()) | AbbrevForwardStep()) } void ForwardAxis() : {/*@bgen(jjtree) ForwardAxis */ SimpleNode jjtn000 = new SimpleNode(this, JJTFORWARDAXIS); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) ForwardAxis */ try { /*@egen*/ ( ( "child"{jjtn000.processValue("child");} "::") | ( "descendant"{jjtn000.processValue("descendant");} "::") | ( "attribute"{jjtn000.processValue("attribute");} "::") | ( "self"{jjtn000.processValue("self");} "::") | ( "descendant-or-self"{jjtn000.processValue("descendant-or-self");} "::") | ( "following-sibling"{jjtn000.processValue("following-sibling");} "::") | ( "following"{jjtn000.processValue("following");} "::") | ( "namespace"{jjtn000.processValue("namespace");} "::"))/*@bgen(jjtree)*/ } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void AbbrevForwardStep() : {/*@bgen(jjtree) AbbrevForwardStep */ SimpleNode jjtn000 = new SimpleNode(this, JJTABBREVFORWARDSTEP); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) AbbrevForwardStep */ try { /*@egen*/ ["@"{jjtn000.processValue("@");}] NodeTest()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void ReverseStep() : {} { ( ( ReverseAxis() NodeTest()) | AbbrevReverseStep()) } void ReverseAxis() : {/*@bgen(jjtree) ReverseAxis */ SimpleNode jjtn000 = new SimpleNode(this, JJTREVERSEAXIS); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) ReverseAxis */ try { /*@egen*/ ( ( "parent"{jjtn000.processValue("parent");} "::") | ( "ancestor"{jjtn000.processValue("ancestor");} "::") | ( "preceding-sibling"{jjtn000.processValue("preceding-sibling");} "::") | ( "preceding"{jjtn000.processValue("preceding");} "::") | ( "ancestor-or-self"{jjtn000.processValue("ancestor-or-self");} "::"))/*@bgen(jjtree)*/ } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void AbbrevReverseStep() : {/*@bgen(jjtree) AbbrevReverseStep */ SimpleNode jjtn000 = new SimpleNode(this, JJTABBREVREVERSESTEP); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) AbbrevReverseStep */ try { /*@egen*/ ".."/*@bgen(jjtree)*/ } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void NodeTest() : {/*@bgen(jjtree) NodeTest */ SimpleNode jjtn000 = new SimpleNode(this, JJTNODETEST); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) NodeTest */ try { /*@egen*/ (LOOKAHEAD(2) KindTest() | NameTest())/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void NameTest() : {/*@bgen(jjtree) NameTest */ SimpleNode jjtn000 = new SimpleNode(this, JJTNAMETEST); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) NameTest */ try { /*@egen*/ (QName() | Wildcard())/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void Wildcard() : {/*@bgen(jjtree) Wildcard */ SimpleNode jjtn000 = new SimpleNode(this, JJTWILDCARD); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) Wildcard */ try { /*@egen*/ ("*"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("*");} | /*@bgen(jjtree) #NCNameColonStar( true) */ { SimpleNode jjtn001 = new SimpleNode(this, JJTNCNAMECOLONSTAR); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn001, true); jjtc001 = false; } /*@egen*/{processToken(jjtn001, token);}/*@bgen(jjtree)*/ } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, true); } } /*@egen*/ | /*@bgen(jjtree) #StarColonNCName( true) */ { SimpleNode jjtn002 = new SimpleNode(this, JJTSTARCOLONNCNAME); boolean jjtc002 = true; jjtree.openNodeScope(jjtn002); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn002, true); jjtc002 = false; } /*@egen*/{processToken(jjtn002, token);}/*@bgen(jjtree)*/ } finally { if (jjtc002) { jjtree.closeNodeScope(jjtn002, true); } } /*@egen*/)/*@bgen(jjtree)*/ } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void FilterExpr() : {} { PrimaryExpr() PredicateList() } void PredicateList() : {/*@bgen(jjtree) #PredicateList(> 0) */ SimpleNode jjtn000 = new SimpleNode(this, JJTPREDICATELIST); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) #PredicateList(> 0) */ try { /*@egen*/ (Predicate())*/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 0); } } /*@egen*/ } void Predicate() : {/*@bgen(jjtree) #Predicate(> 0) */ SimpleNode jjtn000 = new SimpleNode(this, JJTPREDICATE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) #Predicate(> 0) */ try { /*@egen*/ "[" Expr() "]"/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 0); } } /*@egen*/ } void PrimaryExpr() : {} { (Literal() | VarRef() | ParenthesizedExpr() | {isStep=true;}ContextItemExpr() | LOOKAHEAD(2) FunctionCall()) } void Literal() : {} { (NumericLiteral() | /*@bgen(jjtree) #StringLiteral( true) */ { SimpleNode jjtn001 = new SimpleNode(this, JJTSTRINGLITERAL); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn001, true); jjtc001 = false; } /*@egen*/{processToken(jjtn001, token);}/*@bgen(jjtree)*/ } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, true); } } /*@egen*/) } void NumericLiteral() : {} { (/*@bgen(jjtree) #IntegerLiteral( true) */ { SimpleNode jjtn001 = new SimpleNode(this, JJTINTEGERLITERAL); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn001, true); jjtc001 = false; } /*@egen*/{processToken(jjtn001, token);}/*@bgen(jjtree)*/ } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, true); } } /*@egen*/ | /*@bgen(jjtree) #DecimalLiteral( true) */ { SimpleNode jjtn002 = new SimpleNode(this, JJTDECIMALLITERAL); boolean jjtc002 = true; jjtree.openNodeScope(jjtn002); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn002, true); jjtc002 = false; } /*@egen*/{processToken(jjtn002, token);}/*@bgen(jjtree)*/ } finally { if (jjtc002) { jjtree.closeNodeScope(jjtn002, true); } } /*@egen*/ | /*@bgen(jjtree) #DoubleLiteral( true) */ { SimpleNode jjtn003 = new SimpleNode(this, JJTDOUBLELITERAL); boolean jjtc003 = true; jjtree.openNodeScope(jjtn003); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn003, true); jjtc003 = false; } /*@egen*/{processToken(jjtn003, token);}/*@bgen(jjtree)*/ } finally { if (jjtc003) { jjtree.closeNodeScope(jjtn003, true); } } /*@egen*/) } void VarRef() : {} { "$" VarName() } void VarName() : {/*@bgen(jjtree) VarName */ SimpleNode jjtn000 = new SimpleNode(this, JJTVARNAME); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) VarName */ try { /*@egen*/ QName()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void ParenthesizedExpr() : {/*@bgen(jjtree) ParenthesizedExpr */ SimpleNode jjtn000 = new SimpleNode(this, JJTPARENTHESIZEDEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) ParenthesizedExpr */ try { /*@egen*/ "(" [Expr()] ")"/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void ContextItemExpr() : {/*@bgen(jjtree) ContextItemExpr */ SimpleNode jjtn000 = new SimpleNode(this, JJTCONTEXTITEMEXPR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) ContextItemExpr */ try { /*@egen*/ "."/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue(".");}/*@bgen(jjtree)*/ } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void FunctionCall() : {/*@bgen(jjtree) FunctionCall */ SimpleNode jjtn000 = new SimpleNode(this, JJTFUNCTIONCALL); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) FunctionCall */ try { /*@egen*/ FunctionQName() "(" [ExprSingle() ("," ExprSingle())*] ")"/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void SingleType() : {/*@bgen(jjtree) SingleType */ SimpleNode jjtn000 = new SimpleNode(this, JJTSINGLETYPE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SingleType */ try { /*@egen*/ AtomicType() ["?"{jjtn000.processValue("?");}]/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void SequenceType() : {/*@bgen(jjtree) SequenceType */ SimpleNode jjtn000 = new SimpleNode(this, JJTSEQUENCETYPE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SequenceType */ try { /*@egen*/ (LOOKAHEAD(2) ( "empty-sequence"{jjtn000.processValue("empty-sequence");} "(" ")") | ( ItemType() [LOOKAHEAD(1) OccurrenceIndicator()]))/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void OccurrenceIndicator() : {/*@bgen(jjtree) OccurrenceIndicator */ SimpleNode jjtn000 = new SimpleNode(this, JJTOCCURRENCEINDICATOR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) OccurrenceIndicator */ try { /*@egen*/ ("?"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("?");} | "*"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("*");} | /*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{processToken(((SimpleNode)jjtree.peekNode()), token);})/*@bgen(jjtree)*/ } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void ItemType() : {/*@bgen(jjtree) ItemType */ SimpleNode jjtn000 = new SimpleNode(this, JJTITEMTYPE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) ItemType */ try { /*@egen*/ (LOOKAHEAD(2) KindTest() | LOOKAHEAD(2) ( "item"{jjtn000.processValue("item");} "(" ")") | AtomicType())/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void AtomicType() : {/*@bgen(jjtree) AtomicType */ SimpleNode jjtn000 = new SimpleNode(this, JJTATOMICTYPE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) AtomicType */ try { /*@egen*/ QName()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void KindTest() : {} { (DocumentTest() | ElementTest() | AttributeTest() | SchemaElementTest() | SchemaAttributeTest() | PITest() | CommentTest() | TextTest() | AnyKindTest()) } void AnyKindTest() : {/*@bgen(jjtree) AnyKindTest */ SimpleNode jjtn000 = new SimpleNode(this, JJTANYKINDTEST); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) AnyKindTest */ try { /*@egen*/ "node" "(" ")"/*@bgen(jjtree)*/ } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void DocumentTest() : {/*@bgen(jjtree) DocumentTest */ SimpleNode jjtn000 = new SimpleNode(this, JJTDOCUMENTTEST); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) DocumentTest */ try { /*@egen*/ "document-node" "(" [(ElementTest() | SchemaElementTest())] ")"/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void TextTest() : {/*@bgen(jjtree) TextTest */ SimpleNode jjtn000 = new SimpleNode(this, JJTTEXTTEST); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) TextTest */ try { /*@egen*/ "text" "(" ")"/*@bgen(jjtree)*/ } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void CommentTest() : {/*@bgen(jjtree) CommentTest */ SimpleNode jjtn000 = new SimpleNode(this, JJTCOMMENTTEST); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) CommentTest */ try { /*@egen*/ "comment" "(" ")"/*@bgen(jjtree)*/ } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void PITest() : {/*@bgen(jjtree) PITest */ SimpleNode jjtn000 = new SimpleNode(this, JJTPITEST); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) PITest */ try { /*@egen*/ "processing-instruction" "(" [(NCName() | /*@bgen(jjtree) #StringLiteral( true) */ { SimpleNode jjtn001 = new SimpleNode(this, JJTSTRINGLITERAL); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn001, true); jjtc001 = false; } /*@egen*/{processToken(jjtn001, token);}/*@bgen(jjtree)*/ } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, true); } } /*@egen*/)] ")"/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void AttributeTest() : {/*@bgen(jjtree) AttributeTest */ SimpleNode jjtn000 = new SimpleNode(this, JJTATTRIBUTETEST); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) AttributeTest */ try { /*@egen*/ "attribute" "(" [ ( AttribNameOrWildcard() ["," TypeName()])] ")"/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void AttribNameOrWildcard() : {/*@bgen(jjtree) AttribNameOrWildcard */ SimpleNode jjtn000 = new SimpleNode(this, JJTATTRIBNAMEORWILDCARD); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) AttribNameOrWildcard */ try { /*@egen*/ (AttributeName() | "*"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("*");})/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void SchemaAttributeTest() : {/*@bgen(jjtree) SchemaAttributeTest */ SimpleNode jjtn000 = new SimpleNode(this, JJTSCHEMAATTRIBUTETEST); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SchemaAttributeTest */ try { /*@egen*/ "schema-attribute" "(" AttributeDeclaration() ")"/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void AttributeDeclaration() : {/*@bgen(jjtree) AttributeDeclaration */ SimpleNode jjtn000 = new SimpleNode(this, JJTATTRIBUTEDECLARATION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) AttributeDeclaration */ try { /*@egen*/ AttributeName()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void ElementTest() : {/*@bgen(jjtree) ElementTest */ SimpleNode jjtn000 = new SimpleNode(this, JJTELEMENTTEST); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) ElementTest */ try { /*@egen*/ "element" "(" [ ( ElementNameOrWildcard() ["," TypeName() ["?"{jjtn000.processValue("?");}]])] ")"/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void ElementNameOrWildcard() : {/*@bgen(jjtree) ElementNameOrWildcard */ SimpleNode jjtn000 = new SimpleNode(this, JJTELEMENTNAMEORWILDCARD); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) ElementNameOrWildcard */ try { /*@egen*/ (ElementName() | "*"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("*");})/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void SchemaElementTest() : {/*@bgen(jjtree) SchemaElementTest */ SimpleNode jjtn000 = new SimpleNode(this, JJTSCHEMAELEMENTTEST); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) SchemaElementTest */ try { /*@egen*/ "schema-element" "(" ElementDeclaration() ")"/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void ElementDeclaration() : {/*@bgen(jjtree) ElementDeclaration */ SimpleNode jjtn000 = new SimpleNode(this, JJTELEMENTDECLARATION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) ElementDeclaration */ try { /*@egen*/ ElementName()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void AttributeName() : {/*@bgen(jjtree) AttributeName */ SimpleNode jjtn000 = new SimpleNode(this, JJTATTRIBUTENAME); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) AttributeName */ try { /*@egen*/ QName()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void ElementName() : {/*@bgen(jjtree) ElementName */ SimpleNode jjtn000 = new SimpleNode(this, JJTELEMENTNAME); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) ElementName */ try { /*@egen*/ QName()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void TypeName() : {/*@bgen(jjtree) TypeName */ SimpleNode jjtn000 = new SimpleNode(this, JJTTYPENAME); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) TypeName */ try { /*@egen*/ QName()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void Pattern() : {/*@bgen(jjtree) Pattern */ SimpleNode jjtn000 = new SimpleNode(this, JJTPATTERN); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) Pattern */ try { /*@egen*/ PathPattern() [("union" | "|") Pattern()]/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void PathPattern() : {/*@bgen(jjtree) PathPattern */ SimpleNode jjtn000 = new SimpleNode(this, JJTPATHPATTERN); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) PathPattern */ try { /*@egen*/ ( ( /*@bgen(jjtree) #Slash( true) */ { SimpleNode jjtn001 = new SimpleNode(this, JJTSLASH); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn001, true); jjtc001 = false; } /*@egen*/{processToken(jjtn001, token);}/*@bgen(jjtree)*/ } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, true); } } /*@egen*/ [LOOKAHEAD(1) RelativePathPattern()]) | ( /*@bgen(jjtree) #SlashSlash( true) */ { SimpleNode jjtn002 = new SimpleNode(this, JJTSLASHSLASH); boolean jjtc002 = true; jjtree.openNodeScope(jjtn002); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn002, true); jjtc002 = false; } /*@egen*/{processToken(jjtn002, token);}/*@bgen(jjtree)*/ } finally { if (jjtc002) { jjtree.closeNodeScope(jjtn002, true); } } /*@egen*/ RelativePathPattern()) | RelativePathPattern())/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void RelativePathPattern() : {} { PatternStep() [({processToken(((SimpleNode)jjtree.peekNode()), token);} | /*@bgen(jjtree) #SlashSlash( true) */ { SimpleNode jjtn001 = new SimpleNode(this, JJTSLASHSLASH); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); } try { /*@egen*//*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn001, true); jjtc001 = false; } /*@egen*/{processToken(jjtn001, token);}/*@bgen(jjtree)*/ } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, true); } } /*@egen*/) RelativePathPattern()] } void PatternStep() : {/*@bgen(jjtree) PatternStep */ SimpleNode jjtn000 = new SimpleNode(this, JJTPATTERNSTEP); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) PatternStep */ try { /*@egen*/ [LOOKAHEAD(2) PatternAxis()] NodeTest() PredicateList()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void PatternAxis() : {/*@bgen(jjtree) PatternAxis */ SimpleNode jjtn000 = new SimpleNode(this, JJTPATTERNAXIS); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) PatternAxis */ try { /*@egen*/ ( ( "child"{jjtn000.processValue("child");} "::") | ( "attribute"{jjtn000.processValue("attribute");} "::") | "@")/*@bgen(jjtree)*/ } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void NCName() : {/*@bgen(jjtree) NCName */ SimpleNode jjtn000 = new SimpleNode(this, JJTNCNAME); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) NCName */ try { /*@egen*/ QName()/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void QName() : {/*@bgen(jjtree) QName */ SimpleNode jjtn000 = new SimpleNode(this, JJTQNAME); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) QName */ try { /*@egen*/ (FunctionQName() | "attribute"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("attribute");} | "comment"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("comment");} | "document-node"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("document-node");} | "element"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("element");} | "if"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("if");} | "item"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("item");} | "node"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("node");} | "processing-instruction"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("processing-instruction");} | "schema-attribute"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("schema-attribute");} | "schema-element"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("schema-element");} | "text"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("text");} | "empty-sequence"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("empty-sequence");})/*@bgen(jjtree)*/ } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { throw (RuntimeException)jjte000; } if (jjte000 instanceof ParseException) { throw (ParseException)jjte000; } throw (Error)jjte000; } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } /*@egen*/ } void FunctionQName() : {/*@bgen(jjtree) FunctionQName */ SimpleNode jjtn000 = new SimpleNode(this, JJTFUNCTIONQNAME); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); /*@egen*/} {/*@bgen(jjtree) FunctionQName */ try { /*@egen*/ (/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{processToken(((SimpleNode)jjtree.peekNode()), token);} | /*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{processToken(((SimpleNode)jjtree.peekNode()), token);} | "return"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("return");} | "for"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("for");} | "in"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("in");} | "some"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("some");} | "every"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("every");} | "satisfies"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("satisfies");} | "then"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("then");} | "else"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("else");} | "or"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("or");} | "and"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("and");} | "to"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("to");} | "div"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("div");} | "idiv"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; } /*@egen*/{jjtn000.processValue("idiv");} | "mod"/*@bgen(jjtree)*/ { jjtree.closeNodeScope(jjtn000, true); jjtc000 = false;