Author: dennyxu
Date: 2009-05-06 03:53:03 -0400 (Wed, 06 May 2009)
New Revision: 15056
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/.classpath
workspace/Denny/bpel/org.eclipse.bpel.xpath10/.project
workspace/Denny/bpel/org.eclipse.bpel.xpath10/META-INF/
workspace/Denny/bpel/org.eclipse.bpel.xpath10/META-INF/MANIFEST.MF
workspace/Denny/bpel/org.eclipse.bpel.xpath10/bin/
workspace/Denny/bpel/org.eclipse.bpel.xpath10/build.properties
workspace/Denny/bpel/org.eclipse.bpel.xpath10/lib/
workspace/Denny/bpel/org.eclipse.bpel.xpath10/lib/antlr-runtime-3.0.1.jar
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/AdditiveExpr.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/AllNodeStep.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Axis.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/BinaryExpr.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/CommentNodeStep.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/EqualityExpr.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Expr.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/FilterExpr.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/FunctionCallExpr.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LiteralExpr.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LocationPath.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LogicalExpr.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/MultiplicativeExpr.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/NameStep.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/NumberExpr.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/PathExpr.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Predicate.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/ProcessingInstructionNodeStep.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/RelationalExpr.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Step.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/TextNodeStep.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/UnaryExpr.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/UnionExpr.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/VariableReferenceExpr.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Visitor.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Exception.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Factory.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Lexer.java
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Parser.java
Log:
Initial import.
Added: workspace/Denny/bpel/org.eclipse.bpel.xpath10/.classpath
===================================================================
--- workspace/Denny/bpel/org.eclipse.bpel.xpath10/.classpath (rev
0)
+++ workspace/Denny/bpel/org.eclipse.bpel.xpath10/.classpath 2009-05-06 07:53:03 UTC (rev
15056)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry exported="true" kind="lib"
path="bin/"/>
+ <classpathentry exported="true" kind="lib"
path="lib/antlr-runtime-3.0.1.jar"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: workspace/Denny/bpel/org.eclipse.bpel.xpath10/.project
===================================================================
--- workspace/Denny/bpel/org.eclipse.bpel.xpath10/.project (rev
0)
+++ workspace/Denny/bpel/org.eclipse.bpel.xpath10/.project 2009-05-06 07:53:03 UTC (rev
15056)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.bpel.xpath10</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.dltk.core.scriptbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.deved.antlride.core.nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
Added: workspace/Denny/bpel/org.eclipse.bpel.xpath10/META-INF/MANIFEST.MF
===================================================================
--- workspace/Denny/bpel/org.eclipse.bpel.xpath10/META-INF/MANIFEST.MF
(rev 0)
+++ workspace/Denny/bpel/org.eclipse.bpel.xpath10/META-INF/MANIFEST.MF 2009-05-06 07:53:03
UTC (rev 15056)
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: XPath Parser 1.0 (Incubation)
+Bundle-SymbolicName: org.eclipse.bpel.xpath10
+Bundle-Version: 0.4.0
+Bundle-ClassPath: bin/,
+ lib/antlr-runtime-3.0.1.jar
+Export-Package: org.antlr.runtime;uses:="org.antlr.runtime.tree",
+ org.antlr.runtime.debug;uses:="org.antlr.runtime.tree,org.antlr.runtime",
+ org.antlr.runtime.misc,
+ org.antlr.runtime.tree;uses:="org.antlr.runtime,org.antlr.stringtemplate",
+ org.eclipse.bpel.xpath10,
+
org.eclipse.bpel.xpath10.parser;uses:="org.antlr.runtime.tree,org.antlr.runtime,org.eclipse.bpel.xpath10"
+Bundle-Vendor:
Eclipse.org
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Added: workspace/Denny/bpel/org.eclipse.bpel.xpath10/build.properties
===================================================================
--- workspace/Denny/bpel/org.eclipse.bpel.xpath10/build.properties
(rev 0)
+++ workspace/Denny/bpel/org.eclipse.bpel.xpath10/build.properties 2009-05-06 07:53:03 UTC
(rev 15056)
@@ -0,0 +1,10 @@
+bin.includes = META-INF/,\
+ lib/antlr-runtime-3.0.1.jar,\
+ bin/
+jars.compile.order =
+src.includes = .classpath,\
+ .project,\
+ META-INF/,\
+ build.properties,\
+ lib/,\
+ src/
Added: workspace/Denny/bpel/org.eclipse.bpel.xpath10/lib/antlr-runtime-3.0.1.jar
===================================================================
(Binary files differ)
Property changes on:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/lib/antlr-runtime-3.0.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/AdditiveExpr.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/AdditiveExpr.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/AdditiveExpr.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * Additive Expression.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+public class AdditiveExpr extends BinaryExpr {
+
+ /**
+ * Brand new additive expression.
+ * @param op either + or - (additive)
+ * @param left
+ * @param right
+ */
+ public AdditiveExpr (String op, Expr left, Expr right) {
+ super (op,left,right);
+ }
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/AllNodeStep.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/AllNodeStep.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/AllNodeStep.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * All note step.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+
+public class AllNodeStep extends Step {
+
+ /**
+ * Brand new shiny all node step.
+ *
+ * @param axis
+ */
+
+ public AllNodeStep (int axis) {
+ super(axis);
+ }
+
+ @Override
+ protected String asString () {
+ return "node()";
+ }
+
+ @Override
+ protected String asText () {
+ return asString();
+ }
+
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Axis.java
===================================================================
--- workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Axis.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Axis.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+@SuppressWarnings("nls")
+
+public class Axis {
+
+ /** */
+ static final public int INVALID_AXIS = 0;
+
+ /** Child axis */
+ static final public int CHILD = 1;
+
+ /** Descendant axis */
+ static final public int DESCENDANT = 2;
+
+ /** Parent axis */
+ static final public int PARENT = 3;
+
+ /** Ancestor axis */
+ static final public int ANCESTOR = 4;
+
+ /** Following sibling axis */
+ static final public int FOLLOWING_SIBLING = 5;
+
+ /** Proceeding sibling axis */
+ static final public int PRECEDING_SIBLING = 6;
+
+ /** Following axis */
+ static final public int FOLLOWING = 7;
+
+ /** Preceeding sibling axis */
+ static final public int PRECEDING = 8;
+
+ /** Attribute axis */
+ static final public int ATTRIBUTE = 9;
+
+ /** Namespace axis */
+ static final public int NAMESPACE = 10;
+
+ /** Self axis */
+ static final public int SELF = 11;
+
+ /** Descendant or self axis */
+ static final public int DESCENDANT_OR_SELF = 12;
+
+ /** Ancestor or self [ lucky 13 ] */
+ static final public int ANCESTOR_OR_SELF = 13;
+
+
+ static final private String [] NAMES = {
+
+ "unknown-axis-name", /** at [0] we have null */
+
+ "child",
+ "descendant",
+ "parent",
+ "ancestor",
+ "following-sibling",
+ "preceding-sibling",
+ "following",
+ "preceding",
+ "attribute",
+ "namespace",
+ "self",
+ "descendant-or-self",
+ "ancestor-or-self"
+ };
+
+ /**
+ * Get the name of the axis given it's index (retrieved via {{@link
#getAxis(String)} below.
+ *
+ * @param axis
+ * @return the axis name
+ */
+ static public String getName (int axis) {
+ if (axis < 1 || axis >= NAMES.length) {
+ return NAMES[0];
+ }
+ return NAMES[axis];
+ }
+
+ /**
+ *
+ * @param axisName the axis name
+ * @return the axis id given its name
+ */
+
+ static public int getAxis ( String axisName ) {
+ for(int i=1; i<NAMES.length; i++) {
+ if (NAMES[i].equals(axisName)) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/BinaryExpr.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/BinaryExpr.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/BinaryExpr.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ *
+ * A binary expression. Something with left and right side and an operator in the
middle.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+@SuppressWarnings("nls")
+
+public class BinaryExpr extends Expr {
+
+ String fOperator;
+ Expr fLHS;
+ Expr fRHS;
+
+ /**
+ * Brand new shiny binary expression.
+ *
+ * @param op
+ * @param lhs
+ * @param rhs
+ */
+ public BinaryExpr (String op, Expr lhs, Expr rhs) {
+ super("");
+ fOperator = op;
+ fLHS = lhs;
+ fRHS = rhs;
+ }
+
+ /**
+ * @return the operator of the binary expression.
+ */
+
+ public String getOperator() {
+ return fOperator;
+ }
+ /**
+ *
+ * @return the left hand side of the expression.
+ */
+
+ public Expr getLHS() {
+ return fLHS;
+ }
+
+ /**
+ *
+ * @return the right hand side of the expression.
+ */
+
+ public Expr getRHS() {
+ return fRHS;
+ }
+
+
+ @Override
+ protected String asText() {
+ StringBuilder sb = new StringBuilder();
+ if (isWrapParen()) {
+ sb.append("(");
+ }
+ sb.append( fLHS != null ? fLHS.getText() : "?" );
+ sb.append(" ");
+ sb.append(getOperator());
+ sb.append(" ");
+ sb.append( fRHS != null ? fRHS.getText() : "?" );
+ if (isWrapParen()) {
+ sb.append(")");
+ }
+ return sb.toString();
+ }
+
+
+ @Override
+ protected String asString () {
+ StringBuilder sb = new StringBuilder();
+ if (isWrapParen()) {
+ sb.append("(");
+ }
+ sb.append(getLHS()).append(" ").append(getOperator()).append("
").append(getRHS());
+ if (isWrapParen()) {
+ sb.append(")");
+ }
+ return sb.toString();
+ }
+
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getPosition()
+ */
+ @Override
+ public int getPosition () {
+ return getLHS().getPosition();
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getEndPosition()
+ */
+
+ @Override
+ public int getEndPosition () {
+ return getRHS().getEndPosition();
+ }
+
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/CommentNodeStep.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/CommentNodeStep.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/CommentNodeStep.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * The comment() element of the XPath location path.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+
+public class CommentNodeStep extends Step {
+
+ /**
+ * Bran new shiny comment node step.
+ * @param axis
+ */
+ public CommentNodeStep (int axis) {
+ super(axis);
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Step#getText()
+ */
+ @Override
+ public String getText() {
+ return asString();
+ }
+
+
+ @Override
+ protected String asString () {
+ return "comment()";
+ }
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/EqualityExpr.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/EqualityExpr.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/EqualityExpr.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * An equality XPath expression.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+public class EqualityExpr extends BinaryExpr {
+
+ /**
+ * Brand new shiny EqualityExpr ...
+ * @param op
+ * @param left
+ * @param right
+ */
+
+ public EqualityExpr (String op, Expr left, Expr right) {
+ super (op,left,right);
+ }
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Expr.java
===================================================================
--- workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Expr.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Expr.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * The base expression class for XPath semantic tree hierarchy.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+
+public class Expr {
+
+ String fText ;
+ int fStartPosition = -1;
+ int fEndPosition = -1;
+
+ boolean fWrapWithParenthesis = false;
+
+ /**
+ * Brand new shiny Expr object.
+ * @param text
+ */
+ public Expr (String text) {
+ fText = text;
+ }
+
+
+ /**
+ * @return the expression as a text
+ */
+ public final String getText() {
+ StringBuilder sb = new StringBuilder();
+ if (fWrapWithParenthesis) {
+ sb.append("(");
+ }
+ sb.append(asText());
+ if (fWrapWithParenthesis) {
+ sb.append(")");
+ }
+ return sb.toString();
+ };
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString () {
+ StringBuilder sb = new StringBuilder();
+ sb.append("{").append(getClass().getSimpleName()).append(",").append(asString()).append("}")
;
+ return sb.toString();
+ }
+
+ protected String asString () {
+ return getText();
+ }
+
+ protected String asText () {
+ return fText;
+ }
+
+ /**
+ * @return whether the expression is wrapped in parenthesis.
+ */
+ public boolean isWrapParen () {
+ return fWrapWithParenthesis;
+ }
+
+ /**
+ * @param wrap
+ */
+ public void setWrapParen ( boolean wrap ) {
+ fWrapWithParenthesis = wrap;
+ }
+
+ /**
+ * This is useful for error reporting :-)
+ *
+ * @return the end position of the expression in the "stream" that it was
parsed from
+ */
+ public int getEndPosition() {
+ return fEndPosition;
+ }
+
+ /**
+ * This is useful for error reporting :-)
+ *
+ * @return the start position of the expression in the "stream" that it was
parsed from
+ */
+
+ public int getPosition() {
+ return fStartPosition;
+ }
+
+ /**
+ * Set the start and end position of the expression in the input "stream" it
was parsed from.
+ * The parser uses this to provide location information to the semantic tree model.
+ *
+ * @param start
+ * @param end
+ */
+ public void setPosition (int start, int end) {
+ fStartPosition = start;
+ fEndPosition = end;
+ }
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/FilterExpr.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/FilterExpr.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/FilterExpr.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A filter expression.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+public class FilterExpr extends Expr {
+
+ List<Predicate> fList = new ArrayList<Predicate>();
+ Expr fExpr;
+
+
+ /**
+ * Brand new shiny filter expression.
+ *
+ * @param expr the expression to which the filter (predicates) are to be applied.
+ */
+ public FilterExpr (Expr expr) {
+ super(expr.toString());
+ fExpr = expr;
+ }
+
+ /**
+ * @return the expression that is to be predicated.
+ */
+ public Expr getExpr () {
+ return fExpr;
+ }
+
+ /**
+ * @return a list of predicates for this filter.
+ */
+ public List<Predicate> getPredicates() {
+ return fList;
+ }
+
+ /**
+ * Add a predicate to the filter list.
+ * @param p the predicate to add.
+ */
+ public void addPredicate (Predicate p) {
+ fList.add(p);
+ }
+
+ /**
+ * @return true if yes, false if no.
+ */
+
+ public boolean hasPredicates ()
+ {
+ return fList.size() > 0;
+ }
+
+ @Override
+ protected String asText()
+ {
+ StringBuilder sb = new StringBuilder();
+ if ( fExpr != null ) {
+ sb.append(fExpr.getText());
+ }
+ for(Predicate p : fList) {
+ sb.append(p.getText());
+ }
+ return sb.toString();
+ }
+
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getPosition()
+ */
+ @Override
+ public int getPosition () {
+ return fExpr != null ? fExpr.getPosition() : -1;
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getEndPosition()
+ */
+ @Override
+ public int getEndPosition () {
+ return fExpr != null ? fExpr.getEndPosition() : -1;
+ }
+
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/FunctionCallExpr.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/FunctionCallExpr.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/FunctionCallExpr.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A function all expression in XPath.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+
+public class FunctionCallExpr extends Expr {
+
+ final List<Expr> fParams = new ArrayList<Expr>();
+ String fName;
+ String fPrefix;
+
+ /**
+ * Brand new shiny XPath expression.
+ *
+ * @param pfx the prefix
+ * @param name the function name.
+ */
+ public FunctionCallExpr (String pfx, String name) {
+ super(null);
+ fName = name;
+ fPrefix = pfx;
+ }
+
+ /**
+ * @return the function prefix (if defined).
+ */
+ public String getPrefix() {
+ return fPrefix;
+ }
+
+ /**
+ * @return the function name
+ */
+ public String getFunctionName() {
+ return fName;
+ }
+
+ /**
+ * @return the parameter list for this function.
+ */
+ public List<Expr> getParameters() {
+ return fParams;
+ }
+
+ /**
+ * Add a parameter to the parameter list. The parser
+ * call this method.
+ *
+ * @param p the parameter
+ */
+ public void addParameter (Expr p) {
+ fParams.add(p);
+ }
+
+ @Override
+ protected String asText() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(fnName()).append(argsToString(false));
+ return sb.toString();
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#toString()
+ */
+
+ @Override
+ public String toString () {
+ StringBuilder sb = new StringBuilder();
+
sb.append("{FunctionCall,").append(getFunctionName()).append(",").append(
argsToString(true) ).append("}");
+ return sb.toString();
+ }
+
+
+ String fnName () {
+ if ("".equals(fPrefix) || fPrefix == null) {
+ return fName;
+ }
+ return fPrefix + ":" + fName;
+ }
+
+ String argsToString (boolean asString ) {
+ StringBuilder sb = new StringBuilder();
+ sb.append("(");
+ int count = 0;
+ for(Expr n : fParams) {
+ if (count > 0) {
+ sb.append(", ");
+ }
+ if (asString) {
+ sb.append(n);
+ } else {
+ sb.append(n.getText());
+ }
+ count ++;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LiteralExpr.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LiteralExpr.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LiteralExpr.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * A literal expression (string literal).
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+
+public class LiteralExpr extends Expr {
+
+ String fLiteral;
+
+ /**
+ * Brand new shiny string literal expression.
+ *
+ * @param text
+ */
+ public LiteralExpr (String text) {
+ super(text);
+ fLiteral = parseLiteral( text);
+ }
+
+ /**
+ * @return the literal
+ */
+ public String getLiteral() {
+ return fLiteral;
+ }
+
+
+ protected String parseLiteral (String string) {
+ if (string.length() < 2) {
+ return "";
+ }
+ char ch1 = string.charAt(0);
+ char ch2 = string.charAt(string.length()-1);
+ if ( (ch1 == '"' || ch1 == '\'') && ch1 == ch2 ) {
+ return string.substring(1, string.length()-2);
+ }
+ return string;
+ }
+
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LocationPath.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LocationPath.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LocationPath.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Location path expression in XPath.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+
+public class LocationPath extends Expr {
+
+ List<Step> fSteps = new ArrayList<Step>();
+ boolean fAbsolute = false;
+
+ /**
+ * A brand new shiny LocationPath expression.
+ *
+ * @param abs is it an absolute path ? true/false
+ * @param steps the steps in the path.
+ */
+ public LocationPath ( boolean abs, Step ... steps) {
+ super(null);
+ fAbsolute = abs;
+ for(Step s : steps) {
+ addStep(s);
+ }
+ }
+
+ /**
+ * Add a step to this path expression.
+ *
+ * @param s step
+ */
+ public void addStep (Step s) {
+ if (s != null) {
+ fSteps.add(s);
+ }
+ }
+
+ /**
+ * Add as the first step of the path (from the beginning).
+ *
+ * @param s
+ */
+ public void addFirstStep (Step s) {
+ if (s != null) {
+ fSteps.add(0, s);
+ }
+ }
+
+ /**
+ * @return the steps in the location path expression.
+ */
+ public List<Step> getSteps () {
+ return fSteps;
+ }
+
+ /**
+ * @return is it an absolute path expression ?
+ */
+ public boolean isAbsolute() {
+ return fAbsolute;
+ }
+
+ /**
+ * Set if expression is absolute (from parser).
+ * @param v true/false
+ */
+ public void setIsAbsolute (boolean v) {
+ fAbsolute = v;
+ }
+
+
+ @Override
+ protected String asText()
+ {
+ StringBuilder buf = new StringBuilder();
+ if (isAbsolute()) {
+ buf.append("/");
+ }
+ Iterator<Step> stepIter = getSteps().iterator();
+ while (stepIter.hasNext())
+ {
+ buf.append(stepIter.next().getText());
+ if (stepIter.hasNext())
+ {
+ buf.append("/");
+ }
+ }
+ return buf.toString();
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#toString()
+ */
+
+ @Override
+ public String toString()
+ {
+ StringBuilder buf = new StringBuilder();
+ buf.append("{");
+ buf.append(getClass().getSimpleName());
+ buf.append(",").append(isAbsolute()).append(",");
+
+ Iterator<Step> stepIter = getSteps().iterator();
+ while (stepIter.hasNext())
+ {
+ buf.append( stepIter.next() );
+ if (stepIter.hasNext())
+ {
+ buf.append("/");
+ }
+ }
+ buf.append("}");
+ return buf.toString();
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getPosition()
+ */
+ @Override
+ public int getPosition ()
+ {
+ return fSteps.size() > 0 ? fSteps.get(0).getPosition() : -1;
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getEndPosition()
+ */
+ @Override
+ public int getEndPosition () {
+ int size = fSteps.size();
+ return size > 0 ? fSteps.get(size-1).getEndPosition() : -1;
+ }
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LogicalExpr.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LogicalExpr.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LogicalExpr.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * Logical Expression (and,or)
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+
+ */
+public class LogicalExpr extends BinaryExpr {
+
+ /**
+ * Brand new shiny LogicalExpr.
+ * @param op
+ * @param left
+ * @param right
+ */
+ public LogicalExpr (String op, Expr left, Expr right) {
+ super (op,left,right);
+ }
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/MultiplicativeExpr.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/MultiplicativeExpr.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/MultiplicativeExpr.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * Multiplicative expression ... ( *,/,mod,div)
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+public class MultiplicativeExpr extends BinaryExpr {
+
+ /**
+ * Brand new shiny multiplicative expression.
+ * @param op
+ * @param left
+ * @param right
+ */
+
+ public MultiplicativeExpr (String op, Expr left, Expr right) {
+ super (op,left,right);
+ }
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/NameStep.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/NameStep.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/NameStep.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * Name step in a location path.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+public class NameStep extends Step {
+
+ String fPrefix ;
+ String fLocalName;
+ boolean matchesAnyName = false;
+
+ /**
+ * Brand new shiny NameStep ...
+ *
+ * @param axis
+ * @param prefix
+ * @param name
+ */
+
+ public NameStep ( int axis, String prefix, String name ) {
+ super(axis);
+ fPrefix = prefix;
+ fLocalName = name;
+ matchesAnyName = "*".equals(fLocalName);
+ }
+
+ /**
+ * @return the prefix in the name step.
+ */
+
+ public String getPrefix () {
+ return fPrefix;
+ }
+ /**
+ * @return the local name of the name step.
+ */
+
+ public String getLocalName() {
+ return fLocalName;
+ }
+
+ /**
+ *
+ * @return is this a * ?
+ */
+ public boolean isMatchesAnyName() {
+ return matchesAnyName;
+ }
+
+
+ @Override
+ protected String asString () {
+ return asText();
+ }
+
+ @Override
+ protected String asText() {
+ StringBuilder buf = new StringBuilder(64);
+
+ if (getPrefix() != null && getPrefix().length() > 0) {
+ buf.append(getPrefix()).append(':');
+ }
+ buf.append(getLocalName());
+ return buf.toString();
+ }
+}
+
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/NumberExpr.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/NumberExpr.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/NumberExpr.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * A number expression.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+public class NumberExpr extends Expr {
+
+ Number fNumber = new Integer(0);
+
+ /**
+ * Brand new shiny number expression.
+ * @param number
+ */
+ public NumberExpr (String number) {
+ super( number );
+ fNumber = extractNumber(number);
+ }
+
+ /**
+ * Brand new shiny number expression.
+ * @param num
+ */
+ public NumberExpr (Number num) {
+ super(num.toString());
+ fNumber = num;
+ }
+
+ /**
+ * @return the number.
+ */
+ public Number getNumber() {
+ return fNumber;
+ }
+
+ Number extractNumber(String numberBody) {
+ boolean isReal = numberBody.indexOf('.') >= 0;
+ if (!isReal) {
+ return new Integer(numberBody);
+ }
+ double result = Double.parseDouble(numberBody);
+ return new Double(result);
+ }
+
+
+ /**
+ * negate the number expression.
+ */
+ public void negate () {
+
+ if (fNumber instanceof Float) {
+ fNumber = new Float(-1 * fNumber.floatValue());
+ } else if (fNumber instanceof Short) {
+ fNumber = new Short((short) (-1 * fNumber.shortValue()));
+ } else if (fNumber instanceof Integer) {
+ fNumber = new Integer(-1*fNumber.intValue());
+ } else if (fNumber instanceof Long) {
+ fNumber = new Long( -1*fNumber.longValue());
+ } else {
+ fNumber = new Double(-1.0 * fNumber.doubleValue());
+ }
+ }
+
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/PathExpr.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/PathExpr.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/PathExpr.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * A path expression.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+public class PathExpr extends Expr {
+
+ Expr fFilterExpr;
+ LocationPath fLocationPath;
+
+ /**
+ * Brand new shiny PathExpr ...
+ *
+ * @param filter
+ * @param locationPath
+ */
+
+ public PathExpr ( Expr filter, LocationPath locationPath) {
+ super(null);
+ fFilterExpr = filter;
+ fLocationPath = locationPath;
+ }
+
+ /**
+ * @return return the filter expression.
+ */
+ public Expr getFilterExpr() {
+ return fFilterExpr;
+ }
+
+ /**
+ * @return the location path.
+ */
+ public LocationPath getLocationPath() {
+ return fLocationPath;
+ }
+
+ @Override
+ protected String asText() {
+ StringBuilder buf = new StringBuilder();
+
+ if (getFilterExpr() != null) {
+ buf.append(getFilterExpr().getText());
+ }
+
+ if (getLocationPath() != null) {
+ if (!getLocationPath().getSteps().isEmpty()) buf.append("/");
+ buf.append(getLocationPath().getText());
+ }
+
+ return buf.toString();
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#toString()
+ */
+
+ @Override
+ public String toString() {
+ StringBuilder buf = new StringBuilder();
+ buf.append("{");
+ buf.append(getClass().getSimpleName());
+ buf.append(",");
+ if (getFilterExpr() != null) {
+ buf.append(getFilterExpr() );
+ }
+
+ if (getLocationPath() != null) {
+ if (!getLocationPath().getSteps().isEmpty()) buf.append("/");
+ buf.append(getLocationPath() );
+ }
+ buf.append("}");
+
+ return buf.toString();
+ }
+
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getPosition()
+ */
+ @Override
+ public int getPosition () {
+ return fFilterExpr.getPosition();
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getEndPosition()
+ */
+ @Override
+ public int getEndPosition () {
+ if (fLocationPath != null) {
+ return fLocationPath.getEndPosition();
+ }
+ return fFilterExpr.getEndPosition();
+ }
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Predicate.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Predicate.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Predicate.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * A predicate.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+public class Predicate {
+
+ Expr fExpr ;
+
+ /**
+ * Brand new predicate on an expression.
+ * @param expr
+ */
+
+ public Predicate (Expr expr) {
+ fExpr = expr;
+ }
+
+ /**
+ * @return the predicate (boolean) expression.
+ */
+ public Expr getExpr () {
+ return fExpr;
+ }
+
+ /**
+ * @return return it as text.
+ */
+
+ public String getText() {
+ return "[" + fExpr.getText() + "]";
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString () {
+ StringBuilder sb = new StringBuilder();
+ sb.append("{").append(getClass().getName()).append(",");
+ sb.append("[").append(fExpr).append("]");
+ return sb.toString();
+ }
+
+ /**
+ * @return the position of the predicate in the input "stream"
+ */
+ public int getPosition ()
+ {
+ return fExpr != null ? fExpr.getPosition() : -1;
+ }
+
+ /**
+ * @return the end position of the predicate in the input "stream"
+ */
+ public int getEndPosition ()
+ {
+ return fExpr != null ? fExpr.getEndPosition() : -1;
+ }
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/ProcessingInstructionNodeStep.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/ProcessingInstructionNodeStep.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/ProcessingInstructionNodeStep.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * ProcessingIntstruction node step in an XPath path.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+
+public class ProcessingInstructionNodeStep extends Step {
+
+ String fName;
+ /**
+ * Brand new processing-instruction-node-step ...
+ * @param axis
+ * @param name
+ */
+ public ProcessingInstructionNodeStep (int axis, String name) {
+ super(axis);
+ fName = name;
+
+ }
+
+ /**
+ * @return name of the processing instruction.
+ */
+ public String getName () {
+ return fName;
+ }
+
+
+ @Override
+ protected String asString () {
+ StringBuilder sb = new StringBuilder ();
+ sb.append("processing-instruction(");
+ if (fName != null) {
+ sb.append(fName);
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ @Override
+ protected String asText() {
+ return asString();
+ }
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/RelationalExpr.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/RelationalExpr.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/RelationalExpr.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * A relational expression ( >,<, etc.)
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+public class RelationalExpr extends BinaryExpr {
+
+ /**
+ * A brand new shiny relational expression.
+ *
+ * @param op
+ * @param left
+ * @param right
+ */
+
+ public RelationalExpr (String op, Expr left, Expr right) {
+ super (op,left,right);
+ }
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Step.java
===================================================================
--- workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Step.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Step.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,158 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A step in the location path ...
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+public class Step {
+
+ int fAxis = 0;
+ List<Predicate> fList = new ArrayList<Predicate>();
+
+ int fStartPosition = -1;
+ int fEndPosition = -1;
+
+ /**
+ * Bran new step ... on the axis specified.
+ *
+ * @param axis
+ */
+ public Step (int axis) {
+ fAxis = axis;
+ }
+
+
+ /**
+ * @return return the text of this step.
+ */
+
+ public String getText()
+ {
+ StringBuilder buf = new StringBuilder();
+ buf.append(getAxisName());
+ buf.append("::");
+ buf.append(asText());
+
+ for(Predicate p : fList) {
+ buf.append(p.getText());
+ }
+ return buf.toString();
+ }
+
+ protected String asText () {
+ return "?";
+ }
+
+ /**
+ * @return the axis of this step.
+ */
+ public int getAxis () {
+ return fAxis;
+ }
+
+ /**
+ * Set the axis of this step (from parser).
+ *
+ * @param axis the axis of this step.
+ */
+ public void setAxis (int axis) {
+ fAxis = axis;
+ }
+
+ /**
+ * Add a predicate to this step.
+ *
+ * @param predicate
+ */
+ public void addPredicate(Predicate predicate)
+ {
+ if (predicate != null) {
+ fList.add(predicate);
+ }
+ }
+
+ /**
+ * @return all predicates of this step.
+ */
+ public List<Predicate> getPredicates() {
+ return fList;
+ }
+
+ /**
+ * @return the axis name.
+ */
+ public String getAxisName ()
+ {
+ return Axis.getName(fAxis);
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString () {
+ StringBuilder sb = new StringBuilder();
+
sb.append("{").append(getClass().getSimpleName()).append(",").append(getAxisName()).append(",");
+ sb.append(asString());
+ sb.append(",[");
+ for(Predicate p : fList) {
+ sb.append(p);
+ sb.append(",");
+ }
+ sb.append("]");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ protected String asString () {
+ return null;
+ }
+
+
+ /**
+ * @return the end position of this step in the input "stream"
+ */
+ public int getEndPosition() {
+ return fEndPosition;
+ }
+
+ /**
+ * @return the start position of this step in the input "stream"
+ */
+
+ public int getPosition() {
+ return fStartPosition;
+ }
+
+ /**
+ * Set the position of this step in the input stream.
+ * This is called by the parser ...
+ *
+ * @param start
+ * @param end
+ */
+ public void setPosition (int start, int end) {
+ fStartPosition = start;
+ fEndPosition = end;
+ }
+
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/TextNodeStep.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/TextNodeStep.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/TextNodeStep.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * TextNodeStep are text() nodes in any XPath path.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+public class TextNodeStep extends Step {
+
+ /**
+ * Brand new shiny TextNodeStep
+ * @param axis
+ */
+ public TextNodeStep (int axis) {
+ super(axis);
+ }
+
+ @Override
+ @SuppressWarnings("nls")
+ protected String asText()
+ {
+ return "text()";
+ }
+
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/UnaryExpr.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/UnaryExpr.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/UnaryExpr.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+
+
+/**
+ * A unary expression.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+@SuppressWarnings("nls")
+
+public class UnaryExpr extends Expr {
+
+ Expr fExpr;
+ String fOparand;
+
+ /**
+ * Brand new shiny unary expression
+ * @param expr
+ */
+ public UnaryExpr (Expr expr) {
+ super(expr.toString());
+ fExpr = expr;
+ }
+
+ /**
+ * @return the RHS of the unary expression.
+ */
+
+ public Expr getExpr () {
+ return fExpr;
+ }
+
+ /**
+ * Set the operand of the unary expression.
+ *
+ * @param operand the operand
+ */
+
+ public void setOperand (String operand)
+ {
+ fOparand = operand;
+ }
+
+ @Override
+ protected String asText()
+ {
+ StringBuilder sb = new StringBuilder();
+ if (fOparand != null) {
+ sb.append(fOparand);
+ }
+ if (fExpr != null) {
+ sb.append(fExpr.asText());
+ }
+ return sb.toString();
+ }
+
+
+ @Override
+ protected String asString () {
+ StringBuilder sb = new StringBuilder();
+ if (fOparand != null) {
+ sb.append(fOparand);
+ sb.append(",");
+ }
+ if (fExpr != null) {
+ sb.append(fExpr);
+ }
+ return sb.toString();
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#isWrapParen()
+ */
+ @Override
+ public boolean isWrapParen () {
+ return fExpr != null ? fExpr.isWrapParen() : false;
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getPosition()
+ */
+ @Override
+ public int getPosition () {
+ return fExpr != null ? fExpr.getPosition() : -1;
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getEndPosition()
+ */
+ @Override
+ public int getEndPosition () {
+ return fExpr != null ? fExpr.getEndPosition() : -1;
+ }
+
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/UnionExpr.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/UnionExpr.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/UnionExpr.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * A union expression in XPath.
+ * Basically
+ * <pre>path | path</pre>
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+public class UnionExpr extends BinaryExpr {
+
+ /**
+ * A Brand new shiny union expression.
+ *
+ * @param op should only be |
+ * @param left
+ * @param right
+ */
+
+ public UnionExpr (String op, Expr left, Expr right) {
+ super (op,left,right);
+ }
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/VariableReferenceExpr.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/VariableReferenceExpr.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/VariableReferenceExpr.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ *
+ * Variable Reference Expression. $variable bit of XPath
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+@SuppressWarnings("nls")
+
+public class VariableReferenceExpr extends Expr {
+ String fName;
+ String fPrefix;
+
+ /**
+ * Brand new shiny VariableRefExpr.
+ * @param prefix prefix of the variable (may be null or "")
+ * @param name the name of the variable
+ */
+
+ public VariableReferenceExpr (String prefix, String name) {
+ super(null);
+ fPrefix = prefix;
+ fName = name;
+ fText = getText();
+ }
+
+ /**
+ *
+ * @return the prefix
+ */
+
+ public String getPrefix() {
+ return fPrefix;
+ }
+
+ /**
+ * @return The variable name (sans prefix)
+ */
+ public String getVariableName() {
+ return fName;
+ }
+
+ /**
+ * Return the QName that represents this variable name.
+ * The QName is returned as a string, with the original prefix used to specify the
namespace.
+ *
+ * @return the QName of this variable
+ */
+
+ public String getQName() {
+ if ("".equals(fPrefix) || fPrefix == null) {
+ return fName;
+ }
+ return fPrefix + ":" + fName;
+ }
+
+
+ @Override
+ protected String asText() {
+ return "$" + getQName();
+ }
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Visitor.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Visitor.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Visitor.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10 ;
+
+/**
+ * Java JDK dependencies ...
+ */
+import java.util.List;
+
+
+/**
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ */
+
+public class Visitor {
+
+ protected void visit ( PathExpr expr ) {
+ visit ( expr.getFilterExpr() );
+ visit ( expr.getLocationPath() );
+ }
+
+
+ protected void visit (LocationPath expr ) {
+ visitList( expr.getSteps() );
+ }
+
+
+
+ protected void visit (FilterExpr expr) {
+ visit(expr.getExpr());
+ visitList( expr.getPredicates() );
+ }
+
+ protected void visit (BinaryExpr expr) {
+
+ visit(expr.getLHS());
+ visit(expr.getRHS());
+ }
+
+
+ protected void visit(UnaryExpr expr) {
+ visit( expr.getExpr() );
+ }
+
+
+ protected void visit(UnionExpr expr) {
+ visit(expr.getLHS());
+ visit(expr.getRHS());
+
+ }
+
+ protected void visit (NumberExpr expr) {
+
+ }
+
+
+ protected void visit (LiteralExpr expr) {
+
+ }
+
+
+ protected void visit (VariableReferenceExpr expr) {
+
+ }
+
+
+ protected void visit (FunctionCallExpr expr) {
+ visitList( expr.getParameters() );
+ }
+
+ protected void visit (NameStep step) {
+ visitList(step.getPredicates());
+ }
+
+ protected void visit(ProcessingInstructionNodeStep step) {
+ visitList(step.getPredicates());
+ }
+
+ protected void visit(AllNodeStep step) {
+ visitList(step.getPredicates());
+ }
+
+
+ protected void visit (TextNodeStep step) {
+ visitList(step.getPredicates());
+ }
+
+ protected void visit (CommentNodeStep step) {
+ visitList(step.getPredicates());
+ }
+
+ protected void visit (Predicate predicate) {
+ visit(predicate.getExpr());
+ }
+
+
+ void visitList ( List<?> list) {
+ for(Object next: list) {
+ visit(next);
+ }
+ }
+
+
+ /**
+ * @param obj
+ */
+ public void visit ( Object obj ) {
+
+ if (obj instanceof PathExpr) {
+ visit((PathExpr) obj);
+ } else if (obj instanceof LocationPath) {
+ visit((LocationPath) obj);
+ } else if (obj instanceof BinaryExpr) {
+ visit((BinaryExpr) obj);
+ } else if (obj instanceof FilterExpr) {
+ visit((FilterExpr)obj);
+ } else if (obj instanceof UnaryExpr) {
+ visit((UnaryExpr)obj);
+ } else if (obj instanceof NumberExpr) {
+ visit((NumberExpr)obj);
+ } else if (obj instanceof LiteralExpr) {
+ visit((LiteralExpr)obj);
+ } else if (obj instanceof VariableReferenceExpr) {
+ visit((VariableReferenceExpr)obj);
+ } else if (obj instanceof FunctionCallExpr) {
+ visit((FunctionCallExpr) obj);
+ } else if (obj instanceof List) {
+ visitList((List<?>) obj);
+ } else if (obj instanceof NameStep) {
+ visit((NameStep)obj);
+ } else if (obj instanceof ProcessingInstructionNodeStep) {
+ visit((ProcessingInstructionNodeStep) obj);
+ } else if (obj instanceof AllNodeStep) {
+ visit((AllNodeStep)obj);
+ } else if (obj instanceof TextNodeStep) {
+ visit((TextNodeStep)obj);
+ } else if (obj instanceof CommentNodeStep) {
+ visit((CommentNodeStep)obj);
+ } else if (obj instanceof Predicate) {
+ visit((Predicate)obj);
+ } else {
+ // ignore or throw error ... ?
+ }
+ }
+
+}
\ No newline at end of file
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,512 @@
+grammar XPath10;
+
+options
+{
+ k=4;
+ output=AST;
+}
+
+tokens {
+ OR = 'or' ;
+ AND = 'and' ;
+ MOD = 'mod' ;
+ DIV = 'div' ;
+
+ LPAREN = '(' ;
+ RPAREN = ')' ;
+ LBRACKET = '[' ;
+ RBRACKET = ']' ;
+ PIPE = '|' ;
+ DOT = '.' ;
+ DOT2 = '..' ;
+ AT = '@' ;
+ COMMA = ',' ;
+ COLON2 = '::' ;
+ COLON = ':' ;
+ SLASH = '/' ;
+ SLASH2 = '//' ;
+ DOLLAR = '$' ;
+ PLUS = '+' ;
+ MINUS = '-' ;
+
+ EQ = '=' ;
+ NE = '!=' ;
+ LT = '<' ;
+ LTE = '<=' ;
+ GT = '>' ;
+ GTE = '>=' ;
+ STAR = '*' ;
+
+ // Pseudo Tokens.
+ Args;
+}
+
+
+@header {
+ package org.eclipse.bpel.xpath10.parser;
+ import org.eclipse.bpel.xpath10.*;
+
+}
+
+@lexer::header {
+ package org.eclipse.bpel.xpath10.parser;
+}
+
+@members {
+
+ boolean isNodeNodeName (String node) {
+ return "node".equals(node);
+ }
+ boolean isTextNodeName (String node) {
+ return "text".equals(node);
+ }
+ boolean isCommentNodeName (String node) {
+ return "comment".equals(node);
+ }
+ boolean isProcessingInstructionNodeName (String node) {
+ return "processing-instruction".equals(node);
+ }
+
+ static int positionOf (Token token, boolean start) {
+ if (token instanceof CommonToken) {
+ CommonToken t = (CommonToken)token;
+ if (start) {
+ return t.getStartIndex();
+ }
+ return t.getStopIndex();
+ }
+ return -1;
+ }
+
+ static int positionOfIfUnset (Token token, boolean start, int currentValue) {
+ if (currentValue < 0) {
+ return positionOf(token,start);
+ }
+ return currentValue;
+ }
+
+ public void displayRecognitionError(String[] tokenNames, RecognitionException re)
+ {
+ String msg = getErrorMessage(re, tokenNames);
+ // we don't recover
+ throw new XPath10Exception(msg,re.getCause(),re.index);
+ }
+
+}
+
+@lexer::members {
+ public void displayRecognitionError(String[] tokenNames, RecognitionException re)
+ {
+ String msg = getErrorMessage(re, tokenNames);
+ // we don't recover
+ throw new XPath10Exception(msg,re.getCause(),re.index);
+ }
+}
+//
+// XPath 1.0 Grammer rules.
+//
+
+xpath returns [Expr result]
+ : e=unionExpr
+ { $result = e.result; }
+ ;
+
+locationPath returns [LocationPath result]:
+ aloc=absoluteLocationPath
+ { $result=aloc.result; }
+ | rloc=relativeLocationPath
+ { $result=rloc.result; }
+ ;
+
+absoluteLocationPath returns [LocationPath result]
+@init {
+ Step ans = null;
+} :
+ (op=SLASH2^ {
+ ans=new AllNodeStep(Axis.DESCENDANT_OR_SELF);
+ ans.setPosition(positionOf($op,true),positionOf($op,false)); } | op=SLASH^ )
+
+ ( (AT|STAR|IDENTIFIER)=> loc=i_relativeLocationPath { $result = loc.result; }
| { $result = new LocationPath(true); } )
+ { if ($result != null) {
+ if (ans != null) { $result.addFirstStep(ans); }
+ $result.setIsAbsolute(true);
+ }
+ }
+ ;
+
+relativeLocationPath returns [LocationPath result]:
+ e=i_relativeLocationPath
+ { $result = e.result; }
+ ;
+
+i_relativeLocationPath returns [LocationPath result]:
+ s1=step { $result=new LocationPath(false, s1.result); }
+ ( (op=SLASH2 { $result.addStep(new AllNodeStep(Axis.DESCENDANT_OR_SELF));
+ $result.setPosition(positionOf($op,true),positionOf($op,false));
+ } |SLASH ) s2=step {$result.addStep(s2.result);} )*
+ ;
+
+
+// Step is:
+// NameStep
+// Special Step
+// Abbr Step
+step returns [Step result]
+@init {
+ // default axis, per XPath spec.
+ int anAxis = Axis.CHILD;
+ int posStart = -1;
+ String aNs = null;
+
+} :
+ (
+ // If it has an axis
+ ( (IDENTIFIER COLON2 | AT) => axis { anAxis=$axis.axis; posStart =
$axis.posStart;} | /* Empty, no axis (default) */ )
+
+ (
+ ( (ns=IDENTIFIER COLON { aNs=$ns.text;
posStart=positionOfIfUnset($ns,true,posStart); } )? ( id=IDENTIFIER|id=STAR ) {
+ $result = new NameStep(anAxis,aNs,$id.text);
+ $result.setPosition(positionOfIfUnset($id,true,posStart),
positionOf($id,false));
+ } )
+ |
+
+ ss=specialStep {$result = ss.result; $result.setAxis(anAxis); }
+
+ ) ( p=predicate {$result.addPredicate(p.result);} )*
+ )
+
+ | as=abbrStep {
+ $result=as.result;
+ $result.setPosition(as.posStart,as.posEnd);
+ } ( p=predicate {$result.addPredicate(p.result);} )*
+ ;
+
+
+// special step copies the position in the token stream into the semantic tree
+//
+specialStep returns [Step result]
+@init {
+ String piID = null;
+} :
+ { isProcessingInstructionNodeName( input.LT(1).getText() ) }?
+ id=IDENTIFIER^ LPAREN! ( pi=IDENTIFIER {piID=$pi.text; } )? rp=RPAREN!
+ { $result = new ProcessingInstructionNodeStep(0, piID );
+ $result.setPosition(positionOf($id,true),positionOf($rp,false));
+ }
+
+ | { isCommentNodeName(input.LT(1).getText()) }? id=IDENTIFIER^ LPAREN! rp=RPAREN!
+ { $result = new CommentNodeStep(Axis.CHILD);
+ $result.setPosition(positionOf($id,true),positionOf($rp,false));
+ }
+
+ | { isTextNodeName(input.LT(1).getText()) }? id=IDENTIFIER^ LPAREN! rp=RPAREN!
+ { $result = new TextNodeStep(Axis.CHILD);
+ $result.setPosition(positionOf($id,true),positionOf($rp,false));
+ }
+
+ | { isNodeNodeName(input.LT(1).getText()) }? id=IDENTIFIER^ LPAREN! rp=RPAREN!
+ { $result = new AllNodeStep(Axis.CHILD);
+ $result.setPosition(positionOf($id,true),positionOf($rp,false));
+ }
+
+ ;
+
+axis returns [int axis, int posStart, int posEnd ]:
+ id=IDENTIFIER COLON2^
+ { $axis = Axis.getAxis( $id.text);
+ $posStart = positionOf($id,true);
+ $posEnd = positionOf($id,false);
+ }
+ | at=AT
+ { $axis = Axis.ATTRIBUTE;
+ $posStart = positionOf($at,true);
+ $posEnd = positionOf($at,false);
+ }
+ ;
+
+
+// ----------------------------------------
+// Section 2.4
+// Predicates
+// ----------------------------------------
+
+// .... production [8] ....
+//
+predicate returns [Predicate result]:
+ LBRACKET^ e=predicateExpr RBRACKET!
+ { $result = e.result ; }
+ ;
+
+// .... production [9] ....
+//
+predicateExpr returns [Predicate result]
+ : e=expr
+ { $result = new Predicate(e.result) ; }
+ ;
+
+// .... production [12] ....
+// A location step of . is short for self::node().
+// Similarly, a location step of .. is short for parent::node()
+//
+abbrStep returns [Step result, int posStart, int posEnd ]:
+ d=DOT { $result = new AllNodeStep(Axis.SELF); $posStart = positionOf($d,true);
$posEnd = $posStart+1; }
+ | d=DOT2 { $result = new AllNodeStep(Axis.PARENT); $posStart = positionOf($d,true);
$posEnd = $posStart+2; }
+
+;
+
+// .... production [13] ....
+//
+abbrAxisSpecifier : ( AT )? ;
+
+
+// ----------------------------------------
+// Section 3
+// Expressions
+// ----------------------------------------
+
+// ----------------------------------------
+// Section 3.1
+// Basics
+// ----------------------------------------
+
+// .... production [14] ....
+//
+expr returns [Expr result]
+ : e=orExpr
+ { $result = $e.result ; }
+ ;
+
+// .... production [15] ....
+//
+primaryExpr returns [Expr result]:
+ varRef=variableReference { $result = varRef.result ; }
+ | LPAREN! exp=expr RPAREN! { $result = exp.result; $result.setWrapParen(true);
}
+ | lit=literal { $result = lit.result ;}
+ | num=number { $result = num.result ; }
+ | fn=functionCall { $result = fn.result ; }
+ ;
+
+
+literal returns [Expr result]
+ : lit=LITERAL^
+ { $result = new LiteralExpr($lit.text) ;
+ $result.setPosition (positionOf($lit,true),positionOf($lit,false) );
+ }
+ ;
+
+number returns [Expr result]
+ : num=NUMBER^
+ { $result = new NumberExpr($num.text);
+ $result.setPosition(positionOf($num,true),positionOf($num,false));
+ }
+ ;
+
+variableReference returns [Expr result]
+ : DOLLAR^ var=qName
+ { $result = new VariableReferenceExpr($var.prefix, $var.localName);
+ $result.setPosition( $var.startOffset, $var.endOffset );
+ }
+ ;
+
+// ----------------------------------------
+// Section 3.2
+// Function Calls
+// ----------------------------------------
+
+// .... production [16] ....
+//
+functionCall returns [FunctionCallExpr result ]
+ : qn=qName
+ { $result = new FunctionCallExpr($qn.prefix,$qn.localName);
+ $result.setPosition ($qn.startOffset,$qn.endOffset);
+ }
+ LPAREN! ( list=argList { $result.getParameters().addAll(list.result); } )?
RPAREN!
+ ;
+
+// .... production [16.1] ....
+//
+argList returns [ List<Expr> result ]
+@init {
+ $result = new ArrayList<Expr>();
+}
+ : a=argument { $result.add(a.result); }
+ ( COMMA b=argument { $result.add(b.result); } )*
+ -> ^(Args argument+) ;
+
+// .... production [17] ....
+//
+argument returns [Expr result]
+ : e=expr
+ { $result = e.result ; }
+ ;
+
+// ----------------------------------------
+// Section 3.3
+// Node-sets
+// ----------------------------------------
+
+// .... production [18] ....
+//
+unionExpr returns [Expr result]
+ : (a=pathExpr)
+ { $result = a.result; }
+ ((op=PIPE^) b=pathExpr
+ {$result = new UnionExpr($op.text,$unionExpr.result,b.result); }
+ )*
+ ;
+// .... production [19] ....
+// TODO: Fix Slash2 //
+
+pathExpr returns [Expr result]
+@init {
+ Step ans = null;
+}:
+ loc=locationPath
+ { $result = $loc.result; }
+ | e=filterExpr { $result = e.result; }
+ ( (SLASH|SLASH2 { ans=new AllNodeStep(Axis.DESCENDANT_OR_SELF);})
path=relativeLocationPath {
+ $result = new PathExpr(e.result,path.result);
+ if (ans != null) { path.result.addFirstStep(ans); }
+ } )?
+ ;
+
+// .... production [20] ....
+//
+filterExpr returns [Expr result]
+@init {
+ FilterExpr filter = null;
+}
+ : e=primaryExpr { filter = new FilterExpr(e.result) ; }
+ ( p=predicate {filter.addPredicate(p.result); } )*
+ { $result = filter.hasPredicates() ? filter : filter.getExpr(); }
+ ;
+
+
+// ----------------------------------------
+// Section 3.4
+// Booleans
+// ----------------------------------------
+
+// .... production [21] ....
+// orExpr: andExpr ( OR^ andExpr )* ;
+
+orExpr returns [Expr result]
+ : (a=andExpr)
+ { $result = $a.result; }
+ ((op=OR^) b=andExpr
+ { $result = new LogicalExpr($op.text, $orExpr.result, b.result); }
+ )*
+ ;
+
+// .... production [22] ....
+// andExpr : equalityExpr ( AND^ equalityExpr )? ;
+
+andExpr returns [Expr result]
+ : (a=equalityExpr)
+ { $result = a.result; }
+ ((op=AND^) b=equalityExpr
+ { $result = new LogicalExpr($op.text,$andExpr.result,b.result); }
+ )*
+ ;
+
+// .... production [23] ....
+// equalityExpr : relationalExpr ((EQ|NE)^ relationalExpr )? ;
+equalityExpr returns [Expr result]
+ : (a=relationalExpr)
+ { $result = a.result; }
+ ((op=EQ^|op=NE^) b=relationalExpr
+ { $result = new EqualityExpr($op.text, $equalityExpr.result, b.result );
}
+ )*
+ ;
+
+// .... production [24] ....
+// relationalExpr : additiveExpr ((LT|GT|LTE|GTE)^ additiveExpr )? ;
+relationalExpr returns [Expr result]
+ : (a=additiveExpr) // set result
+ { $result = a.result; }
+ ((op=LT^|op=GT^|op=LTE^|op=GTE^) b=additiveExpr
+ { $result = new RelationalExpr($op.text, $relationalExpr.result, b.result);
}
+ )*
+ ;
+// ----------------------------------------
+// Section 3.5
+// Numbers
+// ----------------------------------------
+
+// .... production [25] ....
+//
+// additiveExpr : multExpr ((PLUS^|MINUS^) multExpr )? ;
+
+additiveExpr returns [Expr result]
+ : (a=multExpr)
+ { $result = a.result; } // set result
+ ((op=PLUS^|op=MINUS^) b=multExpr
+ { $result = new AdditiveExpr($op.text,$additiveExpr.result, b.result); }
+ )*
+ ;
+
+// .... production [26] ....
+// multExpr : unaryExpr ( (STAR^| DIV^| MOD^) unaryExpr )? ;
+multExpr returns [Expr result]
+ : (a=unaryExpr)
+ { $result = a.result; } // set result
+ ((op=STAR^|op=DIV^|op=MOD^) b=unaryExpr
+ { $result = new MultiplicativeExpr($op.text, $multExpr.result, b.result); }
+ )*
+ ;
+
+// .... production [27] ....
+//
+unaryExpr returns [UnaryExpr result]
+ : u=unionExpr
+ { $result = new UnaryExpr(u.result); }
+
+ | op=MINUS n=unaryExpr
+ {
+ $result = n.result;
+ $result.setOperand($op.text);
+ $result.setPosition(positionOf($op,true),-1);
+ }
+ ;
+
+
+// QName
+// When no namespace is present, the default prefix is "", not null
+
+qName returns [String prefix, String localName , int startOffset, int endOffset ]
+@init {
+ $prefix = "";
+ $startOffset = -1;
+ $startOffset = -1;
+} :
+ (p=IDENTIFIER COLON^ { $prefix=$p.text ; $startOffset = positionOf($p,true); })?
+ n=IDENTIFIER { $localName=$n.text;
+ if ($startOffset < 0) {
+ $startOffset = positionOf($n,true);
+ }
+ $endOffset = positionOf($n,false);
+ }
+ ;
+
+
+// Lexer section. Convention is that rules which start with an uppercase letter are lexer
rules.
+WS : ('\n' | ' ' | '\t' | '\r')+ { $channel=HIDDEN;}
+ ;
+
+fragment
+DIGITS : '0'..'9'+;
+
+fragment
+SINGLE_QUOTE_STRING : '\''! (~('\''))* '\''! ;
+
+fragment
+DOUBLE_QUOTE_STRING : '"'! (~('"'))* '"'! ;
+
+LITERAL : SINGLE_QUOTE_STRING | DOUBLE_QUOTE_STRING ;
+
+NUMBER : (DIGITS) ('.'DIGITS)? | '.' DIGITS ;
+
+IDENTIFIER :
+ ('\u0241'..'\u0377'|'a'..'z'|'A'..'Z'|'_')
('\u0241'..'\u0377'|'a'..'z'|'A'..'Z'|'-'|'_'|'0'..'9'|'.')*
+ ;
+
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Exception.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Exception.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Exception.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10.parser;
+
+/**
+ *
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Jun 23, 2008
+ *
+ */
+public class XPath10Exception extends Error {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 7269923697850123266L;
+
+ int fPosition = 0;
+ /**
+ * @param message
+ * @param cause
+ * @param position
+ */
+
+ public XPath10Exception(String message, Throwable cause, int position ) {
+ super(message, cause);
+ fPosition = position;
+ }
+
+ /**
+ * @return the position within the input stream where the exception has occurred.
+ */
+ public int getPosition () {
+ return fPosition;
+ }
+
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Factory.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Factory.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Factory.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10.parser;
+
+import org.antlr.runtime.ANTLRStringStream;
+import org.antlr.runtime.RecognitionException;
+
+import org.antlr.runtime.CommonTokenStream;
+import org.eclipse.bpel.xpath10.Expr;
+
+/**
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Jun 23, 2008
+ *
+ */
+public class XPath10Factory {
+
+ /**
+ * @param source
+ * @return a brand new shiny xpath expr [ whatever it may be ]
+ * @throws XPath10Exception
+ */
+ static public Expr create (String source) throws XPath10Exception
+ {
+ XPath10Parser parser = createParser(source);
+ try {
+ return parser.expr().result;
+ } catch (RecognitionException re) {
+ throw new XPath10Exception(re.getLocalizedMessage(),re.getCause(),re.index);
+ } catch (XPath10Exception ex) {
+ throw ex;
+ } catch (Throwable t) {
+ throw new XPath10Exception(t.getLocalizedMessage(),t.getCause(),-1);
+ }
+ }
+
+
+ static protected XPath10Parser createParser(String source) {
+ return new XPath10Parser(new CommonTokenStream(createLexer(source)));
+ }
+
+ static XPath10Lexer createLexer(String testString) {
+ return new XPath10Lexer(new ANTLRStringStream(testString));
+ }
+}
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Lexer.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Lexer.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Lexer.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,1365 @@
+// $ANTLR 3.0.1 XPath10__.g 2008-06-23 18:23:27
+
+ package org.eclipse.bpel.xpath10.parser;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+public class XPath10Lexer extends Lexer {
+ public static final int DOLLAR=21;
+ public static final int LT=26;
+ public static final int SLASH2=20;
+ public static final int STAR=30;
+ public static final int MOD=6;
+ public static final int DIGITS=36;
+ public static final int GTE=29;
+ public static final int NUMBER=34;
+ public static final int Args=31;
+ public static final int LITERAL=33;
+ public static final int MINUS=23;
+ public static final int AND=5;
+ public static final int Tokens=39;
+ public static final int EOF=-1;
+ public static final int LTE=27;
+ public static final int LPAREN=8;
+ public static final int COLON=18;
+ public static final int LBRACKET=10;
+ public static final int AT=15;
+ public static final int RPAREN=9;
+ public static final int SINGLE_QUOTE_STRING=37;
+ public static final int SLASH=19;
+ public static final int WS=35;
+ public static final int COMMA=16;
+ public static final int DOUBLE_QUOTE_STRING=38;
+ public static final int IDENTIFIER=32;
+ public static final int OR=4;
+ public static final int GT=28;
+ public static final int PIPE=12;
+ public static final int PLUS=22;
+ public static final int DOT2=14;
+ public static final int RBRACKET=11;
+ public static final int DIV=7;
+ public static final int EQ=24;
+ public static final int DOT=13;
+ public static final int COLON2=17;
+ public static final int NE=25;
+
+ public void displayRecognitionError(String[] tokenNames, RecognitionException re)
+ {
+ String msg = getErrorMessage(re, tokenNames);
+ // we don't recover
+ throw new XPath10Exception(msg,re.getCause(),re.index);
+ }
+
+ public XPath10Lexer() {;}
+ public XPath10Lexer(CharStream input) {
+ super(input);
+ }
+ public String getGrammarFileName() { return "XPath10__.g"; }
+
+ // $ANTLR start OR
+ public final void mOR() throws RecognitionException {
+ try {
+ int _type = OR;
+ // XPath10__.g:14:4: ( 'or' )
+ // XPath10__.g:14:6: 'or'
+ {
+ match("or");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end OR
+
+ // $ANTLR start AND
+ public final void mAND() throws RecognitionException {
+ try {
+ int _type = AND;
+ // XPath10__.g:15:5: ( 'and' )
+ // XPath10__.g:15:7: 'and'
+ {
+ match("and");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end AND
+
+ // $ANTLR start MOD
+ public final void mMOD() throws RecognitionException {
+ try {
+ int _type = MOD;
+ // XPath10__.g:16:5: ( 'mod' )
+ // XPath10__.g:16:7: 'mod'
+ {
+ match("mod");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end MOD
+
+ // $ANTLR start DIV
+ public final void mDIV() throws RecognitionException {
+ try {
+ int _type = DIV;
+ // XPath10__.g:17:5: ( 'div' )
+ // XPath10__.g:17:7: 'div'
+ {
+ match("div");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end DIV
+
+ // $ANTLR start LPAREN
+ public final void mLPAREN() throws RecognitionException {
+ try {
+ int _type = LPAREN;
+ // XPath10__.g:18:8: ( '(' )
+ // XPath10__.g:18:10: '('
+ {
+ match('(');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end LPAREN
+
+ // $ANTLR start RPAREN
+ public final void mRPAREN() throws RecognitionException {
+ try {
+ int _type = RPAREN;
+ // XPath10__.g:19:8: ( ')' )
+ // XPath10__.g:19:10: ')'
+ {
+ match(')');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RPAREN
+
+ // $ANTLR start LBRACKET
+ public final void mLBRACKET() throws RecognitionException {
+ try {
+ int _type = LBRACKET;
+ // XPath10__.g:20:10: ( '[' )
+ // XPath10__.g:20:12: '['
+ {
+ match('[');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end LBRACKET
+
+ // $ANTLR start RBRACKET
+ public final void mRBRACKET() throws RecognitionException {
+ try {
+ int _type = RBRACKET;
+ // XPath10__.g:21:10: ( ']' )
+ // XPath10__.g:21:12: ']'
+ {
+ match(']');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RBRACKET
+
+ // $ANTLR start PIPE
+ public final void mPIPE() throws RecognitionException {
+ try {
+ int _type = PIPE;
+ // XPath10__.g:22:6: ( '|' )
+ // XPath10__.g:22:8: '|'
+ {
+ match('|');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end PIPE
+
+ // $ANTLR start DOT
+ public final void mDOT() throws RecognitionException {
+ try {
+ int _type = DOT;
+ // XPath10__.g:23:5: ( '.' )
+ // XPath10__.g:23:7: '.'
+ {
+ match('.');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end DOT
+
+ // $ANTLR start DOT2
+ public final void mDOT2() throws RecognitionException {
+ try {
+ int _type = DOT2;
+ // XPath10__.g:24:6: ( '..' )
+ // XPath10__.g:24:8: '..'
+ {
+ match("..");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end DOT2
+
+ // $ANTLR start AT
+ public final void mAT() throws RecognitionException {
+ try {
+ int _type = AT;
+ // XPath10__.g:25:4: ( '@' )
+ // XPath10__.g:25:6: '@'
+ {
+ match('@');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end AT
+
+ // $ANTLR start COMMA
+ public final void mCOMMA() throws RecognitionException {
+ try {
+ int _type = COMMA;
+ // XPath10__.g:26:7: ( ',' )
+ // XPath10__.g:26:9: ','
+ {
+ match(',');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end COMMA
+
+ // $ANTLR start COLON2
+ public final void mCOLON2() throws RecognitionException {
+ try {
+ int _type = COLON2;
+ // XPath10__.g:27:8: ( '::' )
+ // XPath10__.g:27:10: '::'
+ {
+ match("::");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end COLON2
+
+ // $ANTLR start COLON
+ public final void mCOLON() throws RecognitionException {
+ try {
+ int _type = COLON;
+ // XPath10__.g:28:7: ( ':' )
+ // XPath10__.g:28:9: ':'
+ {
+ match(':');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end COLON
+
+ // $ANTLR start SLASH
+ public final void mSLASH() throws RecognitionException {
+ try {
+ int _type = SLASH;
+ // XPath10__.g:29:7: ( '/' )
+ // XPath10__.g:29:9: '/'
+ {
+ match('/');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end SLASH
+
+ // $ANTLR start SLASH2
+ public final void mSLASH2() throws RecognitionException {
+ try {
+ int _type = SLASH2;
+ // XPath10__.g:30:8: ( '//' )
+ // XPath10__.g:30:10: '//'
+ {
+ match("//");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end SLASH2
+
+ // $ANTLR start DOLLAR
+ public final void mDOLLAR() throws RecognitionException {
+ try {
+ int _type = DOLLAR;
+ // XPath10__.g:31:8: ( '$' )
+ // XPath10__.g:31:10: '$'
+ {
+ match('$');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end DOLLAR
+
+ // $ANTLR start PLUS
+ public final void mPLUS() throws RecognitionException {
+ try {
+ int _type = PLUS;
+ // XPath10__.g:32:6: ( '+' )
+ // XPath10__.g:32:8: '+'
+ {
+ match('+');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end PLUS
+
+ // $ANTLR start MINUS
+ public final void mMINUS() throws RecognitionException {
+ try {
+ int _type = MINUS;
+ // XPath10__.g:33:7: ( '-' )
+ // XPath10__.g:33:9: '-'
+ {
+ match('-');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end MINUS
+
+ // $ANTLR start EQ
+ public final void mEQ() throws RecognitionException {
+ try {
+ int _type = EQ;
+ // XPath10__.g:34:4: ( '=' )
+ // XPath10__.g:34:6: '='
+ {
+ match('=');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end EQ
+
+ // $ANTLR start NE
+ public final void mNE() throws RecognitionException {
+ try {
+ int _type = NE;
+ // XPath10__.g:35:4: ( '!=' )
+ // XPath10__.g:35:6: '!='
+ {
+ match("!=");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end NE
+
+ // $ANTLR start LT
+ public final void mLT() throws RecognitionException {
+ try {
+ int _type = LT;
+ // XPath10__.g:36:4: ( '<' )
+ // XPath10__.g:36:6: '<'
+ {
+ match('<');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end LT
+
+ // $ANTLR start LTE
+ public final void mLTE() throws RecognitionException {
+ try {
+ int _type = LTE;
+ // XPath10__.g:37:5: ( '<=' )
+ // XPath10__.g:37:7: '<='
+ {
+ match("<=");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end LTE
+
+ // $ANTLR start GT
+ public final void mGT() throws RecognitionException {
+ try {
+ int _type = GT;
+ // XPath10__.g:38:4: ( '>' )
+ // XPath10__.g:38:6: '>'
+ {
+ match('>');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end GT
+
+ // $ANTLR start GTE
+ public final void mGTE() throws RecognitionException {
+ try {
+ int _type = GTE;
+ // XPath10__.g:39:5: ( '>=' )
+ // XPath10__.g:39:7: '>='
+ {
+ match(">=");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end GTE
+
+ // $ANTLR start STAR
+ public final void mSTAR() throws RecognitionException {
+ try {
+ int _type = STAR;
+ // XPath10__.g:40:6: ( '*' )
+ // XPath10__.g:40:8: '*'
+ {
+ match('*');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end STAR
+
+ // $ANTLR start WS
+ public final void mWS() throws RecognitionException {
+ try {
+ int _type = WS;
+ // XPath10__.g:493:4: ( ( '\\n' | ' ' | '\\t' |
'\\r' )+ )
+ // XPath10__.g:493:6: ( '\\n' | ' ' | '\\t' |
'\\r' )+
+ {
+ // XPath10__.g:493:6: ( '\\n' | ' ' | '\\t' |
'\\r' )+
+ int cnt1=0;
+ loop1:
+ do {
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( ((LA1_0>='\t' &&
LA1_0<='\n')||LA1_0=='\r'||LA1_0==' ') ) {
+ alt1=1;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // XPath10__.g:
+ {
+ if ( (input.LA(1)>='\t' &&
input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ if ( cnt1 >= 1 ) break loop1;
+ EarlyExitException eee =
+ new EarlyExitException(1, input);
+ throw eee;
+ }
+ cnt1++;
+ } while (true);
+
+ channel=HIDDEN;
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end WS
+
+ // $ANTLR start DIGITS
+ public final void mDIGITS() throws RecognitionException {
+ try {
+ // XPath10__.g:497:8: ( ( '0' .. '9' )+ )
+ // XPath10__.g:497:10: ( '0' .. '9' )+
+ {
+ // XPath10__.g:497:10: ( '0' .. '9' )+
+ int cnt2=0;
+ loop2:
+ do {
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( ((LA2_0>='0' && LA2_0<='9')) ) {
+ alt2=1;
+ }
+
+
+ switch (alt2) {
+ case 1 :
+ // XPath10__.g:497:10: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ if ( cnt2 >= 1 ) break loop2;
+ EarlyExitException eee =
+ new EarlyExitException(2, input);
+ throw eee;
+ }
+ cnt2++;
+ } while (true);
+
+
+ }
+
+ }
+ finally {
+ }
+ }
+ // $ANTLR end DIGITS
+
+ // $ANTLR start SINGLE_QUOTE_STRING
+ public final void mSINGLE_QUOTE_STRING() throws RecognitionException {
+ try {
+ // XPath10__.g:500:21: ( '\\'' (~ ( '\\'' ) )*
'\\'' )
+ // XPath10__.g:500:23: '\\'' (~ ( '\\'' ) )*
'\\''
+ {
+ match('\'');
+ // XPath10__.g:500:29: (~ ( '\\'' ) )*
+ loop3:
+ do {
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( ((LA3_0>='\u0000' &&
LA3_0<='&')||(LA3_0>='(' && LA3_0<='\uFFFE'))
) {
+ alt3=1;
+ }
+
+
+ switch (alt3) {
+ case 1 :
+ // XPath10__.g:500:30: ~ ( '\\'' )
+ {
+ if ( (input.LA(1)>='\u0000' &&
input.LA(1)<='&')||(input.LA(1)>='(' &&
input.LA(1)<='\uFFFE') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop3;
+ }
+ } while (true);
+
+ match('\'');
+
+ }
+
+ }
+ finally {
+ }
+ }
+ // $ANTLR end SINGLE_QUOTE_STRING
+
+ // $ANTLR start DOUBLE_QUOTE_STRING
+ public final void mDOUBLE_QUOTE_STRING() throws RecognitionException {
+ try {
+ // XPath10__.g:503:21: ( '\"' (~ ( '\"' ) )*
'\"' )
+ // XPath10__.g:503:23: '\"' (~ ( '\"' ) )*
'\"'
+ {
+ match('\"');
+ // XPath10__.g:503:28: (~ ( '\"' ) )*
+ loop4:
+ do {
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+
+ if ( ((LA4_0>='\u0000' &&
LA4_0<='!')||(LA4_0>='#' && LA4_0<='\uFFFE')) )
{
+ alt4=1;
+ }
+
+
+ switch (alt4) {
+ case 1 :
+ // XPath10__.g:503:29: ~ ( '\"' )
+ {
+ if ( (input.LA(1)>='\u0000' &&
input.LA(1)<='!')||(input.LA(1)>='#' &&
input.LA(1)<='\uFFFE') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop4;
+ }
+ } while (true);
+
+ match('\"');
+
+ }
+
+ }
+ finally {
+ }
+ }
+ // $ANTLR end DOUBLE_QUOTE_STRING
+
+ // $ANTLR start LITERAL
+ public final void mLITERAL() throws RecognitionException {
+ try {
+ int _type = LITERAL;
+ // XPath10__.g:505:9: ( SINGLE_QUOTE_STRING | DOUBLE_QUOTE_STRING )
+ int alt5=2;
+ int LA5_0 = input.LA(1);
+
+ if ( (LA5_0=='\'') ) {
+ alt5=1;
+ }
+ else if ( (LA5_0=='\"') ) {
+ alt5=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("505:1: LITERAL : ( SINGLE_QUOTE_STRING
| DOUBLE_QUOTE_STRING );", 5, 0, input);
+
+ throw nvae;
+ }
+ switch (alt5) {
+ case 1 :
+ // XPath10__.g:505:11: SINGLE_QUOTE_STRING
+ {
+ mSINGLE_QUOTE_STRING();
+
+ }
+ break;
+ case 2 :
+ // XPath10__.g:505:33: DOUBLE_QUOTE_STRING
+ {
+ mDOUBLE_QUOTE_STRING();
+
+ }
+ break;
+
+ }
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end LITERAL
+
+ // $ANTLR start NUMBER
+ public final void mNUMBER() throws RecognitionException {
+ try {
+ int _type = NUMBER;
+ // XPath10__.g:507:8: ( ( DIGITS ) ( '.' DIGITS )? | '.'
DIGITS )
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+
+ if ( ((LA7_0>='0' && LA7_0<='9')) ) {
+ alt7=1;
+ }
+ else if ( (LA7_0=='.') ) {
+ alt7=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("507:1: NUMBER : ( ( DIGITS ) (
'.' DIGITS )? | '.' DIGITS );", 7, 0, input);
+
+ throw nvae;
+ }
+ switch (alt7) {
+ case 1 :
+ // XPath10__.g:507:10: ( DIGITS ) ( '.' DIGITS )?
+ {
+ // XPath10__.g:507:10: ( DIGITS )
+ // XPath10__.g:507:11: DIGITS
+ {
+ mDIGITS();
+
+ }
+
+ // XPath10__.g:507:19: ( '.' DIGITS )?
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0=='.') ) {
+ alt6=1;
+ }
+ switch (alt6) {
+ case 1 :
+ // XPath10__.g:507:20: '.' DIGITS
+ {
+ match('.');
+ mDIGITS();
+
+ }
+ break;
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // XPath10__.g:507:34: '.' DIGITS
+ {
+ match('.');
+ mDIGITS();
+
+ }
+ break;
+
+ }
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end NUMBER
+
+ // $ANTLR start IDENTIFIER
+ public final void mIDENTIFIER() throws RecognitionException {
+ try {
+ int _type = IDENTIFIER;
+ // XPath10__.g:509:12: ( ( '\\u0241' .. '\\u0377' |
'a' .. 'z' | 'A' .. 'Z' | '_' ) (
'\\u0241' .. '\\u0377' | 'a' .. 'z' | 'A' ..
'Z' | '-' | '_' | '0' .. '9' | '.' )* )
+ // XPath10__.g:510:3: ( '\\u0241' .. '\\u0377' | 'a'
.. 'z' | 'A' .. 'Z' | '_' ) ( '\\u0241' ..
'\\u0377' | 'a' .. 'z' | 'A' .. 'Z' | '-'
| '_' | '0' .. '9' | '.' )*
+ {
+ if ( (input.LA(1)>='A' &&
input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a'
&& input.LA(1)<='z')||(input.LA(1)>='\u0241' &&
input.LA(1)<='\u0377') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+ // XPath10__.g:510:46: ( '\\u0241' .. '\\u0377' | 'a'
.. 'z' | 'A' .. 'Z' | '-' | '_' | '0' ..
'9' | '.' )*
+ loop8:
+ do {
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( ((LA8_0>='-' &&
LA8_0<='.')||(LA8_0>='0' &&
LA8_0<='9')||(LA8_0>='A' &&
LA8_0<='Z')||LA8_0=='_'||(LA8_0>='a' &&
LA8_0<='z')||(LA8_0>='\u0241' &&
LA8_0<='\u0377')) ) {
+ alt8=1;
+ }
+
+
+ switch (alt8) {
+ case 1 :
+ // XPath10__.g:
+ {
+ if ( (input.LA(1)>='-' &&
input.LA(1)<='.')||(input.LA(1)>='0' &&
input.LA(1)<='9')||(input.LA(1)>='A' &&
input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a'
&& input.LA(1)<='z')||(input.LA(1)>='\u0241' &&
input.LA(1)<='\u0377') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop8;
+ }
+ } while (true);
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end IDENTIFIER
+
+ public void mTokens() throws RecognitionException {
+ // XPath10__.g:1:8: ( OR | AND | MOD | DIV | LPAREN | RPAREN | LBRACKET |
RBRACKET | PIPE | DOT | DOT2 | AT | COMMA | COLON2 | COLON | SLASH | SLASH2 | DOLLAR |
PLUS | MINUS | EQ | NE | LT | LTE | GT | GTE | STAR | WS | LITERAL | NUMBER | IDENTIFIER
)
+ int alt9=31;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0=='o') ) {
+ int LA9_1 = input.LA(2);
+
+ if ( (LA9_1=='r') ) {
+ int LA9_27 = input.LA(3);
+
+ if ( ((LA9_27>='-' &&
LA9_27<='.')||(LA9_27>='0' &&
LA9_27<='9')||(LA9_27>='A' &&
LA9_27<='Z')||LA9_27=='_'||(LA9_27>='a' &&
LA9_27<='z')||(LA9_27>='\u0241' &&
LA9_27<='\u0377')) ) {
+ alt9=31;
+ }
+ else {
+ alt9=1;}
+ }
+ else {
+ alt9=31;}
+ }
+ else if ( (LA9_0=='a') ) {
+ int LA9_2 = input.LA(2);
+
+ if ( (LA9_2=='n') ) {
+ int LA9_28 = input.LA(3);
+
+ if ( (LA9_28=='d') ) {
+ int LA9_42 = input.LA(4);
+
+ if ( ((LA9_42>='-' &&
LA9_42<='.')||(LA9_42>='0' &&
LA9_42<='9')||(LA9_42>='A' &&
LA9_42<='Z')||LA9_42=='_'||(LA9_42>='a' &&
LA9_42<='z')||(LA9_42>='\u0241' &&
LA9_42<='\u0377')) ) {
+ alt9=31;
+ }
+ else {
+ alt9=2;}
+ }
+ else {
+ alt9=31;}
+ }
+ else {
+ alt9=31;}
+ }
+ else if ( (LA9_0=='m') ) {
+ int LA9_3 = input.LA(2);
+
+ if ( (LA9_3=='o') ) {
+ int LA9_29 = input.LA(3);
+
+ if ( (LA9_29=='d') ) {
+ int LA9_43 = input.LA(4);
+
+ if ( ((LA9_43>='-' &&
LA9_43<='.')||(LA9_43>='0' &&
LA9_43<='9')||(LA9_43>='A' &&
LA9_43<='Z')||LA9_43=='_'||(LA9_43>='a' &&
LA9_43<='z')||(LA9_43>='\u0241' &&
LA9_43<='\u0377')) ) {
+ alt9=31;
+ }
+ else {
+ alt9=3;}
+ }
+ else {
+ alt9=31;}
+ }
+ else {
+ alt9=31;}
+ }
+ else if ( (LA9_0=='d') ) {
+ int LA9_4 = input.LA(2);
+
+ if ( (LA9_4=='i') ) {
+ int LA9_30 = input.LA(3);
+
+ if ( (LA9_30=='v') ) {
+ int LA9_44 = input.LA(4);
+
+ if ( ((LA9_44>='-' &&
LA9_44<='.')||(LA9_44>='0' &&
LA9_44<='9')||(LA9_44>='A' &&
LA9_44<='Z')||LA9_44=='_'||(LA9_44>='a' &&
LA9_44<='z')||(LA9_44>='\u0241' &&
LA9_44<='\u0377')) ) {
+ alt9=31;
+ }
+ else {
+ alt9=4;}
+ }
+ else {
+ alt9=31;}
+ }
+ else {
+ alt9=31;}
+ }
+ else if ( (LA9_0=='(') ) {
+ alt9=5;
+ }
+ else if ( (LA9_0==')') ) {
+ alt9=6;
+ }
+ else if ( (LA9_0=='[') ) {
+ alt9=7;
+ }
+ else if ( (LA9_0==']') ) {
+ alt9=8;
+ }
+ else if ( (LA9_0=='|') ) {
+ alt9=9;
+ }
+ else if ( (LA9_0=='.') ) {
+ switch ( input.LA(2) ) {
+ case '.':
+ {
+ alt9=11;
+ }
+ break;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ {
+ alt9=30;
+ }
+ break;
+ default:
+ alt9=10;}
+
+ }
+ else if ( (LA9_0=='@') ) {
+ alt9=12;
+ }
+ else if ( (LA9_0==',') ) {
+ alt9=13;
+ }
+ else if ( (LA9_0==':') ) {
+ int LA9_13 = input.LA(2);
+
+ if ( (LA9_13==':') ) {
+ alt9=14;
+ }
+ else {
+ alt9=15;}
+ }
+ else if ( (LA9_0=='/') ) {
+ int LA9_14 = input.LA(2);
+
+ if ( (LA9_14=='/') ) {
+ alt9=17;
+ }
+ else {
+ alt9=16;}
+ }
+ else if ( (LA9_0=='$') ) {
+ alt9=18;
+ }
+ else if ( (LA9_0=='+') ) {
+ alt9=19;
+ }
+ else if ( (LA9_0=='-') ) {
+ alt9=20;
+ }
+ else if ( (LA9_0=='=') ) {
+ alt9=21;
+ }
+ else if ( (LA9_0=='!') ) {
+ alt9=22;
+ }
+ else if ( (LA9_0=='<') ) {
+ int LA9_20 = input.LA(2);
+
+ if ( (LA9_20=='=') ) {
+ alt9=24;
+ }
+ else {
+ alt9=23;}
+ }
+ else if ( (LA9_0=='>') ) {
+ int LA9_21 = input.LA(2);
+
+ if ( (LA9_21=='=') ) {
+ alt9=26;
+ }
+ else {
+ alt9=25;}
+ }
+ else if ( (LA9_0=='*') ) {
+ alt9=27;
+ }
+ else if ( ((LA9_0>='\t' &&
LA9_0<='\n')||LA9_0=='\r'||LA9_0==' ') ) {
+ alt9=28;
+ }
+ else if ( (LA9_0=='\"'||LA9_0=='\'') ) {
+ alt9=29;
+ }
+ else if ( ((LA9_0>='0' && LA9_0<='9')) ) {
+ alt9=30;
+ }
+ else if ( ((LA9_0>='A' &&
LA9_0<='Z')||LA9_0=='_'||(LA9_0>='b' &&
LA9_0<='c')||(LA9_0>='e' &&
LA9_0<='l')||LA9_0=='n'||(LA9_0>='p' &&
LA9_0<='z')||(LA9_0>='\u0241' &&
LA9_0<='\u0377')) ) {
+ alt9=31;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("1:1: Tokens : ( OR | AND | MOD | DIV |
LPAREN | RPAREN | LBRACKET | RBRACKET | PIPE | DOT | DOT2 | AT | COMMA | COLON2 | COLON |
SLASH | SLASH2 | DOLLAR | PLUS | MINUS | EQ | NE | LT | LTE | GT | GTE | STAR | WS |
LITERAL | NUMBER | IDENTIFIER );", 9, 0, input);
+
+ throw nvae;
+ }
+ switch (alt9) {
+ case 1 :
+ // XPath10__.g:1:10: OR
+ {
+ mOR();
+
+ }
+ break;
+ case 2 :
+ // XPath10__.g:1:13: AND
+ {
+ mAND();
+
+ }
+ break;
+ case 3 :
+ // XPath10__.g:1:17: MOD
+ {
+ mMOD();
+
+ }
+ break;
+ case 4 :
+ // XPath10__.g:1:21: DIV
+ {
+ mDIV();
+
+ }
+ break;
+ case 5 :
+ // XPath10__.g:1:25: LPAREN
+ {
+ mLPAREN();
+
+ }
+ break;
+ case 6 :
+ // XPath10__.g:1:32: RPAREN
+ {
+ mRPAREN();
+
+ }
+ break;
+ case 7 :
+ // XPath10__.g:1:39: LBRACKET
+ {
+ mLBRACKET();
+
+ }
+ break;
+ case 8 :
+ // XPath10__.g:1:48: RBRACKET
+ {
+ mRBRACKET();
+
+ }
+ break;
+ case 9 :
+ // XPath10__.g:1:57: PIPE
+ {
+ mPIPE();
+
+ }
+ break;
+ case 10 :
+ // XPath10__.g:1:62: DOT
+ {
+ mDOT();
+
+ }
+ break;
+ case 11 :
+ // XPath10__.g:1:66: DOT2
+ {
+ mDOT2();
+
+ }
+ break;
+ case 12 :
+ // XPath10__.g:1:71: AT
+ {
+ mAT();
+
+ }
+ break;
+ case 13 :
+ // XPath10__.g:1:74: COMMA
+ {
+ mCOMMA();
+
+ }
+ break;
+ case 14 :
+ // XPath10__.g:1:80: COLON2
+ {
+ mCOLON2();
+
+ }
+ break;
+ case 15 :
+ // XPath10__.g:1:87: COLON
+ {
+ mCOLON();
+
+ }
+ break;
+ case 16 :
+ // XPath10__.g:1:93: SLASH
+ {
+ mSLASH();
+
+ }
+ break;
+ case 17 :
+ // XPath10__.g:1:99: SLASH2
+ {
+ mSLASH2();
+
+ }
+ break;
+ case 18 :
+ // XPath10__.g:1:106: DOLLAR
+ {
+ mDOLLAR();
+
+ }
+ break;
+ case 19 :
+ // XPath10__.g:1:113: PLUS
+ {
+ mPLUS();
+
+ }
+ break;
+ case 20 :
+ // XPath10__.g:1:118: MINUS
+ {
+ mMINUS();
+
+ }
+ break;
+ case 21 :
+ // XPath10__.g:1:124: EQ
+ {
+ mEQ();
+
+ }
+ break;
+ case 22 :
+ // XPath10__.g:1:127: NE
+ {
+ mNE();
+
+ }
+ break;
+ case 23 :
+ // XPath10__.g:1:130: LT
+ {
+ mLT();
+
+ }
+ break;
+ case 24 :
+ // XPath10__.g:1:133: LTE
+ {
+ mLTE();
+
+ }
+ break;
+ case 25 :
+ // XPath10__.g:1:137: GT
+ {
+ mGT();
+
+ }
+ break;
+ case 26 :
+ // XPath10__.g:1:140: GTE
+ {
+ mGTE();
+
+ }
+ break;
+ case 27 :
+ // XPath10__.g:1:144: STAR
+ {
+ mSTAR();
+
+ }
+ break;
+ case 28 :
+ // XPath10__.g:1:149: WS
+ {
+ mWS();
+
+ }
+ break;
+ case 29 :
+ // XPath10__.g:1:152: LITERAL
+ {
+ mLITERAL();
+
+ }
+ break;
+ case 30 :
+ // XPath10__.g:1:160: NUMBER
+ {
+ mNUMBER();
+
+ }
+ break;
+ case 31 :
+ // XPath10__.g:1:167: IDENTIFIER
+ {
+ mIDENTIFIER();
+
+ }
+ break;
+
+ }
+
+ }
+
+
+
+
+}
\ No newline at end of file
Added:
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Parser.java
===================================================================
---
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Parser.java
(rev 0)
+++
workspace/Denny/bpel/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Parser.java 2009-05-06
07:53:03 UTC (rev 15056)
@@ -0,0 +1,5843 @@
+// $ANTLR 3.0.1 /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g
2008-06-23 18:23:26
+
+ package org.eclipse.bpel.xpath10.parser;
+ import org.eclipse.bpel.xpath10.*;
+
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+
+import org.antlr.runtime.tree.*;
+
+public class XPath10Parser extends Parser {
+ public static final String[] tokenNames = new String[] {
+ "<invalid>", "<EOR>", "<DOWN>",
"<UP>", "OR", "AND", "MOD", "DIV",
"LPAREN", "RPAREN", "LBRACKET", "RBRACKET",
"PIPE", "DOT", "DOT2", "AT", "COMMA",
"COLON2", "COLON", "SLASH", "SLASH2",
"DOLLAR", "PLUS", "MINUS", "EQ", "NE",
"LT", "LTE", "GT", "GTE", "STAR",
"Args", "IDENTIFIER", "LITERAL", "NUMBER",
"WS", "DIGITS", "SINGLE_QUOTE_STRING",
"DOUBLE_QUOTE_STRING"
+ };
+ public static final int DOLLAR=21;
+ public static final int LT=26;
+ public static final int STAR=30;
+ public static final int SLASH2=20;
+ public static final int MOD=6;
+ public static final int DIGITS=36;
+ public static final int GTE=29;
+ public static final int NUMBER=34;
+ public static final int Args=31;
+ public static final int LITERAL=33;
+ public static final int MINUS=23;
+ public static final int AND=5;
+ public static final int EOF=-1;
+ public static final int LTE=27;
+ public static final int LPAREN=8;
+ public static final int LBRACKET=10;
+ public static final int AT=15;
+ public static final int COLON=18;
+ public static final int RPAREN=9;
+ public static final int SINGLE_QUOTE_STRING=37;
+ public static final int WS=35;
+ public static final int SLASH=19;
+ public static final int DOUBLE_QUOTE_STRING=38;
+ public static final int COMMA=16;
+ public static final int IDENTIFIER=32;
+ public static final int OR=4;
+ public static final int GT=28;
+ public static final int PLUS=22;
+ public static final int PIPE=12;
+ public static final int DOT2=14;
+ public static final int EQ=24;
+ public static final int DIV=7;
+ public static final int RBRACKET=11;
+ public static final int DOT=13;
+ public static final int COLON2=17;
+ public static final int NE=25;
+
+ public XPath10Parser(TokenStream input) {
+ super(input);
+ ruleMemo = new HashMap[33+1];
+ }
+
+ protected TreeAdaptor adaptor = new CommonTreeAdaptor();
+
+ public void setTreeAdaptor(TreeAdaptor adaptor) {
+ this.adaptor = adaptor;
+ }
+ public TreeAdaptor getTreeAdaptor() {
+ return adaptor;
+ }
+
+ public String[] getTokenNames() { return tokenNames; }
+ public String getGrammarFileName() { return
"/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g"; }
+
+
+
+ boolean isNodeNodeName (String node) {
+ return "node".equals(node);
+ }
+ boolean isTextNodeName (String node) {
+ return "text".equals(node);
+ }
+ boolean isCommentNodeName (String node) {
+ return "comment".equals(node);
+ }
+ boolean isProcessingInstructionNodeName (String node) {
+ return "processing-instruction".equals(node);
+ }
+
+ static int positionOf (Token token, boolean start) {
+ if (token instanceof CommonToken) {
+ CommonToken t = (CommonToken)token;
+ if (start) {
+ return t.getStartIndex();
+ }
+ return t.getStopIndex();
+ }
+ return -1;
+ }
+
+ static int positionOfIfUnset (Token token, boolean start, int currentValue) {
+ if (currentValue < 0) {
+ return positionOf(token,start);
+ }
+ return currentValue;
+ }
+
+ public void displayRecognitionError(String[] tokenNames, RecognitionException re)
+ {
+ String msg = getErrorMessage(re, tokenNames);
+ // we don't recover
+ throw new XPath10Exception(msg,re.getCause(),re.index);
+ }
+
+
+
+ public static class xpath_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start xpath
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:109:0:
xpath returns [Expr result] : e= unionExpr ;
+ public final xpath_return xpath() throws RecognitionException {
+ xpath_return retval = new xpath_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ unionExpr_return e = null;
+
+
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:110:3: (e=
unionExpr )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:110:5: e=
unionExpr
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_unionExpr_in_xpath742);
+ e=unionExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, e.getTree());
+ if ( backtracking==0 ) {
+ retval.result = e.result;
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end xpath
+
+ public static class locationPath_return extends ParserRuleReturnScope {
+ public LocationPath result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start locationPath
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:114:0:
locationPath returns [LocationPath result] : (aloc= absoluteLocationPath | rloc=
relativeLocationPath );
+ public final locationPath_return locationPath() throws RecognitionException {
+ locationPath_return retval = new locationPath_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ absoluteLocationPath_return aloc = null;
+
+ relativeLocationPath_return rloc = null;
+
+
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:114:43: (aloc=
absoluteLocationPath | rloc= relativeLocationPath )
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( ((LA1_0>=SLASH && LA1_0<=SLASH2)) ) {
+ alt1=1;
+ }
+ else if ( ((LA1_0>=DOT &&
LA1_0<=AT)||LA1_0==STAR||LA1_0==IDENTIFIER) ) {
+ alt1=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("114:0: locationPath returns
[LocationPath result] : (aloc= absoluteLocationPath | rloc= relativeLocationPath );",
1, 0, input);
+
+ throw nvae;
+ }
+ switch (alt1) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:115:2: aloc=
absoluteLocationPath
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_absoluteLocationPath_in_locationPath769);
+ aloc=absoluteLocationPath();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, aloc.getTree());
+ if ( backtracking==0 ) {
+ retval.result =aloc.result;
+ }
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:117:4: rloc=
relativeLocationPath
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_relativeLocationPath_in_locationPath781);
+ rloc=relativeLocationPath();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, rloc.getTree());
+ if ( backtracking==0 ) {
+ retval.result =rloc.result;
+ }
+
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end locationPath
+
+ public static class absoluteLocationPath_return extends ParserRuleReturnScope {
+ public LocationPath result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start absoluteLocationPath
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:121:0:
absoluteLocationPath returns [LocationPath result] : (op= SLASH2 | op= SLASH ) ( ( AT |
STAR | IDENTIFIER )=>loc= i_relativeLocationPath | ) ;
+ public final absoluteLocationPath_return absoluteLocationPath() throws
RecognitionException {
+ absoluteLocationPath_return retval = new absoluteLocationPath_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ i_relativeLocationPath_return loc = null;
+
+
+ Object op_tree=null;
+
+
+ Step ans = null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:124:3: ( (op=
SLASH2 | op= SLASH ) ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | ) )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:125:3: (op= SLASH2
| op= SLASH ) ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )
+ {
+ root_0 = (Object)adaptor.nil();
+
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:125:3: (op= SLASH2
| op= SLASH )
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( (LA2_0==SLASH2) ) {
+ alt2=1;
+ }
+ else if ( (LA2_0==SLASH) ) {
+ alt2=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("125:3: (op= SLASH2 | op= SLASH
)", 2, 0, input);
+
+ throw nvae;
+ }
+ switch (alt2) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:125:4: op= SLASH2
+ {
+ op=(Token)input.LT(1);
+ match(input,SLASH2,FOLLOW_SLASH2_in_absoluteLocationPath811); if
(failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+ if ( backtracking==0 ) {
+
+ ans=new AllNodeStep(Axis.DESCENDANT_OR_SELF);
+ ans.setPosition(positionOf(op,true),positionOf(op,false));
+ }
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:127:73: op= SLASH
+ {
+ op=(Token)input.LT(1);
+ match(input,SLASH,FOLLOW_SLASH_in_absoluteLocationPath820); if
(failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+
+ }
+
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:129:7: ( ( AT |
STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( (LA3_0==IDENTIFIER) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_0==AT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_0==STAR) ) {
+ int LA3_3 = input.LA(2);
+
+ if ( (LA3_3==LBRACKET) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==SLASH2) ) {
+ switch ( input.LA(3) ) {
+ case IDENTIFIER:
+ {
+ int LA3_52 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 52, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case AT:
+ {
+ int LA3_53 = input.LA(4);
+
+ if ( (LA3_53==IDENTIFIER) ) {
+ int LA3_158 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 158, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_53==STAR) ) {
+ int LA3_159 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 159, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 53, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case STAR:
+ {
+ int LA3_54 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 54, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT:
+ {
+ int LA3_55 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 55, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT2:
+ {
+ int LA3_56 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 56, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case OR:
+ case AND:
+ case MOD:
+ case DIV:
+ case RPAREN:
+ case RBRACKET:
+ case PIPE:
+ case COMMA:
+ case PLUS:
+ case MINUS:
+ case EQ:
+ case NE:
+ case LT:
+ case LTE:
+ case GT:
+ case GTE:
+ {
+ alt3=2;
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 24, input);
+
+ throw nvae;
+ }
+
+ }
+ else if ( (LA3_3==SLASH) ) {
+ switch ( input.LA(3) ) {
+ case IDENTIFIER:
+ {
+ int LA3_73 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 73, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case AT:
+ {
+ int LA3_74 = input.LA(4);
+
+ if ( (LA3_74==IDENTIFIER) ) {
+ int LA3_255 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 255, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_74==STAR) ) {
+ int LA3_256 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 256, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 74, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case STAR:
+ {
+ int LA3_75 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 75, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT:
+ {
+ int LA3_76 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 76, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT2:
+ {
+ int LA3_77 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 77, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case OR:
+ case AND:
+ case MOD:
+ case DIV:
+ case RPAREN:
+ case RBRACKET:
+ case PIPE:
+ case COMMA:
+ case PLUS:
+ case MINUS:
+ case EQ:
+ case NE:
+ case LT:
+ case LTE:
+ case GT:
+ case GTE:
+ {
+ alt3=2;
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 25, input);
+
+ throw nvae;
+ }
+
+ }
+ else if ( (LA3_3==PIPE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==EOF) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==STAR) ) {
+ int LA3_28 = input.LA(3);
+
+ if ( ((LA3_28>=OR && LA3_28<=DIV)||(LA3_28>=RPAREN
&& LA3_28<=PIPE)||LA3_28==COMMA||LA3_28==PLUS||(LA3_28>=EQ &&
LA3_28<=GTE)) ) {
+ alt3=2;
+ }
+ else if ( (LA3_28==SLASH2) ) {
+ int LA3_95 = input.LA(4);
+
+ if ( (LA3_95==IDENTIFIER) ) {
+ int LA3_328 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 328, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_95==AT) ) {
+ int LA3_329 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 329, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_95==STAR) ) {
+ int LA3_330 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 330, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_95==DOT) ) {
+ int LA3_331 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 331, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_95==DOT2) ) {
+ int LA3_332 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 332, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_95==PIPE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==PLUS) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==MINUS) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==LT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==GT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==LTE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==GTE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==EQ) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==NE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==AND) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==OR) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==RBRACKET) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==RPAREN) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==COMMA) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==DIV) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==MOD) && (synpred1())) {
+ alt3=1;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 95, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_28==SLASH) ) {
+ int LA3_96 = input.LA(4);
+
+ if ( (LA3_96==IDENTIFIER) ) {
+ int LA3_349 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 349, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_96==AT) ) {
+ int LA3_350 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 350, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_96==STAR) ) {
+ int LA3_351 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 351, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_96==DOT) ) {
+ int LA3_352 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 352, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_96==DOT2) ) {
+ int LA3_353 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 353, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_96==PIPE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==PLUS) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==MINUS) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==LT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==GT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==LTE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==GTE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==EQ) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==NE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==AND) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==OR) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==RBRACKET) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==RPAREN) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==COMMA) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==DIV) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==MOD) && (synpred1())) {
+ alt3=1;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 96, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_28==MINUS) ) {
+ switch ( input.LA(4) ) {
+ case SLASH2:
+ {
+ int LA3_370 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 370, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case SLASH:
+ {
+ int LA3_371 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 371, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case IDENTIFIER:
+ {
+ int LA3_372 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 372, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case AT:
+ {
+ int LA3_373 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 373, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case STAR:
+ {
+ int LA3_374 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 374, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT:
+ {
+ int LA3_375 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 375, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT2:
+ {
+ int LA3_376 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 376, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOLLAR:
+ {
+ int LA3_377 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 377, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case LPAREN:
+ {
+ int LA3_378 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 378, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case LITERAL:
+ {
+ int LA3_379 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 379, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case NUMBER:
+ {
+ int LA3_380 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 380, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case MINUS:
+ {
+ int LA3_381 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 381, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 99, input);
+
+ throw nvae;
+ }
+
+ }
+ else if ( (LA3_28==STAR) ) {
+ int LA3_111 = input.LA(4);
+
+ if ( (LA3_111==LBRACKET) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==SLASH2) ) {
+ int LA3_383 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 383, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_111==SLASH) ) {
+ int LA3_384 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 384, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_111==PIPE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==PLUS) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==MINUS) ) {
+ int LA3_387 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 387, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_111==LT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==GT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==LTE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==GTE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==EQ) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==NE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==AND) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==OR) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==RBRACKET) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==RPAREN) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==COMMA) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==STAR) ) {
+ int LA3_399 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 399, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_111==DIV) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==MOD) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==LPAREN||(LA3_111>=DOT &&
LA3_111<=AT)||LA3_111==DOLLAR||(LA3_111>=IDENTIFIER && LA3_111<=NUMBER))
) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 111, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_28==IDENTIFIER) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_28==AT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_28==DOT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_28==DOT2) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_28==DOLLAR) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_28==LPAREN) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_28==LITERAL) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_28==NUMBER) && (synpred1())) {
+ alt3=1;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 28, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_3==DIV) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==MOD) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==PLUS) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==MINUS) ) {
+ switch ( input.LA(3) ) {
+ case SLASH2:
+ {
+ int LA3_122 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 122, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case SLASH:
+ {
+ int LA3_123 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 123, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case IDENTIFIER:
+ {
+ int LA3_124 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 124, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case AT:
+ {
+ int LA3_125 = input.LA(4);
+
+ if ( (LA3_125==IDENTIFIER) ) {
+ int LA3_475 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 475, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_125==STAR) ) {
+ int LA3_476 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 476, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 125, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case STAR:
+ {
+ int LA3_126 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 126, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT:
+ {
+ int LA3_127 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 127, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT2:
+ {
+ int LA3_128 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 128, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOLLAR:
+ {
+ int LA3_129 = input.LA(4);
+
+ if ( (LA3_129==IDENTIFIER) ) {
+ int LA3_537 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 537, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 129, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case LPAREN:
+ {
+ switch ( input.LA(4) ) {
+ case SLASH2:
+ {
+ int LA3_538 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 538, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case SLASH:
+ {
+ int LA3_539 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 539, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case IDENTIFIER:
+ {
+ int LA3_540 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 540, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case AT:
+ {
+ int LA3_541 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 541, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case STAR:
+ {
+ int LA3_542 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 542, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT:
+ {
+ int LA3_543 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 543, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT2:
+ {
+ int LA3_544 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 544, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOLLAR:
+ {
+ int LA3_545 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 545, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case LPAREN:
+ {
+ int LA3_546 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 546, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case LITERAL:
+ {
+ int LA3_547 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 547, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case NUMBER:
+ {
+ int LA3_548 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 548, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case MINUS:
+ {
+ int LA3_549 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 549, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 130, input);
+
+ throw nvae;
+ }
+
+ }
+ break;
+ case LITERAL:
+ {
+ int LA3_131 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 131, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case NUMBER:
+ {
+ int LA3_132 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 132, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case MINUS:
+ {
+ switch ( input.LA(4) ) {
+ case SLASH2:
+ {
+ int LA3_590 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 590, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case SLASH:
+ {
+ int LA3_591 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 591, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case IDENTIFIER:
+ {
+ int LA3_592 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 592, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case AT:
+ {
+ int LA3_593 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 593, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case STAR:
+ {
+ int LA3_594 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 594, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT:
+ {
+ int LA3_595 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 595, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT2:
+ {
+ int LA3_596 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 596, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOLLAR:
+ {
+ int LA3_597 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 597, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case LPAREN:
+ {
+ int LA3_598 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 598, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case LITERAL:
+ {
+ int LA3_599 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 599, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case NUMBER:
+ {
+ int LA3_600 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 600, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case MINUS:
+ {
+ int LA3_601 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 601, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 133, input);
+
+ throw nvae;
+ }
+
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR |
IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 32, input);
+
+ throw nvae;
+ }
+
+ }
+ else if ( (LA3_3==LT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==GT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==LTE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==GTE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==EQ) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==NE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==AND) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==OR) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==RBRACKET) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==RPAREN) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==COMMA) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==LPAREN||(LA3_3>=DOT &&
LA3_3<=AT)||LA3_3==DOLLAR||(LA3_3>=IDENTIFIER && LA3_3<=NUMBER)) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER
)=>loc= i_relativeLocationPath | )", 3, 3, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_0==DOT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_0==DOT2) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_0==EOF||(LA3_0>=OR &&
LA3_0<=DIV)||LA3_0==RPAREN||(LA3_0>=RBRACKET &&
LA3_0<=PIPE)||LA3_0==COMMA||(LA3_0>=PLUS && LA3_0<=GTE)) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER
)=>loc= i_relativeLocationPath | )", 3, 0, input);
+
+ throw nvae;
+ }
+ switch (alt3) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:129:9: ( AT | STAR
| IDENTIFIER )=>loc= i_relativeLocationPath
+ {
+
pushFollow(FOLLOW_i_relativeLocationPath_in_absoluteLocationPath853);
+ loc=i_relativeLocationPath();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, loc.getTree());
+ if ( backtracking==0 ) {
+ retval.result = loc.result;
+ }
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:129:88:
+ {
+ if ( backtracking==0 ) {
+ retval.result = new LocationPath(true);
+ }
+
+ }
+ break;
+
+ }
+
+ if ( backtracking==0 ) {
+ if (retval.result != null) {
+ if (ans != null) { retval.result.addFirstStep(ans); }
+ retval.result.setIsAbsolute(true);
+ }
+
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end absoluteLocationPath
+
+ public static class relativeLocationPath_return extends ParserRuleReturnScope {
+ public LocationPath result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start relativeLocationPath
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:137:0:
relativeLocationPath returns [LocationPath result] : e= i_relativeLocationPath ;
+ public final relativeLocationPath_return relativeLocationPath() throws
RecognitionException {
+ relativeLocationPath_return retval = new relativeLocationPath_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ i_relativeLocationPath_return e = null;
+
+
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:137:51: (e=
i_relativeLocationPath )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:138:3: e=
i_relativeLocationPath
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_i_relativeLocationPath_in_relativeLocationPath898);
+ e=i_relativeLocationPath();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, e.getTree());
+ if ( backtracking==0 ) {
+ retval.result = e.result;
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end relativeLocationPath
+
+ public static class i_relativeLocationPath_return extends ParserRuleReturnScope {
+ public LocationPath result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start i_relativeLocationPath
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:142:0:
i_relativeLocationPath returns [LocationPath result] : s1= step ( (op= SLASH2 | SLASH )
s2= step )* ;
+ public final i_relativeLocationPath_return i_relativeLocationPath() throws
RecognitionException {
+ i_relativeLocationPath_return retval = new i_relativeLocationPath_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ Token SLASH1=null;
+ step_return s1 = null;
+
+ step_return s2 = null;
+
+
+ Object op_tree=null;
+ Object SLASH1_tree=null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:142:53: (s1= step
( (op= SLASH2 | SLASH ) s2= step )* )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:143:4: s1= step (
(op= SLASH2 | SLASH ) s2= step )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_step_in_i_relativeLocationPath926);
+ s1=step();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, s1.getTree());
+ if ( backtracking==0 ) {
+ retval.result =new LocationPath(false, s1.result);
+ }
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:144:7: ( (op=
SLASH2 | SLASH ) s2= step )*
+ loop5:
+ do {
+ int alt5=2;
+ int LA5_0 = input.LA(1);
+
+ if ( ((LA5_0>=SLASH && LA5_0<=SLASH2)) ) {
+ alt5=1;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:144:9: (op= SLASH2
| SLASH ) s2= step
+ {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:144:9: (op= SLASH2
| SLASH )
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0==SLASH2) ) {
+ alt4=1;
+ }
+ else if ( (LA4_0==SLASH) ) {
+ alt4=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("144:9: (op= SLASH2 | SLASH
)", 4, 0, input);
+
+ throw nvae;
+ }
+ switch (alt4) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:144:10: op=
SLASH2
+ {
+ op=(Token)input.LT(1);
+ match(input,SLASH2,FOLLOW_SLASH2_in_i_relativeLocationPath941);
if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ adaptor.addChild(root_0, op_tree);
+ }
+ if ( backtracking==0 ) {
+ retval.result.addStep(new
AllNodeStep(Axis.DESCENDANT_OR_SELF));
+
retval.result.setPosition(positionOf(op,true),positionOf(op,false));
+
+ }
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:146:23: SLASH
+ {
+ SLASH1=(Token)input.LT(1);
+ match(input,SLASH,FOLLOW_SLASH_in_i_relativeLocationPath946); if
(failed) return retval;
+ if ( backtracking==0 ) {
+ SLASH1_tree = (Object)adaptor.create(SLASH1);
+ adaptor.addChild(root_0, SLASH1_tree);
+ }
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_step_in_i_relativeLocationPath952);
+ s2=step();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, s2.getTree());
+ if ( backtracking==0 ) {
+ retval.result.addStep(s2.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop5;
+ }
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end i_relativeLocationPath
+
+ public static class step_return extends ParserRuleReturnScope {
+ public Step result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start step
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:154:0:
step returns [Step result] : ( ( ( ( IDENTIFIER COLON2 | AT )=> axis | ) ( ( (ns=
IDENTIFIER COLON )? (id= IDENTIFIER | id= STAR ) ) | ss= specialStep ) (p= predicate )* )
| as= abbrStep (p= predicate )* );
+ public final step_return step() throws RecognitionException {
+ step_return retval = new step_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token ns=null;
+ Token id=null;
+ Token COLON3=null;
+ specialStep_return ss = null;
+
+ predicate_return p = null;
+
+ abbrStep_return as = null;
+
+ axis_return axis2 = null;
+
+
+ Object ns_tree=null;
+ Object id_tree=null;
+ Object COLON3_tree=null;
+
+
+ // default axis, per XPath spec.
+ int anAxis = Axis.CHILD;
+ int posStart = -1;
+ String aNs = null;
+
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:161:4: ( ( ( (
IDENTIFIER COLON2 | AT )=> axis | ) ( ( (ns= IDENTIFIER COLON )? (id= IDENTIFIER | id=
STAR ) ) | ss= specialStep ) (p= predicate )* ) | as= abbrStep (p= predicate )* )
+ int alt12=2;
+ int LA12_0 = input.LA(1);
+
+ if ( (LA12_0==AT||LA12_0==STAR||LA12_0==IDENTIFIER) ) {
+ alt12=1;
+ }
+ else if ( ((LA12_0>=DOT && LA12_0<=DOT2)) ) {
+ alt12=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("154:0: step returns [Step result] : (
( ( ( IDENTIFIER COLON2 | AT )=> axis | ) ( ( (ns= IDENTIFIER COLON )? (id= IDENTIFIER
| id= STAR ) ) | ss= specialStep ) (p= predicate )* ) | as= abbrStep (p= predicate )*
);", 12, 0, input);
+
+ throw nvae;
+ }
+ switch (alt12) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:162:3: ( ( (
IDENTIFIER COLON2 | AT )=> axis | ) ( ( (ns= IDENTIFIER COLON )? (id= IDENTIFIER | id=
STAR ) ) | ss= specialStep ) (p= predicate )* )
+ {
+ root_0 = (Object)adaptor.nil();
+
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:162:3: ( ( (
IDENTIFIER COLON2 | AT )=> axis | ) ( ( (ns= IDENTIFIER COLON )? (id= IDENTIFIER | id=
STAR ) ) | ss= specialStep ) (p= predicate )* )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:164:4: ( (
IDENTIFIER COLON2 | AT )=> axis | ) ( ( (ns= IDENTIFIER COLON )? (id= IDENTIFIER | id=
STAR ) ) | ss= specialStep ) (p= predicate )*
+ {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:164:4: ( (
IDENTIFIER COLON2 | AT )=> axis | )
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0==IDENTIFIER) ) {
+ int LA6_1 = input.LA(2);
+
+ if ( (LA6_1==EOF||(LA6_1>=OR &&
LA6_1<=PIPE)||LA6_1==COMMA||(LA6_1>=COLON &&
LA6_1<=SLASH2)||(LA6_1>=PLUS && LA6_1<=STAR)) ) {
+ alt6=2;
+ }
+ else if ( (LA6_1==COLON2) && (synpred2())) {
+ alt6=1;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("164:4: ( ( IDENTIFIER
COLON2 | AT )=> axis | )", 6, 1, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA6_0==AT) && (synpred2())) {
+ alt6=1;
+ }
+ else if ( (LA6_0==STAR) ) {
+ alt6=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("164:4: ( ( IDENTIFIER COLON2 |
AT )=> axis | )", 6, 0, input);
+
+ throw nvae;
+ }
+ switch (alt6) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:164:6: (
IDENTIFIER COLON2 | AT )=> axis
+ {
+ pushFollow(FOLLOW_axis_in_step1015);
+ axis2=axis();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0,
axis2.getTree());
+ if ( backtracking==0 ) {
+ anAxis=axis2.axis; posStart = axis2.posStart;
+ }
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:164:124:
+ {
+ }
+ break;
+
+ }
+
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:166:4: ( ( (ns=
IDENTIFIER COLON )? (id= IDENTIFIER | id= STAR ) ) | ss= specialStep )
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0==IDENTIFIER) ) {
+ int LA9_1 = input.LA(2);
+
+ if ( (LA9_1==LPAREN) ) {
+ alt9=2;
+ }
+ else if ( (LA9_1==EOF||(LA9_1>=OR &&
LA9_1<=DIV)||(LA9_1>=RPAREN &&
LA9_1<=PIPE)||LA9_1==COMMA||(LA9_1>=COLON &&
LA9_1<=SLASH2)||(LA9_1>=PLUS && LA9_1<=STAR)) ) {
+ alt9=1;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("166:4: ( ( (ns= IDENTIFIER
COLON )? (id= IDENTIFIER | id= STAR ) ) | ss= specialStep )", 9, 1, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA9_0==STAR) ) {
+ alt9=1;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("166:4: ( ( (ns= IDENTIFIER
COLON )? (id= IDENTIFIER | id= STAR ) ) | ss= specialStep )", 9, 0, input);
+
+ throw nvae;
+ }
+ switch (alt9) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:167:5: ( (ns=
IDENTIFIER COLON )? (id= IDENTIFIER | id= STAR ) )
+ {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:167:5: ( (ns=
IDENTIFIER COLON )? (id= IDENTIFIER | id= STAR ) )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:167:7: (ns=
IDENTIFIER COLON )? (id= IDENTIFIER | id= STAR )
+ {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:167:7: (ns=
IDENTIFIER COLON )?
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+
+ if ( (LA7_0==IDENTIFIER) ) {
+ int LA7_1 = input.LA(2);
+
+ if ( (LA7_1==COLON) ) {
+ alt7=1;
+ }
+ }
+ switch (alt7) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:167:8: ns=
IDENTIFIER COLON
+ {
+ ns=(Token)input.LT(1);
+
match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_step1042); if (failed) return retval;
+ if ( backtracking==0 ) {
+ ns_tree = (Object)adaptor.create(ns);
+ adaptor.addChild(root_0, ns_tree);
+ }
+ COLON3=(Token)input.LT(1);
+ match(input,COLON,FOLLOW_COLON_in_step1044); if
(failed) return retval;
+ if ( backtracking==0 ) {
+ COLON3_tree = (Object)adaptor.create(COLON3);
+ adaptor.addChild(root_0, COLON3_tree);
+ }
+ if ( backtracking==0 ) {
+ aNs=ns.getText();
posStart=positionOfIfUnset(ns,true,posStart);
+ }
+
+ }
+ break;
+
+ }
+
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:167:97: (id=
IDENTIFIER | id= STAR )
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( (LA8_0==IDENTIFIER) ) {
+ alt8=1;
+ }
+ else if ( (LA8_0==STAR) ) {
+ alt8=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("167:97: (id=
IDENTIFIER | id= STAR )", 8, 0, input);
+
+ throw nvae;
+ }
+ switch (alt8) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:167:99: id=
IDENTIFIER
+ {
+ id=(Token)input.LT(1);
+
match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_step1056); if (failed) return retval;
+ if ( backtracking==0 ) {
+ id_tree = (Object)adaptor.create(id);
+ adaptor.addChild(root_0, id_tree);
+ }
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:167:113: id= STAR
+ {
+ id=(Token)input.LT(1);
+ match(input,STAR,FOLLOW_STAR_in_step1060); if
(failed) return retval;
+ if ( backtracking==0 ) {
+ id_tree = (Object)adaptor.create(id);
+ adaptor.addChild(root_0, id_tree);
+ }
+
+ }
+ break;
+
+ }
+
+ if ( backtracking==0 ) {
+
+ retval.result = new
NameStep(anAxis,aNs,id.getText());
+
retval.result.setPosition(positionOfIfUnset(id,true,posStart), positionOf(id,false));
+
+ }
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:173:5: ss=
specialStep
+ {
+ pushFollow(FOLLOW_specialStep_in_step1081);
+ ss=specialStep();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0,
ss.getTree());
+ if ( backtracking==0 ) {
+ retval.result = ss.result; retval.result.setAxis(anAxis);
+ }
+
+ }
+ break;
+
+ }
+
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:175:6: (p=
predicate )*
+ loop10:
+ do {
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( (LA10_0==LBRACKET) ) {
+ alt10=1;
+ }
+
+
+ switch (alt10) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:175:8: p=
predicate
+ {
+ pushFollow(FOLLOW_predicate_in_step1099);
+ p=predicate();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, p.getTree());
+ if ( backtracking==0 ) {
+ retval.result.addPredicate(p.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop10;
+ }
+ } while (true);
+
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:178:5: as=
abbrStep (p= predicate )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_abbrStep_in_step1121);
+ as=abbrStep();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, as.getTree());
+ if ( backtracking==0 ) {
+
+ retval.result =as.result;
+ retval.result.setPosition(as.posStart,as.posEnd);
+
+ }
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:181:19: (p=
predicate )*
+ loop11:
+ do {
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( (LA11_0==LBRACKET) ) {
+ alt11=1;
+ }
+
+
+ switch (alt11) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:181:21: p=
predicate
+ {
+ pushFollow(FOLLOW_predicate_in_step1130);
+ p=predicate();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, p.getTree());
+ if ( backtracking==0 ) {
+ retval.result.addPredicate(p.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop11;
+ }
+ } while (true);
+
+
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end step
+
+ public static class specialStep_return extends ParserRuleReturnScope {
+ public Step result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start specialStep
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:187:0:
specialStep returns [Step result] : ({...}?id= IDENTIFIER LPAREN (pi= IDENTIFIER )? rp=
RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN |
{...}?id= IDENTIFIER LPAREN rp= RPAREN );
+ public final specialStep_return specialStep() throws RecognitionException {
+ specialStep_return retval = new specialStep_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token id=null;
+ Token pi=null;
+ Token rp=null;
+ Token LPAREN4=null;
+ Token LPAREN5=null;
+ Token LPAREN6=null;
+ Token LPAREN7=null;
+
+ Object id_tree=null;
+ Object pi_tree=null;
+ Object rp_tree=null;
+ Object LPAREN4_tree=null;
+ Object LPAREN5_tree=null;
+ Object LPAREN6_tree=null;
+ Object LPAREN7_tree=null;
+
+
+ String piID = null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:190:3: ({...}?id=
IDENTIFIER LPAREN (pi= IDENTIFIER )? rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN |
{...}?id= IDENTIFIER LPAREN rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN )
+ int alt14=4;
+ int LA14_0 = input.LA(1);
+
+ if ( (LA14_0==IDENTIFIER) ) {
+ int LA14_1 = input.LA(2);
+
+ if ( (LA14_1==LPAREN) ) {
+ int LA14_2 = input.LA(3);
+
+ if ( (LA14_2==RPAREN) ) {
+ int LA14_3 = input.LA(4);
+
+ if ( ( isProcessingInstructionNodeName( input.LT(1).getText() ) )
) {
+ alt14=1;
+ }
+ else if ( ( isCommentNodeName(input.LT(1).getText()) ) ) {
+ alt14=2;
+ }
+ else if ( ( isTextNodeName(input.LT(1).getText()) ) ) {
+ alt14=3;
+ }
+ else if ( ( isNodeNodeName(input.LT(1).getText()) ) ) {
+ alt14=4;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("187:0: specialStep returns
[Step result] : ({...}?id= IDENTIFIER LPAREN (pi= IDENTIFIER )? rp= RPAREN | {...}?id=
IDENTIFIER LPAREN rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN | {...}?id=
IDENTIFIER LPAREN rp= RPAREN );", 14, 3, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA14_2==IDENTIFIER) ) {
+ alt14=1;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("187:0: specialStep returns
[Step result] : ({...}?id= IDENTIFIER LPAREN (pi= IDENTIFIER )? rp= RPAREN | {...}?id=
IDENTIFIER LPAREN rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN | {...}?id=
IDENTIFIER LPAREN rp= RPAREN );", 14, 2, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("187:0: specialStep returns [Step
result] : ({...}?id= IDENTIFIER LPAREN (pi= IDENTIFIER )? rp= RPAREN | {...}?id=
IDENTIFIER LPAREN rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN | {...}?id=
IDENTIFIER LPAREN rp= RPAREN );", 14, 1, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("187:0: specialStep returns [Step
result] : ({...}?id= IDENTIFIER LPAREN (pi= IDENTIFIER )? rp= RPAREN | {...}?id=
IDENTIFIER LPAREN rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN | {...}?id=
IDENTIFIER LPAREN rp= RPAREN );", 14, 0, input);
+
+ throw nvae;
+ }
+ switch (alt14) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:191:2: {...}?id=
IDENTIFIER LPAREN (pi= IDENTIFIER )? rp= RPAREN
+ {
+ root_0 = (Object)adaptor.nil();
+
+ if ( !( isProcessingInstructionNodeName( input.LT(1).getText() ) ) )
{
+ if (backtracking>0) {failed=true; return retval;}
+ throw new FailedPredicateException(input,
"specialStep", "\tisProcessingInstructionNodeName( input.LT(1).getText() )
");
+ }
+ id=(Token)input.LT(1);
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_specialStep1167); if
(failed) return retval;
+ if ( backtracking==0 ) {
+ id_tree = (Object)adaptor.create(id);
+ root_0 = (Object)adaptor.becomeRoot(id_tree, root_0);
+ }
+ LPAREN4=(Token)input.LT(1);
+ match(input,LPAREN,FOLLOW_LPAREN_in_specialStep1170); if (failed)
return retval;
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:192:27: (pi=
IDENTIFIER )?
+ int alt13=2;
+ int LA13_0 = input.LA(1);
+
+ if ( (LA13_0==IDENTIFIER) ) {
+ alt13=1;
+ }
+ switch (alt13) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:192:29: pi=
IDENTIFIER
+ {
+ pi=(Token)input.LT(1);
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_specialStep1177);
if (failed) return retval;
+ if ( backtracking==0 ) {
+ pi_tree = (Object)adaptor.create(pi);
+ adaptor.addChild(root_0, pi_tree);
+ }
+ if ( backtracking==0 ) {
+ piID=pi.getText();
+ }
+
+ }
+ break;
+
+ }
+
+ rp=(Token)input.LT(1);
+ match(input,RPAREN,FOLLOW_RPAREN_in_specialStep1186); if (failed)
return retval;
+ if ( backtracking==0 ) {
+ retval.result = new ProcessingInstructionNodeStep(0, piID );
+
retval.result.setPosition(positionOf(id,true),positionOf(rp,false));
+
+ }
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:197:4: {...}?id=
IDENTIFIER LPAREN rp= RPAREN
+ {
+ root_0 = (Object)adaptor.nil();
+
+ if ( !( isCommentNodeName(input.LT(1).getText()) ) ) {
+ if (backtracking>0) {failed=true; return retval;}
+ throw new FailedPredicateException(input,
"specialStep", " isCommentNodeName(input.LT(1).getText()) ");
+ }
+ id=(Token)input.LT(1);
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_specialStep1215); if
(failed) return retval;
+ if ( backtracking==0 ) {
+ id_tree = (Object)adaptor.create(id);
+ root_0 = (Object)adaptor.becomeRoot(id_tree, root_0);
+ }
+ LPAREN5=(Token)input.LT(1);
+ match(input,LPAREN,FOLLOW_LPAREN_in_specialStep1218); if (failed)
return retval;
+ rp=(Token)input.LT(1);
+ match(input,RPAREN,FOLLOW_RPAREN_in_specialStep1223); if (failed)
return retval;
+ if ( backtracking==0 ) {
+ retval.result = new CommentNodeStep(Axis.CHILD);
+
retval.result.setPosition(positionOf(id,true),positionOf(rp,false));
+
+ }
+
+ }
+ break;
+ case 3 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:202:4: {...}?id=
IDENTIFIER LPAREN rp= RPAREN
+ {
+ root_0 = (Object)adaptor.nil();
+
+ if ( !( isTextNodeName(input.LT(1).getText()) ) ) {
+ if (backtracking>0) {failed=true; return retval;}
+ throw new FailedPredicateException(input,
"specialStep", " isTextNodeName(input.LT(1).getText()) ");
+ }
+ id=(Token)input.LT(1);
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_specialStep1262); if
(failed) return retval;
+ if ( backtracking==0 ) {
+ id_tree = (Object)adaptor.create(id);
+ root_0 = (Object)adaptor.becomeRoot(id_tree, root_0);
+ }
+ LPAREN6=(Token)input.LT(1);
+ match(input,LPAREN,FOLLOW_LPAREN_in_specialStep1265); if (failed)
return retval;
+ rp=(Token)input.LT(1);
+ match(input,RPAREN,FOLLOW_RPAREN_in_specialStep1270); if (failed)
return retval;
+ if ( backtracking==0 ) {
+ retval.result = new TextNodeStep(Axis.CHILD);
+
retval.result.setPosition(positionOf(id,true),positionOf(rp,false));
+
+ }
+
+ }
+ break;
+ case 4 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:207:4: {...}?id=
IDENTIFIER LPAREN rp= RPAREN
+ {
+ root_0 = (Object)adaptor.nil();
+
+ if ( !( isNodeNodeName(input.LT(1).getText()) ) ) {
+ if (backtracking>0) {failed=true; return retval;}
+ throw new FailedPredicateException(input,
"specialStep", " isNodeNodeName(input.LT(1).getText()) ");
+ }
+ id=(Token)input.LT(1);
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_specialStep1302); if
(failed) return retval;
+ if ( backtracking==0 ) {
+ id_tree = (Object)adaptor.create(id);
+ root_0 = (Object)adaptor.becomeRoot(id_tree, root_0);
+ }
+ LPAREN7=(Token)input.LT(1);
+ match(input,LPAREN,FOLLOW_LPAREN_in_specialStep1305); if (failed)
return retval;
+ rp=(Token)input.LT(1);
+ match(input,RPAREN,FOLLOW_RPAREN_in_specialStep1310); if (failed)
return retval;
+ if ( backtracking==0 ) {
+ retval.result = new AllNodeStep(Axis.CHILD);
+
retval.result.setPosition(positionOf(id,true),positionOf(rp,false));
+
+ }
+
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end specialStep
+
+ public static class axis_return extends ParserRuleReturnScope {
+ public int axis;
+ public int posStart;
+ public int posEnd;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start axis
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:214:0:
axis returns [int axis, int posStart, int posEnd ] : (id= IDENTIFIER COLON2 | at= AT );
+ public final axis_return axis() throws RecognitionException {
+ axis_return retval = new axis_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token id=null;
+ Token at=null;
+ Token COLON28=null;
+
+ Object id_tree=null;
+ Object at_tree=null;
+ Object COLON28_tree=null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:214:51: (id=
IDENTIFIER COLON2 | at= AT )
+ int alt15=2;
+ int LA15_0 = input.LA(1);
+
+ if ( (LA15_0==IDENTIFIER) ) {
+ alt15=1;
+ }
+ else if ( (LA15_0==AT) ) {
+ alt15=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("214:0: axis returns [int axis, int
posStart, int posEnd ] : (id= IDENTIFIER COLON2 | at= AT );", 15, 0, input);
+
+ throw nvae;
+ }
+ switch (alt15) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:215:4: id=
IDENTIFIER COLON2
+ {
+ root_0 = (Object)adaptor.nil();
+
+ id=(Token)input.LT(1);
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_axis1366); if (failed)
return retval;
+ if ( backtracking==0 ) {
+ id_tree = (Object)adaptor.create(id);
+ adaptor.addChild(root_0, id_tree);
+ }
+ COLON28=(Token)input.LT(1);
+ match(input,COLON2,FOLLOW_COLON2_in_axis1368); if (failed) return
retval;
+ if ( backtracking==0 ) {
+ COLON28_tree = (Object)adaptor.create(COLON28);
+ root_0 = (Object)adaptor.becomeRoot(COLON28_tree, root_0);
+ }
+ if ( backtracking==0 ) {
+ retval.axis = Axis.getAxis( id.getText());
+ retval.posStart = positionOf(id,true);
+ retval.posEnd = positionOf(id,false);
+
+ }
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:220:6: at= AT
+ {
+ root_0 = (Object)adaptor.nil();
+
+ at=(Token)input.LT(1);
+ match(input,AT,FOLLOW_AT_in_axis1388); if (failed) return retval;
+ if ( backtracking==0 ) {
+ at_tree = (Object)adaptor.create(at);
+ adaptor.addChild(root_0, at_tree);
+ }
+ if ( backtracking==0 ) {
+ retval.axis = Axis.ATTRIBUTE;
+ retval.posStart = positionOf(at,true);
+ retval.posEnd = positionOf(at,false);
+
+ }
+
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end axis
+
+ public static class predicate_return extends ParserRuleReturnScope {
+ public Predicate result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start predicate
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:235:0:
predicate returns [Predicate result] : LBRACKET e= predicateExpr RBRACKET ;
+ public final predicate_return predicate() throws RecognitionException {
+ predicate_return retval = new predicate_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token LBRACKET9=null;
+ Token RBRACKET10=null;
+ predicateExpr_return e = null;
+
+
+ Object LBRACKET9_tree=null;
+ Object RBRACKET10_tree=null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:235:37: ( LBRACKET
e= predicateExpr RBRACKET )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:236:3: LBRACKET e=
predicateExpr RBRACKET
+ {
+ root_0 = (Object)adaptor.nil();
+
+ LBRACKET9=(Token)input.LT(1);
+ match(input,LBRACKET,FOLLOW_LBRACKET_in_predicate1430); if (failed) return
retval;
+ if ( backtracking==0 ) {
+ LBRACKET9_tree = (Object)adaptor.create(LBRACKET9);
+ root_0 = (Object)adaptor.becomeRoot(LBRACKET9_tree, root_0);
+ }
+ pushFollow(FOLLOW_predicateExpr_in_predicate1435);
+ e=predicateExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, e.getTree());
+ RBRACKET10=(Token)input.LT(1);
+ match(input,RBRACKET,FOLLOW_RBRACKET_in_predicate1437); if (failed) return
retval;
+ if ( backtracking==0 ) {
+ retval.result = e.result ;
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end predicate
+
+ public static class predicateExpr_return extends ParserRuleReturnScope {
+ public Predicate result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start predicateExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:242:0:
predicateExpr returns [Predicate result] : e= expr ;
+ public final predicateExpr_return predicateExpr() throws RecognitionException {
+ predicateExpr_return retval = new predicateExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ expr_return e = null;
+
+
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:243:3: (e= expr )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:243:5: e= expr
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_expr_in_predicateExpr1468);
+ e=expr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, e.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new Predicate(e.result) ;
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end predicateExpr
+
+ public static class abbrStep_return extends ParserRuleReturnScope {
+ public Step result;
+ public int posStart;
+ public int posEnd;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start abbrStep
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:251:0:
abbrStep returns [Step result, int posStart, int posEnd ] : (d= DOT | d= DOT2 );
+ public final abbrStep_return abbrStep() throws RecognitionException {
+ abbrStep_return retval = new abbrStep_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token d=null;
+
+ Object d_tree=null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:251:58: (d= DOT |
d= DOT2 )
+ int alt16=2;
+ int LA16_0 = input.LA(1);
+
+ if ( (LA16_0==DOT) ) {
+ alt16=1;
+ }
+ else if ( (LA16_0==DOT2) ) {
+ alt16=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("251:0: abbrStep returns [Step result,
int posStart, int posEnd ] : (d= DOT | d= DOT2 );", 16, 0, input);
+
+ throw nvae;
+ }
+ switch (alt16) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:252:4: d= DOT
+ {
+ root_0 = (Object)adaptor.nil();
+
+ d=(Token)input.LT(1);
+ match(input,DOT,FOLLOW_DOT_in_abbrStep1500); if (failed) return
retval;
+ if ( backtracking==0 ) {
+ d_tree = (Object)adaptor.create(d);
+ adaptor.addChild(root_0, d_tree);
+ }
+ if ( backtracking==0 ) {
+ retval.result = new AllNodeStep(Axis.SELF); retval.posStart =
positionOf(d,true); retval.posEnd = retval.posStart+1;
+ }
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:253:4: d= DOT2
+ {
+ root_0 = (Object)adaptor.nil();
+
+ d=(Token)input.LT(1);
+ match(input,DOT2,FOLLOW_DOT2_in_abbrStep1513); if (failed) return
retval;
+ if ( backtracking==0 ) {
+ d_tree = (Object)adaptor.create(d);
+ adaptor.addChild(root_0, d_tree);
+ }
+ if ( backtracking==0 ) {
+ retval.result = new AllNodeStep(Axis.PARENT); retval.posStart =
positionOf(d,true); retval.posEnd = retval.posStart+2;
+ }
+
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end abbrStep
+
+ public static class abbrAxisSpecifier_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start abbrAxisSpecifier
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:259:0:
abbrAxisSpecifier : ( AT )? ;
+ public final abbrAxisSpecifier_return abbrAxisSpecifier() throws RecognitionException
{
+ abbrAxisSpecifier_return retval = new abbrAxisSpecifier_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token AT11=null;
+
+ Object AT11_tree=null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:259:19: ( ( AT )?
)
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:259:21: ( AT )?
+ {
+ root_0 = (Object)adaptor.nil();
+
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:259:21: ( AT )?
+ int alt17=2;
+ int LA17_0 = input.LA(1);
+
+ if ( (LA17_0==AT) ) {
+ alt17=1;
+ }
+ switch (alt17) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:259:23: AT
+ {
+ AT11=(Token)input.LT(1);
+ match(input,AT,FOLLOW_AT_in_abbrAxisSpecifier1531); if (failed)
return retval;
+ if ( backtracking==0 ) {
+ AT11_tree = (Object)adaptor.create(AT11);
+ adaptor.addChild(root_0, AT11_tree);
+ }
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end abbrAxisSpecifier
+
+ public static class expr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start expr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:274:0:
expr returns [Expr result] : e= orExpr ;
+ public final expr_return expr() throws RecognitionException {
+ expr_return retval = new expr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ orExpr_return e = null;
+
+
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:275:3: (e= orExpr
)
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:275:5: e= orExpr
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_orExpr_in_expr1565);
+ e=orExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, e.getTree());
+ if ( backtracking==0 ) {
+ retval.result = e.result ;
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end expr
+
+ public static class primaryExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start primaryExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:281:0:
primaryExpr returns [Expr result] : (varRef= variableReference | LPAREN exp= expr RPAREN |
lit= literal | num= number | fn= functionCall );
+ public final primaryExpr_return primaryExpr() throws RecognitionException {
+ primaryExpr_return retval = new primaryExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token LPAREN12=null;
+ Token RPAREN13=null;
+ variableReference_return varRef = null;
+
+ expr_return exp = null;
+
+ literal_return lit = null;
+
+ number_return num = null;
+
+ functionCall_return fn = null;
+
+
+ Object LPAREN12_tree=null;
+ Object RPAREN13_tree=null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:281:34: (varRef=
variableReference | LPAREN exp= expr RPAREN | lit= literal | num= number | fn=
functionCall )
+ int alt18=5;
+ switch ( input.LA(1) ) {
+ case DOLLAR:
+ {
+ alt18=1;
+ }
+ break;
+ case LPAREN:
+ {
+ alt18=2;
+ }
+ break;
+ case LITERAL:
+ {
+ alt18=3;
+ }
+ break;
+ case NUMBER:
+ {
+ alt18=4;
+ }
+ break;
+ case IDENTIFIER:
+ {
+ alt18=5;
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("281:0: primaryExpr returns [Expr
result] : (varRef= variableReference | LPAREN exp= expr RPAREN | lit= literal | num=
number | fn= functionCall );", 18, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt18) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:282:4: varRef=
variableReference
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_variableReference_in_primaryExpr1594);
+ varRef=variableReference();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, varRef.getTree());
+ if ( backtracking==0 ) {
+ retval.result = varRef.result ;
+ }
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:283:5: LPAREN exp=
expr RPAREN
+ {
+ root_0 = (Object)adaptor.nil();
+
+ LPAREN12=(Token)input.LT(1);
+ match(input,LPAREN,FOLLOW_LPAREN_in_primaryExpr1611); if (failed)
return retval;
+ pushFollow(FOLLOW_expr_in_primaryExpr1616);
+ exp=expr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, exp.getTree());
+ RPAREN13=(Token)input.LT(1);
+ match(input,RPAREN,FOLLOW_RPAREN_in_primaryExpr1618); if (failed)
return retval;
+ if ( backtracking==0 ) {
+ retval.result = exp.result; retval.result.setWrapParen(true);
+ }
+
+ }
+ break;
+ case 3 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:284:5: lit=
literal
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_literal_in_primaryExpr1638);
+ lit=literal();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, lit.getTree());
+ if ( backtracking==0 ) {
+ retval.result = lit.result ;
+ }
+
+ }
+ break;
+ case 4 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:285:5: num=
number
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_number_in_primaryExpr1670);
+ num=number();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, num.getTree());
+ if ( backtracking==0 ) {
+ retval.result = num.result ;
+ }
+
+ }
+ break;
+ case 5 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:286:5: fn=
functionCall
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_functionCall_in_primaryExpr1703);
+ fn=functionCall();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, fn.getTree());
+ if ( backtracking==0 ) {
+ retval.result = fn.result ;
+ }
+
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end primaryExpr
+
+ public static class literal_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start literal
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:290:0:
literal returns [Expr result] : lit= LITERAL ;
+ public final literal_return literal() throws RecognitionException {
+ literal_return retval = new literal_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token lit=null;
+
+ Object lit_tree=null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:291:2: (lit=
LITERAL )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:291:4: lit=
LITERAL
+ {
+ root_0 = (Object)adaptor.nil();
+
+ lit=(Token)input.LT(1);
+ match(input,LITERAL,FOLLOW_LITERAL_in_literal1741); if (failed) return
retval;
+ if ( backtracking==0 ) {
+ lit_tree = (Object)adaptor.create(lit);
+ root_0 = (Object)adaptor.becomeRoot(lit_tree, root_0);
+ }
+ if ( backtracking==0 ) {
+ retval.result = new LiteralExpr(lit.getText()) ;
+ retval.result.setPosition (positionOf(lit,true),positionOf(lit,false)
);
+
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end literal
+
+ public static class number_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start number
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:297:0:
number returns [Expr result] : num= NUMBER ;
+ public final number_return number() throws RecognitionException {
+ number_return retval = new number_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token num=null;
+
+ Object num_tree=null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:298:4: (num=
NUMBER )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:298:6: num=
NUMBER
+ {
+ root_0 = (Object)adaptor.nil();
+
+ num=(Token)input.LT(1);
+ match(input,NUMBER,FOLLOW_NUMBER_in_number1767); if (failed) return retval;
+ if ( backtracking==0 ) {
+ num_tree = (Object)adaptor.create(num);
+ root_0 = (Object)adaptor.becomeRoot(num_tree, root_0);
+ }
+ if ( backtracking==0 ) {
+ retval.result = new NumberExpr(num.getText());
+
retval.result.setPosition(positionOf(num,true),positionOf(num,false));
+
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end number
+
+ public static class variableReference_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start variableReference
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:304:0:
variableReference returns [Expr result] : DOLLAR var= qName ;
+ public final variableReference_return variableReference() throws RecognitionException
{
+ variableReference_return retval = new variableReference_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token DOLLAR14=null;
+ qName_return var = null;
+
+
+ Object DOLLAR14_tree=null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:305:3: ( DOLLAR
var= qName )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:305:5: DOLLAR var=
qName
+ {
+ root_0 = (Object)adaptor.nil();
+
+ DOLLAR14=(Token)input.LT(1);
+ match(input,DOLLAR,FOLLOW_DOLLAR_in_variableReference1798); if (failed)
return retval;
+ if ( backtracking==0 ) {
+ DOLLAR14_tree = (Object)adaptor.create(DOLLAR14);
+ root_0 = (Object)adaptor.becomeRoot(DOLLAR14_tree, root_0);
+ }
+ pushFollow(FOLLOW_qName_in_variableReference1803);
+ var=qName();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, var.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new VariableReferenceExpr(var.prefix, var.localName);
+ retval.result.setPosition( var.startOffset, var.endOffset );
+
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end variableReference
+
+ public static class functionCall_return extends ParserRuleReturnScope {
+ public FunctionCallExpr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start functionCall
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:318:0:
functionCall returns [FunctionCallExpr result ] : qn= qName LPAREN (list= argList )?
RPAREN ;
+ public final functionCall_return functionCall() throws RecognitionException {
+ functionCall_return retval = new functionCall_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token LPAREN15=null;
+ Token RPAREN16=null;
+ qName_return qn = null;
+
+ argList_return list = null;
+
+
+ Object LPAREN15_tree=null;
+ Object RPAREN16_tree=null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:319:5: (qn= qName
LPAREN (list= argList )? RPAREN )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:319:7: qn= qName
LPAREN (list= argList )? RPAREN
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_qName_in_functionCall1838);
+ qn=qName();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, qn.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new FunctionCallExpr(qn.prefix,qn.localName);
+ retval.result.setPosition (qn.startOffset,qn.endOffset);
+
+ }
+ LPAREN15=(Token)input.LT(1);
+ match(input,LPAREN,FOLLOW_LPAREN_in_functionCall1863); if (failed) return
retval;
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:323:18: (list=
argList )?
+ int alt19=2;
+ int LA19_0 = input.LA(1);
+
+ if ( (LA19_0==LPAREN||(LA19_0>=DOT &&
LA19_0<=AT)||(LA19_0>=SLASH &&
LA19_0<=DOLLAR)||LA19_0==MINUS||LA19_0==STAR||(LA19_0>=IDENTIFIER &&
LA19_0<=NUMBER)) ) {
+ alt19=1;
+ }
+ switch (alt19) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:323:20: list=
argList
+ {
+ pushFollow(FOLLOW_argList_in_functionCall1870);
+ list=argList();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, list.getTree());
+ if ( backtracking==0 ) {
+ retval.result.getParameters().addAll(list.result);
+ }
+
+ }
+ break;
+
+ }
+
+ RPAREN16=(Token)input.LT(1);
+ match(input,RPAREN,FOLLOW_RPAREN_in_functionCall1877); if (failed) return
retval;
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end functionCall
+
+ public static class argList_return extends ParserRuleReturnScope {
+ public List<Expr> result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start argList
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:328:0:
argList returns [ List<Expr> result ] : a= argument ( COMMA b= argument )* -> ^(
Args ( argument )+ ) ;
+ public final argList_return argList() throws RecognitionException {
+ argList_return retval = new argList_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token COMMA17=null;
+ argument_return a = null;
+
+ argument_return b = null;
+
+
+ Object COMMA17_tree=null;
+ RewriteRuleTokenStream stream_COMMA=new
RewriteRuleTokenStream(adaptor,"token COMMA");
+ RewriteRuleSubtreeStream stream_argument=new
RewriteRuleSubtreeStream(adaptor,"rule argument");
+
+ retval.result = new ArrayList<Expr>();
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:332:3: (a=
argument ( COMMA b= argument )* -> ^( Args ( argument )+ ) )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:332:5: a= argument
( COMMA b= argument )*
+ {
+ pushFollow(FOLLOW_argument_in_argList1914);
+ a=argument();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) stream_argument.add(a.getTree());
+ if ( backtracking==0 ) {
+ retval.result.add(a.result);
+ }
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:333:5: ( COMMA b=
argument )*
+ loop20:
+ do {
+ int alt20=2;
+ int LA20_0 = input.LA(1);
+
+ if ( (LA20_0==COMMA) ) {
+ alt20=1;
+ }
+
+
+ switch (alt20) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:333:7: COMMA b=
argument
+ {
+ COMMA17=(Token)input.LT(1);
+ match(input,COMMA,FOLLOW_COMMA_in_argList1925); if (failed) return
retval;
+ if ( backtracking==0 ) stream_COMMA.add(COMMA17);
+
+ pushFollow(FOLLOW_argument_in_argList1929);
+ b=argument();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) stream_argument.add(b.getTree());
+ if ( backtracking==0 ) {
+ retval.result.add(b.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop20;
+ }
+ } while (true);
+
+
+ // AST REWRITE
+ // elements: argument
+ // token labels:
+ // rule labels: retval
+ // token list labels:
+ // rule list labels:
+ if ( backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleSubtreeStream stream_retval=new
RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 334:8: -> ^( Args ( argument )+ )
+ {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:334:11: ^( Args (
argument )+ )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot(adaptor.create(Args,
"Args"), root_1);
+
+ if ( !(stream_argument.hasNext()) ) {
+ throw new RewriteEarlyExitException();
+ }
+ while ( stream_argument.hasNext() ) {
+ adaptor.addChild(root_1, stream_argument.next());
+
+ }
+ stream_argument.reset();
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end argList
+
+ public static class argument_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start argument
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:338:0:
argument returns [Expr result] : e= expr ;
+ public final argument_return argument() throws RecognitionException {
+ argument_return retval = new argument_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ expr_return e = null;
+
+
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:339:4: (e= expr )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:339:6: e= expr
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_expr_in_argument1980);
+ e=expr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, e.getTree());
+ if ( backtracking==0 ) {
+ retval.result = e.result ;
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end argument
+
+ public static class unionExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start unionExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:350:0:
unionExpr returns [Expr result] : (a= pathExpr ) ( (op= PIPE ) b= pathExpr )* ;
+ public final unionExpr_return unionExpr() throws RecognitionException {
+ unionExpr_return retval = new unionExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ pathExpr_return a = null;
+
+ pathExpr_return b = null;
+
+
+ Object op_tree=null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:351:3: ( (a=
pathExpr ) ( (op= PIPE ) b= pathExpr )* )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:351:5: (a=
pathExpr ) ( (op= PIPE ) b= pathExpr )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:351:5: (a=
pathExpr )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:351:6: a=
pathExpr
+ {
+ pushFollow(FOLLOW_pathExpr_in_unionExpr2015);
+ a=pathExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, a.getTree());
+
+ }
+
+ if ( backtracking==0 ) {
+ retval.result = a.result;
+ }
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:353:5: ( (op= PIPE
) b= pathExpr )*
+ loop21:
+ do {
+ int alt21=2;
+ int LA21_0 = input.LA(1);
+
+ if ( (LA21_0==PIPE) ) {
+ alt21=1;
+ }
+
+
+ switch (alt21) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:353:6: (op= PIPE )
b= pathExpr
+ {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:353:6: (op= PIPE
)
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:353:7: op= PIPE
+ {
+ op=(Token)input.LT(1);
+ match(input,PIPE,FOLLOW_PIPE_in_unionExpr2036); if (failed) return
retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+
+ pushFollow(FOLLOW_pathExpr_in_unionExpr2042);
+ b=pathExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, b.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new UnionExpr(op.getText(),retval.result,b.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop21;
+ }
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end unionExpr
+
+ public static class pathExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start pathExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:360:0:
pathExpr returns [Expr result] : (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 )
path= relativeLocationPath )? );
+ public final pathExpr_return pathExpr() throws RecognitionException {
+ pathExpr_return retval = new pathExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token SLASH18=null;
+ Token SLASH219=null;
+ locationPath_return loc = null;
+
+ filterExpr_return e = null;
+
+ relativeLocationPath_return path = null;
+
+
+ Object SLASH18_tree=null;
+ Object SLASH219_tree=null;
+
+
+ Step ans = null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:363:2: (loc=
locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path= relativeLocationPath )? )
+ int alt24=2;
+ switch ( input.LA(1) ) {
+ case DOT:
+ case DOT2:
+ case AT:
+ case SLASH:
+ case SLASH2:
+ case STAR:
+ {
+ alt24=1;
+ }
+ break;
+ case IDENTIFIER:
+ {
+ switch ( input.LA(2) ) {
+ case COLON:
+ {
+ int LA24_12 = input.LA(3);
+
+ if ( (LA24_12==IDENTIFIER) ) {
+ int LA24_36 = input.LA(4);
+
+ if ( (LA24_36==LPAREN) ) {
+ alt24=2;
+ }
+ else if ( (LA24_36==EOF||(LA24_36>=OR &&
LA24_36<=DIV)||(LA24_36>=RPAREN &&
LA24_36<=PIPE)||LA24_36==COMMA||(LA24_36>=SLASH &&
LA24_36<=SLASH2)||(LA24_36>=PLUS && LA24_36<=STAR)) ) {
+ alt24=1;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("360:0: pathExpr returns
[Expr result] : (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path=
relativeLocationPath )? );", 24, 36, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA24_12==STAR) ) {
+ alt24=1;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("360:0: pathExpr returns [Expr
result] : (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path=
relativeLocationPath )? );", 24, 12, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case LPAREN:
+ {
+ switch ( input.LA(3) ) {
+ case RPAREN:
+ {
+ int LA24_38 = input.LA(4);
+
+ if ( (( isCommentNodeName(input.LT(1).getText()) ||
isNodeNodeName(input.LT(1).getText()) || isTextNodeName(input.LT(1).getText())
|| isProcessingInstructionNodeName( input.LT(1).getText() ) )) ) {
+ alt24=1;
+ }
+ else if ( (true) ) {
+ alt24=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("360:0: pathExpr returns
[Expr result] : (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path=
relativeLocationPath )? );", 24, 38, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case IDENTIFIER:
+ {
+ int LA24_39 = input.LA(4);
+
+ if ( ((LA24_39>=OR &&
LA24_39<=LPAREN)||LA24_39==LBRACKET||LA24_39==PIPE||(LA24_39>=COMMA &&
LA24_39<=SLASH2)||(LA24_39>=PLUS && LA24_39<=STAR)) ) {
+ alt24=2;
+ }
+ else if ( (LA24_39==RPAREN) ) {
+ int LA24_97 = input.LA(5);
+
+ if ( ( isProcessingInstructionNodeName( input.LT(1).getText()
) ) ) {
+ alt24=1;
+ }
+ else if ( (true) ) {
+ alt24=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("360:0: pathExpr
returns [Expr result] : (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path=
relativeLocationPath )? );", 24, 97, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("360:0: pathExpr returns
[Expr result] : (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path=
relativeLocationPath )? );", 24, 39, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case LPAREN:
+ case DOT:
+ case DOT2:
+ case AT:
+ case SLASH:
+ case SLASH2:
+ case DOLLAR:
+ case MINUS:
+ case STAR:
+ case LITERAL:
+ case NUMBER:
+ {
+ alt24=2;
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("360:0: pathExpr returns [Expr
result] : (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path=
relativeLocationPath )? );", 24, 13, input);
+
+ throw nvae;
+ }
+
+ }
+ break;
+ case EOF:
+ case OR:
+ case AND:
+ case MOD:
+ case DIV:
+ case RPAREN:
+ case LBRACKET:
+ case RBRACKET:
+ case PIPE:
+ case COMMA:
+ case COLON2:
+ case SLASH:
+ case SLASH2:
+ case PLUS:
+ case MINUS:
+ case EQ:
+ case NE:
+ case LT:
+ case LTE:
+ case GT:
+ case GTE:
+ case STAR:
+ {
+ alt24=1;
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("360:0: pathExpr returns [Expr
result] : (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path=
relativeLocationPath )? );", 24, 3, input);
+
+ throw nvae;
+ }
+
+ }
+ break;
+ case LPAREN:
+ case DOLLAR:
+ case LITERAL:
+ case NUMBER:
+ {
+ alt24=2;
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("360:0: pathExpr returns [Expr result]
: (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path= relativeLocationPath )?
);", 24, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt24) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:364:3: loc=
locationPath
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_locationPath_in_pathExpr2092);
+ loc=locationPath();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, loc.getTree());
+ if ( backtracking==0 ) {
+ retval.result = loc.result;
+ }
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:366:5: e=
filterExpr ( ( SLASH | SLASH2 ) path= relativeLocationPath )?
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_filterExpr_in_pathExpr2109);
+ e=filterExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, e.getTree());
+ if ( backtracking==0 ) {
+ retval.result = e.result;
+ }
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:367:8: ( ( SLASH |
SLASH2 ) path= relativeLocationPath )?
+ int alt23=2;
+ int LA23_0 = input.LA(1);
+
+ if ( ((LA23_0>=SLASH && LA23_0<=SLASH2)) ) {
+ alt23=1;
+ }
+ switch (alt23) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:367:10: ( SLASH |
SLASH2 ) path= relativeLocationPath
+ {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:367:10: ( SLASH |
SLASH2 )
+ int alt22=2;
+ int LA22_0 = input.LA(1);
+
+ if ( (LA22_0==SLASH) ) {
+ alt22=1;
+ }
+ else if ( (LA22_0==SLASH2) ) {
+ alt22=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("367:10: ( SLASH |
SLASH2 )", 22, 0, input);
+
+ throw nvae;
+ }
+ switch (alt22) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:367:11: SLASH
+ {
+ SLASH18=(Token)input.LT(1);
+ match(input,SLASH,FOLLOW_SLASH_in_pathExpr2124); if
(failed) return retval;
+ if ( backtracking==0 ) {
+ SLASH18_tree = (Object)adaptor.create(SLASH18);
+ adaptor.addChild(root_0, SLASH18_tree);
+ }
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:367:17: SLASH2
+ {
+ SLASH219=(Token)input.LT(1);
+ match(input,SLASH2,FOLLOW_SLASH2_in_pathExpr2126); if
(failed) return retval;
+ if ( backtracking==0 ) {
+ SLASH219_tree = (Object)adaptor.create(SLASH219);
+ adaptor.addChild(root_0, SLASH219_tree);
+ }
+ if ( backtracking==0 ) {
+ ans=new AllNodeStep(Axis.DESCENDANT_OR_SELF);
+ }
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_relativeLocationPath_in_pathExpr2133);
+ path=relativeLocationPath();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0,
path.getTree());
+ if ( backtracking==0 ) {
+
+ retval.result = new
PathExpr(e.result,path.result);
+ if (ans != null) {
path.result.addFirstStep(ans); }
+
+ }
+
+ }
+ break;
+
+ }
+
+
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end pathExpr
+
+ public static class filterExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start filterExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:375:0:
filterExpr returns [Expr result] : e= primaryExpr (p= predicate )* ;
+ public final filterExpr_return filterExpr() throws RecognitionException {
+ filterExpr_return retval = new filterExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ primaryExpr_return e = null;
+
+ predicate_return p = null;
+
+
+
+
+ FilterExpr filter = null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:379:3: (e=
primaryExpr (p= predicate )* )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:379:5: e=
primaryExpr (p= predicate )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_primaryExpr_in_filterExpr2172);
+ e=primaryExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, e.getTree());
+ if ( backtracking==0 ) {
+ filter = new FilterExpr(e.result) ;
+ }
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:380:9: (p=
predicate )*
+ loop25:
+ do {
+ int alt25=2;
+ int LA25_0 = input.LA(1);
+
+ if ( (LA25_0==LBRACKET) ) {
+ alt25=1;
+ }
+
+
+ switch (alt25) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:380:11: p=
predicate
+ {
+ pushFollow(FOLLOW_predicate_in_filterExpr2189);
+ p=predicate();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, p.getTree());
+ if ( backtracking==0 ) {
+ filter.addPredicate(p.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop25;
+ }
+ } while (true);
+
+ if ( backtracking==0 ) {
+ retval.result = filter.hasPredicates() ? filter : filter.getExpr();
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end filterExpr
+
+ public static class orExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start orExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:393:0:
orExpr returns [Expr result] : (a= andExpr ) ( (op= OR ) b= andExpr )* ;
+ public final orExpr_return orExpr() throws RecognitionException {
+ orExpr_return retval = new orExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ andExpr_return a = null;
+
+ andExpr_return b = null;
+
+
+ Object op_tree=null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:394:3: ( (a=
andExpr ) ( (op= OR ) b= andExpr )* )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:394:5: (a= andExpr
) ( (op= OR ) b= andExpr )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:394:5: (a= andExpr
)
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:394:6: a= andExpr
+ {
+ pushFollow(FOLLOW_andExpr_in_orExpr2234);
+ a=andExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, a.getTree());
+
+ }
+
+ if ( backtracking==0 ) {
+ retval.result = a.result;
+ }
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:396:9: ( (op= OR )
b= andExpr )*
+ loop26:
+ do {
+ int alt26=2;
+ int LA26_0 = input.LA(1);
+
+ if ( (LA26_0==OR) ) {
+ alt26=1;
+ }
+
+
+ switch (alt26) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:396:10: (op= OR )
b= andExpr
+ {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:396:10: (op= OR )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:396:11: op= OR
+ {
+ op=(Token)input.LT(1);
+ match(input,OR,FOLLOW_OR_in_orExpr2266); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+
+ pushFollow(FOLLOW_andExpr_in_orExpr2272);
+ b=andExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, b.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new LogicalExpr(op.getText(), retval.result,
b.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop26;
+ }
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end orExpr
+
+ public static class andExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start andExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:404:0:
andExpr returns [Expr result] : (a= equalityExpr ) ( (op= AND ) b= equalityExpr )* ;
+ public final andExpr_return andExpr() throws RecognitionException {
+ andExpr_return retval = new andExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ equalityExpr_return a = null;
+
+ equalityExpr_return b = null;
+
+
+ Object op_tree=null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:405:3: ( (a=
equalityExpr ) ( (op= AND ) b= equalityExpr )* )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:405:6: (a=
equalityExpr ) ( (op= AND ) b= equalityExpr )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:405:6: (a=
equalityExpr )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:405:7: a=
equalityExpr
+ {
+ pushFollow(FOLLOW_equalityExpr_in_andExpr2332);
+ a=equalityExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, a.getTree());
+
+ }
+
+ if ( backtracking==0 ) {
+ retval.result = a.result;
+ }
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:407:12: ( (op= AND
) b= equalityExpr )*
+ loop27:
+ do {
+ int alt27=2;
+ int LA27_0 = input.LA(1);
+
+ if ( (LA27_0==AND) ) {
+ alt27=1;
+ }
+
+
+ switch (alt27) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:407:13: (op= AND )
b= equalityExpr
+ {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:407:13: (op= AND
)
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:407:14: op= AND
+ {
+ op=(Token)input.LT(1);
+ match(input,AND,FOLLOW_AND_in_andExpr2377); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+
+ pushFollow(FOLLOW_equalityExpr_in_andExpr2383);
+ b=equalityExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, b.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new LogicalExpr(op.getText(),retval.result,b.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop27;
+ }
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end andExpr
+
+ public static class equalityExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start equalityExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:414:0:
equalityExpr returns [Expr result] : (a= relationalExpr ) ( (op= EQ | op= NE ) b=
relationalExpr )* ;
+ public final equalityExpr_return equalityExpr() throws RecognitionException {
+ equalityExpr_return retval = new equalityExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ relationalExpr_return a = null;
+
+ relationalExpr_return b = null;
+
+
+ Object op_tree=null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:415:3: ( (a=
relationalExpr ) ( (op= EQ | op= NE ) b= relationalExpr )* )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:415:5: (a=
relationalExpr ) ( (op= EQ | op= NE ) b= relationalExpr )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:415:5: (a=
relationalExpr )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:415:6: a=
relationalExpr
+ {
+ pushFollow(FOLLOW_relationalExpr_in_equalityExpr2452);
+ a=relationalExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, a.getTree());
+
+ }
+
+ if ( backtracking==0 ) {
+ retval.result = a.result;
+ }
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:417:12: ( (op= EQ
| op= NE ) b= relationalExpr )*
+ loop29:
+ do {
+ int alt29=2;
+ int LA29_0 = input.LA(1);
+
+ if ( ((LA29_0>=EQ && LA29_0<=NE)) ) {
+ alt29=1;
+ }
+
+
+ switch (alt29) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:417:13: (op= EQ |
op= NE ) b= relationalExpr
+ {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:417:13: (op= EQ |
op= NE )
+ int alt28=2;
+ int LA28_0 = input.LA(1);
+
+ if ( (LA28_0==EQ) ) {
+ alt28=1;
+ }
+ else if ( (LA28_0==NE) ) {
+ alt28=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("417:13: (op= EQ | op= NE )",
28, 0, input);
+
+ throw nvae;
+ }
+ switch (alt28) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:417:14: op= EQ
+ {
+ op=(Token)input.LT(1);
+ match(input,EQ,FOLLOW_EQ_in_equalityExpr2484); if (failed)
return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:417:21: op= NE
+ {
+ op=(Token)input.LT(1);
+ match(input,NE,FOLLOW_NE_in_equalityExpr2489); if (failed)
return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_relationalExpr_in_equalityExpr2495);
+ b=relationalExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, b.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new EqualityExpr(op.getText(), retval.result,
b.result );
+ }
+
+ }
+ break;
+
+ default :
+ break loop29;
+ }
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end equalityExpr
+
+ public static class relationalExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start relationalExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:424:0:
relationalExpr returns [Expr result] : (a= additiveExpr ) ( (op= LT | op= GT | op= LTE |
op= GTE ) b= additiveExpr )* ;
+ public final relationalExpr_return relationalExpr() throws RecognitionException {
+ relationalExpr_return retval = new relationalExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ additiveExpr_return a = null;
+
+ additiveExpr_return b = null;
+
+
+ Object op_tree=null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:425:3: ( (a=
additiveExpr ) ( (op= LT | op= GT | op= LTE | op= GTE ) b= additiveExpr )* )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:425:5: (a=
additiveExpr ) ( (op= LT | op= GT | op= LTE | op= GTE ) b= additiveExpr )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:425:5: (a=
additiveExpr )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:425:6: a=
additiveExpr
+ {
+ pushFollow(FOLLOW_additiveExpr_in_relationalExpr2565);
+ a=additiveExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, a.getTree());
+
+ }
+
+ if ( backtracking==0 ) {
+ retval.result = a.result;
+ }
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:427:13: ( (op= LT
| op= GT | op= LTE | op= GTE ) b= additiveExpr )*
+ loop31:
+ do {
+ int alt31=2;
+ int LA31_0 = input.LA(1);
+
+ if ( ((LA31_0>=LT && LA31_0<=GTE)) ) {
+ alt31=1;
+ }
+
+
+ switch (alt31) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:427:14: (op= LT |
op= GT | op= LTE | op= GTE ) b= additiveExpr
+ {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:427:14: (op= LT |
op= GT | op= LTE | op= GTE )
+ int alt30=4;
+ switch ( input.LA(1) ) {
+ case LT:
+ {
+ alt30=1;
+ }
+ break;
+ case GT:
+ {
+ alt30=2;
+ }
+ break;
+ case LTE:
+ {
+ alt30=3;
+ }
+ break;
+ case GTE:
+ {
+ alt30=4;
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("427:14: (op= LT | op= GT | op=
LTE | op= GTE )", 30, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt30) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:427:15: op= LT
+ {
+ op=(Token)input.LT(1);
+ match(input,LT,FOLLOW_LT_in_relationalExpr2595); if (failed)
return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:427:22: op= GT
+ {
+ op=(Token)input.LT(1);
+ match(input,GT,FOLLOW_GT_in_relationalExpr2600); if (failed)
return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+ case 3 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:427:29: op= LTE
+ {
+ op=(Token)input.LT(1);
+ match(input,LTE,FOLLOW_LTE_in_relationalExpr2605); if (failed)
return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+ case 4 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:427:37: op= GTE
+ {
+ op=(Token)input.LT(1);
+ match(input,GTE,FOLLOW_GTE_in_relationalExpr2610); if (failed)
return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_additiveExpr_in_relationalExpr2616);
+ b=additiveExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, b.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new RelationalExpr(op.getText(), retval.result,
b.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop31;
+ }
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end relationalExpr
+
+ public static class additiveExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start additiveExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:440:0:
additiveExpr returns [Expr result] : (a= multExpr ) ( (op= PLUS | op= MINUS ) b= multExpr
)* ;
+ public final additiveExpr_return additiveExpr() throws RecognitionException {
+ additiveExpr_return retval = new additiveExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ multExpr_return a = null;
+
+ multExpr_return b = null;
+
+
+ Object op_tree=null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:441:2: ( (a=
multExpr ) ( (op= PLUS | op= MINUS ) b= multExpr )* )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:441:5: (a=
multExpr ) ( (op= PLUS | op= MINUS ) b= multExpr )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:441:5: (a=
multExpr )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:441:6: a=
multExpr
+ {
+ pushFollow(FOLLOW_multExpr_in_additiveExpr2677);
+ a=multExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, a.getTree());
+
+ }
+
+ if ( backtracking==0 ) {
+ retval.result = a.result;
+ }
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:443:12: ( (op=
PLUS | op= MINUS ) b= multExpr )*
+ loop33:
+ do {
+ int alt33=2;
+ int LA33_0 = input.LA(1);
+
+ if ( ((LA33_0>=PLUS && LA33_0<=MINUS)) ) {
+ alt33=1;
+ }
+
+
+ switch (alt33) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:443:13: (op= PLUS
| op= MINUS ) b= multExpr
+ {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:443:13: (op= PLUS
| op= MINUS )
+ int alt32=2;
+ int LA32_0 = input.LA(1);
+
+ if ( (LA32_0==PLUS) ) {
+ alt32=1;
+ }
+ else if ( (LA32_0==MINUS) ) {
+ alt32=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("443:13: (op= PLUS | op= MINUS
)", 32, 0, input);
+
+ throw nvae;
+ }
+ switch (alt32) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:443:14: op= PLUS
+ {
+ op=(Token)input.LT(1);
+ match(input,PLUS,FOLLOW_PLUS_in_additiveExpr2709); if (failed)
return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:443:23: op= MINUS
+ {
+ op=(Token)input.LT(1);
+ match(input,MINUS,FOLLOW_MINUS_in_additiveExpr2714); if (failed)
return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_multExpr_in_additiveExpr2720);
+ b=multExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, b.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new AdditiveExpr(op.getText(),retval.result,
b.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop33;
+ }
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end additiveExpr
+
+ public static class multExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start multExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:450:0:
multExpr returns [Expr result] : (a= unaryExpr ) ( (op= STAR | op= DIV | op= MOD ) b=
unaryExpr )* ;
+ public final multExpr_return multExpr() throws RecognitionException {
+ multExpr_return retval = new multExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ unaryExpr_return a = null;
+
+ unaryExpr_return b = null;
+
+
+ Object op_tree=null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:451:3: ( (a=
unaryExpr ) ( (op= STAR | op= DIV | op= MOD ) b= unaryExpr )* )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:451:5: (a=
unaryExpr ) ( (op= STAR | op= DIV | op= MOD ) b= unaryExpr )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:451:5: (a=
unaryExpr )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:451:6: a=
unaryExpr
+ {
+ pushFollow(FOLLOW_unaryExpr_in_multExpr2799);
+ a=unaryExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, a.getTree());
+
+ }
+
+ if ( backtracking==0 ) {
+ retval.result = a.result;
+ }
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:453:10: ( (op=
STAR | op= DIV | op= MOD ) b= unaryExpr )*
+ loop35:
+ do {
+ int alt35=2;
+ int LA35_0 = input.LA(1);
+
+ if ( ((LA35_0>=MOD && LA35_0<=DIV)||LA35_0==STAR) ) {
+ alt35=1;
+ }
+
+
+ switch (alt35) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:453:11: (op= STAR
| op= DIV | op= MOD ) b= unaryExpr
+ {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:453:11: (op= STAR
| op= DIV | op= MOD )
+ int alt34=3;
+ switch ( input.LA(1) ) {
+ case STAR:
+ {
+ alt34=1;
+ }
+ break;
+ case DIV:
+ {
+ alt34=2;
+ }
+ break;
+ case MOD:
+ {
+ alt34=3;
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("453:11: (op= STAR | op= DIV | op=
MOD )", 34, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt34) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:453:12: op= STAR
+ {
+ op=(Token)input.LT(1);
+ match(input,STAR,FOLLOW_STAR_in_multExpr2827); if (failed)
return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:453:21: op= DIV
+ {
+ op=(Token)input.LT(1);
+ match(input,DIV,FOLLOW_DIV_in_multExpr2832); if (failed) return
retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+ case 3 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:453:29: op= MOD
+ {
+ op=(Token)input.LT(1);
+ match(input,MOD,FOLLOW_MOD_in_multExpr2837); if (failed) return
retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_unaryExpr_in_multExpr2843);
+ b=unaryExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, b.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new MultiplicativeExpr(op.getText(), retval.result,
b.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop35;
+ }
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end multExpr
+
+ public static class unaryExpr_return extends ParserRuleReturnScope {
+ public UnaryExpr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start unaryExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:460:0:
unaryExpr returns [UnaryExpr result] : (u= unionExpr | op= MINUS n= unaryExpr );
+ public final unaryExpr_return unaryExpr() throws RecognitionException {
+ unaryExpr_return retval = new unaryExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ unionExpr_return u = null;
+
+ unaryExpr_return n = null;
+
+
+ Object op_tree=null;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:461:3: (u=
unionExpr | op= MINUS n= unaryExpr )
+ int alt36=2;
+ int LA36_0 = input.LA(1);
+
+ if ( (LA36_0==LPAREN||(LA36_0>=DOT &&
LA36_0<=AT)||(LA36_0>=SLASH &&
LA36_0<=DOLLAR)||LA36_0==STAR||(LA36_0>=IDENTIFIER && LA36_0<=NUMBER)) )
{
+ alt36=1;
+ }
+ else if ( (LA36_0==MINUS) ) {
+ alt36=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("460:0: unaryExpr returns [UnaryExpr
result] : (u= unionExpr | op= MINUS n= unaryExpr );", 36, 0, input);
+
+ throw nvae;
+ }
+ switch (alt36) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:461:5: u=
unionExpr
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_unionExpr_in_unaryExpr2907);
+ u=unionExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, u.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new UnaryExpr(u.result);
+ }
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:464:5: op= MINUS
n= unaryExpr
+ {
+ root_0 = (Object)adaptor.nil();
+
+ op=(Token)input.LT(1);
+ match(input,MINUS,FOLLOW_MINUS_in_unaryExpr2929); if (failed) return
retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ adaptor.addChild(root_0, op_tree);
+ }
+ pushFollow(FOLLOW_unaryExpr_in_unaryExpr2933);
+ n=unaryExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, n.getTree());
+ if ( backtracking==0 ) {
+
+ retval.result = n.result;
+ retval.result.setOperand(op.getText());
+ retval.result.setPosition(positionOf(op,true),-1);
+
+ }
+
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end unaryExpr
+
+ public static class qName_return extends ParserRuleReturnScope {
+ public String prefix;
+ public String localName;
+ public int startOffset;
+ public int endOffset;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start qName
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:476:0:
qName returns [String prefix, String localName , int startOffset, int endOffset ] : (p=
IDENTIFIER COLON )? n= IDENTIFIER ;
+ public final qName_return qName() throws RecognitionException {
+ qName_return retval = new qName_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token p=null;
+ Token n=null;
+ Token COLON20=null;
+
+ Object p_tree=null;
+ Object n_tree=null;
+ Object COLON20_tree=null;
+
+
+ retval.prefix = "";
+ retval.startOffset = -1;
+ retval.startOffset = -1;
+
+ try {
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:481:3: ( (p=
IDENTIFIER COLON )? n= IDENTIFIER )
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:482:6: (p=
IDENTIFIER COLON )? n= IDENTIFIER
+ {
+ root_0 = (Object)adaptor.nil();
+
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:482:6: (p=
IDENTIFIER COLON )?
+ int alt37=2;
+ int LA37_0 = input.LA(1);
+
+ if ( (LA37_0==IDENTIFIER) ) {
+ int LA37_1 = input.LA(2);
+
+ if ( (LA37_1==COLON) ) {
+ alt37=1;
+ }
+ }
+ switch (alt37) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:482:7: p=
IDENTIFIER COLON
+ {
+ p=(Token)input.LT(1);
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_qName2972); if (failed)
return retval;
+ if ( backtracking==0 ) {
+ p_tree = (Object)adaptor.create(p);
+ adaptor.addChild(root_0, p_tree);
+ }
+ COLON20=(Token)input.LT(1);
+ match(input,COLON,FOLLOW_COLON_in_qName2974); if (failed) return
retval;
+ if ( backtracking==0 ) {
+ COLON20_tree = (Object)adaptor.create(COLON20);
+ root_0 = (Object)adaptor.becomeRoot(COLON20_tree, root_0);
+ }
+ if ( backtracking==0 ) {
+ retval.prefix =p.getText() ; retval.startOffset =
positionOf(p,true);
+ }
+
+ }
+ break;
+
+ }
+
+ n=(Token)input.LT(1);
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_qName2992); if (failed) return
retval;
+ if ( backtracking==0 ) {
+ n_tree = (Object)adaptor.create(n);
+ adaptor.addChild(root_0, n_tree);
+ }
+ if ( backtracking==0 ) {
+ retval.localName =n.getText();
+ if (retval.startOffset < 0) {
+ retval.startOffset = positionOf(n,true);
+ }
+ retval.endOffset = positionOf(n,false);
+
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end qName
+
+ // $ANTLR start synpred1
+ public final void synpred1_fragment() throws RecognitionException {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:129:9:
( AT | STAR | IDENTIFIER )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:
+ {
+ if ( input.LA(1)==AT||input.LA(1)==STAR||input.LA(1)==IDENTIFIER ) {
+ input.consume();
+ errorRecovery=false;failed=false;
+ }
+ else {
+ if (backtracking>0) {failed=true; return ;}
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recoverFromMismatchedSet(input,mse,FOLLOW_set_in_synpred1842); throw mse;
+ }
+
+
+ }
+ }
+ // $ANTLR end synpred1
+
+ // $ANTLR start synpred2
+ public final void synpred2_fragment() throws RecognitionException {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:164:6:
( IDENTIFIER COLON2 | AT )
+ int alt38=2;
+ int LA38_0 = input.LA(1);
+
+ if ( (LA38_0==IDENTIFIER) ) {
+ alt38=1;
+ }
+ else if ( (LA38_0==AT) ) {
+ alt38=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return ;}
+ NoViableAltException nvae =
+ new NoViableAltException("164:6: synpred2 : ( IDENTIFIER COLON2 | AT
);", 38, 0, input);
+
+ throw nvae;
+ }
+ switch (alt38) {
+ case 1 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:164:7: IDENTIFIER
COLON2
+ {
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_synpred21003); if (failed)
return ;
+ match(input,COLON2,FOLLOW_COLON2_in_synpred21005); if (failed) return ;
+
+ }
+ break;
+ case 2 :
+ //
/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:164:27: AT
+ {
+ match(input,AT,FOLLOW_AT_in_synpred21009); if (failed) return ;
+
+ }
+ break;
+
+ }}
+ // $ANTLR end synpred2
+
+ public final boolean synpred1() {
+ backtracking++;
+ int start = input.mark();
+ try {
+ synpred1_fragment(); // can never throw exception
+ } catch (RecognitionException re) {
+ System.err.println("impossible: "+re);
+ }
+ boolean success = !failed;
+ input.rewind(start);
+ backtracking--;
+ failed=false;
+ return success;
+ }
+ public final boolean synpred2() {
+ backtracking++;
+ int start = input.mark();
+ try {
+ synpred2_fragment(); // can never throw exception
+ } catch (RecognitionException re) {
+ System.err.println("impossible: "+re);
+ }
+ boolean success = !failed;
+ input.rewind(start);
+ backtracking--;
+ failed=false;
+ return success;
+ }
+
+
+
+
+ public static final BitSet FOLLOW_unionExpr_in_xpath742 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_absoluteLocationPath_in_locationPath769 = new
BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_relativeLocationPath_in_locationPath781 = new
BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_SLASH2_in_absoluteLocationPath811 = new BitSet(new
long[]{0x000000014000E002L});
+ public static final BitSet FOLLOW_SLASH_in_absoluteLocationPath820 = new BitSet(new
long[]{0x000000014000E002L});
+ public static final BitSet FOLLOW_i_relativeLocationPath_in_absoluteLocationPath853 =
new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_i_relativeLocationPath_in_relativeLocationPath898 =
new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_step_in_i_relativeLocationPath926 = new BitSet(new
long[]{0x0000000000180002L});
+ public static final BitSet FOLLOW_SLASH2_in_i_relativeLocationPath941 = new
BitSet(new long[]{0x000000014000E000L});
+ public static final BitSet FOLLOW_SLASH_in_i_relativeLocationPath946 = new BitSet(new
long[]{0x000000014000E000L});
+ public static final BitSet FOLLOW_step_in_i_relativeLocationPath952 = new BitSet(new
long[]{0x0000000000180002L});
+ public static final BitSet FOLLOW_axis_in_step1015 = new BitSet(new
long[]{0x0000000140000000L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_step1042 = new BitSet(new
long[]{0x0000000000040000L});
+ public static final BitSet FOLLOW_COLON_in_step1044 = new BitSet(new
long[]{0x0000000140000000L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_step1056 = new BitSet(new
long[]{0x0000000000000402L});
+ public static final BitSet FOLLOW_STAR_in_step1060 = new BitSet(new
long[]{0x0000000000000402L});
+ public static final BitSet FOLLOW_specialStep_in_step1081 = new BitSet(new
long[]{0x0000000000000402L});
+ public static final BitSet FOLLOW_predicate_in_step1099 = new BitSet(new
long[]{0x0000000000000402L});
+ public static final BitSet FOLLOW_abbrStep_in_step1121 = new BitSet(new
long[]{0x0000000000000402L});
+ public static final BitSet FOLLOW_predicate_in_step1130 = new BitSet(new
long[]{0x0000000000000402L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_specialStep1167 = new BitSet(new
long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_LPAREN_in_specialStep1170 = new BitSet(new
long[]{0x0000000100000200L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_specialStep1177 = new BitSet(new
long[]{0x0000000000000200L});
+ public static final BitSet FOLLOW_RPAREN_in_specialStep1186 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_specialStep1215 = new BitSet(new
long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_LPAREN_in_specialStep1218 = new BitSet(new
long[]{0x0000000000000200L});
+ public static final BitSet FOLLOW_RPAREN_in_specialStep1223 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_specialStep1262 = new BitSet(new
long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_LPAREN_in_specialStep1265 = new BitSet(new
long[]{0x0000000000000200L});
+ public static final BitSet FOLLOW_RPAREN_in_specialStep1270 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_specialStep1302 = new BitSet(new
long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_LPAREN_in_specialStep1305 = new BitSet(new
long[]{0x0000000000000200L});
+ public static final BitSet FOLLOW_RPAREN_in_specialStep1310 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_axis1366 = new BitSet(new
long[]{0x0000000000020000L});
+ public static final BitSet FOLLOW_COLON2_in_axis1368 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_AT_in_axis1388 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LBRACKET_in_predicate1430 = new BitSet(new
long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_predicateExpr_in_predicate1435 = new BitSet(new
long[]{0x0000000000000800L});
+ public static final BitSet FOLLOW_RBRACKET_in_predicate1437 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_expr_in_predicateExpr1468 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_DOT_in_abbrStep1500 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_DOT2_in_abbrStep1513 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_AT_in_abbrAxisSpecifier1531 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_orExpr_in_expr1565 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_variableReference_in_primaryExpr1594 = new
BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LPAREN_in_primaryExpr1611 = new BitSet(new
long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_expr_in_primaryExpr1616 = new BitSet(new
long[]{0x0000000000000200L});
+ public static final BitSet FOLLOW_RPAREN_in_primaryExpr1618 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_literal_in_primaryExpr1638 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_number_in_primaryExpr1670 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_functionCall_in_primaryExpr1703 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LITERAL_in_literal1741 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NUMBER_in_number1767 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_DOLLAR_in_variableReference1798 = new BitSet(new
long[]{0x0000000100000000L});
+ public static final BitSet FOLLOW_qName_in_variableReference1803 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_qName_in_functionCall1838 = new BitSet(new
long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_LPAREN_in_functionCall1863 = new BitSet(new
long[]{0x0000000740B8E300L});
+ public static final BitSet FOLLOW_argList_in_functionCall1870 = new BitSet(new
long[]{0x0000000000000200L});
+ public static final BitSet FOLLOW_RPAREN_in_functionCall1877 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_argument_in_argList1914 = new BitSet(new
long[]{0x0000000000010002L});
+ public static final BitSet FOLLOW_COMMA_in_argList1925 = new BitSet(new
long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_argument_in_argList1929 = new BitSet(new
long[]{0x0000000000010002L});
+ public static final BitSet FOLLOW_expr_in_argument1980 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_pathExpr_in_unionExpr2015 = new BitSet(new
long[]{0x0000000000001002L});
+ public static final BitSet FOLLOW_PIPE_in_unionExpr2036 = new BitSet(new
long[]{0x000000074038E100L});
+ public static final BitSet FOLLOW_pathExpr_in_unionExpr2042 = new BitSet(new
long[]{0x0000000000001002L});
+ public static final BitSet FOLLOW_locationPath_in_pathExpr2092 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_filterExpr_in_pathExpr2109 = new BitSet(new
long[]{0x0000000000180002L});
+ public static final BitSet FOLLOW_SLASH_in_pathExpr2124 = new BitSet(new
long[]{0x000000014000E000L});
+ public static final BitSet FOLLOW_SLASH2_in_pathExpr2126 = new BitSet(new
long[]{0x000000014000E000L});
+ public static final BitSet FOLLOW_relativeLocationPath_in_pathExpr2133 = new
BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_primaryExpr_in_filterExpr2172 = new BitSet(new
long[]{0x0000000000000402L});
+ public static final BitSet FOLLOW_predicate_in_filterExpr2189 = new BitSet(new
long[]{0x0000000000000402L});
+ public static final BitSet FOLLOW_andExpr_in_orExpr2234 = new BitSet(new
long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_OR_in_orExpr2266 = new BitSet(new
long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_andExpr_in_orExpr2272 = new BitSet(new
long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_equalityExpr_in_andExpr2332 = new BitSet(new
long[]{0x0000000000000022L});
+ public static final BitSet FOLLOW_AND_in_andExpr2377 = new BitSet(new
long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_equalityExpr_in_andExpr2383 = new BitSet(new
long[]{0x0000000000000022L});
+ public static final BitSet FOLLOW_relationalExpr_in_equalityExpr2452 = new BitSet(new
long[]{0x0000000003000002L});
+ public static final BitSet FOLLOW_EQ_in_equalityExpr2484 = new BitSet(new
long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_NE_in_equalityExpr2489 = new BitSet(new
long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_relationalExpr_in_equalityExpr2495 = new BitSet(new
long[]{0x0000000003000002L});
+ public static final BitSet FOLLOW_additiveExpr_in_relationalExpr2565 = new BitSet(new
long[]{0x000000003C000002L});
+ public static final BitSet FOLLOW_LT_in_relationalExpr2595 = new BitSet(new
long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_GT_in_relationalExpr2600 = new BitSet(new
long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_LTE_in_relationalExpr2605 = new BitSet(new
long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_GTE_in_relationalExpr2610 = new BitSet(new
long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_additiveExpr_in_relationalExpr2616 = new BitSet(new
long[]{0x000000003C000002L});
+ public static final BitSet FOLLOW_multExpr_in_additiveExpr2677 = new BitSet(new
long[]{0x0000000000C00002L});
+ public static final BitSet FOLLOW_PLUS_in_additiveExpr2709 = new BitSet(new
long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_MINUS_in_additiveExpr2714 = new BitSet(new
long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_multExpr_in_additiveExpr2720 = new BitSet(new
long[]{0x0000000000C00002L});
+ public static final BitSet FOLLOW_unaryExpr_in_multExpr2799 = new BitSet(new
long[]{0x00000000400000C2L});
+ public static final BitSet FOLLOW_STAR_in_multExpr2827 = new BitSet(new
long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_DIV_in_multExpr2832 = new BitSet(new
long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_MOD_in_multExpr2837 = new BitSet(new
long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_unaryExpr_in_multExpr2843 = new BitSet(new
long[]{0x00000000400000C2L});
+ public static final BitSet FOLLOW_unionExpr_in_unaryExpr2907 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_MINUS_in_unaryExpr2929 = new BitSet(new
long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_unaryExpr_in_unaryExpr2933 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_qName2972 = new BitSet(new
long[]{0x0000000000040000L});
+ public static final BitSet FOLLOW_COLON_in_qName2974 = new BitSet(new
long[]{0x0000000100000000L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_qName2992 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_set_in_synpred1842 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_synpred21003 = new BitSet(new
long[]{0x0000000000020000L});
+ public static final BitSet FOLLOW_COLON2_in_synpred21005 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_AT_in_synpred21009 = new BitSet(new
long[]{0x0000000000000002L});
+
+}
\ No newline at end of file