kodexa.selectors.parserules

XPath parsing rules.

To understand how this module works, it is valuable to have a strong understanding of the ply <http://www.dabeaz.com/ply/> module.

Module Contents

Functions

p_expr_boolean(p)

Expr : Expr OR_OP Expr

p_expr_unary(p)

Expr : MINUS_OP Expr %prec UMINUS_OP

p_expr_pipeline(p)

Expr : Expr PIPELINE_OP Expr

p_path_expr_binary(p)

Expr : FilterExpr PATH_SEP RelativeLocationPath

p_path_expr_unary(p)

Expr : RelativeLocationPath

p_absolute_location_path_rootonly(p)

AbsoluteLocationPath : PATH_SEP

p_absolute_location_path_subpath(p)

AbsoluteLocationPath : PATH_SEP RelativeLocationPath

p_abbreviated_absolute_location_path(p)

AbbreviatedAbsoluteLocationPath : ABBREV_PATH_SEP RelativeLocationPath

p_relative_location_path_simple(p)

RelativeLocationPath : Step

p_relative_location_path_binary(p)

RelativeLocationPath : RelativeLocationPath PATH_SEP Step

p_step_nodetest(p)

Step : NodeTest

p_step_nodetest_predicates(p)

Step : NodeTest PredicateList

p_step_axis_nodetest(p)

Step : AxisSpecifier NodeTest

p_step_axis_nodetest_predicates(p)

Step : AxisSpecifier NodeTest PredicateList

p_step_abbrev(p)

Step : ABBREV_STEP_SELF

p_axis_specifier_full(p)

AxisSpecifier : AXISNAME AXIS_SEP

p_axis_specifier_abbrev(p)

AxisSpecifier : ABBREV_AXIS_AT

p_node_test_name_test(p)

NodeTest : NameTest

p_node_test_type_simple(p)

NodeTest : NODETYPE OPEN_PAREN CLOSE_PAREN

p_node_test_type_literal(p)

NodeTest : NODETYPE OPEN_PAREN LITERAL CLOSE_PAREN

p_name_test_star(p)

NameTest : STAR_OP

p_name_test_prefix_star(p)

NameTest : NCNAME COLON STAR_OP

p_name_test_qname(p)

NameTest : QName

p_qname_prefixed(p)

QName : NCNAME COLON NCNAME

p_qname_unprefixed(p)

QName : NCNAME

p_funcqname_prefixed(p)

FuncQName : NCNAME COLON FUNCNAME

p_funcqname_unprefixed(p)

FuncQName : FUNCNAME

p_filter_expr_simple(p)

FilterExpr : VariableReference

p_filter_expr_grouped(p)

FilterExpr : OPEN_PAREN Expr CLOSE_PAREN

p_filter_expr_predicate(p)

FilterExpr : FilterExpr Predicate

p_predicate_list_single(p)

PredicateList : Predicate

p_predicate_list_recursive(p)

PredicateList : PredicateList Predicate

p_predicate(p)

Predicate : OPEN_BRACKET Expr CLOSE_BRACKET

p_variable_reference(p)

VariableReference : DOLLAR QName

p_number(p)

Number : FLOAT

p_function_call(p)

FunctionCall : FuncQName FormalArguments

p_formal_arguments_empty(p)

FormalArguments : OPEN_PAREN CLOSE_PAREN

p_formal_arguments_list(p)

FormalArguments : OPEN_PAREN ArgumentList CLOSE_PAREN

p_argument_list_single(p)

ArgumentList : Expr

p_argument_list_recursive(p)

ArgumentList : ArgumentList COMMA Expr

p_error(p)

Attributes

precedence

