diff --git a/.classpath b/.classpath
index b4df3def3..61d3a4bd6 100644
--- a/.classpath
+++ b/.classpath
@@ -1,29 +1,13 @@
-
See also: org/apache/xalan/res/XSLTInfo.properties Semantics of the version string are identical to the Xerces project. DTMStringPool is an "interning" mechanism for strings. It will
* create a stable 1:1 mapping between a set of string values and a set of
* integer index values, so the integers can be used to reliably and
@@ -57,9 +57,7 @@
public class DTMStringPool
{
Vector m_intToString;
- static final int HASHPRIME=101;
- int[] m_hashStart=new int[HASHPRIME];
- IntVector m_hashChain;
+ Map m_stringToInt;
public static final int NULL=-1;
/**
@@ -70,7 +68,7 @@ public class DTMStringPool
public DTMStringPool(int chainSize)
{
m_intToString=new Vector();
- m_hashChain=new IntVector(chainSize);
+ m_stringToInt=new HashMap();
removeAllElements();
// -sb Add this to force empty strings to be index 0.
@@ -85,9 +83,7 @@ public DTMStringPool()
public void removeAllElements()
{
m_intToString.removeAllElements();
- for(int i=0;i How well we've achieved the goals will be measured by feedback from the
- "Xalan Language
+ * v.r[.dd| Dnn]".
+ * reduce_goto table. */
+ protected static final short[][] _reduce_table =
+ unpackFromStrings(new String[] {
+ "\000\307\000\004\003\003\001\001\000\002\001\001\000" +
+ "\070\004\307\006\120\010\127\011\117\012\101\013\075" +
+ "\014\104\015\063\016\111\017\145\020\113\021\125\022" +
+ "\073\023\121\024\143\025\123\026\136\027\146\030\134" +
+ "\031\107\032\072\033\106\034\147\047\150\050\116\052" +
+ "\100\053\077\001\001\000\026\035\016\036\007\037\006" +
+ "\040\031\041\025\042\023\043\052\044\010\047\051\054" +
+ "\021\001\001\000\002\001\001\000\002\001\001\000\002" +
+ "\001\001\000\002\001\001\000\020\040\031\041\304\042" +
+ "\023\043\052\044\010\047\051\054\021\001\001\000\002" +
+ "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
+ "\001\000\002\001\001\000\002\001\001\000\012\040\271" +
+ "\043\272\044\010\047\051\001\001\000\020\040\031\041" +
+ "\270\042\023\043\052\044\010\047\051\054\021\001\001" +
+ "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
+ "\002\001\001\000\002\001\001\000\002\001\001\000\006" +
+ "\007\053\045\262\001\001\000\002\001\001\000\002\001" +
+ "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+ "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
+ "\002\001\001\000\002\001\001\000\002\001\001\000\002" +
+ "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
+ "\001\000\002\001\001\000\006\007\053\045\055\001\001" +
+ "\000\006\007\053\045\250\001\001\000\070\004\132\006" +
+ "\120\010\127\011\117\012\101\013\075\014\104\015\063" +
+ "\016\111\017\145\020\113\021\125\022\073\023\121\024" +
+ "\143\025\123\026\136\027\146\030\134\031\107\032\072" +
+ "\033\106\034\147\047\150\050\116\052\100\053\077\001" +
+ "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+ "\000\024\011\117\026\136\027\247\030\134\033\106\034" +
+ "\147\047\153\052\100\053\077\001\001\000\002\001\001" +
+ "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
+ "\002\001\001\000\002\001\001\000\024\011\117\026\136" +
+ "\027\243\030\134\033\106\034\147\047\153\052\100\053" +
+ "\077\001\001\000\070\004\241\006\120\010\127\011\117" +
+ "\012\101\013\075\014\104\015\063\016\111\017\145\020" +
+ "\113\021\125\022\073\023\121\024\143\025\123\026\136" +
+ "\027\146\030\134\031\107\032\072\033\106\034\147\047" +
+ "\150\050\116\052\100\053\077\001\001\000\002\001\001" +
+ "\000\002\001\001\000\002\001\001\000\052\006\120\010" +
+ "\127\011\117\020\240\021\125\022\073\023\121\024\143" +
+ "\025\123\026\136\027\146\030\134\031\107\032\072\033" +
+ "\106\034\147\047\150\050\116\052\100\053\077\001\001" +
+ "\000\002\001\001\000\002\001\001\000\010\033\236\034" +
+ "\147\047\153\001\001\000\002\001\001\000\002\001\001" +
+ "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
+ "\002\001\001\000\006\007\053\045\214\001\001\000\002" +
+ "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
+ "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+ "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
+ "\006\007\053\045\177\001\001\000\002\001\001\000\002" +
+ "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
+ "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+ "\000\002\001\001\000\006\047\164\051\166\001\001\000" +
+ "\002\001\001\000\002\001\001\000\002\001\001\000\002" +
+ "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
+ "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+ "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
+ "\020\011\155\026\136\033\106\034\147\047\153\052\100" +
+ "\053\077\001\001\000\020\011\154\026\136\033\106\034" +
+ "\147\047\153\052\100\053\077\001\001\000\002\001\001" +
+ "\000\002\001\001\000\002\001\001\000\052\006\120\010" +
+ "\127\011\117\020\163\021\125\022\073\023\121\024\143" +
+ "\025\123\026\136\027\146\030\134\031\107\032\072\033" +
+ "\106\034\147\047\150\050\116\052\100\053\077\001\001" +
+ "\000\052\006\120\010\127\011\117\020\162\021\125\022" +
+ "\073\023\121\024\143\025\123\026\136\027\146\030\134" +
+ "\031\107\032\072\033\106\034\147\047\150\050\116\052" +
+ "\100\053\077\001\001\000\052\006\120\010\127\011\117" +
+ "\020\161\021\125\022\073\023\121\024\143\025\123\026" +
+ "\136\027\146\030\134\031\107\032\072\033\106\034\147" +
+ "\047\150\050\116\052\100\053\077\001\001\000\002\001" +
+ "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+ "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
+ "\002\001\001\000\024\011\117\026\136\027\174\030\134" +
+ "\033\106\034\147\047\153\052\100\053\077\001\001\000" +
+ "\024\011\117\026\136\027\173\030\134\033\106\034\147" +
+ "\047\153\052\100\053\077\001\001\000\002\001\001\000" +
+ "\002\001\001\000\050\006\120\010\127\011\117\021\125" +
+ "\022\073\023\121\024\176\025\123\026\136\027\146\030" +
+ "\134\031\107\032\072\033\106\034\147\047\150\050\116" +
+ "\052\100\053\077\001\001\000\002\001\001\000\002\001" +
+ "\001\000\074\004\203\005\202\006\120\010\127\011\117" +
+ "\012\101\013\075\014\104\015\063\016\111\017\145\020" +
+ "\113\021\125\022\073\023\121\024\143\025\123\026\136" +
+ "\027\146\030\134\031\107\032\072\033\106\034\147\046" +
+ "\204\047\150\050\116\052\100\053\077\001\001\000\002" +
+ "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
+ "\001\000\002\001\001\000\074\004\203\005\202\006\120" +
+ "\010\127\011\117\012\101\013\075\014\104\015\063\016" +
+ "\111\017\145\020\113\021\125\022\073\023\121\024\143" +
+ "\025\123\026\136\027\146\030\134\031\107\032\072\033" +
+ "\106\034\147\046\207\047\150\050\116\052\100\053\077" +
+ "\001\001\000\002\001\001\000\054\006\120\010\127\011" +
+ "\117\017\213\020\113\021\125\022\073\023\121\024\143" +
+ "\025\123\026\136\027\146\030\134\031\107\032\072\033" +
+ "\106\034\147\047\150\050\116\052\100\053\077\001\001" +
+ "\000\054\006\120\010\127\011\117\017\212\020\113\021" +
+ "\125\022\073\023\121\024\143\025\123\026\136\027\146" +
+ "\030\134\031\107\032\072\033\106\034\147\047\150\050" +
+ "\116\052\100\053\077\001\001\000\002\001\001\000\002" +
+ "\001\001\000\002\001\001\000\060\006\120\010\127\011" +
+ "\117\015\230\016\111\017\145\020\113\021\125\022\073" +
+ "\023\121\024\143\025\123\026\136\027\146\030\134\031" +
+ "\107\032\072\033\106\034\147\047\150\050\116\052\100" +
+ "\053\077\001\001\000\060\006\120\010\127\011\117\015" +
+ "\217\016\111\017\145\020\113\021\125\022\073\023\121" +
+ "\024\143\025\123\026\136\027\146\030\134\031\107\032" +
+ "\072\033\106\034\147\047\150\050\116\052\100\053\077" +
+ "\001\001\000\002\001\001\000\056\006\120\010\127\011" +
+ "\117\016\227\017\145\020\113\021\125\022\073\023\121" +
+ "\024\143\025\123\026\136\027\146\030\134\031\107\032" +
+ "\072\033\106\034\147\047\150\050\116\052\100\053\077" +
+ "\001\001\000\056\006\120\010\127\011\117\016\226\017" +
+ "\145\020\113\021\125\022\073\023\121\024\143\025\123" +
+ "\026\136\027\146\030\134\031\107\032\072\033\106\034" +
+ "\147\047\150\050\116\052\100\053\077\001\001\000\056" +
+ "\006\120\010\127\011\117\016\225\017\145\020\113\021" +
+ "\125\022\073\023\121\024\143\025\123\026\136\027\146" +
+ "\030\134\031\107\032\072\033\106\034\147\047\150\050" +
+ "\116\052\100\053\077\001\001\000\056\006\120\010\127" +
+ "\011\117\016\224\017\145\020\113\021\125\022\073\023" +
+ "\121\024\143\025\123\026\136\027\146\030\134\031\107" +
+ "\032\072\033\106\034\147\047\150\050\116\052\100\053" +
+ "\077\001\001\000\002\001\001\000\002\001\001\000\002" +
+ "\001\001\000\002\001\001\000\002\001\001\000\064\006" +
+ "\120\010\127\011\117\013\232\014\104\015\063\016\111" +
+ "\017\145\020\113\021\125\022\073\023\121\024\143\025" +
+ "\123\026\136\027\146\030\134\031\107\032\072\033\106" +
+ "\034\147\047\150\050\116\052\100\053\077\001\001\000" +
+ "\002\001\001\000\062\006\120\010\127\011\117\014\234" +
+ "\015\063\016\111\017\145\020\113\021\125\022\073\023" +
+ "\121\024\143\025\123\026\136\027\146\030\134\031\107" +
+ "\032\072\033\106\034\147\047\150\050\116\052\100\053" +
+ "\077\001\001\000\002\001\001\000\002\001\001\000\006" +
+ "\007\053\045\237\001\001\000\002\001\001\000\002\001" +
+ "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+ "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
+ "\002\001\001\000\002\001\001\000\002\001\001\000\002" +
+ "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
+ "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
+ "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
+ "\020\040\031\041\267\042\023\043\052\044\010\047\051" +
+ "\054\021\001\001\000\020\040\031\041\266\042\023\043" +
+ "\052\044\010\047\051\054\021\001\001\000\002\001\001" +
+ "\000\002\001\001\000\002\001\001\000\006\007\053\045" +
+ "\274\001\001\000\006\007\053\045\273\001\001\000\002" +
+ "\001\001\000\002\001\001\000\020\040\031\041\300\042" +
+ "\023\043\052\044\010\047\051\054\021\001\001\000\020" +
+ "\040\031\041\277\042\023\043\052\044\010\047\051\054" +
+ "\021\001\001\000\002\001\001\000\002\001\001\000\002" +
+ "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
+ "\001\000\026\035\016\036\306\037\006\040\031\041\025" +
+ "\042\023\043\052\044\010\047\051\054\021\001\001\000" +
+ "\002\001\001\000\002\001\001\000\002\001\001" });
+
+ /** Access to reduce_goto table. */
+ public short[][] reduce_table() {return _reduce_table;}
+
+ /** Instance of action encapsulation class. */
+ protected CUP$XPathParser$actions action_obj;
+
+ /** Action encapsulation object initializer. */
+ protected void init_actions()
+ {
+ action_obj = new CUP$XPathParser$actions(this);
+ }
+
+ /** Invoke a user supplied parse action. */
+ public java_cup.runtime.Symbol do_action(
+ int act_num,
+ java_cup.runtime.lr_parser parser,
+ java.util.Stack stack,
+ int top)
+ throws java.lang.Exception
+ {
+ /* call code in generated class */
+ return action_obj.CUP$XPathParser$do_action(act_num, parser, stack, top);
+ }
+
+ /** Indicates start state. */
+ public int start_state() {return 0;}
+ /** Indicates start production. */
+ public int start_production() {return 0;}
+
+ /** EOF Symbol index. */
+ public int EOF_sym() {return 0;}
+
+ /** error Symbol index. */
+ public int error_sym() {return 1;}
+
+
+
+ /**
+ * Used by function calls with no args.
+ */
+ static public final Vector EmptyArgs = new Vector(0);
+
+ /**
+ * Reference to non-existing variable.
+ */
+ static public final VariableRef DummyVarRef = null;
+
+ /**
+ * Reference to the Parser class.
+ */
+ private Parser _parser;
+ private XSLTC _xsltc;
+
+ /**
+ * String representation of the expression being parsed.
+ */
+ private String _expression;
+
+ /**
+ * Line number where this expression/pattern was declared.
+ */
+ private int _lineNumber = 0;
+
+ /**
+ * Reference to the symbol table.
+ */
+ public SymbolTable _symbolTable;
+
+ public XPathParser(Parser parser) {
+ _parser = parser;
+ _xsltc = parser.getXSLTC();
+ _symbolTable = parser.getSymbolTable();
+ }
+
+ public int getLineNumber() {
+ return _lineNumber;
+ }
+
+ public QName getQNameIgnoreDefaultNs(String name) {
+ return _parser.getQNameIgnoreDefaultNs(name);
+ }
+
+ public QName getQName(String namespace, String prefix, String localname) {
+ return _parser.getQName(namespace, prefix, localname);
+ }
+
+ public void setMultiDocument(boolean flag) {
+ _xsltc.setMultiDocument(flag);
+ }
+
+ public void setCallsNodeset(boolean flag) {
+ _xsltc.setCallsNodeset(flag);
+ }
+
+ public void setHasIdCall(boolean flag) {
+ _xsltc.setHasIdCall(flag);
+ }
+
+
+ /**
+ * This method is similar to findNodeType(int, Object) except that it
+ * creates a StepPattern instead of just returning a node type. It also
+ * differs in the way it handles "{uri}:*" and "{uri}:@*". The last two
+ * patterns are expanded as "*[namespace-uri() = 'uri']" and
+ * "@*[namespace-uri() = 'uri']", respectively. This expansion considerably
+ * simplifies the grouping of patterns in the Mode class. For this
+ * expansion to be correct, the priority of the pattern/template must be
+ * set to -0.25 (when no other predicates are present).
+ */
+ public StepPattern createStepPattern(int axis, Object test, Vector predicates) {
+ int nodeType;
+
+ if (test == null) { // "*"
+ nodeType = (axis == Axis.ATTRIBUTE) ? NodeTest.ATTRIBUTE :
+ (axis == Axis.NAMESPACE) ? -1 : NodeTest.ELEMENT;
+
+ return new StepPattern(axis, nodeType, predicates);
+ }
+ else if (test instanceof Integer) {
+ nodeType = ((Integer) test).intValue();
+
+ return new StepPattern(axis, nodeType, predicates);
+ }
+ else {
+ QName name = (QName)test;
+ boolean setPriority = false;
+
+ if (axis == Axis.NAMESPACE) {
+ nodeType = (name.toString().equals("*")) ? -1
+ : _xsltc.registerNamespacePrefix(name);;
+ }
+ else {
+ final String uri = name.getNamespace();
+ final String local = name.getLocalPart();
+ final QName namespace_uri =
+ _parser.getQNameIgnoreDefaultNs("namespace-uri");
+
+ // Expand {uri}:* to *[namespace-uri() = 'uri'] - same for @*
+ if (uri != null && (local.equals("*") || local.equals("@*"))) {
+ if (predicates == null) {
+ predicates = new Vector(2);
+ }
+
+ // Priority is set by hand if no other predicates exist
+ setPriority = (predicates.size() == 0);
+
+ predicates.add(
+ new Predicate(
+ new EqualityExpr(Operators.EQ,
+ new NamespaceUriCall(namespace_uri),
+ new LiteralExpr(uri))));
+ }
+
+ if (local.equals("*")) {
+ nodeType = (axis == Axis.ATTRIBUTE) ? NodeTest.ATTRIBUTE
+ : NodeTest.ELEMENT;
+ }
+ else if (local.equals("@*")) {
+ nodeType = NodeTest.ATTRIBUTE;
+ }
+ else {
+ nodeType = (axis == Axis.ATTRIBUTE) ? _xsltc.registerAttribute(name)
+ : _xsltc.registerElement(name);
+ }
+ }
+
+ final StepPattern result = new StepPattern(axis, nodeType, predicates);
+
+ // Set priority for case prefix:* and prefix:@* (no predicates)
+ if (setPriority) {
+ result.setPriority(-0.25);
+ }
+
+ return result;
+ }
+ }
+
+ public int findNodeType(int axis, Object test) {
+ if (test == null) { // *
+ return (axis == Axis.ATTRIBUTE) ?
+ NodeTest.ATTRIBUTE :
+ (axis == Axis.NAMESPACE) ? -1 : NodeTest.ELEMENT;
+ }
+ else if (test instanceof Integer) {
+ return ((Integer)test).intValue();
+ }
+ else {
+ QName name = (QName)test;
+
+ if (axis == Axis.NAMESPACE) {
+ return (name.toString().equals("*")) ? -1
+ : _xsltc.registerNamespacePrefix(name);
+ }
+
+ if (name.getNamespace() == null) {
+ final String local = name.getLocalPart();
+
+ if (local.equals("*")) {
+ return (axis == Axis.ATTRIBUTE) ? NodeTest.ATTRIBUTE
+ : NodeTest.ELEMENT;
+ }
+ else if (local.equals("@*")) {
+ return NodeTest.ATTRIBUTE;
+ }
+ }
+
+ return (axis == Axis.ATTRIBUTE) ? _xsltc.registerAttribute(name)
+ : _xsltc.registerElement(name);
+ }
+ }
+
+ /**
+ * Parse the expression passed to the current scanner. If this
+ * expression contains references to local variables and it will be
+ * compiled in an external module (not in the main class) request
+ * the current template to create a new variable stack frame.
+ *
+ * @param lineNumber Line where the current expression is defined.
+ * @param external Set to true if this expression is
+ * compiled in a separate module.
+ *
+ */
+ public Symbol parse(String expression, int lineNumber) throws Exception {
+ try {
+ _expression = expression;
+ _lineNumber = lineNumber;
+ return super.parse();
+ }
+ catch (IllegalCharException e) {
+ ErrorMsg err = new ErrorMsg(ErrorMsg.ILLEGAL_CHAR_ERR,
+ lineNumber, e.getMessage());
+ _parser.reportError(Constants.FATAL, err);
+ }
+ return null;
+ }
+
+ /**
+ * Lookup a variable or parameter in the symbol table given its name.
+ *
+ * @param name Name of the symbol being looked up.
+ */
+ final SyntaxTreeNode lookupName(QName name) {
+ // Is it a local var or param ?
+ final SyntaxTreeNode result = _parser.lookupVariable(name);
+ if (result != null)
+ return(result);
+ else
+ return(_symbolTable.lookupName(name));
+ }
+
+ public final void addError(ErrorMsg error) {
+ _parser.reportError(Constants.ERROR, error);
+ }
+
+ public void report_error(String message, Object info) {
+ final ErrorMsg err = new ErrorMsg(ErrorMsg.SYNTAX_ERR, _lineNumber,
+ _expression);
+ _parser.reportError(Constants.FATAL, err);
+ }
+
+ public void report_fatal_error(String message, Object info) {
+ // empty
+ }
+
+ public RelativeLocationPath insertStep(Step step, RelativeLocationPath rlp) {
+ if (rlp instanceof Step) {
+ return new ParentLocationPath(step, (Step) rlp);
+ }
+ else if (rlp instanceof ParentLocationPath) {
+ final ParentLocationPath plp = (ParentLocationPath) rlp;
+ final RelativeLocationPath newrlp = insertStep(step, plp.getPath());
+ return new ParentLocationPath(newrlp, plp.getStep());
+ }
+ else {
+ addError(new ErrorMsg(ErrorMsg.INTERNAL_ERR, "XPathParser.insertStep"));
+ return rlp;
+ }
+ }
+
+ /**
+ * Returns true if the axis applies to elements only. The axes
+ * child, attribute, namespace, descendant result in non-empty
+ * nodesets only if the context node is of type element.
+ */
+ public boolean isElementAxis(int axis) {
+ return (axis == Axis.CHILD || axis == Axis.ATTRIBUTE ||
+ axis == Axis.NAMESPACE || axis == Axis.DESCENDANT);
+ }
+
+}
+
+/** Cup generated class to encapsulate user supplied action code.*/
+class CUP$XPathParser$actions {
+ private final XPathParser parser;
+
+ /** Constructor */
+ CUP$XPathParser$actions(XPathParser parser) {
+ this.parser = parser;
+ }
+
+ /** Method with the actual generated action code. */
+ public final java_cup.runtime.Symbol CUP$XPathParser$do_action(
+ int CUP$XPathParser$act_num,
+ java_cup.runtime.lr_parser CUP$XPathParser$parser,
+ java.util.Stack CUP$XPathParser$stack,
+ int CUP$XPathParser$top)
+ throws java.lang.Exception
+ {
+ /* Symbol object for return from actions */
+ java_cup.runtime.Symbol CUP$XPathParser$result;
+
+ /* select the action based on the action number */
+ switch (CUP$XPathParser$act_num)
+ {
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 140: // QName ::= ID
+ {
+ QName RESULT = null;
+ RESULT = parser.getQNameIgnoreDefaultNs("id");
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 139: // QName ::= SELF
+ {
+ QName RESULT = null;
+ RESULT = parser.getQNameIgnoreDefaultNs("self");
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 138: // QName ::= PRECEDINGSIBLING
+ {
+ QName RESULT = null;
+ RESULT = parser.getQNameIgnoreDefaultNs("preceding-sibling");
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 137: // QName ::= PRECEDING
+ {
+ QName RESULT = null;
+ RESULT = parser.getQNameIgnoreDefaultNs("preceding");
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 136: // QName ::= PARENT
+ {
+ QName RESULT = null;
+ RESULT = parser.getQNameIgnoreDefaultNs("parent");
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 135: // QName ::= NAMESPACE
+ {
+ QName RESULT = null;
+ RESULT = parser.getQNameIgnoreDefaultNs("namespace");
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 134: // QName ::= FOLLOWINGSIBLING
+ {
+ QName RESULT = null;
+ RESULT = parser.getQNameIgnoreDefaultNs("following-sibling");
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 133: // QName ::= FOLLOWING
+ {
+ QName RESULT = null;
+ RESULT = parser.getQNameIgnoreDefaultNs("following");
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 132: // QName ::= DESCENDANTORSELF
+ {
+ QName RESULT = null;
+ RESULT = parser.getQNameIgnoreDefaultNs("decendant-or-self");
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 131: // QName ::= DESCENDANT
+ {
+ QName RESULT = null;
+ RESULT = parser.getQNameIgnoreDefaultNs("decendant");
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 130: // QName ::= CHILD
+ {
+ QName RESULT = null;
+ RESULT = parser.getQNameIgnoreDefaultNs("child");
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 129: // QName ::= ATTRIBUTE
+ {
+ QName RESULT = null;
+ RESULT = parser.getQNameIgnoreDefaultNs("attribute");
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 128: // QName ::= ANCESTORORSELF
+ {
+ QName RESULT = null;
+ RESULT = parser.getQNameIgnoreDefaultNs("ancestor-or-self");
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 127: // QName ::= ANCESTOR
+ {
+ QName RESULT = null;
+ RESULT = parser.getQNameIgnoreDefaultNs("child");
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 126: // QName ::= KEY
+ {
+ QName RESULT = null;
+ RESULT = parser.getQNameIgnoreDefaultNs("key");
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 125: // QName ::= MOD
+ {
+ QName RESULT = null;
+ RESULT = parser.getQNameIgnoreDefaultNs("mod");
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 124: // QName ::= DIV
+ {
+ QName RESULT = null;
+ RESULT = parser.getQNameIgnoreDefaultNs("div");
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 123: // QName ::= QNAME
+ {
+ QName RESULT = null;
+ int qnameleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int qnameright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ String qname = (String)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = parser.getQNameIgnoreDefaultNs(qname);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 122: // NameTest ::= QName
+ {
+ Object RESULT = null;
+ int qnleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int qnright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ QName qn = (QName)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = qn;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(26/*NameTest*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 121: // NameTest ::= STAR
+ {
+ Object RESULT = null;
+ RESULT = null;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(26/*NameTest*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 120: // NodeTest ::= PI
+ {
+ Object RESULT = null;
+ RESULT = new Integer(NodeTest.PI);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(25/*NodeTest*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 119: // NodeTest ::= PIPARAM LPAREN Literal RPAREN
+ {
+ Object RESULT = null;
+ int lleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int lright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ String l = (String)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+
+ QName name = parser.getQNameIgnoreDefaultNs("name");
+ Expression exp = new EqualityExpr(Operators.EQ,
+ new NameCall(name),
+ new LiteralExpr(l));
+ Vector predicates = new Vector();
+ predicates.addElement(new Predicate(exp));
+ RESULT = new Step(Axis.CHILD, NodeTest.PI, predicates);
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(25/*NodeTest*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-3)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 118: // NodeTest ::= COMMENT
+ {
+ Object RESULT = null;
+ RESULT = new Integer(NodeTest.COMMENT);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(25/*NodeTest*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 117: // NodeTest ::= TEXT
+ {
+ Object RESULT = null;
+ RESULT = new Integer(NodeTest.TEXT);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(25/*NodeTest*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 116: // NodeTest ::= NODE
+ {
+ Object RESULT = null;
+ RESULT = new Integer(NodeTest.ANODE);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(25/*NodeTest*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 115: // NodeTest ::= NameTest
+ {
+ Object RESULT = null;
+ int ntleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ntright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Object nt = (Object)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = nt;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(25/*NodeTest*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 114: // Argument ::= Expr
+ {
+ Expression RESULT = null;
+ int exleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int exright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression ex = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = ex;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(3/*Argument*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 113: // VariableName ::= QName
+ {
+ QName RESULT = null;
+ int vnameleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int vnameright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ QName vname = (QName)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ RESULT = vname;
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(39/*VariableName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 112: // FunctionName ::= QName
+ {
+ QName RESULT = null;
+ int fnameleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int fnameright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ QName fname = (QName)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ RESULT = fname;
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(38/*FunctionName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 111: // NonemptyArgumentList ::= Argument COMMA NonemptyArgumentList
+ {
+ Vector RESULT = null;
+ int argleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int argright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression arg = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int arglleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int arglright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Vector argl = (Vector)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ argl.insertElementAt(arg, 0); RESULT = argl;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(36/*NonemptyArgumentList*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 110: // NonemptyArgumentList ::= Argument
+ {
+ Vector RESULT = null;
+ int argleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int argright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression arg = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ Vector temp = new Vector();
+ temp.addElement(arg);
+ RESULT = temp;
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(36/*NonemptyArgumentList*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 109: // FunctionCall ::= FunctionName LPAREN NonemptyArgumentList RPAREN
+ {
+ Expression RESULT = null;
+ int fnameleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-3)).left;
+ int fnameright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-3)).right;
+ QName fname = (QName)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-3)).value;
+ int arglleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int arglright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ Vector argl = (Vector)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+
+ if (parser.getQNameIgnoreDefaultNs("concat").equals(fname)) {
+ RESULT = new ConcatCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("number").equals(fname)) {
+ RESULT = new NumberCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("document").equals(fname)) {
+ parser.setMultiDocument(true);
+ RESULT = new DocumentCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("string").equals(fname)) {
+ RESULT = new StringCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("boolean").equals(fname)) {
+ RESULT = new BooleanCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("name").equals(fname)) {
+ RESULT = new NameCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("generate-id").equals(fname)) {
+ RESULT = new GenerateIdCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("not").equals(fname)) {
+ RESULT = new NotCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("format-number").equals(fname)) {
+ RESULT = new FormatNumberCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("unparsed-entity-uri").equals(fname)) {
+ RESULT = new UnparsedEntityUriCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("key").equals(fname)) {
+ RESULT = new KeyCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("id").equals(fname)) {
+ RESULT = new KeyCall(fname, argl);
+ parser.setHasIdCall(true);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("ceiling").equals(fname)) {
+ RESULT = new CeilingCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("round").equals(fname)) {
+ RESULT = new RoundCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("floor").equals(fname)) {
+ RESULT = new FloorCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("contains").equals(fname)) {
+ RESULT = new ContainsCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("string-length").equals(fname)) {
+ RESULT = new StringLengthCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("starts-with").equals(fname)) {
+ RESULT = new StartsWithCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("function-available").equals(fname)) {
+ RESULT = new FunctionAvailableCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("element-available").equals(fname)) {
+ RESULT = new ElementAvailableCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("local-name").equals(fname)) {
+ RESULT = new LocalNameCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("lang").equals(fname)) {
+ RESULT = new LangCall(fname, argl);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("namespace-uri").equals(fname)) {
+ RESULT = new NamespaceUriCall(fname, argl);
+ }
+ else if (parser.getQName(Constants.TRANSLET_URI, "xsltc", "cast").equals(fname)) {
+ RESULT = new CastCall(fname, argl);
+ }
+ // Special case for extension function nodeset()
+ else if (fname.getLocalPart().equals("nodeset") || fname.getLocalPart().equals("node-set")) {
+ parser.setCallsNodeset(true); // implies MultiDOM
+ RESULT = new FunctionCall(fname, argl);
+ }
+ else {
+ RESULT = new FunctionCall(fname, argl);
+ }
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(16/*FunctionCall*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-3)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 108: // FunctionCall ::= FunctionName LPAREN RPAREN
+ {
+ Expression RESULT = null;
+ int fnameleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int fnameright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ QName fname = (QName)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+
+
+ if (parser.getQNameIgnoreDefaultNs("current").equals(fname)) {
+ RESULT = new CurrentCall(fname);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("number").equals(fname)) {
+ RESULT = new NumberCall(fname, parser.EmptyArgs);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("string").equals(fname)) {
+ RESULT = new StringCall(fname, parser.EmptyArgs);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("concat").equals(fname)) {
+ RESULT = new ConcatCall(fname, parser.EmptyArgs);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("true").equals(fname)) {
+ RESULT = new BooleanExpr(true);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("false").equals(fname)) {
+ RESULT = new BooleanExpr(false);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("name").equals(fname)) {
+ RESULT = new NameCall(fname);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("generate-id").equals(fname)) {
+ RESULT = new GenerateIdCall(fname, parser.EmptyArgs);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("string-length").equals(fname)) {
+ RESULT = new StringLengthCall(fname, parser.EmptyArgs);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("position").equals(fname)) {
+ RESULT = new PositionCall(fname);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("last").equals(fname)) {
+ RESULT = new LastCall(fname);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("local-name").equals(fname)) {
+ RESULT = new LocalNameCall(fname);
+ }
+ else if (parser.getQNameIgnoreDefaultNs("namespace-uri").equals(fname)) {
+ RESULT = new NamespaceUriCall(fname);
+ }
+ else {
+ RESULT = new FunctionCall(fname, parser.EmptyArgs);
+ }
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(16/*FunctionCall*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 107: // VariableReference ::= DOLLAR VariableName
+ {
+ Expression RESULT = null;
+ int varNameleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int varNameright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ QName varName = (QName)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ // An empty qname prefix for a variable or parameter reference
+ // should map to the null namespace and not the default URI.
+ SyntaxTreeNode node = parser.lookupName(varName);
+
+ if (node != null) {
+ if (node instanceof Variable) {
+ RESULT = new VariableRef((Variable)node);
+ }
+ else if (node instanceof Param) {
+ RESULT = new ParameterRef((Param)node);
+ }
+ else {
+ RESULT = new UnresolvedRef(varName);
+ }
+ }
+
+ if (node == null) {
+ RESULT = new UnresolvedRef(varName);
+ }
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(15/*VariableReference*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 106: // PrimaryExpr ::= FunctionCall
+ {
+ Expression RESULT = null;
+ int fcleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int fcright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression fc = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = fc;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(17/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 105: // PrimaryExpr ::= REAL
+ {
+ Expression RESULT = null;
+ int numleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int numright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Double num = (Double)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new RealExpr(num.doubleValue());
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(17/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 104: // PrimaryExpr ::= INT
+ {
+ Expression RESULT = null;
+ int numleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int numright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Long num = (Long)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ long value = num.longValue();
+ if (value < Integer.MIN_VALUE || value > Integer.MAX_VALUE) {
+ RESULT = new RealExpr(value);
+ }
+ else {
+ if (num.doubleValue() == -0)
+ RESULT = new RealExpr(num.doubleValue());
+ else if (num.intValue() == 0)
+ RESULT = new IntExpr(num.intValue());
+ else if (num.doubleValue() == 0.0)
+ RESULT = new RealExpr(num.doubleValue());
+ else
+ RESULT = new IntExpr(num.intValue());
+ }
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(17/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 103: // PrimaryExpr ::= Literal
+ {
+ Expression RESULT = null;
+ int stringleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int stringright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ String string = (String)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ /*
+ * If the string appears to have the syntax of a QName, store
+ * namespace info in the literal expression. This is used for
+ * element-available and function-available functions, among
+ * others. Also, the default namespace must be ignored.
+ */
+ String namespace = null;
+ final int index = string.lastIndexOf(':');
+
+ if (index > 0) {
+ final String prefix = string.substring(0, index);
+ namespace = parser._symbolTable.lookupNamespace(prefix);
+ }
+ RESULT = (namespace == null) ? new LiteralExpr(string)
+ : new LiteralExpr(string, namespace);
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(17/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 102: // PrimaryExpr ::= LPAREN Expr RPAREN
+ {
+ Expression RESULT = null;
+ int exleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int exright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ Expression ex = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ RESULT = ex;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(17/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 101: // PrimaryExpr ::= VariableReference
+ {
+ Expression RESULT = null;
+ int vrleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int vrright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression vr = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = vr;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(17/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 100: // FilterExpr ::= PrimaryExpr Predicates
+ {
+ Expression RESULT = null;
+ int primaryleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int primaryright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ Expression primary = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ int ppleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ppright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Vector pp = (Vector)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new FilterExpr(primary, pp);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(6/*FilterExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 99: // FilterExpr ::= PrimaryExpr
+ {
+ Expression RESULT = null;
+ int primaryleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int primaryright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression primary = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = primary;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(6/*FilterExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 98: // AbbreviatedStep ::= DDOT
+ {
+ Expression RESULT = null;
+ RESULT = new Step(Axis.PARENT, NodeTest.ANODE, null);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(20/*AbbreviatedStep*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 97: // AbbreviatedStep ::= DOT
+ {
+ Expression RESULT = null;
+ RESULT = new Step(Axis.SELF, NodeTest.ANODE, null);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(20/*AbbreviatedStep*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 96: // AxisName ::= SELF
+ {
+ Integer RESULT = null;
+ RESULT = new Integer(Axis.SELF);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(40/*AxisName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 95: // AxisName ::= PRECEDINGSIBLING
+ {
+ Integer RESULT = null;
+ RESULT = new Integer(Axis.PRECEDINGSIBLING);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(40/*AxisName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 94: // AxisName ::= PRECEDING
+ {
+ Integer RESULT = null;
+ RESULT = new Integer(Axis.PRECEDING);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(40/*AxisName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 93: // AxisName ::= PARENT
+ {
+ Integer RESULT = null;
+ RESULT = new Integer(Axis.PARENT);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(40/*AxisName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 92: // AxisName ::= NAMESPACE
+ {
+ Integer RESULT = null;
+ RESULT = new Integer(Axis.NAMESPACE);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(40/*AxisName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 91: // AxisName ::= FOLLOWINGSIBLING
+ {
+ Integer RESULT = null;
+ RESULT = new Integer(Axis.FOLLOWINGSIBLING);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(40/*AxisName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 90: // AxisName ::= FOLLOWING
+ {
+ Integer RESULT = null;
+ RESULT = new Integer(Axis.FOLLOWING);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(40/*AxisName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 89: // AxisName ::= DESCENDANTORSELF
+ {
+ Integer RESULT = null;
+ RESULT = new Integer(Axis.DESCENDANTORSELF);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(40/*AxisName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 88: // AxisName ::= DESCENDANT
+ {
+ Integer RESULT = null;
+ RESULT = new Integer(Axis.DESCENDANT);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(40/*AxisName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 87: // AxisName ::= CHILD
+ {
+ Integer RESULT = null;
+ RESULT = new Integer(Axis.CHILD);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(40/*AxisName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 86: // AxisName ::= ATTRIBUTE
+ {
+ Integer RESULT = null;
+ RESULT = new Integer(Axis.ATTRIBUTE);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(40/*AxisName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 85: // AxisName ::= ANCESTORORSELF
+ {
+ Integer RESULT = null;
+ RESULT = new Integer(Axis.ANCESTORORSELF);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(40/*AxisName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 84: // AxisName ::= ANCESTOR
+ {
+ Integer RESULT = null;
+ RESULT = new Integer(Axis.ANCESTOR);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(40/*AxisName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 83: // AxisSpecifier ::= ATSIGN
+ {
+ Integer RESULT = null;
+ RESULT = new Integer(Axis.ATTRIBUTE);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(41/*AxisSpecifier*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 82: // AxisSpecifier ::= AxisName DCOLON
+ {
+ Integer RESULT = null;
+ int anleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int anright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ Integer an = (Integer)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ RESULT = an;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(41/*AxisSpecifier*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 81: // Step ::= AbbreviatedStep
+ {
+ Expression RESULT = null;
+ int abbrevleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int abbrevright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression abbrev = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = abbrev;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(7/*Step*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 80: // Step ::= AxisSpecifier NodeTest
+ {
+ Expression RESULT = null;
+ int axisleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int axisright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ Integer axis = (Integer)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ int ntestleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ntestright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Object ntest = (Object)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new Step(axis.intValue(),
+ parser.findNodeType(axis.intValue(), ntest),
+ null);
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(7/*Step*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 79: // Step ::= AxisSpecifier NodeTest Predicates
+ {
+ Expression RESULT = null;
+ int axisleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int axisright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Integer axis = (Integer)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int ntestleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int ntestright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ Object ntest = (Object)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ int ppleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ppright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Vector pp = (Vector)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new Step(axis.intValue(),
+ parser.findNodeType(axis.intValue(), ntest),
+ pp);
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(7/*Step*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 78: // Step ::= NodeTest Predicates
+ {
+ Expression RESULT = null;
+ int ntestleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int ntestright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ Object ntest = (Object)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ int ppleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ppright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Vector pp = (Vector)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ if (ntest instanceof Step) {
+ Step step = (Step)ntest;
+ step.addPredicates(pp);
+ RESULT = (Step)ntest;
+ }
+ else {
+ RESULT = new Step(Axis.CHILD,
+ parser.findNodeType(Axis.CHILD, ntest), pp);
+ }
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(7/*Step*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 77: // Step ::= NodeTest
+ {
+ Expression RESULT = null;
+ int ntestleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ntestright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Object ntest = (Object)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ if (ntest instanceof Step) {
+ RESULT = (Step)ntest;
+ }
+ else {
+ RESULT = new Step(Axis.CHILD,
+ parser.findNodeType(Axis.CHILD, ntest),
+ null);
+ }
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(7/*Step*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 76: // AbbreviatedAbsoluteLocationPath ::= DSLASH RelativeLocationPath
+ {
+ Expression RESULT = null;
+ int rlpleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int rlpright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression rlp = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ //
+ // Expand '//' into '/descendant-or-self::node()/' or
+ // into /descendant-or-self::*/
+ //
+ int nodeType = DOM.NO_TYPE;
+ if (rlp instanceof Step &&
+ parser.isElementAxis(((Step) rlp).getAxis()))
+ {
+ nodeType = DTM.ELEMENT_NODE;
+ }
+ final Step step = new Step(Axis.DESCENDANTORSELF, nodeType, null);
+ RESULT = new AbsoluteLocationPath(parser.insertStep(step,
+ (RelativeLocationPath) rlp));
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(24/*AbbreviatedAbsoluteLocationPath*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 75: // AbbreviatedRelativeLocationPath ::= RelativeLocationPath DSLASH Step
+ {
+ Expression RESULT = null;
+ int rlpleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int rlpright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression rlp = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int stepleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int stepright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression step = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ final Step right = (Step)step;
+ final int axis = right.getAxis();
+ final int type = right.getNodeType();
+ final Vector predicates = right.getPredicates();
+
+ if ((axis == Axis.CHILD) && (type != NodeTest.ATTRIBUTE)) {
+ // Compress './/child:E' into 'descendant::E' - if possible
+ if (predicates == null) {
+ right.setAxis(Axis.DESCENDANT);
+ if (rlp instanceof Step && ((Step)rlp).isAbbreviatedDot()) {
+ RESULT = right;
+ }
+ else {
+ // Expand 'rlp//child::E' into 'rlp/descendant::E'
+ RelativeLocationPath left = (RelativeLocationPath)rlp;
+ RESULT = new ParentLocationPath(left, right);
+ }
+ }
+ else {
+ // Expand './/step' -> 'descendant-or-self::*/step'
+ if (rlp instanceof Step && ((Step)rlp).isAbbreviatedDot()) {
+ Step left = new Step(Axis.DESCENDANTORSELF,
+ DTM.ELEMENT_NODE, null);
+ RESULT = new ParentLocationPath(left, right);
+ }
+ else {
+ // Expand 'rlp//step' -> 'rlp/descendant-or-self::*/step'
+ RelativeLocationPath left = (RelativeLocationPath)rlp;
+ Step mid = new Step(Axis.DESCENDANTORSELF,
+ DTM.ELEMENT_NODE, null);
+ ParentLocationPath ppl = new ParentLocationPath(mid, right);
+ RESULT = new ParentLocationPath(left, ppl);
+ }
+ }
+ }
+ else if ((axis == Axis.ATTRIBUTE) || (type == NodeTest.ATTRIBUTE)) {
+ // Expand 'rlp//step' -> 'rlp/descendant-or-self::*/step'
+ RelativeLocationPath left = (RelativeLocationPath)rlp;
+ Step middle = new Step(Axis.DESCENDANTORSELF,
+ DTM.ELEMENT_NODE, null);
+ ParentLocationPath ppl = new ParentLocationPath(middle, right);
+ RESULT = new ParentLocationPath(left, ppl);
+ }
+ else {
+ // Expand 'rlp//step' -> 'rlp/descendant-or-self::node()/step'
+ RelativeLocationPath left = (RelativeLocationPath)rlp;
+ Step middle = new Step(Axis.DESCENDANTORSELF,
+ DOM.NO_TYPE, null);
+ ParentLocationPath ppl = new ParentLocationPath(middle, right);
+ RESULT = new ParentLocationPath(left, ppl);
+ }
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(22/*AbbreviatedRelativeLocationPath*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 74: // AbsoluteLocationPath ::= AbbreviatedAbsoluteLocationPath
+ {
+ Expression RESULT = null;
+ int aalpleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int aalpright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression aalp = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = aalp;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(23/*AbsoluteLocationPath*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 73: // AbsoluteLocationPath ::= SLASH RelativeLocationPath
+ {
+ Expression RESULT = null;
+ int rlpleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int rlpright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression rlp = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new AbsoluteLocationPath(rlp);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(23/*AbsoluteLocationPath*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 72: // AbsoluteLocationPath ::= SLASH
+ {
+ Expression RESULT = null;
+ RESULT = new AbsoluteLocationPath();
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(23/*AbsoluteLocationPath*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 71: // RelativeLocationPath ::= AbbreviatedRelativeLocationPath
+ {
+ Expression RESULT = null;
+ int arlpleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int arlpright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression arlp = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = arlp;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(21/*RelativeLocationPath*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 70: // RelativeLocationPath ::= RelativeLocationPath SLASH Step
+ {
+ Expression RESULT = null;
+ int rlpleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int rlpright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression rlp = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int stepleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int stepright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression step = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ if (rlp instanceof Step && ((Step) rlp).isAbbreviatedDot()) {
+ RESULT = step; // Remove './' from the middle
+ }
+ else if (((Step) step).isAbbreviatedDot()) {
+ RESULT = rlp; // Remove '/.' from the end
+ }
+ else {
+ RESULT =
+ new ParentLocationPath((RelativeLocationPath) rlp, step);
+ }
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(21/*RelativeLocationPath*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 69: // RelativeLocationPath ::= Step
+ {
+ Expression RESULT = null;
+ int stepleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int stepright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression step = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = step;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(21/*RelativeLocationPath*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 68: // LocationPath ::= AbsoluteLocationPath
+ {
+ Expression RESULT = null;
+ int alpleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int alpright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression alp = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = alp;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(4/*LocationPath*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 67: // LocationPath ::= RelativeLocationPath
+ {
+ Expression RESULT = null;
+ int rlpleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int rlpright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression rlp = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = rlp;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(4/*LocationPath*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 66: // PathExpr ::= FilterExpr DSLASH RelativeLocationPath
+ {
+ Expression RESULT = null;
+ int fexpleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int fexpright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression fexp = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int rlpleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int rlpright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression rlp = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ //
+ // Expand '//' into '/descendant-or-self::node()/' or
+ // into /descendant-or-self::*/
+ //
+ int nodeType = DOM.NO_TYPE;
+ if (rlp instanceof Step &&
+ parser.isElementAxis(((Step) rlp).getAxis()))
+ {
+ nodeType = DTM.ELEMENT_NODE;
+ }
+ final Step step = new Step(Axis.DESCENDANTORSELF, nodeType, null);
+ FilterParentPath fpp = new FilterParentPath(fexp, step);
+ fpp = new FilterParentPath(fpp, rlp);
+ if (fexp instanceof KeyCall == false) {
+ fpp.setDescendantAxis();
+ }
+ RESULT = fpp;
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(19/*PathExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 65: // PathExpr ::= FilterExpr SLASH RelativeLocationPath
+ {
+ Expression RESULT = null;
+ int fexpleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int fexpright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression fexp = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int rlpleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int rlpright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression rlp = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new FilterParentPath(fexp, rlp);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(19/*PathExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 64: // PathExpr ::= FilterExpr
+ {
+ Expression RESULT = null;
+ int fexpleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int fexpright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression fexp = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = fexp;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(19/*PathExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 63: // PathExpr ::= LocationPath
+ {
+ Expression RESULT = null;
+ int lpleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int lpright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression lp = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = lp;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(19/*PathExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 62: // UnionExpr ::= PathExpr VBAR UnionExpr
+ {
+ Expression RESULT = null;
+ int peleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int peright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression pe = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int restleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int restright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression rest = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new UnionPathExpr(pe, rest);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(18/*UnionExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 61: // UnionExpr ::= PathExpr
+ {
+ Expression RESULT = null;
+ int peleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int peright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression pe = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = pe;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(18/*UnionExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 60: // UnaryExpr ::= MINUS UnaryExpr
+ {
+ Expression RESULT = null;
+ int ueleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ueright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression ue = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new UnaryOpExpr(ue);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(14/*UnaryExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 59: // UnaryExpr ::= UnionExpr
+ {
+ Expression RESULT = null;
+ int ueleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ueright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression ue = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = ue;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(14/*UnaryExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 58: // MultiplicativeExpr ::= MultiplicativeExpr MOD UnaryExpr
+ {
+ Expression RESULT = null;
+ int meleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int meright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression me = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int ueleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ueright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression ue = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new BinOpExpr(BinOpExpr.MOD, me, ue);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(13/*MultiplicativeExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 57: // MultiplicativeExpr ::= MultiplicativeExpr DIV UnaryExpr
+ {
+ Expression RESULT = null;
+ int meleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int meright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression me = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int ueleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ueright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression ue = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new BinOpExpr(BinOpExpr.DIV, me, ue);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(13/*MultiplicativeExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 56: // MultiplicativeExpr ::= MultiplicativeExpr MULT UnaryExpr
+ {
+ Expression RESULT = null;
+ int meleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int meright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression me = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int ueleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ueright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression ue = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new BinOpExpr(BinOpExpr.TIMES, me, ue);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(13/*MultiplicativeExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 55: // MultiplicativeExpr ::= UnaryExpr
+ {
+ Expression RESULT = null;
+ int ueleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ueright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression ue = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = ue;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(13/*MultiplicativeExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 54: // AdditiveExpr ::= AdditiveExpr MINUS MultiplicativeExpr
+ {
+ Expression RESULT = null;
+ int aeleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int aeright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression ae = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int meleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int meright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression me = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new BinOpExpr(BinOpExpr.MINUS, ae, me);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(12/*AdditiveExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 53: // AdditiveExpr ::= AdditiveExpr PLUS MultiplicativeExpr
+ {
+ Expression RESULT = null;
+ int aeleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int aeright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression ae = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int meleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int meright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression me = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new BinOpExpr(BinOpExpr.PLUS, ae, me);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(12/*AdditiveExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 52: // AdditiveExpr ::= MultiplicativeExpr
+ {
+ Expression RESULT = null;
+ int meleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int meright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression me = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = me;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(12/*AdditiveExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 51: // RelationalExpr ::= RelationalExpr GE AdditiveExpr
+ {
+ Expression RESULT = null;
+ int releft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int reright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression re = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int aeleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int aeright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression ae = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new RelationalExpr(Operators.GE, re, ae);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(11/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 50: // RelationalExpr ::= RelationalExpr LE AdditiveExpr
+ {
+ Expression RESULT = null;
+ int releft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int reright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression re = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int aeleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int aeright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression ae = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new RelationalExpr(Operators.LE, re, ae);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(11/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 49: // RelationalExpr ::= RelationalExpr GT AdditiveExpr
+ {
+ Expression RESULT = null;
+ int releft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int reright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression re = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int aeleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int aeright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression ae = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new RelationalExpr(Operators.GT, re, ae);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(11/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 48: // RelationalExpr ::= RelationalExpr LT AdditiveExpr
+ {
+ Expression RESULT = null;
+ int releft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int reright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression re = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int aeleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int aeright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression ae = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new RelationalExpr(Operators.LT, re, ae);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(11/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 47: // RelationalExpr ::= AdditiveExpr
+ {
+ Expression RESULT = null;
+ int aeleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int aeright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression ae = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = ae;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(11/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 46: // EqualityExpr ::= EqualityExpr NE RelationalExpr
+ {
+ Expression RESULT = null;
+ int eeleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int eeright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression ee = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int releft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int reright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression re = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new EqualityExpr(Operators.NE, ee, re);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(10/*EqualityExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 45: // EqualityExpr ::= EqualityExpr EQ RelationalExpr
+ {
+ Expression RESULT = null;
+ int eeleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int eeright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression ee = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int releft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int reright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression re = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new EqualityExpr(Operators.EQ, ee, re);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(10/*EqualityExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 44: // EqualityExpr ::= RelationalExpr
+ {
+ Expression RESULT = null;
+ int releft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int reright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression re = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = re;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(10/*EqualityExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 43: // AndExpr ::= AndExpr AND EqualityExpr
+ {
+ Expression RESULT = null;
+ int aeleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int aeright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression ae = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int eeleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int eeright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression ee = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new LogicalExpr(LogicalExpr.AND, ae, ee);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(9/*AndExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 42: // AndExpr ::= EqualityExpr
+ {
+ Expression RESULT = null;
+ int eleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int eright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression e = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = e;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(9/*AndExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 41: // OrExpr ::= OrExpr OR AndExpr
+ {
+ Expression RESULT = null;
+ int oeleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int oeright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Expression oe = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int aeleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int aeright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression ae = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new LogicalExpr(LogicalExpr.OR, oe, ae);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(8/*OrExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 40: // OrExpr ::= AndExpr
+ {
+ Expression RESULT = null;
+ int aeleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int aeright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression ae = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = ae;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(8/*OrExpr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 39: // Expr ::= OrExpr
+ {
+ Expression RESULT = null;
+ int exleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int exright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression ex = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = ex;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(2/*Expr*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 38: // Predicate ::= LBRACK Expr RBRACK
+ {
+ Expression RESULT = null;
+ int eleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int eright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ Expression e = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+
+ RESULT = new Predicate(e);
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(5/*Predicate*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 37: // Predicates ::= Predicate Predicates
+ {
+ Vector RESULT = null;
+ int pleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int pright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ Expression p = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ int ppleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ppright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Vector pp = (Vector)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ pp.insertElementAt(p, 0); RESULT = pp;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(35/*Predicates*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 36: // Predicates ::= Predicate
+ {
+ Vector RESULT = null;
+ int pleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int pright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression p = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ Vector temp = new Vector();
+ temp.addElement(p);
+ RESULT = temp;
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(35/*Predicates*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 35: // ChildOrAttributeAxisSpecifier ::= ATTRIBUTE DCOLON
+ {
+ Integer RESULT = null;
+ RESULT = new Integer(Axis.ATTRIBUTE);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(42/*ChildOrAttributeAxisSpecifier*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 34: // ChildOrAttributeAxisSpecifier ::= CHILD DCOLON
+ {
+ Integer RESULT = null;
+ RESULT = new Integer(Axis.CHILD);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(42/*ChildOrAttributeAxisSpecifier*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 33: // ChildOrAttributeAxisSpecifier ::= ATSIGN
+ {
+ Integer RESULT = null;
+ RESULT = new Integer(Axis.ATTRIBUTE);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(42/*ChildOrAttributeAxisSpecifier*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 32: // NameTestPattern ::= QName
+ {
+ Object RESULT = null;
+ int qnleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int qnright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ QName qn = (QName)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = qn;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(34/*NameTestPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 31: // NameTestPattern ::= STAR
+ {
+ Object RESULT = null;
+ RESULT = null;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(34/*NameTestPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 30: // NodeTestPattern ::= PI
+ {
+ Object RESULT = null;
+ RESULT = new Integer(NodeTest.PI);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(33/*NodeTestPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 29: // NodeTestPattern ::= COMMENT
+ {
+ Object RESULT = null;
+ RESULT = new Integer(NodeTest.COMMENT);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(33/*NodeTestPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 28: // NodeTestPattern ::= TEXT
+ {
+ Object RESULT = null;
+ RESULT = new Integer(NodeTest.TEXT);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(33/*NodeTestPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 27: // NodeTestPattern ::= NODE
+ {
+ Object RESULT = null;
+ RESULT = new Integer(NodeTest.ANODE);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(33/*NodeTestPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 26: // NodeTestPattern ::= NameTestPattern
+ {
+ Object RESULT = null;
+ int ntleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ntright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Object nt = (Object)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = nt;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(33/*NodeTestPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 25: // StepPattern ::= ChildOrAttributeAxisSpecifier ProcessingInstructionPattern Predicates
+ {
+ StepPattern RESULT = null;
+ int axisleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int axisright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Integer axis = (Integer)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int pipleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int pipright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ StepPattern pip = (StepPattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ int ppleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ppright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Vector pp = (Vector)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ // TODO: report error if axis is attribute
+ RESULT = (ProcessingInstructionPattern)pip.setPredicates(pp);
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(32/*StepPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 24: // StepPattern ::= ChildOrAttributeAxisSpecifier ProcessingInstructionPattern
+ {
+ StepPattern RESULT = null;
+ int axisleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int axisright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ Integer axis = (Integer)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ int pipleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int pipright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ StepPattern pip = (StepPattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ RESULT = pip; // TODO: report error if axis is attribute
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(32/*StepPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 23: // StepPattern ::= ChildOrAttributeAxisSpecifier NodeTestPattern Predicates
+ {
+ StepPattern RESULT = null;
+ int axisleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int axisright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Integer axis = (Integer)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int ntleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int ntright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ Object nt = (Object)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ int ppleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ppright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Vector pp = (Vector)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ RESULT = parser.createStepPattern(axis.intValue(), nt, pp);
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(32/*StepPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 22: // StepPattern ::= ChildOrAttributeAxisSpecifier NodeTestPattern
+ {
+ StepPattern RESULT = null;
+ int axisleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int axisright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ Integer axis = (Integer)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ int ntleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ntright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Object nt = (Object)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ RESULT = parser.createStepPattern(axis.intValue(), nt, null);
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(32/*StepPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 21: // StepPattern ::= ProcessingInstructionPattern Predicates
+ {
+ StepPattern RESULT = null;
+ int pipleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int pipright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ StepPattern pip = (StepPattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ int ppleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ppright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Vector pp = (Vector)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = (ProcessingInstructionPattern)pip.setPredicates(pp);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(32/*StepPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 20: // StepPattern ::= ProcessingInstructionPattern
+ {
+ StepPattern RESULT = null;
+ int pipleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int pipright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ StepPattern pip = (StepPattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = pip;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(32/*StepPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 19: // StepPattern ::= NodeTestPattern Predicates
+ {
+ StepPattern RESULT = null;
+ int ntleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int ntright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ Object nt = (Object)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ int ppleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ppright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Vector pp = (Vector)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ RESULT = parser.createStepPattern(Axis.CHILD, nt, pp);
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(32/*StepPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 18: // StepPattern ::= NodeTestPattern
+ {
+ StepPattern RESULT = null;
+ int ntleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ntright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Object nt = (Object)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+
+ RESULT = parser.createStepPattern(Axis.CHILD, nt, null);
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(32/*StepPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 17: // RelativePathPattern ::= StepPattern DSLASH RelativePathPattern
+ {
+ RelativePathPattern RESULT = null;
+ int spleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int spright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ StepPattern sp = (StepPattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int rppleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int rppright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ RelativePathPattern rpp = (RelativePathPattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new AncestorPattern(sp, rpp);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(31/*RelativePathPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 16: // RelativePathPattern ::= StepPattern SLASH RelativePathPattern
+ {
+ RelativePathPattern RESULT = null;
+ int spleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int spright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ StepPattern sp = (StepPattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int rppleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int rppright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ RelativePathPattern rpp = (RelativePathPattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new ParentPattern(sp, rpp);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(31/*RelativePathPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 15: // RelativePathPattern ::= StepPattern
+ {
+ RelativePathPattern RESULT = null;
+ int spleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int spright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ StepPattern sp = (StepPattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = sp;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(31/*RelativePathPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 14: // ProcessingInstructionPattern ::= PIPARAM LPAREN Literal RPAREN
+ {
+ StepPattern RESULT = null;
+ int lleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int lright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ String l = (String)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ RESULT = new ProcessingInstructionPattern(l);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(30/*ProcessingInstructionPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-3)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 13: // IdKeyPattern ::= KEY LPAREN Literal COMMA Literal RPAREN
+ {
+ IdKeyPattern RESULT = null;
+ int l1left = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-3)).left;
+ int l1right = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-3)).right;
+ String l1 = (String)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-3)).value;
+ int l2left = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int l2right = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ String l2 = (String)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ RESULT = new KeyPattern(l1, l2);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(27/*IdKeyPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-5)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 12: // IdKeyPattern ::= ID LPAREN Literal RPAREN
+ {
+ IdKeyPattern RESULT = null;
+ int lleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int lright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ String l = (String)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ RESULT = new IdPattern(l);
+ parser.setHasIdCall(true);
+
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(27/*IdKeyPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-3)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 11: // LocationPathPattern ::= RelativePathPattern
+ {
+ Pattern RESULT = null;
+ int rppleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int rppright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ RelativePathPattern rpp = (RelativePathPattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = rpp;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(29/*LocationPathPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 10: // LocationPathPattern ::= DSLASH RelativePathPattern
+ {
+ Pattern RESULT = null;
+ int rppleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int rppright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ RelativePathPattern rpp = (RelativePathPattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new AncestorPattern(rpp);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(29/*LocationPathPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 9: // LocationPathPattern ::= IdKeyPattern DSLASH RelativePathPattern
+ {
+ Pattern RESULT = null;
+ int ikpleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int ikpright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ IdKeyPattern ikp = (IdKeyPattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int rppleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int rppright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ RelativePathPattern rpp = (RelativePathPattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new AncestorPattern(ikp, rpp);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(29/*LocationPathPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 8: // LocationPathPattern ::= IdKeyPattern SLASH RelativePathPattern
+ {
+ Pattern RESULT = null;
+ int ikpleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int ikpright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ IdKeyPattern ikp = (IdKeyPattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int rppleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int rppright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ RelativePathPattern rpp = (RelativePathPattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new ParentPattern(ikp, rpp);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(29/*LocationPathPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 7: // LocationPathPattern ::= IdKeyPattern
+ {
+ Pattern RESULT = null;
+ int ikpleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int ikpright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ IdKeyPattern ikp = (IdKeyPattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = ikp;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(29/*LocationPathPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 6: // LocationPathPattern ::= SLASH RelativePathPattern
+ {
+ Pattern RESULT = null;
+ int rppleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int rppright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ RelativePathPattern rpp = (RelativePathPattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new AbsolutePathPattern(rpp);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(29/*LocationPathPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 5: // LocationPathPattern ::= SLASH
+ {
+ Pattern RESULT = null;
+ RESULT = new AbsolutePathPattern(null);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(29/*LocationPathPattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 4: // Pattern ::= LocationPathPattern VBAR Pattern
+ {
+ Pattern RESULT = null;
+ int lppleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
+ int lppright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
+ Pattern lpp = (Pattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+ int pleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int pright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Pattern p = (Pattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = new AlternativePattern(lpp, p);
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(28/*Pattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 3: // Pattern ::= LocationPathPattern
+ {
+ Pattern RESULT = null;
+ int lppleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int lppright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Pattern lpp = (Pattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = lpp;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(28/*Pattern*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 2: // TopLevel ::= EXPRESSION Expr
+ {
+ SyntaxTreeNode RESULT = null;
+ int exprleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int exprright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Expression expr = (Expression)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = expr;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(1/*TopLevel*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 1: // TopLevel ::= PATTERN Pattern
+ {
+ SyntaxTreeNode RESULT = null;
+ int patternleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
+ int patternright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
+ Pattern pattern = (Pattern)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ RESULT = pattern;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(1/*TopLevel*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ return CUP$XPathParser$result;
+
+ /*. . . . . . . . . . . . . . . . . . . .*/
+ case 0: // $START ::= TopLevel EOF
+ {
+ Object RESULT = null;
+ int start_valleft = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
+ int start_valright = ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
+ SyntaxTreeNode start_val = (SyntaxTreeNode)((java_cup.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ RESULT = start_val;
+ CUP$XPathParser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ }
+ /* ACCEPT */
+ CUP$XPathParser$parser.done_parsing();
+ return CUP$XPathParser$result;
+
+ /* . . . . . .*/
+ default:
+ throw new Exception(
+ "Invalid action number found in internal parse table");
+
+ }
+ }
+}
+
diff --git a/src/org/apache/xalan/xsltc/compiler/XSLTC.java b/src/org/apache/xalan/xsltc/compiler/XSLTC.java
index b859af43c..c548538f0 100644
--- a/src/org/apache/xalan/xsltc/compiler/XSLTC.java
+++ b/src/org/apache/xalan/xsltc/compiler/XSLTC.java
@@ -377,7 +377,7 @@ else if (systemId != null && systemId.length() != 0) {
_parser.reportError(Constants.FATAL, new ErrorMsg(e));
}
catch (Error e) {
- if (_debug) e.printStackTrace();
+ // if (_debug) e.printStackTrace();
_parser.reportError(Constants.FATAL, new ErrorMsg(e));
}
finally {
@@ -825,49 +825,70 @@ public String getHelperClassName() {
public void dumpClass(JavaClass clazz) {
- if (_outputType == FILE_OUTPUT ||
- _outputType == BYTEARRAY_AND_FILE_OUTPUT)
- {
- File outFile = getOutputFile(clazz.getClassName());
- String parentDir = outFile.getParent();
- if (parentDir != null) {
- File parentFile = new File(parentDir);
- if (!parentFile.exists())
- parentFile.mkdirs();
- }
- }
+ if (_outputType == FILE_OUTPUT ||
+ _outputType == BYTEARRAY_AND_FILE_OUTPUT)
+ {
+ File outFile = getOutputFile(clazz.getClassName());
+ String parentDir = outFile.getParent();
+ if (parentDir != null) {
+ File parentFile = new File(parentDir);
+ if (!parentFile.exists())
+ parentFile.mkdirs();
+ }
+ }
+
+ try {
+ switch (_outputType) {
+ case FILE_OUTPUT:
+ clazz.dump(
+ new BufferedOutputStream(
+ new FileOutputStream(
+ getOutputFile(clazz.getClassName()))));
+ break;
+ case JAR_OUTPUT:
+ _bcelClasses.addElement(clazz);
+ break;
+ case BYTEARRAY_OUTPUT:
+ case BYTEARRAY_AND_FILE_OUTPUT:
+ case BYTEARRAY_AND_JAR_OUTPUT:
+ case CLASSLOADER_OUTPUT:
+ ByteArrayOutputStream out = new ByteArrayOutputStream(2048);
+ clazz.dump(out);
+ _classes.addElement(out.toByteArray());
+
+ if (_outputType == BYTEARRAY_AND_FILE_OUTPUT) {
+ // check that the, class to be serialized to filesystem, is of the valid format.
+ // check with the native JVM class loader
+ byte[] classByteArray = clazz.getBytes();
+ ByteArrayClassLoader classLoader = new ByteArrayClassLoader(classByteArray);
+ Class clz = classLoader.findClass(clazz.getClassName());
+
+ clazz.dump(new BufferedOutputStream(
+ new FileOutputStream(getOutputFile(clazz.getClassName()))));
+ }
+ else if (_outputType == BYTEARRAY_AND_JAR_OUTPUT)
+ _bcelClasses.addElement(clazz);
+
+ break;
+ }
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public class ByteArrayClassLoader extends ClassLoader {
+
+ byte[] ba;
+
+ public ByteArrayClassLoader(byte[] bArray) {
+ ba = bArray;
+ }
+
+ public Class findClass(String name) {
+ return defineClass(name, ba, 0, ba.length);
+ }
- try {
- switch (_outputType) {
- case FILE_OUTPUT:
- clazz.dump(
- new BufferedOutputStream(
- new FileOutputStream(
- getOutputFile(clazz.getClassName()))));
- break;
- case JAR_OUTPUT:
- _bcelClasses.addElement(clazz);
- break;
- case BYTEARRAY_OUTPUT:
- case BYTEARRAY_AND_FILE_OUTPUT:
- case BYTEARRAY_AND_JAR_OUTPUT:
- case CLASSLOADER_OUTPUT:
- ByteArrayOutputStream out = new ByteArrayOutputStream(2048);
- clazz.dump(out);
- _classes.addElement(out.toByteArray());
-
- if (_outputType == BYTEARRAY_AND_FILE_OUTPUT)
- clazz.dump(new BufferedOutputStream(
- new FileOutputStream(getOutputFile(clazz.getClassName()))));
- else if (_outputType == BYTEARRAY_AND_JAR_OUTPUT)
- _bcelClasses.addElement(clazz);
-
- break;
- }
- }
- catch (Exception e) {
- e.printStackTrace();
- }
}
/**
diff --git a/src/org/apache/xalan/xsltc/compiler/sym.java b/src/org/apache/xalan/xsltc/compiler/sym.java
new file mode 100644
index 000000000..6c68f58d7
--- /dev/null
+++ b/src/org/apache/xalan/xsltc/compiler/sym.java
@@ -0,0 +1,68 @@
+
+//----------------------------------------------------
+// The following code was generated by CUP v0.10k
+// Fri Sep 16 18:02:07 IST 2022
+//----------------------------------------------------
+
+package org.apache.xalan.xsltc.compiler;
+
+/** CUP generated class containing symbol constants. */
+public class sym {
+ /* terminals */
+ public static final int MULT = 26;
+ public static final int Literal = 27;
+ public static final int GE = 21;
+ public static final int NAMESPACE = 49;
+ public static final int SLASH = 2;
+ public static final int PI = 36;
+ public static final int COMMENT = 35;
+ public static final int PIPARAM = 37;
+ public static final int FOLLOWINGSIBLING = 48;
+ public static final int ATSIGN = 12;
+ public static final int DSLASH = 15;
+ public static final int LPAREN = 7;
+ public static final int EXPRESSION = 54;
+ public static final int INT = 52;
+ public static final int CHILD = 41;
+ public static final int MINUS = 23;
+ public static final int STAR = 9;
+ public static final int DESCENDANTORSELF = 46;
+ public static final int RPAREN = 8;
+ public static final int AND = 34;
+ public static final int LT = 18;
+ public static final int OR = 33;
+ public static final int COMMA = 10;
+ public static final int DDOT = 13;
+ public static final int DIV = 24;
+ public static final int PLUS = 22;
+ public static final int DOT = 3;
+ public static final int ID = 29;
+ public static final int LE = 20;
+ public static final int QNAME = 28;
+ public static final int DESCENDANT = 45;
+ public static final int PRECEDINGSIBLING = 38;
+ public static final int EOF = 0;
+ public static final int error = 1;
+ public static final int SELF = 39;
+ public static final int VBAR = 6;
+ public static final int MOD = 25;
+ public static final int ANCESTORORSELF = 44;
+ public static final int PRECEDING = 50;
+ public static final int EQ = 16;
+ public static final int PATTERN = 53;
+ public static final int LBRACK = 4;
+ public static final int REAL = 51;
+ public static final int ANCESTOR = 43;
+ public static final int RBRACK = 5;
+ public static final int DCOLON = 14;
+ public static final int DOLLAR = 11;
+ public static final int NE = 17;
+ public static final int PARENT = 40;
+ public static final int FOLLOWING = 47;
+ public static final int KEY = 30;
+ public static final int TEXT = 31;
+ public static final int ATTRIBUTE = 42;
+ public static final int GT = 19;
+ public static final int NODE = 32;
+}
+
diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMsg.java b/src/org/apache/xalan/xsltc/compiler/util/ErrorMsg.java
index 41106fa2e..acd55a56f 100644
--- a/src/org/apache/xalan/xsltc/compiler/util/ErrorMsg.java
+++ b/src/org/apache/xalan/xsltc/compiler/util/ErrorMsg.java
@@ -184,7 +184,12 @@ public ErrorMsg(String code) {
public ErrorMsg(Throwable e) {
_code = null;
- _message = e.getMessage();
+ if (e instanceof ClassFormatError) {
+ _message = "Aborting serializing the generated bytecode, because verification of generated bytecode failed. " + e.getMessage();
+ }
+ else {
+ _message = e.getMessage();
+ }
_line = 0;
}
diff --git a/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java b/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java
index 7c31f6ef0..d049df2c0 100644
--- a/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java
+++ b/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java
@@ -64,7 +64,7 @@ public final class BasisLibrary {
* Standard function count(node-set)
*/
public static int countF(DTMAxisIterator iterator) {
- return(iterator.getLast());
+ return iterator.getLast();
}
/**
diff --git a/src/org/apache/xalan/xsltc/trax/TemplatesHandlerImpl.java b/src/org/apache/xalan/xsltc/trax/TemplatesHandlerImpl.java
index 8088c7d8f..cda21d3bd 100644
--- a/src/org/apache/xalan/xsltc/trax/TemplatesHandlerImpl.java
+++ b/src/org/apache/xalan/xsltc/trax/TemplatesHandlerImpl.java
@@ -341,4 +341,3 @@ public void setDocumentLocator(Locator locator) {
}
}
-
diff --git a/src/org/apache/xalan/xsltc/trax/TemplatesImpl.java b/src/org/apache/xalan/xsltc/trax/TemplatesImpl.java
index f108af2f8..76df1ce70 100644
--- a/src/org/apache/xalan/xsltc/trax/TemplatesImpl.java
+++ b/src/org/apache/xalan/xsltc/trax/TemplatesImpl.java
@@ -407,4 +407,4 @@ public DOM getStylesheetDOM() {
public void setStylesheetDOM(DOM sdom) {
_sdom.set(sdom);
}
-}
+}
\ No newline at end of file
diff --git a/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java b/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java
index cef35440c..106167bdd 100644
--- a/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java
+++ b/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java
@@ -1410,4 +1410,4 @@ private String getStylesheetFileName(Source source)
protected Class getDTMManagerClass() {
return m_DTMManagerClass;
}
-}
+}
\ No newline at end of file
diff --git a/src/org/apache/xml/dtm/ref/DTMStringPool.java b/src/org/apache/xml/dtm/ref/DTMStringPool.java
index 2538a64ad..757446200 100644
--- a/src/org/apache/xml/dtm/ref/DTMStringPool.java
+++ b/src/org/apache/xml/dtm/ref/DTMStringPool.java
@@ -21,10 +21,10 @@
package org.apache.xml.dtm.ref;
+import java.util.HashMap;
+import java.util.Map;
import java.util.Vector;
-import org.apache.xml.utils.IntVector;
-
/**
Please note that the diagrams in this design document are meant to be useful abstractions, and may not always be exact.
The project's technical mailing list for all committers and developers
interested in the API and inner workings is
-
&xslt4j; is a fairly mature project; one where most committers and many
users expect that the daily build will be mostly functional. Very risky changes
or major architecture updates should be discussed ahead of time or committed onto
@@ -82,20 +82,16 @@ suggestions to xalan-dev@xml.apache.org appreciated.
tests that ensure basic functionality. You can also read a full set of
- (Smoketest doc is TBD!)
-
Official builds of &xslt4j; require a few more steps than simply doing -'build fulldist'. This is a quick checklist of the steps; if you are -not comfortable following this list, then please seek help on xalan-dev.
+'build fulldist'. This is a quick checklist of the steps; if you are +not comfortable following this list, then please seek help on dev@xalan.apache.org.Official builds come in several flavors:
@@ -110,7 +106,7 @@ adding new functionality; these go from 2.3 to 2.3.1. They should be done on a branch if the mainline development has already moved forward; the point is to make critical bugfixes for existing customers who want to stay on the stable release.Of course, you checked in all your earlier work to the CVS repository, right?
+Of course, you checked in all your earlier work to the Subversion repository, right?
The safest way to perform a build for distribution is to check out a fresh -new copy of the repository from CVS. This avoids any potential problems with +new copy of the repository from Subversion. This avoids any potential problems with uncommitted changes or extra files on your local machine.
Check out a new copy of both xml-xalan/java and xml-xalan/test repositories to a blank directory on your local machine. You then need to tag the files in the repository with a marker noting that these versions are the actual ones being used in the build (you could actually do this after running the build below). -Use the CVS tag command to add the tag to both repositories (/java and /test). +Use the Subversion tag command to add the tag to both repositories (/java and /test). The tag name should be something like 'xalan-j_2_4'; look at the log of any file to see the exact format of previous builds.
@@ -317,7 +313,7 @@ either scp them or login to the apache machines and use scp or pftp from there outbound to some server that you've copied them to.(Subject to change as www.apache.org/dist gets ready for mirroring) You'll need to log on to xml.apache.org (which is a separate machine -from cvs.apache.org) and upload the files to /www/xml.apache.org/xalan-j/dist
+from svn.apache.org) and upload the files to /www/xml.apache.org/xalan-j/distYou should also update the distribution directory's html files to note the new build numbers. Carefully edit the .htaccess file to update the 'Latest Stable Build' and 'Latest Developers Build' lines @@ -396,7 +392,7 @@ a couple of the highlights of the new build, and a link to the distribution area.
Make the subject something like: [ANN] Xalan-J 2.x Point/Developers/Whatever Release posted to xml.apache.org -and send your email to: general@xml.apache.org, xalan-dev@xml.apache.org, xalan-j-users@xml.apache.org. Note +and send your email to: general@xml.apache.org, dev@xalan.apache.org, xalan-j-users@apache.org. Note that for developers releases, you can omit the general@xml.apache.org address if you don't think it will be of interest to the larger audience.
diff --git a/xdocs/sources/xalan/downloads.xml b/xdocs/sources/xalan/downloads.xml index 6d86af513..8d4d9ac8d 100644 --- a/xdocs/sources/xalan/downloads.xml +++ b/xdocs/sources/xalan/downloads.xml @@ -86,7 +86,7 @@ if you downloaded a source distribution, you have the option to use Ant to build &xslt4j;, includingxalan.jar, xsltc.jar, serializer.jar
- and other things, see Using ant for more
+ and other things, see Using Ant for more
details.
diff --git a/xdocs/sources/xalan/extensions.xml b/xdocs/sources/xalan/extensions.xml
index 18c57df35..3b3ceea15 100644
--- a/xdocs/sources/xalan/extensions.xml
+++ b/xdocs/sources/xalan/extensions.xml
@@ -75,15 +75,15 @@ more information.BSF requires bsf.jar on the classpath. This JAR file is no longer shipped with &xslt4j;. It can be
- downloaded from
BSF requires the file bsf.jar on the classpath. The bsf.jar file is provided, by the XalanJ src
+ distribution. If required, that can also be downloaded from the
By default Xalan-Java assumes BSF support is provided by the Jakarta BSF implementation. There are three +
By default Xalan-Java assumes BSF support is provided by the Apache Commons BSF implementation. There are three ways of specifying the class that provides the BSF Manager service:.
To run the preceding example, bsf.jar and js.jar must be on the classpath. Remember that bsf.jar - must be on the classpath to run any extension written in a language other than Java. For extensions - implemented in a scripting language, see the additional requirements in +
To run the preceding example, bsf.jar and Mozilla Rhino jar must be on the classpath.
+ The Mozilla Rhino jar, is provided by the XalanJ src distribution. Mozilla Rhino is an
+ implementation of JavaScript in Java (please see,
For example, go to the SimpleTransform subdirectory and issue the following command:
java SimpleTransform
The sample writes the transformation result to a file (birds.out). To see how the example works, +
The sample writes the transformation result to a file (birds.out). To see how the example works, examine the source files: birds.xml, birds.xsl, and SimpleTransform.java.
The extensions examples require additional JAR files on the classpath, and the procedure for
running the sample applet and sample servlet is different. For more information about all the
diff --git a/xdocs/sources/xalan/readme.xml b/xdocs/sources/xalan/readme.xml
index 52405c486..b87f9e828 100644
--- a/xdocs/sources/xalan/readme.xml
+++ b/xdocs/sources/xalan/readme.xml
@@ -21,7 +21,9 @@
+ &xslt4j; 2.7.3 was released in April 2023.
+ XALANJ Jira bug fixes:
+
+ &xslt4j; 2.7.2 was released in April 2014.
+
+ When using FEATURE_SECURE_PROCESSING ("http://javax.xml.XMLConstants/feature/secure-processing") on a TransformerFactory, the output properties:
+
+ should be ignored (see http://xml.apache.org/xalan-j/usagepatterns.html#outputprops)
+
+ These properties can be used to load an arbitrary class or access an arbitrary URL/resource so are problematic when secure processing is desired.
+
+
+
+ These features could be used to load a class that had undesirable side-effects or to load a large file and exhaust memory, etc.
+
+ See XALANJ-2435.
+ XALANJ Jira bug fixes:
+ You can also view the list in
+ &xslt4j; 2.7.1 was released in August 2007.
+ Here's what's new in &xslt4j-current;.
+
- The serializer now has support for DOM Level 3 serialization
- (
- More details are in the javadoc of those classes and interfaces
-
-
- xercesImpl.jar
+ and xml-apis.jar (Xerces-J 2.12.2).
+
+
+
+ <xsl:output xalan:content-handler="org.example.BadClass" ...
+
+
+ <xsl:output xalan:entities="http://example.org/reallyLargeFile.bin" ...
+
+ xercesImpl.jar
+ (Xerces-J 2.11.0) and xml-apis.jar (XML Commons External 1.4.01).
+ org.apache.xml.serializer.DOM3Serializerorg.apache.xml.serializer.dom3
- as well as a new method,
- asDOM3Serializer() on the older
- org.apache.xml.serializer.Serializerxml-apis.jar
- (Xerces-J 2.9.0) and xml-apis.jar (XML Commons External 1.3.04).
+ xercesImpl.jar and
+ xml-apis.jar (Xerces-J 2.12.2).