Package com.evolvedbinary.xpath.parser
Class XPathParser
- java.lang.Object
-
- org.parboiled.BaseActions<V>
-
- org.parboiled.BaseParser<ASTNode>
-
- com.evolvedbinary.xpath.parser.XPathParser
-
-
Constructor Summary
Constructors Constructor Description XPathParser(Boolean enableActions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.parboiled.RuleAbbrevForwardStep()[31] AbbrevForwardStep ::= "@"? NodeTestorg.parboiled.RuleAbbrevReverseStep()[34] AbbrevReverseStep ::= ".."org.parboiled.RuleAdditiveExpr()[12] AdditiveExpr ::= MultiplicativeExpr ( ("+" | "-") MultiplicativeExpr )* Value stack head either: AdditiveExpr / MultiplicativeExpr / UnionExpr / IntersectExceptExpr / InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExprorg.parboiled.RuleAndExpr()[9] AndExpr ::= ComparisonExpr ( "and" ComparisonExpr )*org.parboiled.RuleAnyKindTest()[55] AnyKindTest ::= "node" "(" ")"org.parboiled.RuleAtomicType()[53] AtomicType ::= QNameorg.parboiled.RuleAttribNameOrWildcard()[61] AttribNameOrWildcard ::= AttributeName | "*"org.parboiled.RuleAttributeDeclaration()[63] AttributeDeclaration ::= AttributeNameorg.parboiled.RuleAttributeName()[68] AttributeName ::= QNameorg.parboiled.RuleAttributeTest()[60] AttributeTest ::= "attribute" "(" (AttribNameOrWildcard ("," TypeName)?)? ")"org.parboiled.RuleAxisStep()[28] AxisStep ::= (ReverseStep | ForwardStep) PredicateListorg.parboiled.RuleCastableExpr()[18] CastableExpr ::= CastExpr ( "castable" "as" SingleType )? Value stack head either: CastableExpr / CastExpr / UnaryExpr / ValueExprorg.parboiled.RuleCastExpr()[19] CastExpr ::= UnaryExpr ( "cast" "as" SingleType )? Value stack head either: CastExpr / UnaryExpr / ValueExprorg.parboiled.RuleComment()[77] Comment ::= "(:" (CommentContents | Comment)* ":)" //ws: explicitorg.parboiled.RuleCommentContents()[82] CommentContents ::= (Char+ - (Char* ('(:' | ':)') Char*))org.parboiled.RuleCommentTest()[58] CommentTest ::= "comment" "(" ")"org.parboiled.RuleComparisonExpr()[10] ComparisonExpr ::= RangeExpr ( (ValueComp | GeneralComp | NodeComp) RangeExpr )? Value stack head either: ComparisonExpr / RangeExpr / AdditiveExpr / MultiplicativeExpr / UnionExpr / IntersectExceptExpr / InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExprorg.parboiled.RuleContextItemExpr()[47] ContextItemExpr ::= "."org.parboiled.RuleDecimalLiteral()[72] DecimalLiteral ::= ("." Digits) | (Digits "." [0-9]*) //ws: explicitorg.parboiled.RuleDigits()[81] Digits ::= [0-9]+org.parboiled.RuleDocumentTest()[56] DocumentTest ::= "document-node" "(" (ElementTest | SchemaElementTest)? ")"org.parboiled.RuleDoubleLiteral()[73] DoubleLiteral ::= (("." Digits) | (Digits ("." [0-9]*)?)) [eE] [+-]? Digits //ws: explicitorg.parboiled.RuleElementDeclaration()[67] ElementDeclaration ::= ElementNameorg.parboiled.RuleElementName()[69] ElementName ::= QNameorg.parboiled.RuleElementNameOrWildcard()[65] ElementNameOrWildcard ::= ElementName | "*"org.parboiled.RuleElementTest()[64] ElementTest ::= "element" "(" (ElementNameOrWildcard ("," TypeName "?"?)?)? ")"org.parboiled.RuleEscapeApos()[76] EscapeApos ::= "''"org.parboiled.RuleEscapeQuot()[75] EscapeQuot ::= '""'org.parboiled.RuleExpr()[2] Expr ::= ExprSingle ("," ExprSingle)*org.parboiled.RuleExprSingle()[3] ExprSingle ::= ForExpr | QuantifiedExpr | IfExpr | OrExprorg.parboiled.RuleFilterExpr()[38] FilterExpr ::= PrimaryExpr PredicateListorg.parboiled.RuleForExpr()[4] ForExpr ::= SimpleForClause "return" ExprSingleorg.parboiled.RuleForwardAxis()[30] ForwardAxis ::= ("child" "::") | ("descendant" "::") | ("attribute" "::") | ("self" "::") | ("descendant-or-self" "::") | ("following-sibling" "::") | ("following" "::") | ("namespace" "::")org.parboiled.RuleForwardStep()[29] ForwardStep ::= (ForwardAxis NodeTest) | AbbrevForwardSteporg.parboiled.RuleFunctionCall()[48] FunctionCall ::= QName "(" (ExprSingle ("," ExprSingle)*)? ")" //xgs:reserved-function-namesorg.parboiled.RuleGeneralComp()[22] GeneralComp ::= "=" | "!=" | "<" | "<=" | ">" | ">="org.parboiled.RuleIfExpr()[7] IfExpr ::= "if" "(" Expr ")" "then" ExprSingle "else" ExprSingleorg.parboiled.RuleInstanceofExpr()[16] InstanceofExpr ::= TreatExpr ( "instance" "of" SequenceType )? Value stack head either: InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExprorg.parboiled.RuleIntegerLiteral()[71] IntegerLiteral ::= Digitsorg.parboiled.RuleIntersectExceptExpr()[15] IntersectExceptExpr ::= InstanceofExpr ( ("intersect" | "except") InstanceofExpr )* Value stack head either: IntersectExceptExpr / InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExprorg.parboiled.RuleItemType()[52] ItemType ::= KindTest | ("item" "(" ")") | AtomicTypeorg.parboiled.RuleKindTest()[54] KindTest ::= DocumentTest | ElementTest | AttributeTest | SchemaElementTest | SchemaAttributeTest | PITest | CommentTest | TextTest | AnyKindTestorg.parboiled.RuleLiteral()[42] Literal ::= NumericLiteral | StringLiteralorg.parboiled.RuleMultiplicativeExpr()[13] MultiplicativeExpr ::= UnionExpr ( ("*" | "div" | "idiv" | "mod") UnionExpr )* Value stack head either: MultiplicativeExpr / UnionExpr / IntersectExceptExpr / InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExprorg.parboiled.RuleNameTest()[36] NameTest ::= QName | Wildcardorg.parboiled.RuleNCName()[79] NCName ::= [http://www.w3.org/TR/REC-xml-names/#NT-NCName]Names //xgs: xml-versionorg.parboiled.RuleNodeComp()[24] NodeComp ::= "is" | "<<" | ">>"org.parboiled.RuleNodeTest()[35] NodeTest ::= KindTest | NameTestorg.parboiled.RuleNumericLiteral()[43] NumericLiteral ::= IntegerLiteral | DecimalLiteral | DoubleLiteralorg.parboiled.RuleOccurrenceIndicator()[51] OccurrenceIndicator ::= "?" | "*" | "+"org.parboiled.RuleOrExpr()[8] OrExpr ::= AndExpr ( "or" AndExpr )*org.parboiled.RuleParenthesizedExpr()[46] ParenthesizedExpr ::= "(" Expr? ")"org.parboiled.RulePathExpr()[25] PathExpr ::= ("/" RelativePathExpr?) | ("//" RelativePathExpr) | RelativePathExprASTNodepeek()org.parboiled.RulePITest()[59] PITest ::= "processing-instruction" "(" (NCName | StringLiteral)? ")"ASTNodepop()org.parboiled.RulePredicate()[40] Predicate ::= "[" Expr "]"org.parboiled.RulePredicateList()[39] PredicateList ::= Predicate*org.parboiled.RulePrimaryExpr()[41] PrimaryExpr ::= Literal | VarRef | ParenthesizedExpr | ContextItemExpr | FunctionCallbooleanpush(ASTNode value)org.parboiled.RuleQName()[78] QName ::= [http://www.w3.org/TR/REC-xml-names/#NT-QName]Names //xgs: xml-versionorg.parboiled.RuleQuantifiedExpr()[6] QuantifiedExpr ::= ("some" | "every") "$" VarName "in" ExprSingle ("," "$" VarName "in" ExprSingle)* "satisfies" ExprSingleorg.parboiled.RuleRangeExpr()[11] RangeExpr ::= AdditiveExpr ( "to" AdditiveExpr )? Value stack head either: RangeExpr / AdditiveExpr / MultiplicativeExpr / UnionExpr / IntersectExceptExpr / InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExprorg.parboiled.RuleRelativePathExpr()[26] RelativePathExpr ::= StepExpr (("/" | "//") StepExpr)*PathExprrelativePathToPath(StepExpr initialStep, RelativePathExpr relativePathExpr)Converts a Relative Path Expression to a Path Expressionorg.parboiled.RuleReverseAxis()[33] ReverseAxis ::= ("parent" "::") | ("ancestor" "::") | ("preceding-sibling" "::") | ("preceding" "::") | ("ancestor-or-self" "::")org.parboiled.RuleReverseStep()[32] ReverseStep ::= (ReverseAxis NodeTest) | AbbrevReverseSteporg.parboiled.RuleSchemaAttributeTest()[62] SchemaAttributeTest ::= "schema-attribute" "(" AttributeDeclaration ")"org.parboiled.RuleSchemaElementTest()[66] SchemaElementTest ::= "schema-element" "(" ElementDeclaration ")"org.parboiled.RuleSequenceType()[50] SequenceType ::= ("empty-sequence" "(" ")") | (ItemType OccurrenceIndicator?)org.parboiled.RuleSimpleForClause()[5] SimpleForClause ::= "for" "$" VarName "in" ExprSingle ("," "$" VarName "in" ExprSingle)*org.parboiled.RuleSingleType()[49] SingleType ::= AtomicType "?"? //gn: parensorg.parboiled.RuleStepExpr()[27] StepExpr ::= FilterExpr | AxisSteporg.parboiled.RuleStringLiteral()[74] StringLiteral ::= ('"' (EscapeQuot | [^"])* '"') | ("'" (EscapeApos | [^'])* "'") //ws: explicitorg.parboiled.RuleTextTest()[57] TextTest ::= "text" "(" ")"org.parboiled.RuleTreatExpr()[17] TreatExpr ::= CastableExpr ( "treat" "as" SequenceType )? Value stack head either: TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExprorg.parboiled.RuleTypeName()[70] TypeName ::= QNameorg.parboiled.RuleUnaryExpr()[20] UnaryExpr ::= ("-" | "+")* ValueExpr Value stack head either: UnaryExpr / ValueExprorg.parboiled.RuleUnionExpr()[14] UnionExpr ::= IntersectExceptExpr ( ("union" | "|") IntersectExceptExpr )* Value stack head either: UnionExpr / IntersectExceptExpr / InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExprorg.parboiled.RuleValueComp()[23] ValueComp ::= "eq" | "ne" | "lt" | "le" | "gt" | "ge"org.parboiled.RuleValueExpr()[21] ValueExpr ::= PathExprorg.parboiled.RuleVarName()[45] VarName ::= QNameorg.parboiled.RuleVarRef()[44] VarRef ::= "$" VarNameorg.parboiled.RuleWildcard()[37] Wildcard ::= "*" | (NCName ":" "*") | ("*" ":" NCName) //ws: explicitorg.parboiled.RulewithEOI(org.parboiled.Rule rule)Wraps any other rule to consume all input End of input is signalled by aChars.EOIorg.parboiled.RuleXml_Char()Same as [https://www.w3.org/TR/xml/#NT-Char]Char [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]org.parboiled.RuleXml_S()Same as [https://www.w3.org/TR/xml/#NT-S]S [3] S ::= (#x20 | #x9 | #xD | #xA)+org.parboiled.RuleXmlNames_LocalPart()[11] LocalPart ::= NCNameorg.parboiled.RuleXmlNames_Name_minusColon()Modified from Extensible Markup Language (XML) 1.0 (Fifth Edition) Same as [https://www.w3.org/TR/REC-xml/#NT-Name]Name but with the ':' character removed! [_5] Name ::= NameStartChar_minusColon (NameChar)*org.parboiled.RuleXmlNames_NameChar()Modified from Extensible Markup Language (XML) 1.0 (Fifth Edition) Same as [https://www.w3.org/TR/xml/#NT-NameStartChar]NameChar but with the ':' character removed [_4a] NameChar ::= NameStartChar_minusColon | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]org.parboiled.RuleXmlNames_NameStartChar_minusColon()Modified from Extensible Markup Language (XML) 1.0 (Fifth Edition) Same as [https://www.w3.org/TR/xml/#NT-NameStartChar]NameStartChar but with the ':' character removed! [_4] NameStartChar ::= [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]org.parboiled.RuleXmlNames_NCName()[4] NCName ::= [https://www.w3.org/TR/REC-xml/#NT-Name]Name - (Char* ':' Char*) // An XML Name, minus the ":"org.parboiled.RuleXmlNames_Prefix()[10] Prefix ::= NCNameorg.parboiled.RuleXmlNames_PrefixedName()[8] PartialPrefixedName ::= Prefix ':' LocalPartorg.parboiled.RuleXmlNames_QName()[7] QName ::= PartialPrefixedName | UnprefixedNameorg.parboiled.RuleXmlNames_UnprefixedName()[9] UnprefixedName ::= LocalPartorg.parboiled.RuleXPath()[1] XPath ::= Expr-
Methods inherited from class org.parboiled.BaseParser
ACTION, AnyOf, AnyOf, AnyOf, Ch, CharRange, FirstOf, FirstOf, fromCharArray, fromCharLiteral, fromStringLiteral, IgnoreCase, IgnoreCase, IgnoreCase, newInstance, NoneOf, NoneOf, NTimes, NTimes, OneOrMore, OneOrMore, Optional, Optional, Sequence, Sequence, String, String, Test, Test, TestNot, TestNot, toRule, toRules, ZeroOrMore, ZeroOrMore
-
Methods inherited from class org.parboiled.BaseActions
currentChar, currentIndex, drop, drop, dup, getContext, hasError, inPredicate, match, matchedChar, matchEnd, matchLength, matchOrDefault, matchRange, matchStart, nodeSuppressed, peek, poke, poke, pop, position, push, pushAll, setContext, swap, swap3, swap4, swap5, swap6
-
-
-
-
Constructor Detail
-
XPathParser
public XPathParser(Boolean enableActions)
-
-
Method Detail
-
push
public boolean push(ASTNode value)
- Overrides:
pushin classorg.parboiled.BaseActions<ASTNode>
-
XPath
public org.parboiled.Rule XPath()
[1] XPath ::= Expr- Returns:
- the XPath rule.
-
Expr
public org.parboiled.Rule Expr()
[2] Expr ::= ExprSingle ("," ExprSingle)*- Returns:
- the Expr rule.
-
ExprSingle
public org.parboiled.Rule ExprSingle()
[3] ExprSingle ::= ForExpr | QuantifiedExpr | IfExpr | OrExpr- Returns:
- the ExprSingle rule.
-
ForExpr
public org.parboiled.Rule ForExpr()
[4] ForExpr ::= SimpleForClause "return" ExprSingle- Returns:
- the ForExpr rule.
-
SimpleForClause
public org.parboiled.Rule SimpleForClause()
[5] SimpleForClause ::= "for" "$" VarName "in" ExprSingle ("," "$" VarName "in" ExprSingle)*- Returns:
- the SimpleForClause rule.
-
QuantifiedExpr
public org.parboiled.Rule QuantifiedExpr()
[6] QuantifiedExpr ::= ("some" | "every") "$" VarName "in" ExprSingle ("," "$" VarName "in" ExprSingle)* "satisfies" ExprSingle- Returns:
- the QuantifiedExpr rule.
-
IfExpr
public org.parboiled.Rule IfExpr()
[7] IfExpr ::= "if" "(" Expr ")" "then" ExprSingle "else" ExprSingle- Returns:
- the IfExpr rule.
-
OrExpr
public org.parboiled.Rule OrExpr()
[8] OrExpr ::= AndExpr ( "or" AndExpr )*- Returns:
- the OrExpr rule.
-
AndExpr
public org.parboiled.Rule AndExpr()
[9] AndExpr ::= ComparisonExpr ( "and" ComparisonExpr )*- Returns:
- the AndExpr rule.
-
ComparisonExpr
public org.parboiled.Rule ComparisonExpr()
[10] ComparisonExpr ::= RangeExpr ( (ValueComp | GeneralComp | NodeComp) RangeExpr )? Value stack head either: ComparisonExpr / RangeExpr / AdditiveExpr / MultiplicativeExpr / UnionExpr / IntersectExceptExpr / InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExpr- Returns:
- the ComparisonExpr rule.
-
RangeExpr
public org.parboiled.Rule RangeExpr()
[11] RangeExpr ::= AdditiveExpr ( "to" AdditiveExpr )? Value stack head either: RangeExpr / AdditiveExpr / MultiplicativeExpr / UnionExpr / IntersectExceptExpr / InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExpr- Returns:
- the RangeExpr rule.
-
AdditiveExpr
public org.parboiled.Rule AdditiveExpr()
[12] AdditiveExpr ::= MultiplicativeExpr ( ("+" | "-") MultiplicativeExpr )* Value stack head either: AdditiveExpr / MultiplicativeExpr / UnionExpr / IntersectExceptExpr / InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExpr- Returns:
- the AdditiveExpr rule.
-
MultiplicativeExpr
public org.parboiled.Rule MultiplicativeExpr()
[13] MultiplicativeExpr ::= UnionExpr ( ("*" | "div" | "idiv" | "mod") UnionExpr )* Value stack head either: MultiplicativeExpr / UnionExpr / IntersectExceptExpr / InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExpr- Returns:
- the MultiplicativeExpr rule.
-
UnionExpr
public org.parboiled.Rule UnionExpr()
[14] UnionExpr ::= IntersectExceptExpr ( ("union" | "|") IntersectExceptExpr )* Value stack head either: UnionExpr / IntersectExceptExpr / InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExpr- Returns:
- the UnionExpr rule
-
IntersectExceptExpr
public org.parboiled.Rule IntersectExceptExpr()
[15] IntersectExceptExpr ::= InstanceofExpr ( ("intersect" | "except") InstanceofExpr )* Value stack head either: IntersectExceptExpr / InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExpr- Returns:
- the IntersectExceptExpr rule
-
InstanceofExpr
public org.parboiled.Rule InstanceofExpr()
[16] InstanceofExpr ::= TreatExpr ( "instance" "of" SequenceType )? Value stack head either: InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExpr- Returns:
- the InstanceofExpr rule
-
TreatExpr
public org.parboiled.Rule TreatExpr()
[17] TreatExpr ::= CastableExpr ( "treat" "as" SequenceType )? Value stack head either: TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExpr- Returns:
- the TreatExpr rule
-
CastableExpr
public org.parboiled.Rule CastableExpr()
[18] CastableExpr ::= CastExpr ( "castable" "as" SingleType )? Value stack head either: CastableExpr / CastExpr / UnaryExpr / ValueExpr- Returns:
- the CastableExpr rule
-
CastExpr
public org.parboiled.Rule CastExpr()
[19] CastExpr ::= UnaryExpr ( "cast" "as" SingleType )? Value stack head either: CastExpr / UnaryExpr / ValueExpr- Returns:
- the CastExpr rule
-
UnaryExpr
public org.parboiled.Rule UnaryExpr()
[20] UnaryExpr ::= ("-" | "+")* ValueExpr Value stack head either: UnaryExpr / ValueExpr- Returns:
- the UnaryExpr rule
-
ValueExpr
public org.parboiled.Rule ValueExpr()
[21] ValueExpr ::= PathExpr- Returns:
- the ValueExpr rule
-
GeneralComp
public org.parboiled.Rule GeneralComp()
[22] GeneralComp ::= "=" | "!=" | "<" | "<=" | ">" | ">="- Returns:
- the GeneralComp rule
-
ValueComp
public org.parboiled.Rule ValueComp()
[23] ValueComp ::= "eq" | "ne" | "lt" | "le" | "gt" | "ge"- Returns:
- the ValueComp rule
-
NodeComp
public org.parboiled.Rule NodeComp()
[24] NodeComp ::= "is" | "<<" | ">>"- Returns:
- the NodeComp rule
-
PathExpr
public org.parboiled.Rule PathExpr()
[25] PathExpr ::= ("/" RelativePathExpr?) | ("//" RelativePathExpr) | RelativePathExpr- Returns:
- the PathExpr rule
-
relativePathToPath
public PathExpr relativePathToPath(@Nullable StepExpr initialStep, @Nullable RelativePathExpr relativePathExpr)
Converts a Relative Path Expression to a Path Expression- Parameters:
initialStep- An initial step or null, if this Path Expression is still relative and not absoluterelativePathExpr- The RelativePathExpr or null if there is only an initial step, i.e. "/"- Returns:
- The Path Expression
- Throws:
IllegalArgumentException- if both initialStep and relativePathExpr are null
-
RelativePathExpr
public org.parboiled.Rule RelativePathExpr()
[26] RelativePathExpr ::= StepExpr (("/" | "//") StepExpr)*- Returns:
- the RelativePathExpr rule
-
StepExpr
public org.parboiled.Rule StepExpr()
[27] StepExpr ::= FilterExpr | AxisStep- Returns:
- the StepExpr rule
-
AxisStep
public org.parboiled.Rule AxisStep()
[28] AxisStep ::= (ReverseStep | ForwardStep) PredicateList- Returns:
- the AxisStep rule
-
ForwardStep
public org.parboiled.Rule ForwardStep()
[29] ForwardStep ::= (ForwardAxis NodeTest) | AbbrevForwardStep- Returns:
- the ForwardStep rule
-
ForwardAxis
public org.parboiled.Rule ForwardAxis()
[30] ForwardAxis ::= ("child" "::") | ("descendant" "::") | ("attribute" "::") | ("self" "::") | ("descendant-or-self" "::") | ("following-sibling" "::") | ("following" "::") | ("namespace" "::")- Returns:
- the ForwardAxis rule
-
AbbrevForwardStep
public org.parboiled.Rule AbbrevForwardStep()
[31] AbbrevForwardStep ::= "@"? NodeTest- Returns:
- the AbbrevForwardStep rule
-
ReverseStep
public org.parboiled.Rule ReverseStep()
[32] ReverseStep ::= (ReverseAxis NodeTest) | AbbrevReverseStep- Returns:
- the ReverseStep rule
-
ReverseAxis
public org.parboiled.Rule ReverseAxis()
[33] ReverseAxis ::= ("parent" "::") | ("ancestor" "::") | ("preceding-sibling" "::") | ("preceding" "::") | ("ancestor-or-self" "::")- Returns:
- the ReverseAxis rule
-
AbbrevReverseStep
public org.parboiled.Rule AbbrevReverseStep()
[34] AbbrevReverseStep ::= ".."- Returns:
- the AbbrevReverseStep rule
-
NodeTest
public org.parboiled.Rule NodeTest()
[35] NodeTest ::= KindTest | NameTest- Returns:
- the NodeTest rule
-
NameTest
public org.parboiled.Rule NameTest()
[36] NameTest ::= QName | Wildcard- Returns:
- the NameTest rule
-
Wildcard
public org.parboiled.Rule Wildcard()
[37] Wildcard ::= "*" | (NCName ":" "*") | ("*" ":" NCName) //ws: explicit- Returns:
- the Wildcard rule
-
FilterExpr
public org.parboiled.Rule FilterExpr()
[38] FilterExpr ::= PrimaryExpr PredicateList- Returns:
- the FilterExpr rule
-
PredicateList
public org.parboiled.Rule PredicateList()
[39] PredicateList ::= Predicate*- Returns:
- the PredicateList rule
-
Predicate
public org.parboiled.Rule Predicate()
[40] Predicate ::= "[" Expr "]"- Returns:
- the Predicate rule
-
PrimaryExpr
public org.parboiled.Rule PrimaryExpr()
[41] PrimaryExpr ::= Literal | VarRef | ParenthesizedExpr | ContextItemExpr | FunctionCall- Returns:
- the PrimaryExpr rule
-
Literal
public org.parboiled.Rule Literal()
[42] Literal ::= NumericLiteral | StringLiteral- Returns:
- the Literal rule
-
NumericLiteral
public org.parboiled.Rule NumericLiteral()
[43] NumericLiteral ::= IntegerLiteral | DecimalLiteral | DoubleLiteral- Returns:
- the NumericLiteral rule
-
VarRef
public org.parboiled.Rule VarRef()
[44] VarRef ::= "$" VarName- Returns:
- the VarRef rule
-
VarName
public org.parboiled.Rule VarName()
[45] VarName ::= QName- Returns:
- the VarName rule
-
ParenthesizedExpr
public org.parboiled.Rule ParenthesizedExpr()
[46] ParenthesizedExpr ::= "(" Expr? ")"- Returns:
- the ParenthesizedExpr rule
-
ContextItemExpr
public org.parboiled.Rule ContextItemExpr()
[47] ContextItemExpr ::= "."- Returns:
- the ContextItemExpr rule
-
FunctionCall
public org.parboiled.Rule FunctionCall()
[48] FunctionCall ::= QName "(" (ExprSingle ("," ExprSingle)*)? ")" //xgs:reserved-function-names- Returns:
- the FunctionCall rule
-
SingleType
public org.parboiled.Rule SingleType()
[49] SingleType ::= AtomicType "?"? //gn: parens- Returns:
- the SingleType rule
-
SequenceType
public org.parboiled.Rule SequenceType()
[50] SequenceType ::= ("empty-sequence" "(" ")") | (ItemType OccurrenceIndicator?)- Returns:
- the SequenceType rule
-
OccurrenceIndicator
public org.parboiled.Rule OccurrenceIndicator()
[51] OccurrenceIndicator ::= "?" | "*" | "+"- Returns:
- the OccurrenceIndicator rule
-
ItemType
public org.parboiled.Rule ItemType()
[52] ItemType ::= KindTest | ("item" "(" ")") | AtomicType- Returns:
- the ItemType rule
-
AtomicType
public org.parboiled.Rule AtomicType()
[53] AtomicType ::= QName- Returns:
- the AtomicType rule
-
KindTest
public org.parboiled.Rule KindTest()
[54] KindTest ::= DocumentTest | ElementTest | AttributeTest | SchemaElementTest | SchemaAttributeTest | PITest | CommentTest | TextTest | AnyKindTest- Returns:
- the KindTest rule
-
AnyKindTest
public org.parboiled.Rule AnyKindTest()
[55] AnyKindTest ::= "node" "(" ")"- Returns:
- the AnyKindTest rule
-
DocumentTest
public org.parboiled.Rule DocumentTest()
[56] DocumentTest ::= "document-node" "(" (ElementTest | SchemaElementTest)? ")"- Returns:
- the DocumentTest rule
-
TextTest
public org.parboiled.Rule TextTest()
[57] TextTest ::= "text" "(" ")"- Returns:
- the TextTest rule
-
CommentTest
public org.parboiled.Rule CommentTest()
[58] CommentTest ::= "comment" "(" ")"- Returns:
- the CommentTest rule
-
PITest
public org.parboiled.Rule PITest()
[59] PITest ::= "processing-instruction" "(" (NCName | StringLiteral)? ")"- Returns:
- the PITest rule
-
AttributeTest
public org.parboiled.Rule AttributeTest()
[60] AttributeTest ::= "attribute" "(" (AttribNameOrWildcard ("," TypeName)?)? ")"- Returns:
- the AttributeTest rule
-
AttribNameOrWildcard
public org.parboiled.Rule AttribNameOrWildcard()
[61] AttribNameOrWildcard ::= AttributeName | "*"- Returns:
- the AttribNameOrWildcard rule
-
SchemaAttributeTest
public org.parboiled.Rule SchemaAttributeTest()
[62] SchemaAttributeTest ::= "schema-attribute" "(" AttributeDeclaration ")"- Returns:
- the SchemaAttributeTest rule
-
AttributeDeclaration
public org.parboiled.Rule AttributeDeclaration()
[63] AttributeDeclaration ::= AttributeName- Returns:
- the AttributeDeclaration rule
-
ElementTest
public org.parboiled.Rule ElementTest()
[64] ElementTest ::= "element" "(" (ElementNameOrWildcard ("," TypeName "?"?)?)? ")"- Returns:
- the ElementTest rule
-
ElementNameOrWildcard
public org.parboiled.Rule ElementNameOrWildcard()
[65] ElementNameOrWildcard ::= ElementName | "*"- Returns:
- the ElementNameOrWildcard rule
-
SchemaElementTest
public org.parboiled.Rule SchemaElementTest()
[66] SchemaElementTest ::= "schema-element" "(" ElementDeclaration ")"- Returns:
- the SchemaElementTest rule
-
ElementDeclaration
public org.parboiled.Rule ElementDeclaration()
[67] ElementDeclaration ::= ElementName- Returns:
- the ElementDeclaration rule
-
AttributeName
public org.parboiled.Rule AttributeName()
[68] AttributeName ::= QName- Returns:
- the AttributeName rule
-
ElementName
public org.parboiled.Rule ElementName()
[69] ElementName ::= QName- Returns:
- the ElementName rule
-
TypeName
public org.parboiled.Rule TypeName()
[70] TypeName ::= QName- Returns:
- the TypeName rule
-
IntegerLiteral
public org.parboiled.Rule IntegerLiteral()
[71] IntegerLiteral ::= Digits- Returns:
- the IntegerLiteral rule
-
DecimalLiteral
public org.parboiled.Rule DecimalLiteral()
[72] DecimalLiteral ::= ("." Digits) | (Digits "." [0-9]*) //ws: explicit- Returns:
- the DecimalLiteral rule
-
DoubleLiteral
public org.parboiled.Rule DoubleLiteral()
[73] DoubleLiteral ::= (("." Digits) | (Digits ("." [0-9]*)?)) [eE] [+-]? Digits //ws: explicit- Returns:
- the DoubleLiteral rule
-
StringLiteral
public org.parboiled.Rule StringLiteral()
[74] StringLiteral ::= ('"' (EscapeQuot | [^"])* '"') | ("'" (EscapeApos | [^'])* "'") //ws: explicit- Returns:
- the StringLiteral rule
-
EscapeQuot
public org.parboiled.Rule EscapeQuot()
[75] EscapeQuot ::= '""'- Returns:
- the EscapeQuot rule
-
EscapeApos
public org.parboiled.Rule EscapeApos()
[76] EscapeApos ::= "''"- Returns:
- the EscapeApos rule
-
Comment
public org.parboiled.Rule Comment()
[77] Comment ::= "(:" (CommentContents | Comment)* ":)" //ws: explicit- Returns:
- the Comment rule
-
QName
public org.parboiled.Rule QName()
[78] QName ::= [http://www.w3.org/TR/REC-xml-names/#NT-QName]Names //xgs: xml-version- Returns:
- the QName rule
-
NCName
public org.parboiled.Rule NCName()
[79] NCName ::= [http://www.w3.org/TR/REC-xml-names/#NT-NCName]Names //xgs: xml-version- Returns:
- the NCName rule
-
Digits
public org.parboiled.Rule Digits()
[81] Digits ::= [0-9]+- Returns:
- the Digits rule
-
CommentContents
public org.parboiled.Rule CommentContents()
[82] CommentContents ::= (Char+ - (Char* ('(:' | ':)') Char*))- Returns:
- the CommentContents rule
-
XmlNames_QName
public org.parboiled.Rule XmlNames_QName()
[7] QName ::= PartialPrefixedName | UnprefixedName- Returns:
- the XmlNames_QName rule
-
XmlNames_PrefixedName
public org.parboiled.Rule XmlNames_PrefixedName()
[8] PartialPrefixedName ::= Prefix ':' LocalPart- Returns:
- the XmlNames_PrefixedName rule
-
XmlNames_UnprefixedName
public org.parboiled.Rule XmlNames_UnprefixedName()
[9] UnprefixedName ::= LocalPart- Returns:
- the XmlNames_UnprefixedName rule
-
XmlNames_Prefix
public org.parboiled.Rule XmlNames_Prefix()
[10] Prefix ::= NCName- Returns:
- the XmlNames_Prefix rule
-
XmlNames_LocalPart
public org.parboiled.Rule XmlNames_LocalPart()
[11] LocalPart ::= NCName- Returns:
- the XmlNames_LocalPart rule
-
XmlNames_NCName
public org.parboiled.Rule XmlNames_NCName()
[4] NCName ::= [https://www.w3.org/TR/REC-xml/#NT-Name]Name - (Char* ':' Char*) // An XML Name, minus the ":"- Returns:
- the XmlNames_NCName rule
-
XmlNames_Name_minusColon
public org.parboiled.Rule XmlNames_Name_minusColon()
Modified from Extensible Markup Language (XML) 1.0 (Fifth Edition) Same as [https://www.w3.org/TR/REC-xml/#NT-Name]Name but with the ':' character removed! [_5] Name ::= NameStartChar_minusColon (NameChar)*- Returns:
- the XmlNames_Name_minusColon rule
-
XmlNames_NameStartChar_minusColon
public org.parboiled.Rule XmlNames_NameStartChar_minusColon()
Modified from Extensible Markup Language (XML) 1.0 (Fifth Edition) Same as [https://www.w3.org/TR/xml/#NT-NameStartChar]NameStartChar but with the ':' character removed! [_4] NameStartChar ::= [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]- Returns:
- the XmlNames_NameStartChar_minusColon rule
-
XmlNames_NameChar
public org.parboiled.Rule XmlNames_NameChar()
Modified from Extensible Markup Language (XML) 1.0 (Fifth Edition) Same as [https://www.w3.org/TR/xml/#NT-NameStartChar]NameChar but with the ':' character removed [_4a] NameChar ::= NameStartChar_minusColon | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]- Returns:
- the XmlNames_NameChar rule
-
Xml_S
public org.parboiled.Rule Xml_S()
Same as [https://www.w3.org/TR/xml/#NT-S]S [3] S ::= (#x20 | #x9 | #xD | #xA)+- Returns:
- the Xml_S rule
-
Xml_Char
public org.parboiled.Rule Xml_Char()
Same as [https://www.w3.org/TR/xml/#NT-Char]Char [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]- Returns:
- the Xml_Char rule
-
withEOI
public org.parboiled.Rule withEOI(org.parboiled.Rule rule)
Wraps any other rule to consume all input End of input is signalled by aChars.EOI- Parameters:
rule- Any XPathParser rule- Returns:
- The rule followed by an EOI rule
-
-