org.apache.xalan.xsltc.compiler
Class XPathParser
public
class
XPathParser
extends lr_parser
CUP v0.10k generated parser.
Version: Sat Aug 06 17:03:22 EDT 2005
Method Summary |
short[][] | action_table() Access to parse-action table. |
void | addError(ErrorMsg error) |
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. |
Symbol | do_action(int act_num, lr_parser parser, Stack stack, int top) Invoke a user supplied parse action. |
int | error_sym() error Symbol index. |
int | EOF_sym() EOF Symbol index. |
int | findNodeType(int axis, Object test) |
int | getLineNumber() |
QName | getQName(String namespace, String prefix, String localname) |
QName | getQNameIgnoreDefaultNs(String name) |
RelativeLocationPath | insertStep(Step step, RelativeLocationPath rlp) |
boolean | isElementAxis(int axis)
Returns true if the axis applies to elements only. |
Symbol | parse(String expression, int lineNumber)
Parse the expression passed to the current scanner. |
short[][] | production_table() Access to production table. |
short[][] | reduce_table() Access to reduce_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 | start_production() Indicates start production. |
int | start_state() Indicates start state. |
public static final VariableRef DummyVarRef
Reference to non-existing variable.
public static final Vector EmptyArgs
Used by function calls with no args.
public SymbolTable _symbolTable
Reference to the symbol table.
public XPathParser()
Default constructor.
public XPathParser(Scanner s)
Constructor which sets the default scanner.
public XPathParser(
Parser parser)
public short[][] action_table()
Access to parse-action table.
public final void addError(
ErrorMsg error)
public 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).
public Symbol do_action(int act_num, lr_parser parser, Stack stack, int top)
Invoke a user supplied parse action.
public int error_sym()
error
Symbol index.
public int EOF_sym()
EOF
Symbol index.
public int findNodeType(int axis, Object test)
public int getLineNumber()
public QName getQName(String namespace, String prefix, String localname)
public QName getQNameIgnoreDefaultNs(String name)
public RelativeLocationPath insertStep(Step step, RelativeLocationPath rlp)
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.
public Symbol parse(String expression, int lineNumber)
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.
public short[][] production_table()
Access to production table.
public short[][] reduce_table()
Access to reduce_goto
table.
public void report_error(String message, Object info)
public void report_fatal_error(String message, Object info)
public void setCallsNodeset(boolean flag)
public void setHasIdCall(boolean flag)
public void setMultiDocument(boolean flag)
public int start_production()
Indicates start production.
public int start_state()
Indicates start state.
Copyright © 2005 Apache XML Project. All Rights Reserved.