Packages

o

eu.cdevreeze.xpathparser.ast

XPathExpressions

object XPathExpressions

XPath 3.0 AST.

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.

TODO XPath 3.1.

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

Type Members

  1. sealed trait AbbrevForwardStep extends ForwardStep
  2. sealed trait AdditionOp extends XPathElem with LeafElem
  3. sealed trait AdditiveExpr extends XPathElem
  4. final case class AndExpr (comparisonExprs: IndexedSeq[ComparisonExpr]) extends XPathElem with Product with Serializable
  5. sealed trait Argument extends XPathElem
  6. final case class ArgumentList (arguments: IndexedSeq[Argument]) extends PredicateOrArgumentList with Product with Serializable
  7. final case class AtomicOrUnionType (tpe: EQName) extends ItemType with LeafElem with Product with Serializable
  8. final case class AttributeAxisAbbrevForwardStep (nodeTest: NodeTest) extends AbbrevForwardStep with Product with Serializable
  9. final case class AttributeNameAndTypeTest (name: EQName, tpe: EQName) extends AttributeTest with LeafElem with Product with Serializable
  10. final case class AttributeNameTest (name: EQName) extends AttributeTest with LeafElem with Product with Serializable
  11. sealed trait AttributeTest extends KindTest
  12. final case class AttributeTypeTest (tpe: EQName) extends AttributeTest with LeafElem with Product with Serializable
  13. sealed trait AxisStep extends StepExpr
  14. final case class CastExpr (unaryExpr: UnaryExpr, singleTypeOption: Option[SingleType]) extends XPathElem with Product with Serializable
  15. final case class CastableExpr (castExpr: CastExpr, singleTypeOption: Option[SingleType]) extends XPathElem with Product with Serializable
  16. sealed trait Comp extends XPathElem with LeafElem
  17. sealed trait ComparisonExpr extends XPathElem
  18. final case class CompoundAdditiveExpr (headExpr: MultiplicativeExpr, op: AdditionOp, tailExpr: AdditiveExpr) extends AdditiveExpr with Product with Serializable
  19. final case class CompoundComparisonExpr (stringConcatExpr1: StringConcatExpr, comp: Comp, stringConcatExpr2: StringConcatExpr) extends ComparisonExpr with Product with Serializable
  20. final case class CompoundIntersectExceptExpr (headExpr: InstanceOfExpr, op: IntersectExceptOp, tailExpr: IntersectExceptExpr) extends IntersectExceptExpr with Product with Serializable
  21. final case class CompoundMultiplicativeExpr (headExpr: UnionExpr, op: MultiplicativeOp, tailExpr: MultiplicativeExpr) extends MultiplicativeExpr with Product with Serializable
  22. final case class CompoundRangeExpr (additiveExpr1: AdditiveExpr, additiveExpr2: AdditiveExpr) extends RangeExpr with Product with Serializable
  23. final case class CompoundRelativePathExpr (headExpr: StepExpr, op: StepOp, tailExpr: RelativePathExpr) extends RelativePathExpr with Product with Serializable
  24. final case class DataPITest (data: StringLiteral) extends PITest with Product with Serializable
  25. final case class DecimalLiteral (value: BigDecimal) extends NumericLiteral with LeafElem with Product with Serializable
  26. sealed trait DocumentTest extends KindTest
  27. final case class DocumentTestContainingElementTest (elementTest: ElementTest) extends DocumentTest with Product with Serializable
  28. final case class DocumentTestContainingSchemaElementTest (schemaElementTest: SchemaElementTest) extends DocumentTest with Product with Serializable
  29. final case class DoubleLiteral (value: Double) extends NumericLiteral with LeafElem with Product with Serializable
  30. final case class ElementNameAndTypeTest (name: EQName, tpe: EQName) extends ElementTest with LeafElem with Product with Serializable
  31. final case class ElementNameTest (name: EQName) extends ElementTest with LeafElem with Product with Serializable
  32. sealed trait ElementTest extends KindTest
  33. final case class ElementTypeTest (tpe: EQName) extends ElementTest with LeafElem with Product with Serializable
  34. final case class EnclosedExpr (expr: Expr) extends XPathElem with Product with Serializable
  35. final case class ExactlyOneSequenceType (itemType: ItemType) extends SequenceType with Product with Serializable
  36. final case class Expr (exprSingleSeq: IndexedSeq[ExprSingle]) extends XPathElem with Product with Serializable
  37. sealed trait ExprSingle extends XPathElem
  38. final case class ExprSingleArgument (exprSingle: ExprSingle) extends Argument with Product with Serializable
  39. final case class ForExpr (simpleForBindings: IndexedSeq[SimpleForBinding], returnExpr: ExprSingle) extends ExprSingle with Product with Serializable
  40. sealed trait ForwardAxis extends XPathElem with LeafElem
  41. final case class ForwardAxisStep (step: ForwardStep, predicateList: IndexedSeq[Predicate]) extends AxisStep with Product with Serializable
  42. sealed trait ForwardStep extends XPathElem
  43. final case class FunctionCall (functionName: EQName, argumentList: ArgumentList) extends PrimaryExpr with Product with Serializable
  44. sealed trait FunctionItemExpr extends PrimaryExpr
  45. sealed trait FunctionTest extends ItemType
  46. sealed trait GeneralComp extends Comp
  47. final case class IfExpr (condition: Expr, thenExpr: ExprSingle, elseExpr: ExprSingle) extends ExprSingle with Product with Serializable
  48. final case class InlineFunctionExpr (paramListOption: Option[ParamList], resultTypeOption: Option[SequenceType], body: EnclosedExpr) extends FunctionItemExpr with Product with Serializable
  49. final case class InstanceOfExpr (treatExpr: TreatExpr, sequenceTypeOption: Option[SequenceType]) extends XPathElem with Product with Serializable
  50. final case class IntegerLiteral (value: Int) extends NumericLiteral with LeafElem with Product with Serializable
  51. sealed trait IntersectExceptExpr extends XPathElem
  52. sealed trait IntersectExceptOp extends XPathElem with LeafElem
  53. sealed trait ItemType extends XPathElem
  54. sealed trait KindTest extends NodeTest
  55. final case class KindTestItemType (kindTest: KindTest) extends ItemType with Product with Serializable
  56. sealed trait LeafElem extends XPathElem
  57. final case class LetExpr (simpleLetBindings: IndexedSeq[SimpleLetBinding], returnExpr: ExprSingle) extends ExprSingle with Product with Serializable
  58. sealed trait Literal extends PrimaryExpr
  59. final case class LocalNameWildcard (localName: NCName) extends Wildcard with LeafElem with Product with Serializable
  60. sealed trait MultiplicativeExpr extends XPathElem
  61. sealed trait MultiplicativeOp extends XPathElem with LeafElem
  62. sealed trait NameTest extends NodeTest
  63. final case class NamedFunctionRef (functionName: EQName, arity: Int) extends FunctionItemExpr with LeafElem with Product with Serializable
  64. final case class NamespaceWildcard (bracedUriLiteral: BracedUriLiteral) extends Wildcard with LeafElem with Product with Serializable
  65. final case class NillableElementNameAndTypeTest (name: EQName, tpe: EQName) extends ElementTest with LeafElem with Product with Serializable
  66. final case class NillableElementTypeTest (tpe: EQName) extends ElementTest with LeafElem with Product with Serializable
  67. sealed trait NodeComp extends Comp
  68. sealed trait NodeTest extends XPathElem
  69. final case class NonAbbrevForwardStep (forwardAxis: ForwardAxis, nodeTest: NodeTest) extends ForwardStep with Product with Serializable
  70. final case class NonAbbrevReverseStep (reverseAxis: ReverseAxis, nodeTest: NodeTest) extends ReverseStep with Product with Serializable
  71. final case class NonEmptySingleType (name: EQName) extends SingleType with LeafElem with Product with Serializable
  72. sealed trait NumericLiteral extends Literal
  73. final case class OneOrMoreSequenceType (itemType: ItemType) extends SequenceType with Product with Serializable
  74. final case class OrExpr (andExprs: IndexedSeq[AndExpr]) extends ExprSingle with Product with Serializable
  75. sealed trait PITest extends KindTest
  76. final case class Param (paramName: EQName, typeDeclarationOption: Option[TypeDeclaration]) extends XPathElem with Product with Serializable
  77. final case class ParamList (params: IndexedSeq[Param]) extends XPathElem with Product with Serializable
  78. final case class ParenthesizedExpr (exprOption: Option[Expr]) extends PrimaryExpr with Product with Serializable
  79. final case class ParenthesizedItemType (itemType: ItemType) extends ItemType with Product with Serializable
  80. sealed trait PathExpr extends XPathElem
  81. final case class PathExprStartingWithDoubleSlash (relativePathExpr: RelativePathExpr) extends PathExpr with Product with Serializable
  82. final case class PathExprStartingWithSingleSlash (relativePathExpr: RelativePathExpr) extends PathExpr with Product with Serializable
  83. final case class PostfixExpr (primaryExpr: PrimaryExpr, predicatesAndArgumentLists: IndexedSeq[PredicateOrArgumentList]) extends StepExpr with Product with Serializable
  84. final case class PotentiallyEmptySingleType (name: EQName) extends SingleType with LeafElem with Product with Serializable
  85. final case class Predicate (expr: Expr) extends PredicateOrArgumentList with Product with Serializable
  86. sealed trait PredicateOrArgumentList extends XPathElem
  87. final case class PrefixWildcard (prefix: NCName) extends Wildcard with LeafElem with Product with Serializable
  88. sealed trait PrimaryExpr extends XPathElem
  89. final case class QuantifiedExpr (quantifier: Quantifier, simpleBindings: IndexedSeq[SimpleBindingInQuantifiedExpr], satisfiesExpr: ExprSingle) extends ExprSingle with Product with Serializable
  90. sealed trait Quantifier extends XPathElem with LeafElem
  91. sealed trait RangeExpr extends XPathElem
  92. sealed trait RelativePathExpr extends PathExpr
  93. sealed trait ReverseAxis extends XPathElem with LeafElem
  94. final case class ReverseAxisStep (step: ReverseStep, predicateList: IndexedSeq[Predicate]) extends AxisStep with Product with Serializable
  95. sealed trait ReverseStep extends XPathElem
  96. final case class SchemaAttributeTest (name: EQName) extends KindTest with LeafElem with Product with Serializable
  97. final case class SchemaElementTest (name: EQName) extends KindTest with LeafElem with Product with Serializable
  98. sealed trait SequenceType extends XPathElem
  99. final case class SimpleAbbrevForwardStep (nodeTest: NodeTest) extends AbbrevForwardStep with Product with Serializable
  100. final case class SimpleAdditiveExpr (expr: MultiplicativeExpr) extends AdditiveExpr with Product with Serializable
  101. final case class SimpleBindingInQuantifiedExpr (varName: EQName, expr: ExprSingle) extends XPathElem with Product with Serializable
  102. final case class SimpleComparisonExpr (stringConcatExpr: StringConcatExpr) extends ComparisonExpr with Product with Serializable
  103. final case class SimpleForBinding (varName: EQName, expr: ExprSingle) extends XPathElem with Product with Serializable
  104. final case class SimpleIntersectExceptExpr (expr: InstanceOfExpr) extends IntersectExceptExpr with Product with Serializable
  105. final case class SimpleLetBinding (varName: EQName, expr: ExprSingle) extends XPathElem with Product with Serializable
  106. final case class SimpleMapExpr (pathExprs: IndexedSeq[PathExpr]) extends XPathElem with Product with Serializable
  107. final case class SimpleMultiplicativeExpr (expr: UnionExpr) extends MultiplicativeExpr with Product with Serializable
  108. final case class SimpleNameTest (name: EQName) extends NameTest with LeafElem with Product with Serializable
  109. final case class SimpleRangeExpr (additiveExpr: AdditiveExpr) extends RangeExpr with Product with Serializable
  110. final case class SimpleRelativePathExpr (stepExpr: StepExpr) extends RelativePathExpr with Product with Serializable
  111. sealed trait SingleType extends XPathElem
  112. sealed trait StepExpr extends XPathElem
  113. sealed trait StepOp extends XPathElem with LeafElem
  114. final case class StringConcatExpr (rangeExprs: IndexedSeq[RangeExpr]) extends XPathElem with Product with Serializable
  115. final case class StringLiteral (value: String) extends Literal with LeafElem with Product with Serializable
  116. final case class TargetPITest (target: NCName) extends PITest with LeafElem with Product with Serializable
  117. final case class TreatExpr (castableExpr: CastableExpr, sequenceTypeOption: Option[SequenceType]) extends XPathElem with Product with Serializable
  118. final case class TypeDeclaration (tpe: SequenceType) extends XPathElem with Product with Serializable
  119. final case class TypedFunctionTest (argumentTypes: IndexedSeq[SequenceType], resultType: SequenceType) extends FunctionTest with Product with Serializable
  120. final case class UnaryExpr (ops: IndexedSeq[UnaryOp], valueExpr: ValueExpr) extends XPathElem with Product with Serializable
  121. sealed trait UnaryOp extends XPathElem with LeafElem
  122. final case class UnionExpr (intersectExceptExprs: IndexedSeq[IntersectExceptExpr]) extends XPathElem with Product with Serializable
  123. sealed trait ValueComp extends Comp
  124. final case class ValueExpr (expr: SimpleMapExpr) extends XPathElem with Product with Serializable
  125. final case class VarRef (varName: EQName) extends PrimaryExpr with LeafElem with Product with Serializable
  126. sealed trait Wildcard extends NameTest
  127. sealed trait XPathElem extends ElemLike[XPathElem]

    Any XPath language element

  128. final case class XPathExpr (expr: Expr) extends XPathElem with Product with Serializable
  129. final case class ZeroOrMoreSequenceType (itemType: ItemType) extends SequenceType with Product with Serializable
  130. final case class ZeroOrOneSequenceType (itemType: ItemType) extends SequenceType with Product with Serializable

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. object AbbrevReverseStep extends ReverseStep with Product with Serializable
  21. object AdditionOp
  22. object AnyAttributeTest extends AttributeTest with LeafElem with Product with Serializable
  23. object AnyElementTest extends ElementTest with LeafElem with Product with Serializable
  24. object AnyFunctionTest extends FunctionTest with LeafElem with Product with Serializable
  25. object AnyItemType extends ItemType with LeafElem with Product with Serializable
  26. object AnyKindTest extends KindTest with LeafElem with Product with Serializable
  27. object AnyWildcard extends Wildcard with LeafElem with Product with Serializable
  28. object ArgumentPlaceholder extends Argument with LeafElem with Product with Serializable
  29. object CommentTest extends KindTest with LeafElem with Product with Serializable
  30. object ContextItemExpr extends PrimaryExpr with LeafElem with Product with Serializable
  31. object EmptySequenceType extends SequenceType with LeafElem with Product with Serializable
  32. object ForwardAxis
  33. object GeneralComp
  34. object IntersectExceptOp
  35. object MultiplicativeOp
  36. object NamespaceNodeTest extends KindTest with LeafElem with Product with Serializable
  37. object NodeComp
  38. object Quantifier
  39. object ReverseAxis
  40. object SimpleDocumentTest extends DocumentTest with LeafElem with Product with Serializable
  41. object SimplePITest extends PITest with LeafElem with Product with Serializable
  42. object SlashOnlyPathExpr extends PathExpr with LeafElem with Product with Serializable
  43. object StepOp
  44. object TextTest extends KindTest with LeafElem with Product with Serializable
  45. object UnaryOp
  46. object ValueComp

Inherited from AnyRef

Inherited from Any

Ungrouped