APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xalan.internal.xsltc.compiler

public Class XPathParser

Additional top-level class in compilation unit: parser_actions.

extends lr_parser
Class Inheritance
Imports
com.sun.java_cup.internal.runtime.*, com.sun.org.apache.xalan.internal.xsltc.DOM, com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg, com.sun.org.apache.xalan.internal.xsltc.runtime.Operators, com.sun.org.apache.xml.internal.dtm.Axis, .DTM, java.util.ArrayList, .List, .Stack, jdk.xml.internal.JdkConstants, .XMLLimitAnalyzer, .XMLSecurityManager, .XMLSecurityManager.Limit

CUP v0.11b generated parser. This class was generated by CUP v0.11b on Nov 12, 2019.

Field Summary

Modifier and TypeField and Description
protected static final short[][]
_action_table

Parse-action table.

private String
_expression

String representation of the expression being parsed.

private XMLLimitAnalyzer
private int
_lineNumber

Line number where this expression/pattern was declared.

private Parser
_parser

Reference to the Parser class.

protected static final short[][]
_production_table

Production table.

protected static final short[][]
_reduce_table

reduce_goto table.

public SymbolTable
_symbolTable

Reference to the symbol table.

private XMLSecurityManager
private XSLTC
protected parser_actions
action_obj

Instance of action encapsulation class.

public static final VariableRef
DummyVarRef

Reference to non-existing variable.

public static final List<Expression>
EmptyArgs

Used by function calls with no args.

Inherited from com.sun.java_cup.internal.runtime.lr_parser:
_done_parsing_error_sync_sizeaction_tabcur_tokengrpLimitID_GROUPID_OPERATORID_TOTAL_OPERATORlookaheadlookahead_posopLimitproduction_tabreduce_tabstacktostotalOpLimit

Constructor Summary

AccessConstructor and Description
public
XPathParser()

Default constructor.

public
XPathParser(Scanner s)

Constructor which sets the default scanner.

public

Method Summary

Modifier and TypeMethod and Description
public short[][]
action_table()

Implements abstract com.sun.java_cup.internal.runtime.lr_parser.action_table.

Access to parse-action table.

public final void
public StepPattern
createStepPattern(int axis, Object test, List<Predicate> predicates)

This method is similar to findNodeType(int, Object) except that it creates a StepPattern instead of just returning a node type.

public Symbol
do_action(int act_num, lr_parser parser, Stack<Symbol> stack, int top)

Implements abstract com.sun.java_cup.internal.runtime.lr_parser.do_action.

Invoke a user supplied parse action.

public int
EOF_sym()

Implements abstract com.sun.java_cup.internal.runtime.lr_parser.EOF_sym.

EOF Symbol index.

public int
error_sym()

Implements abstract com.sun.java_cup.internal.runtime.lr_parser.error_sym.

error Symbol index.

public int
findNodeType(int axis, Object test)

public int
public QName
getQName(String namespace, String prefix, String localname)

public QName
protected void
init_actions()

Implements abstract com.sun.java_cup.internal.runtime.lr_parser.init_actions.

Action encapsulation object initializer.

public RelativeLocationPath
public boolean
isElementAxis(int axis)

Returns true if the axis applies to elements only.

pack-priv final SyntaxTreeNode
lookupName(QName
Name of the symbol being looked up.
name
)

Lookup a variable or parameter in the symbol table given its name.

public Symbol
parse(String
the expression to be parsed
expression
,
int
Line where the current expression is defined.
lineNumber
)

Parse the expression passed to the current scanner.

public short[][]
production_table()

Implements abstract com.sun.java_cup.internal.runtime.lr_parser.production_table.

Access to production table.

public short[][]
reduce_table()

Implements abstract com.sun.java_cup.internal.runtime.lr_parser.reduce_table.

Access to reduce_goto table.

public void
report_error(String message, Object info)

Overrides com.sun.java_cup.internal.runtime.lr_parser.report_error.

Report a non fatal error (or warning).

public void
public void
setCallsNodeset(boolean flag)

public void
setHasIdCall(boolean flag)

public void
setMultiDocument(boolean flag)

public int
start_production()

Implements abstract com.sun.java_cup.internal.runtime.lr_parser.start_production.

Indicates start production.

public int
start_state()

Implements abstract com.sun.java_cup.internal.runtime.lr_parser.start_state.

Indicates start state.

Inherited from com.sun.java_cup.internal.runtime.lr_parser:
advance_lookaheadcur_err_tokendebug_messagedebug_parsedebug_reducedebug_shiftdebug_stackdone_parsingdump_stackerror_recoveryerror_sync_sizefind_recovery_configget_actionget_reducegetCountgetScannerisOverLimitparseparse_lookaheadread_lookaheadrestart_lookaheadscansetScannershift_under_errorsyntax_errortry_parse_aheadunpackFromStringsunrecovered_syntax_erroruser_init

