Package org.apache.xalan.xsltc.compiler
Class XPathParser
- java.lang.Object
-
- java_cup.runtime.lr_parser
-
- org.apache.xalan.xsltc.compiler.XPathParser
-
public class XPathParser extends java_cup.runtime.lr_parserCUP v0.11b 20160615 generated parser.
-
-
Field Summary
Fields Modifier and Type Field Description org.apache.xalan.xsltc.compiler.SymbolTable_symbolTableReference to the symbol table.static org.apache.xalan.xsltc.compiler.VariableRefDummyVarRefReference to non-existing variable.static java.util.VectorEmptyArgsUsed by function calls with no args.
-
Constructor Summary
Constructors Constructor Description XPathParser()Deprecated.XPathParser(java_cup.runtime.Scanner s)Deprecated.XPathParser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf)Constructor which sets the default scanner.XPathParser(Parser parser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description short[][]action_table()Access to parse-action table.voidaddError(ErrorMsg error)org.apache.xalan.xsltc.compiler.StepPatterncreateStepPattern(int axis, java.lang.Object test, java.util.Vector predicates)This method is similar to findNodeType(int, Object) except that it creates a StepPattern instead of just returning a node type.java_cup.runtime.Symboldo_action(int act_num, java_cup.runtime.lr_parser parser, java.util.Stack stack, int top)Invoke a user supplied parse action.intEOF_sym()EOFSymbol index.interror_sym()errorSymbol index.intfindNodeType(int axis, java.lang.Object test)intgetLineNumber()org.apache.xalan.xsltc.compiler.QNamegetQName(java.lang.String namespace, java.lang.String prefix, java.lang.String localname)org.apache.xalan.xsltc.compiler.QNamegetQNameIgnoreDefaultNs(java.lang.String name)java.lang.ClassgetSymbolContainer()org.apache.xalan.xsltc.compiler.RelativeLocationPathinsertStep(org.apache.xalan.xsltc.compiler.Step step, org.apache.xalan.xsltc.compiler.RelativeLocationPath rlp)booleanisElementAxis(int axis)Returns true if the axis applies to elements only.java_cup.runtime.Symbolparse(java.lang.String expression, int lineNumber)Parse the expression passed to the current scanner.short[][]production_table()Access to production table.short[][]reduce_table()Access toreduce_gototable.voidreport_error(java.lang.String message, java.lang.Object info)voidreport_fatal_error(java.lang.String message, java.lang.Object info)voidsetCallsNodeset(boolean flag)voidsetHasIdCall(boolean flag)voidsetMultiDocument(boolean flag)intstart_production()Indicates start production.intstart_state()Indicates start state.
-
-
-
Field Detail
-
EmptyArgs
public static final java.util.Vector EmptyArgs
Used by function calls with no args.
-
DummyVarRef
public static final org.apache.xalan.xsltc.compiler.VariableRef DummyVarRef
Reference to non-existing variable.
-
_symbolTable
public org.apache.xalan.xsltc.compiler.SymbolTable _symbolTable
Reference to the symbol table.
-
-
Constructor Detail
-
XPathParser
@Deprecated public XPathParser()
Deprecated.Default constructor.
-
XPathParser
@Deprecated public XPathParser(java_cup.runtime.Scanner s)
Deprecated.Constructor which sets the default scanner.
-
XPathParser
public XPathParser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf)Constructor which sets the default scanner.
-
XPathParser
public XPathParser(Parser parser)
-
-
Method Detail
-
getSymbolContainer
public final java.lang.Class getSymbolContainer()
- Overrides:
getSymbolContainerin classjava_cup.runtime.lr_parser
-
production_table
public short[][] production_table()
Access to production table.- Specified by:
production_tablein classjava_cup.runtime.lr_parser
-
action_table
public short[][] action_table()
Access to parse-action table.- Specified by:
action_tablein classjava_cup.runtime.lr_parser
-
reduce_table
public short[][] reduce_table()
Access toreduce_gototable.- Specified by:
reduce_tablein classjava_cup.runtime.lr_parser
-
do_action
public java_cup.runtime.Symbol do_action(int act_num, java_cup.runtime.lr_parser parser, java.util.Stack stack, int top) throws java.lang.ExceptionInvoke a user supplied parse action.- Specified by:
do_actionin classjava_cup.runtime.lr_parser- Throws:
java.lang.Exception
-
start_state
public int start_state()
Indicates start state.- Specified by:
start_statein classjava_cup.runtime.lr_parser
-
start_production
public int start_production()
Indicates start production.- Specified by:
start_productionin classjava_cup.runtime.lr_parser
-
EOF_sym
public int EOF_sym()
EOFSymbol index.- Specified by:
EOF_symin classjava_cup.runtime.lr_parser
-
error_sym
public int error_sym()
errorSymbol index.- Specified by:
error_symin classjava_cup.runtime.lr_parser
-
getLineNumber
public int getLineNumber()
-
getQNameIgnoreDefaultNs
public org.apache.xalan.xsltc.compiler.QName getQNameIgnoreDefaultNs(java.lang.String name)
-
getQName
public org.apache.xalan.xsltc.compiler.QName getQName(java.lang.String namespace, java.lang.String prefix, java.lang.String localname)
-
setMultiDocument
public void setMultiDocument(boolean flag)
-
setCallsNodeset
public void setCallsNodeset(boolean flag)
-
setHasIdCall
public void setHasIdCall(boolean flag)
-
createStepPattern
public org.apache.xalan.xsltc.compiler.StepPattern createStepPattern(int axis, java.lang.Object test, java.util.Vector predicates)This method is similar to findNodeType(int, Object) except that it creates a StepPattern instead of just returning a node type. It also differs in the way it handles "{uri}:*" and "{uri}:@*". The last two patterns are expanded as "*[namespace-uri() = 'uri']" and "@*[namespace-uri() = 'uri']", respectively. This expansion considerably simplifies the grouping of patterns in the Mode class. For this expansion to be correct, the priority of the pattern/template must be set to -0.25 (when no other predicates are present).
-
findNodeType
public int findNodeType(int axis, java.lang.Object test)
-
parse
public java_cup.runtime.Symbol parse(java.lang.String expression, int lineNumber) throws java.lang.ExceptionParse the expression passed to the current scanner. If this expression contains references to local variables and it will be compiled in an external module (not in the main class) request the current template to create a new variable stack frame.- Parameters:
lineNumber- Line where the current expression is defined.external- Set to true if this expression is compiled in a separate module.- Throws:
java.lang.Exception
-
addError
public final void addError(ErrorMsg error)
-
report_error
public void report_error(java.lang.String message, java.lang.Object info)- Overrides:
report_errorin classjava_cup.runtime.lr_parser
-
report_fatal_error
public void report_fatal_error(java.lang.String message, java.lang.Object info)- Overrides:
report_fatal_errorin classjava_cup.runtime.lr_parser
-
insertStep
public org.apache.xalan.xsltc.compiler.RelativeLocationPath insertStep(org.apache.xalan.xsltc.compiler.Step step, org.apache.xalan.xsltc.compiler.RelativeLocationPath rlp)
-
isElementAxis
public boolean isElementAxis(int axis)
Returns true if the axis applies to elements only. The axes child, attribute, namespace, descendant result in non-empty nodesets only if the context node is of type element.
-
-