kodexa.selectors.parserules.precedence = [['left', 'OR_OP'], ['left', 'AND_OP'], ['left', 'EQUAL_OP'], ['left', 'REL_OP'], ['left',...
kodexa.selectors.parserules.p_expr_boolean(p)
ExprExpr OR_OP Expr
Expr AND_OP Expr
Expr EQUAL_OP Expr
Expr REL_OP Expr
Expr PLUS_OP Expr
Expr MINUS_OP Expr
Expr MULT_OP Expr
Expr DIV_OP Expr
Expr MOD_OP Expr
Expr UNION_OP Expr
Expr INTERSECT_OP Expr
kodexa.selectors.parserules.p_expr_unary(p)

Expr : MINUS_OP Expr %prec UMINUS_OP

kodexa.selectors.parserules.p_expr_pipeline(p)

Expr : Expr PIPELINE_OP Expr

kodexa.selectors.parserules.p_path_expr_binary(p)
ExprFilterExpr PATH_SEP RelativeLocationPath
FilterExpr ABBREV_PATH_SEP RelativeLocationPath
kodexa.selectors.parserules.p_path_expr_unary(p)
ExprRelativeLocationPath
AbsoluteLocationPath
AbbreviatedAbsoluteLocationPath
FilterExpr
kodexa.selectors.parserules.p_absolute_location_path_rootonly(p)

AbsoluteLocationPath : PATH_SEP

kodexa.selectors.parserules.p_absolute_location_path_subpath(p)

AbsoluteLocationPath : PATH_SEP RelativeLocationPath

kodexa.selectors.parserules.p_abbreviated_absolute_location_path(p)

AbbreviatedAbsoluteLocationPath : ABBREV_PATH_SEP RelativeLocationPath

kodexa.selectors.parserules.p_relative_location_path_simple(p)

RelativeLocationPath : Step

kodexa.selectors.parserules.p_relative_location_path_binary(p)
RelativeLocationPathRelativeLocationPath PATH_SEP Step
RelativeLocationPath ABBREV_PATH_SEP Step
kodexa.selectors.parserules.p_step_nodetest(p)

Step : NodeTest

kodexa.selectors.parserules.p_step_nodetest_predicates(p)

Step : NodeTest PredicateList

kodexa.selectors.parserules.p_step_axis_nodetest(p)

Step : AxisSpecifier NodeTest

kodexa.selectors.parserules.p_step_axis_nodetest_predicates(p)

Step : AxisSpecifier NodeTest PredicateList

kodexa.selectors.parserules.p_step_abbrev(p)
StepABBREV_STEP_SELF
ABBREV_STEP_PARENT
kodexa.selectors.parserules.p_axis_specifier_full(p)

AxisSpecifier : AXISNAME AXIS_SEP

kodexa.selectors.parserules.p_axis_specifier_abbrev(p)

AxisSpecifier : ABBREV_AXIS_AT

kodexa.selectors.parserules.p_node_test_name_test(p)

NodeTest : NameTest

kodexa.selectors.parserules.p_node_test_type_simple(p)

NodeTest : NODETYPE OPEN_PAREN CLOSE_PAREN

kodexa.selectors.parserules.p_node_test_type_literal(p)

NodeTest : NODETYPE OPEN_PAREN LITERAL CLOSE_PAREN

kodexa.selectors.parserules.p_name_test_star(p)

NameTest : STAR_OP

kodexa.selectors.parserules.p_name_test_prefix_star(p)

NameTest : NCNAME COLON STAR_OP

kodexa.selectors.parserules.p_name_test_qname(p)

NameTest : QName

kodexa.selectors.parserules.p_qname_prefixed(p)

QName : NCNAME COLON NCNAME

kodexa.selectors.parserules.p_qname_unprefixed(p)

QName : NCNAME

kodexa.selectors.parserules.p_funcqname_prefixed(p)

FuncQName : NCNAME COLON FUNCNAME

kodexa.selectors.parserules.p_funcqname_unprefixed(p)

FuncQName : FUNCNAME

kodexa.selectors.parserules.p_filter_expr_simple(p)
FilterExprVariableReference
LITERAL
Number
FunctionCall
kodexa.selectors.parserules.p_filter_expr_grouped(p)

FilterExpr : OPEN_PAREN Expr CLOSE_PAREN

kodexa.selectors.parserules.p_filter_expr_predicate(p)

FilterExpr : FilterExpr Predicate

kodexa.selectors.parserules.p_predicate_list_single(p)

PredicateList : Predicate

kodexa.selectors.parserules.p_predicate_list_recursive(p)

PredicateList : PredicateList Predicate

kodexa.selectors.parserules.p_predicate(p)

Predicate : OPEN_BRACKET Expr CLOSE_BRACKET

kodexa.selectors.parserules.p_variable_reference(p)

VariableReference : DOLLAR QName

kodexa.selectors.parserules.p_number(p)
NumberFLOAT
INTEGER
kodexa.selectors.parserules.p_function_call(p)

FunctionCall : FuncQName FormalArguments

kodexa.selectors.parserules.p_formal_arguments_empty(p)

FormalArguments : OPEN_PAREN CLOSE_PAREN

kodexa.selectors.parserules.p_formal_arguments_list(p)

FormalArguments : OPEN_PAREN ArgumentList CLOSE_PAREN

kodexa.selectors.parserules.p_argument_list_single(p)

ArgumentList : Expr

kodexa.selectors.parserules.p_argument_list_recursive(p)

ArgumentList : ArgumentList COMMA Expr

kodexa.selectors.parserules.p_error(p)