Field Detail

_action_tableback to summary
protected static final short[][] _action_table

Parse-action table.

_expressionback to summary
private String _expression

String representation of the expression being parsed.

_limitAnalyzerback to summary
private XMLLimitAnalyzer _limitAnalyzer
_lineNumberback to summary
private int _lineNumber

Line number where this expression/pattern was declared.

_parserback to summary
private Parser _parser

Reference to the Parser class.

_production_tableback to summary
protected static final short[][] _production_table

Production table.

_reduce_tableback to summary
protected static final short[][] _reduce_table

reduce_goto table.

_symbolTableback to summary
public SymbolTable _symbolTable

Reference to the symbol table.

_xmlSMback to summary
private XMLSecurityManager _xmlSM
_xsltcback to summary
private XSLTC _xsltc
action_objback to summary
protected parser_actions action_obj

Instance of action encapsulation class.

DummyVarRefback to summary
public static final VariableRef DummyVarRef

Reference to non-existing variable.

EmptyArgsback to summary
public static final List<Expression> EmptyArgs

Used by function calls with no args.

Constructor Detail

XPathParserback to summary
public XPathParser()

Default constructor.

XPathParserback to summary
public XPathParser(Scanner s)

Constructor which sets the default scanner.

XPathParserback to summary
public XPathParser(Parser parser)

Method Detail

action_tableback to summary
public short[][] action_table()

Implements abstract com.sun.java_cup.internal.runtime.lr_parser.action_table.

Access to parse-action table.

addErrorback to summary
public final void addError(ErrorMsg error)
createStepPatternback to summary
public StepPattern createStepPattern(int axis, Object test, List<Predicate> 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).

do_actionback to summary
public Symbol do_action(int act_num, lr_parser parser, Stack<Symbol> stack, int top) throws Exception

Implements abstract com.sun.java_cup.internal.runtime.lr_parser.do_action.

Invoke a user supplied parse action.

EOF_symback to summary
public int EOF_sym()

Implements abstract com.sun.java_cup.internal.runtime.lr_parser.EOF_sym.

EOF Symbol index.

error_symback to summary
public int error_sym()

Implements abstract com.sun.java_cup.internal.runtime.lr_parser.error_sym.

error Symbol index.

findNodeTypeback to summary
public int findNodeType(int axis, Object test)
getLineNumberback to summary
public int getLineNumber()
getQNameback to summary
public QName getQName(String namespace, String prefix, String localname)
getQNameIgnoreDefaultNsback to summary
public QName getQNameIgnoreDefaultNs(String name)
init_actionsback to summary
protected void init_actions()

Implements abstract com.sun.java_cup.internal.runtime.lr_parser.init_actions.

Action encapsulation object initializer.

insertStepback to summary
public RelativeLocationPath insertStep(Step step, RelativeLocationPath rlp)
isElementAxisback to summary
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.

lookupNameback to summary
pack-priv final SyntaxTreeNode lookupName(QName name)

Lookup a variable or parameter in the symbol table given its name.

Parameters
name:QName

Name of the symbol being looked up.

parseback to summary
public Symbol parse(String expression, int lineNumber) throws Exception

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
expression:String

the expression to be parsed

lineNumber:int

Line where the current expression is defined.

production_tableback to summary
public short[][] production_table()

Implements abstract com.sun.java_cup.internal.runtime.lr_parser.production_table.

Access to production table.

reduce_tableback to summary
public short[][] reduce_table()

Implements abstract com.sun.java_cup.internal.runtime.lr_parser.reduce_table.

Access to reduce_goto table.

report_errorback to summary
public void report_error(String message, Object info)

Overrides com.sun.java_cup.internal.runtime.lr_parser.report_error.

Doc from com.sun.java_cup.internal.runtime.lr_parser.report_error.

Report a non fatal error (or warning). This method takes a message string and an additional object (to be used by specializations implemented in subclasses). Here in the base class a very simple implementation is provided which simply prints the message to System.err.

report_fatal_errorback to summary
public void report_fatal_error(String message, Object info)

Overrides com.sun.java_cup.internal.runtime.lr_parser.report_fatal_error.

Doc from com.sun.java_cup.internal.runtime.lr_parser.report_fatal_error.

Report a fatal error. This method takes a message string and an additional object (to be used by specializations implemented in subclasses). Here in the base class a very simple implementation is provided which reports the error then throws an exception.

setCallsNodesetback to summary
public void setCallsNodeset(boolean flag)
setHasIdCallback to summary
public void setHasIdCall(boolean flag)
setMultiDocumentback to summary
public void setMultiDocument(boolean flag)
start_productionback to summary
public int start_production()

Implements abstract com.sun.java_cup.internal.runtime.lr_parser.start_production.

Indicates start production.

start_stateback to summary
public int start_state()

Implements abstract com.sun.java_cup.internal.runtime.lr_parser.start_state.

Indicates start state.