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_parser
CUP v0.11b 20160615 generated parser.
-
Field Summary
FieldsModifier and TypeFieldDescriptionorg.apache.xalan.xsltc.compiler.SymbolTable
Reference to the symbol table.static final org.apache.xalan.xsltc.compiler.VariableRef
Reference to non-existing variable.static final Vector
Used by function calls with no args.Fields inherited from class java_cup.runtime.lr_parser
symbolFactory
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.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
Modifier and TypeMethodDescriptionshort[][]
Access to parse-action table.final void
org.apache.xalan.xsltc.compiler.StepPattern
createStepPattern
(int axis, Object test, 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.Symbol
Invoke a user supplied parse action.int
EOF_sym()
EOF
Symbol index.int
error
Symbol index.int
findNodeType
(int axis, Object test) int
org.apache.xalan.xsltc.compiler.QName
org.apache.xalan.xsltc.compiler.QName
final Class
org.apache.xalan.xsltc.compiler.RelativeLocationPath
insertStep
(org.apache.xalan.xsltc.compiler.Step step, org.apache.xalan.xsltc.compiler.RelativeLocationPath rlp) boolean
isElementAxis
(int axis) Returns true if the axis applies to elements only.java_cup.runtime.Symbol
Parse the expression passed to the current scanner.short[][]
Access to production table.short[][]
Access toreduce_goto
table.void
report_error
(String message, Object info) void
report_fatal_error
(String message, Object info) void
setCallsNodeset
(boolean flag) void
setHasIdCall
(boolean flag) void
setMultiDocument
(boolean flag) int
Indicates start production.int
Indicates start state.Methods inherited from class java_cup.runtime.lr_parser
debug_message, debug_parse, debug_reduce, debug_shift, debug_stack, done_parsing, dump_stack, expected_token_ids, getScanner, getSymbolFactory, parse, scan, setScanner, symbl_name_from_id, syntax_error, unrecovered_syntax_error, user_init
-
Field Details
-
EmptyArgs
Used by function calls with no args. -
DummyVarRef
public static final org.apache.xalan.xsltc.compiler.VariableRef DummyVarRefReference to non-existing variable. -
_symbolTable
public org.apache.xalan.xsltc.compiler.SymbolTable _symbolTableReference to the symbol table.
-
-
Constructor Details
-
XPathParser
Deprecated.Default constructor. -
XPathParser
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
-
-
Method Details
-
getSymbolContainer
- Overrides:
getSymbolContainer
in classjava_cup.runtime.lr_parser
-
production_table
public short[][] production_table()Access to production table.- Specified by:
production_table
in classjava_cup.runtime.lr_parser
-
action_table
public short[][] action_table()Access to parse-action table.- Specified by:
action_table
in classjava_cup.runtime.lr_parser
-
reduce_table
public short[][] reduce_table()Access toreduce_goto
table.- Specified by:
reduce_table
in classjava_cup.runtime.lr_parser
-
do_action
public java_cup.runtime.Symbol do_action(int act_num, java_cup.runtime.lr_parser parser, Stack stack, int top) throws Exception Invoke a user supplied parse action.- Specified by:
do_action
in classjava_cup.runtime.lr_parser
- Throws:
Exception
-
start_state
public int start_state()Indicates start state.- Specified by:
start_state
in classjava_cup.runtime.lr_parser
-
start_production
public int start_production()Indicates start production.- Specified by:
start_production
in classjava_cup.runtime.lr_parser
-
EOF_sym
public int EOF_sym()EOF
Symbol index.- Specified by:
EOF_sym
in classjava_cup.runtime.lr_parser
-
error_sym
public int error_sym()error
Symbol index.- Specified by:
error_sym
in classjava_cup.runtime.lr_parser
-
getLineNumber
public int getLineNumber() -
getQNameIgnoreDefaultNs
-
getQName
-
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, Object test, 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
-
parse
Parse the expression passed to the current scanner. If this expression contains references to local variables and it will be compiled in an external module (not in the main class) request the current template to create a new variable stack frame.- Parameters:
lineNumber
- Line where the current expression is defined.external
- Set to true if this expression is compiled in a separate module.- Throws:
Exception
-
addError
-
report_error
- Overrides:
report_error
in classjava_cup.runtime.lr_parser
-
report_fatal_error
- Overrides:
report_fatal_error
in 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.
-