Package

eu.cdevreeze.xpathparser

ast

Permalink

package ast

Abstract syntax tree of XPath expressions, as produced by the parsers specified in the 'parse' package.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ast
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait AbbrevForwardStep extends ForwardStep

    Permalink
  2. sealed trait AdditionOp extends XPathElem with LeafElem

    Permalink
  3. final case class AdditiveExpr(firstExpr: MultiplicativeExpr, operatorExprPairs: IndexedSeq[(AdditionOp, MultiplicativeExpr)]) extends XPathElem with Product with Serializable

    Permalink
  4. final case class AndExpr(comparisonExprs: IndexedSeq[ComparisonExpr]) extends XPathElem with Product with Serializable

    Permalink
  5. sealed trait Argument extends XPathElem

    Permalink
  6. final case class ArgumentList(arguments: IndexedSeq[Argument]) extends Postfix with Product with Serializable

    Permalink
  7. sealed trait ArrayConstructor extends PrimaryExpr

    Permalink
  8. sealed trait ArrayTest extends ItemType

    Permalink
  9. final case class ArrowExpr(unaryExpr: UnaryExpr, arrowFunctionCalls: IndexedSeq[ArrowFunctionCall]) extends XPathElem with Product with Serializable

    Permalink
  10. final case class ArrowFunctionCall(arrowFunctionSpecifier: ArrowFunctionSpecifier, argumentList: ArgumentList) extends XPathElem with Product with Serializable

    Permalink
  11. sealed trait ArrowFunctionSpecifier extends XPathElem

    Permalink
  12. final case class AtomicOrUnionType(tpe: EQName) extends ItemType with LeafElem with Product with Serializable

    Permalink
  13. final case class AttributeAxisAbbrevForwardStep(nodeTest: NodeTest) extends AbbrevForwardStep with Product with Serializable

    Permalink
  14. final case class AttributeNameAndTypeTest(name: EQName, tpe: EQName) extends AttributeTest with LeafElem with Product with Serializable

    Permalink
  15. final case class AttributeNameTest(name: EQName) extends AttributeTest with LeafElem with Product with Serializable

    Permalink
  16. sealed trait AttributeTest extends KindTest

    Permalink
  17. final case class AttributeTypeTest(tpe: EQName) extends AttributeTest with LeafElem with Product with Serializable

    Permalink
  18. sealed trait AxisStep extends StepExpr

    Permalink
  19. final case class BracedUriLiteral(namespaceOption: Option[String]) extends Product with Serializable

    Permalink

    Braced URI literal.

  20. final case class CastExpr(arrowExpr: ArrowExpr, singleTypeOption: Option[SingleType]) extends XPathElem with Product with Serializable

    Permalink
  21. final case class CastableExpr(castExpr: CastExpr, singleTypeOption: Option[SingleType]) extends XPathElem with Product with Serializable

    Permalink
  22. sealed trait Comp extends XPathElem with LeafElem

    Permalink
  23. sealed trait ComparisonExpr extends XPathElem

    Permalink
  24. final case class CompoundComparisonExpr(stringConcatExpr1: StringConcatExpr, comp: Comp, stringConcatExpr2: StringConcatExpr) extends ComparisonExpr with Product with Serializable

    Permalink
  25. final case class CompoundRangeExpr(additiveExpr1: AdditiveExpr, additiveExpr2: AdditiveExpr) extends RangeExpr with Product with Serializable

    Permalink
  26. final case class CurlyArrayConstructor(expr: EnclosedExpr) extends ArrayConstructor with Product with Serializable

    Permalink
  27. final case class DataPITest(data: StringLiteral) extends PITest with Product with Serializable

    Permalink
  28. final case class DecimalLiteral(value: BigDecimal) extends NumericLiteral with LeafElem with Product with Serializable

    Permalink
  29. sealed trait DocumentTest extends KindTest

    Permalink
  30. final case class DocumentTestContainingElementTest(elementTest: ElementTest) extends DocumentTest with Product with Serializable

    Permalink
  31. final case class DocumentTestContainingSchemaElementTest(schemaElementTest: SchemaElementTest) extends DocumentTest with Product with Serializable

    Permalink
  32. final case class DoubleLiteral(value: Double) extends NumericLiteral with LeafElem with Product with Serializable

    Permalink
  33. sealed trait EQName extends AnyRef

    Permalink

    EQName, so either a URIQualifiedName or a QName.

  34. final case class EQNameAsArrowFunctionSpecifier(eqName: EQName) extends ArrowFunctionSpecifier with LeafElem with Product with Serializable

    Permalink
  35. final case class ElementNameAndTypeTest(name: EQName, tpe: EQName) extends ElementTest with LeafElem with Product with Serializable

    Permalink
  36. final case class ElementNameTest(name: EQName) extends ElementTest with LeafElem with Product with Serializable

    Permalink
  37. sealed trait ElementTest extends KindTest

    Permalink
  38. final case class ElementTypeTest(tpe: EQName) extends ElementTest with LeafElem with Product with Serializable

    Permalink
  39. final case class EnclosedExpr(exprOption: Option[Expr]) extends XPathElem with Product with Serializable

    Permalink
  40. final case class ExactlyOneSequenceType(itemType: ItemType) extends SequenceType with Product with Serializable

    Permalink
  41. final case class Expr(exprSingleSeq: IndexedSeq[ExprSingle]) extends XPathElem with Product with Serializable

    Permalink
  42. sealed trait ExprSingle extends XPathElem

    Permalink
  43. final case class ExprSingleArgument(exprSingle: ExprSingle) extends Argument with Product with Serializable

    Permalink
  44. final case class ForExpr(simpleForBindings: IndexedSeq[SimpleForBinding], returnExpr: ExprSingle) extends ExprSingle with VariableIntroducingExpr with Product with Serializable

    Permalink
  45. sealed trait ForwardAxis extends XPathElem with LeafElem

    Permalink
  46. final case class ForwardAxisStep(step: ForwardStep, predicateList: IndexedSeq[Predicate]) extends AxisStep with Product with Serializable

    Permalink
  47. sealed trait ForwardStep extends XPathElem

    Permalink
  48. final case class FunctionCall(functionName: EQName, argumentList: ArgumentList) extends PrimaryExpr with Product with Serializable

    Permalink
  49. sealed trait FunctionItemExpr extends PrimaryExpr

    Permalink
  50. sealed trait FunctionTest extends ItemType

    Permalink
  51. sealed trait GeneralComp extends Comp

    Permalink
  52. final case class IfExpr(condition: Expr, thenExpr: ExprSingle, elseExpr: ExprSingle) extends ExprSingle with Product with Serializable

    Permalink
  53. final case class InlineFunctionExpr(paramListOption: Option[ParamList], resultTypeOption: Option[SequenceType], body: EnclosedExpr) extends FunctionItemExpr with Product with Serializable

    Permalink
  54. final case class InstanceOfExpr(treatExpr: TreatExpr, sequenceTypeOption: Option[SequenceType]) extends XPathElem with Product with Serializable

    Permalink
  55. final case class IntegerLiteral(value: BigInt) extends NumericLiteral with LeafElem with Product with Serializable

    Permalink
  56. final case class IntersectExceptExpr(firstExpr: InstanceOfExpr, operatorExprPairs: IndexedSeq[(IntersectExceptOp, InstanceOfExpr)]) extends XPathElem with Product with Serializable

    Permalink
  57. sealed trait IntersectExceptOp extends XPathElem with LeafElem

    Permalink
  58. sealed trait ItemType extends XPathElem

    Permalink
  59. sealed trait KeySpecifier extends XPathElem

    Permalink
  60. sealed trait KindTest extends NodeTest

    Permalink
  61. final case class KindTestItemType(kindTest: KindTest) extends ItemType with Product with Serializable

    Permalink
  62. sealed trait LeafElem extends XPathElem

    Permalink
  63. final case class LetExpr(simpleLetBindings: IndexedSeq[SimpleLetBinding], returnExpr: ExprSingle) extends ExprSingle with VariableIntroducingExpr with Product with Serializable

    Permalink
  64. sealed trait Literal extends PrimaryExpr

    Permalink
  65. final case class LocalNameWildcard(localName: NCName) extends Wildcard with LeafElem with Product with Serializable

    Permalink
  66. final case class MapConstructor(entries: IndexedSeq[MapConstructorEntry]) extends PrimaryExpr with Product with Serializable

    Permalink
  67. final case class MapConstructorEntry(keyExpr: ExprSingle, valueExpr: ExprSingle) extends XPathElem with Product with Serializable

    Permalink
  68. sealed trait MapTest extends ItemType

    Permalink
  69. final case class MultiplicativeExpr(firstExpr: UnionExpr, operatorExprPairs: IndexedSeq[(MultiplicativeOp, UnionExpr)]) extends XPathElem with Product with Serializable

    Permalink
  70. sealed trait MultiplicativeOp extends XPathElem with LeafElem

    Permalink
  71. final case class NCName(name: String) extends Product with Serializable

    Permalink

    NCName, that is, a non-colon name.

  72. sealed trait NameTest extends NodeTest

    Permalink
  73. final case class NamedFunctionRef(functionName: EQName, arity: BigInt) extends FunctionItemExpr with LeafElem with Product with Serializable

    Permalink
  74. final case class NamedKeySpecifier(ncName: NCName) extends KeySpecifier with LeafElem with Product with Serializable

    Permalink
  75. final case class NamespaceWildcard(bracedUriLiteral: BracedUriLiteral) extends Wildcard with LeafElem with Product with Serializable

    Permalink
  76. final case class NillableElementNameAndTypeTest(name: EQName, tpe: EQName) extends ElementTest with LeafElem with Product with Serializable

    Permalink
  77. final case class NillableElementTypeTest(tpe: EQName) extends ElementTest with LeafElem with Product with Serializable

    Permalink
  78. sealed trait NodeComp extends Comp

    Permalink
  79. sealed trait NodeTest extends XPathElem

    Permalink
  80. final case class NonAbbrevForwardStep(forwardAxis: ForwardAxis, nodeTest: NodeTest) extends ForwardStep with Product with Serializable

    Permalink
  81. final case class NonAbbrevReverseStep(reverseAxis: ReverseAxis, nodeTest: NodeTest) extends ReverseStep with Product with Serializable

    Permalink
  82. final case class NonEmptySingleType(name: EQName) extends SingleType with LeafElem with Product with Serializable

    Permalink
  83. sealed trait NumericLiteral extends Literal

    Permalink
  84. final case class OneOrMoreSequenceType(itemType: ItemType) extends SequenceType with Product with Serializable

    Permalink
  85. final case class OrExpr(andExprs: IndexedSeq[AndExpr]) extends ExprSingle with Product with Serializable

    Permalink
  86. sealed trait PITest extends KindTest

    Permalink
  87. final case class Param(paramName: EQName, typeDeclarationOption: Option[TypeDeclaration]) extends XPathElem with Product with Serializable

    Permalink
  88. final case class ParamList(params: IndexedSeq[Param]) extends XPathElem with Product with Serializable

    Permalink
  89. final case class ParenthesizedExpr(exprOption: Option[Expr]) extends PrimaryExpr with Product with Serializable

    Permalink
  90. final case class ParenthesizedExprAsArrowFunctionSpecifier(parenthesizedExpr: ParenthesizedExpr) extends ArrowFunctionSpecifier with Product with Serializable

    Permalink
  91. final case class ParenthesizedExprKeySpecifier(parenthesizedExpr: ParenthesizedExpr) extends KeySpecifier with Product with Serializable

    Permalink
  92. final case class ParenthesizedItemType(itemType: ItemType) extends ItemType with Product with Serializable

    Permalink
  93. sealed trait PathExpr extends XPathElem

    Permalink
  94. final case class PathExprStartingWithDoubleSlash(relativePathExpr: RelativePathExpr) extends PathExpr with Product with Serializable

    Permalink
  95. final case class PathExprStartingWithSingleSlash(relativePathExpr: RelativePathExpr) extends PathExpr with Product with Serializable

    Permalink
  96. final case class PositionalKeySpecifier(integerLiteral: IntegerLiteral) extends KeySpecifier with Product with Serializable

    Permalink
  97. sealed trait Postfix extends XPathElem

    Permalink
  98. final case class PostfixExpr(primaryExpr: PrimaryExpr, postfixes: IndexedSeq[Postfix]) extends StepExpr with Product with Serializable

    Permalink
  99. final case class PostfixLookup(keySpecifier: KeySpecifier) extends Postfix with Product with Serializable

    Permalink
  100. final case class PotentiallyEmptySingleType(name: EQName) extends SingleType with LeafElem with Product with Serializable

    Permalink
  101. final case class Predicate(expr: Expr) extends Postfix with Product with Serializable

    Permalink
  102. final case class PrefixWildcard(prefix: NCName) extends Wildcard with LeafElem with Product with Serializable

    Permalink
  103. sealed trait PrimaryExpr extends XPathElem

    Permalink
  104. final case class QuantifiedExpr(quantifier: Quantifier, simpleBindings: IndexedSeq[SimpleBindingInQuantifiedExpr], satisfiesExpr: ExprSingle) extends ExprSingle with VariableIntroducingExpr with Product with Serializable

    Permalink
  105. sealed trait Quantifier extends XPathElem with LeafElem

    Permalink
  106. sealed trait RangeExpr extends XPathElem

    Permalink
  107. final case class RelativePathExpr(firstExpr: StepExpr, operatorExprPairs: IndexedSeq[(StepOp, StepExpr)]) extends PathExpr with Product with Serializable

    Permalink
  108. sealed trait ReverseAxis extends XPathElem with LeafElem

    Permalink
  109. final case class ReverseAxisStep(step: ReverseStep, predicateList: IndexedSeq[Predicate]) extends AxisStep with Product with Serializable

    Permalink
  110. sealed trait ReverseStep extends XPathElem

    Permalink
  111. final case class SchemaAttributeTest(name: EQName) extends KindTest with LeafElem with Product with Serializable

    Permalink
  112. final case class SchemaElementTest(name: EQName) extends KindTest with LeafElem with Product with Serializable

    Permalink
  113. sealed trait SequenceType extends XPathElem

    Permalink
  114. final case class SimpleAbbrevForwardStep(nodeTest: NodeTest) extends AbbrevForwardStep with Product with Serializable

    Permalink
  115. final case class SimpleBindingInQuantifiedExpr(varName: EQName, expr: ExprSingle) extends VariableBinding with Product with Serializable

    Permalink
  116. final case class SimpleComparisonExpr(stringConcatExpr: StringConcatExpr) extends ComparisonExpr with Product with Serializable

    Permalink
  117. final case class SimpleForBinding(varName: EQName, expr: ExprSingle) extends VariableBinding with Product with Serializable

    Permalink
  118. final case class SimpleLetBinding(varName: EQName, expr: ExprSingle) extends VariableBinding with Product with Serializable

    Permalink
  119. final case class SimpleMapExpr(pathExprs: IndexedSeq[PathExpr]) extends XPathElem with Product with Serializable

    Permalink
  120. final case class SimpleNameTest(name: EQName) extends NameTest with LeafElem with Product with Serializable

    Permalink
  121. final case class SimpleRangeExpr(additiveExpr: AdditiveExpr) extends RangeExpr with Product with Serializable

    Permalink
  122. sealed trait SingleType extends XPathElem

    Permalink
  123. final case class SquareArrayConstructor(members: IndexedSeq[ExprSingle]) extends ArrayConstructor with Product with Serializable

    Permalink
  124. sealed trait StepExpr extends XPathElem

    Permalink
  125. sealed trait StepOp extends XPathElem with LeafElem

    Permalink
  126. final case class StringConcatExpr(rangeExprs: IndexedSeq[RangeExpr]) extends XPathElem with Product with Serializable

    Permalink
  127. final case class StringLiteral(value: String) extends Literal with LeafElem with Product with Serializable

    Permalink
  128. final case class TargetPITest(target: NCName) extends PITest with LeafElem with Product with Serializable

    Permalink
  129. final case class TreatExpr(castableExpr: CastableExpr, sequenceTypeOption: Option[SequenceType]) extends XPathElem with Product with Serializable

    Permalink
  130. final case class TypeDeclaration(tpe: SequenceType) extends XPathElem with Product with Serializable

    Permalink
  131. final case class TypedArrayTest(elementType: SequenceType) extends ArrayTest with Product with Serializable

    Permalink
  132. final case class TypedFunctionTest(argumentTypes: IndexedSeq[SequenceType], resultType: SequenceType) extends FunctionTest with Product with Serializable

    Permalink
  133. final case class TypedMapTest(keyType: AtomicOrUnionType, valueType: SequenceType) extends MapTest with Product with Serializable

    Permalink
  134. final case class UnaryExpr(ops: IndexedSeq[UnaryOp], valueExpr: ValueExpr) extends XPathElem with Product with Serializable

    Permalink
  135. final case class UnaryLookup(keySpecifier: KeySpecifier) extends PrimaryExpr with Product with Serializable

    Permalink
  136. sealed trait UnaryOp extends XPathElem with LeafElem

    Permalink
  137. final case class UnionExpr(intersectExceptExprs: IndexedSeq[IntersectExceptExpr]) extends XPathElem with Product with Serializable

    Permalink
  138. sealed trait ValueComp extends Comp

    Permalink
  139. final case class ValueExpr(expr: SimpleMapExpr) extends XPathElem with Product with Serializable

    Permalink
  140. final case class VarRef(varName: EQName) extends PrimaryExpr with LeafElem with Product with Serializable

    Permalink
  141. final case class VarRefAsArrowFunctionSpecifier(varRef: VarRef) extends ArrowFunctionSpecifier with Product with Serializable

    Permalink
  142. sealed trait VariableBinding extends XPathElem

    Permalink

    Binding of a variable name to an expression.

  143. sealed trait VariableIntroducingExpr extends XPathElem

    Permalink

    XPathElem that can introduce one or more variable bindings.

  144. sealed trait Wildcard extends NameTest

    Permalink
  145. sealed trait XPathElem extends ElemLike[XPathElem]

    Permalink

    XPath 3.1 AST.

    XPath 3.1 AST. The root of the type hierarchy is XPathElem. It offers the ElemApi query API.

    The purpose of this AST is as follows:

    • It must represent the syntax tree of a successfully parsed XPath expression
    • It is not annotated with more semantic information, like type information that is not included in the XPath expression
    • It does not know anything about the context in which it runs, like bound namespaces etc.
    • It is rich enough to be able to serialize the AST back to XPath, knowing exactly where to place parentheses, braces, etc.
    • It is rich enough to contain operator precedence in the AST itself
    • Serialization of the AST to XPath may lead to differences in whitespace (and operator aliases), but other than that the result must be the same
    • The AST class hierarchy does not have to use the exact same names as the XPath grammar

    Having such an AST of a successfully parsed XPath expression, it must be easy to reliably find used namespace prefixes, for example.

    TODO Improve several class names.

  146. final case class XPathExpr(expr: Expr) extends XPathElem with Product with Serializable

    Permalink
  147. final case class ZeroOrMoreSequenceType(itemType: ItemType) extends SequenceType with Product with Serializable

    Permalink
  148. final case class ZeroOrOneSequenceType(itemType: ItemType) extends SequenceType with Product with Serializable

    Permalink

