Class XPathParser

  • All Implemented Interfaces:
    org.parboiled.ContextAware<ASTNode>

    public class XPathParser
    extends org.parboiled.BaseParser<ASTNode>
    • Field Summary

      • Fields inherited from class org.parboiled.BaseParser

        ANY, DEDENT, EMPTY, EOI, INDENT, NOTHING
    • Constructor Summary

      Constructors 
      Constructor Description
      XPathParser​(Boolean enableActions)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.parboiled.Rule AbbrevForwardStep()
      [31] AbbrevForwardStep ::= "@"? NodeTest
      org.parboiled.Rule AbbrevReverseStep()
      [34] AbbrevReverseStep ::= ".."
      org.parboiled.Rule AdditiveExpr()
      [12] AdditiveExpr ::= MultiplicativeExpr ( ("+" | "-") MultiplicativeExpr )* Value stack head either: AdditiveExpr / MultiplicativeExpr / UnionExpr / IntersectExceptExpr / InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExpr
      org.parboiled.Rule AndExpr()
      [9] AndExpr ::= ComparisonExpr ( "and" ComparisonExpr )*
      org.parboiled.Rule AnyKindTest()
      [55] AnyKindTest ::= "node" "(" ")"
      org.parboiled.Rule AtomicType()
      [53] AtomicType ::= QName
      org.parboiled.Rule AttribNameOrWildcard()
      [61] AttribNameOrWildcard ::= AttributeName | "*"
      org.parboiled.Rule AttributeDeclaration()
      [63] AttributeDeclaration ::= AttributeName
      org.parboiled.Rule AttributeName()
      [68] AttributeName ::= QName
      org.parboiled.Rule AttributeTest()
      [60] AttributeTest ::= "attribute" "(" (AttribNameOrWildcard ("," TypeName)?)? ")"
      org.parboiled.Rule AxisStep()
      [28] AxisStep ::= (ReverseStep | ForwardStep) PredicateList
      org.parboiled.Rule CastableExpr()
      [18] CastableExpr ::= CastExpr ( "castable" "as" SingleType )? Value stack head either: CastableExpr / CastExpr / UnaryExpr / ValueExpr
      org.parboiled.Rule CastExpr()
      [19] CastExpr ::= UnaryExpr ( "cast" "as" SingleType )? Value stack head either: CastExpr / UnaryExpr / ValueExpr
      org.parboiled.Rule Comment()
      [77] Comment ::= "(:" (CommentContents | Comment)* ":)" //ws: explicit
      org.parboiled.Rule CommentContents()
      [82] CommentContents ::= (Char+ - (Char* ('(:' | ':)') Char*))
      org.parboiled.Rule CommentTest()
      [58] CommentTest ::= "comment" "(" ")"
      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
      org.parboiled.Rule ContextItemExpr()
      [47] ContextItemExpr ::= "."
      org.parboiled.Rule DecimalLiteral()
      [72] DecimalLiteral ::= ("." Digits) | (Digits "." [0-9]*) //ws: explicit
      org.parboiled.Rule Digits()
      [81] Digits ::= [0-9]+
      org.parboiled.Rule DocumentTest()
      [56] DocumentTest ::= "document-node" "(" (ElementTest | SchemaElementTest)? ")"
      org.parboiled.Rule DoubleLiteral()
      [73] DoubleLiteral ::= (("." Digits) | (Digits ("." [0-9]*)?)) [eE] [+-]? Digits //ws: explicit
      org.parboiled.Rule ElementDeclaration()
      [67] ElementDeclaration ::= ElementName
      org.parboiled.Rule ElementName()
      [69] ElementName ::= QName
      org.parboiled.Rule ElementNameOrWildcard()
      [65] ElementNameOrWildcard ::= ElementName | "*"
      org.parboiled.Rule ElementTest()
      [64] ElementTest ::= "element" "(" (ElementNameOrWildcard ("," TypeName "?"?)?)? ")"
      org.parboiled.Rule EscapeApos()
      [76] EscapeApos ::= "''"
      org.parboiled.Rule EscapeQuot()
      [75] EscapeQuot ::= '""'
      org.parboiled.Rule Expr()
      [2] Expr ::= ExprSingle ("," ExprSingle)*
      org.parboiled.Rule ExprSingle()
      [3] ExprSingle ::= ForExpr | QuantifiedExpr | IfExpr | OrExpr
      org.parboiled.Rule FilterExpr()
      [38] FilterExpr ::= PrimaryExpr PredicateList
      org.parboiled.Rule ForExpr()
      [4] ForExpr ::= SimpleForClause "return" ExprSingle
      org.parboiled.Rule ForwardAxis()
      [30] ForwardAxis ::= ("child" "::") | ("descendant" "::") | ("attribute" "::") | ("self" "::") | ("descendant-or-self" "::") | ("following-sibling" "::") | ("following" "::") | ("namespace" "::")
      org.parboiled.Rule ForwardStep()
      [29] ForwardStep ::= (ForwardAxis NodeTest) | AbbrevForwardStep
      org.parboiled.Rule FunctionCall()
      [48] FunctionCall ::= QName "(" (ExprSingle ("," ExprSingle)*)? ")" //xgs:reserved-function-names
      org.parboiled.Rule GeneralComp()
      [22] GeneralComp ::= "=" | "!=" | "<" | "<=" | ">" | ">="
      org.parboiled.Rule IfExpr()
      [7] IfExpr ::= "if" "(" Expr ")" "then" ExprSingle "else" ExprSingle
      org.parboiled.Rule InstanceofExpr()
      [16] InstanceofExpr ::= TreatExpr ( "instance" "of" SequenceType )? Value stack head either: InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExpr
      org.parboiled.Rule IntegerLiteral()
      [71] IntegerLiteral ::= Digits
      org.parboiled.Rule IntersectExceptExpr()
      [15] IntersectExceptExpr ::= InstanceofExpr ( ("intersect" | "except") InstanceofExpr )* Value stack head either: IntersectExceptExpr / InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExpr
      org.parboiled.Rule ItemType()
      [52] ItemType ::= KindTest | ("item" "(" ")") | AtomicType
      org.parboiled.Rule KindTest()
      [54] KindTest ::= DocumentTest | ElementTest | AttributeTest | SchemaElementTest | SchemaAttributeTest | PITest | CommentTest | TextTest | AnyKindTest
      org.parboiled.Rule Literal()
      [42] Literal ::= NumericLiteral | StringLiteral
      org.parboiled.Rule MultiplicativeExpr()
      [13] MultiplicativeExpr ::= UnionExpr ( ("*" | "div" | "idiv" | "mod") UnionExpr )* Value stack head either: MultiplicativeExpr / UnionExpr / IntersectExceptExpr / InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExpr
      org.parboiled.Rule NameTest()
      [36] NameTest ::= QName | Wildcard
      org.parboiled.Rule NCName()
      [79] NCName ::= [http://www.w3.org/TR/REC-xml-names/#NT-NCName]Names //xgs: xml-version
      org.parboiled.Rule NodeComp()
      [24] NodeComp ::= "is" | "<<" | ">>"
      org.parboiled.Rule NodeTest()
      [35] NodeTest ::= KindTest | NameTest
      org.parboiled.Rule NumericLiteral()
      [43] NumericLiteral ::= IntegerLiteral | DecimalLiteral | DoubleLiteral
      org.parboiled.Rule OccurrenceIndicator()
      [51] OccurrenceIndicator ::= "?" | "*" | "+"
      org.parboiled.Rule OrExpr()
      [8] OrExpr ::= AndExpr ( "or" AndExpr )*
      org.parboiled.Rule ParenthesizedExpr()
      [46] ParenthesizedExpr ::= "(" Expr? ")"
      org.parboiled.Rule PathExpr()
      [25] PathExpr ::= ("/" RelativePathExpr?) | ("//" RelativePathExpr) | RelativePathExpr
      ASTNode peek()  
      org.parboiled.Rule PITest()
      [59] PITest ::= "processing-instruction" "(" (NCName | StringLiteral)? ")"
      ASTNode pop()  
      org.parboiled.Rule Predicate()
      [40] Predicate ::= "[" Expr "]"
      org.parboiled.Rule PredicateList()
      [39] PredicateList ::= Predicate*
      org.parboiled.Rule PrimaryExpr()
      [41] PrimaryExpr ::= Literal | VarRef | ParenthesizedExpr | ContextItemExpr | FunctionCall
      boolean push​(ASTNode value)  
      org.parboiled.Rule QName()
      [78] QName ::= [http://www.w3.org/TR/REC-xml-names/#NT-QName]Names //xgs: xml-version
      org.parboiled.Rule QuantifiedExpr()
      [6] QuantifiedExpr ::= ("some" | "every") "$" VarName "in" ExprSingle ("," "$" VarName "in" ExprSingle)* "satisfies" ExprSingle
      org.parboiled.Rule RangeExpr()
      [11] RangeExpr ::= AdditiveExpr ( "to" AdditiveExpr )? Value stack head either: RangeExpr / AdditiveExpr / MultiplicativeExpr / UnionExpr / IntersectExceptExpr / InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExpr
      org.parboiled.Rule RelativePathExpr()
      [26] RelativePathExpr ::= StepExpr (("/" | "//") StepExpr)*
      PathExpr relativePathToPath​(StepExpr initialStep, RelativePathExpr relativePathExpr)
      Converts a Relative Path Expression to a Path Expression
      org.parboiled.Rule ReverseAxis()
      [33] ReverseAxis ::= ("parent" "::") | ("ancestor" "::") | ("preceding-sibling" "::") | ("preceding" "::") | ("ancestor-or-self" "::")
      org.parboiled.Rule ReverseStep()
      [32] ReverseStep ::= (ReverseAxis NodeTest) | AbbrevReverseStep
      org.parboiled.Rule SchemaAttributeTest()
      [62] SchemaAttributeTest ::= "schema-attribute" "(" AttributeDeclaration ")"
      org.parboiled.Rule SchemaElementTest()
      [66] SchemaElementTest ::= "schema-element" "(" ElementDeclaration ")"
      org.parboiled.Rule SequenceType()
      [50] SequenceType ::= ("empty-sequence" "(" ")") | (ItemType OccurrenceIndicator?)
      org.parboiled.Rule SimpleForClause()
      [5] SimpleForClause ::= "for" "$" VarName "in" ExprSingle ("," "$" VarName "in" ExprSingle)*
      org.parboiled.Rule SingleType()
      [49] SingleType ::= AtomicType "?"? //gn: parens
      org.parboiled.Rule StepExpr()
      [27] StepExpr ::= FilterExpr | AxisStep
      org.parboiled.Rule StringLiteral()
      [74] StringLiteral ::= ('"' (EscapeQuot | [^"])* '"') | ("'" (EscapeApos | [^'])* "'") //ws: explicit
      org.parboiled.Rule TextTest()
      [57] TextTest ::= "text" "(" ")"
      org.parboiled.Rule TreatExpr()
      [17] TreatExpr ::= CastableExpr ( "treat" "as" SequenceType )? Value stack head either: TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExpr
      org.parboiled.Rule TypeName()
      [70] TypeName ::= QName
      org.parboiled.Rule UnaryExpr()
      [20] UnaryExpr ::= ("-" | "+")* ValueExpr Value stack head either: UnaryExpr / ValueExpr
      org.parboiled.Rule UnionExpr()
      [14] UnionExpr ::= IntersectExceptExpr ( ("union" | "|") IntersectExceptExpr )* Value stack head either: UnionExpr / IntersectExceptExpr / InstanceOfExpr / TreatExpr / CastableExpr / CastExpr / UnaryExpr / ValueExpr
      org.parboiled.Rule ValueComp()
      [23] ValueComp ::= "eq" | "ne" | "lt" | "le" | "gt" | "ge"
      org.parboiled.Rule ValueExpr()
      [21] ValueExpr ::= PathExpr
      org.parboiled.Rule VarName()
      [45] VarName ::= QName
      org.parboiled.Rule VarRef()
      [44] VarRef ::= "$" VarName
      org.parboiled.Rule Wildcard()
      [37] Wildcard ::= "*" | (NCName ":" "*") | ("*" ":" NCName) //ws: explicit
      org.parboiled.Rule withEOI​(org.parboiled.Rule rule)
      Wraps any other rule to consume all input End of input is signalled by a Chars.EOI
      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]
      org.parboiled.Rule Xml_S()
      Same as [https://www.w3.org/TR/xml/#NT-S]S [3] S ::= (#x20 | #x9 | #xD | #xA)+
      org.parboiled.Rule XmlNames_LocalPart()
      [11] LocalPart ::= NCName
      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)*
      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]
      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]
      org.parboiled.Rule XmlNames_NCName()
      [4] NCName ::= [https://www.w3.org/TR/REC-xml/#NT-Name]Name - (Char* ':' Char*) // An XML Name, minus the ":"
      org.parboiled.Rule XmlNames_Prefix()
      [10] Prefix ::= NCName
      org.parboiled.Rule XmlNames_PrefixedName()
      [8] PartialPrefixedName ::= Prefix ':' LocalPart
      org.parboiled.Rule XmlNames_QName()
      [7] QName ::= PartialPrefixedName | UnprefixedName
      org.parboiled.Rule XmlNames_UnprefixedName()
      [9] UnprefixedName ::= LocalPart
      org.parboiled.Rule XPath()
      [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:
        push in class org.parboiled.BaseActions<ASTNode>
      • pop

        public ASTNode pop()
        Overrides:
        pop in class org.parboiled.BaseActions<ASTNode>
      • peek

        public ASTNode peek()
        Overrides:
        peek in class org.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 absolute
        relativePathExpr - 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 a Chars.EOI
        Parameters:
        rule - Any XPathParser rule
        Returns:
        The rule followed by an EOI rule