Value Members

  1. object AbbrevReverseStep extends ReverseStep with Product with Serializable

    Permalink
  2. object AdditionOp

    Permalink
  3. object AnyArrayTest extends ArrayTest with LeafElem with Product with Serializable

    Permalink
  4. object AnyAttributeTest extends AttributeTest with LeafElem with Product with Serializable

    Permalink
  5. object AnyElementTest extends ElementTest with LeafElem with Product with Serializable

    Permalink
  6. object AnyFunctionTest extends FunctionTest with LeafElem with Product with Serializable

    Permalink
  7. object AnyItemType extends ItemType with LeafElem with Product with Serializable

    Permalink
  8. object AnyKindTest extends KindTest with LeafElem with Product with Serializable

    Permalink
  9. object AnyMapTest extends MapTest with LeafElem with Product with Serializable

    Permalink
  10. object AnyWildcard extends Wildcard with LeafElem with Product with Serializable

    Permalink
  11. object ArgumentPlaceholder extends Argument with LeafElem with Product with Serializable

    Permalink
  12. object BracedUriLiteral extends Serializable

    Permalink
  13. object CommentTest extends KindTest with LeafElem with Product with Serializable

    Permalink
  14. object ContextItemExpr extends PrimaryExpr with LeafElem with Product with Serializable

    Permalink
  15. object EQName

    Permalink
  16. object EmptySequenceType extends SequenceType with LeafElem with Product with Serializable

    Permalink
  17. object ForwardAxis

    Permalink
  18. object GeneralComp

    Permalink
  19. object IntersectExceptOp

    Permalink
  20. object MultiplicativeOp

    Permalink
  21. object NCName extends Serializable

    Permalink
  22. object Names

    Permalink

    Names, as per the XML specification.

    Names, as per the XML specification. See for example https://www.w3.org/TR/REC-xml/#NT-Name.

    Only characters in the Unicode BMP (max. ￿) are considered. So the range from #x10000 to #xEFFFF is not recognized as valid name characters in this implementation.

    The functions of this class must be fast, because they are typically called very many times during parsing of XPath expressions.

    Classes like NCName lean on this object. An NCName is an XML name without colon.

  23. object NamespaceNodeTest extends KindTest with LeafElem with Product with Serializable

    Permalink
  24. object NodeComp

    Permalink
  25. object Quantifier

    Permalink
  26. object ReverseAxis

    Permalink
  27. object SimpleDocumentTest extends DocumentTest with LeafElem with Product with Serializable

    Permalink
  28. object SimplePITest extends PITest with LeafElem with Product with Serializable

    Permalink
  29. object SlashOnlyPathExpr extends PathExpr with LeafElem with Product with Serializable

    Permalink
  30. object StepOp

    Permalink
  31. object TextTest extends KindTest with LeafElem with Product with Serializable

    Permalink
  32. object UnaryOp

    Permalink
  33. object ValueComp

    Permalink
  34. object WildcardKeySpecifier extends KeySpecifier with LeafElem with Product with Serializable

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped