Class LookAheadAssertion

All Implemented Interfaces:
AbstractState<Term,ASTTransition>, RegexASTVisitorIterable, JsonConvertible

public class LookAheadAssertion extends LookAroundAssertion
An assertion that succeeds depending on whether another regular expression can be matched at the current position.

Corresponds to the ( ? = Disjunction ) and ( ? ! Disjunction ) right-hand sides of the Assertion goal symbol in the ECMAScript RegExp syntax.

  • Method Details

    • registerReferencedConditionGroup

      public void registerReferencedConditionGroup(int groupNumber)
    • getReferencedConditionGroups

      public TBitSet getReferencedConditionGroups()
    • copy

      public LookAheadAssertion copy(RegexAST ast)
      Description copied from class: RegexASTNode
      Copy this node only, without any child nodes. The ID and minPath of the copied nodes is left unset.
      Specified by:
      copy in class RegexASTSubtreeRootNode
      Parameters:
      ast - RegexAST the node should belong to.
      Returns:
      A shallow copy of this node.
    • copyRecursive

      public LookAheadAssertion copyRecursive(RegexAST ast, CompilationBuffer compilationBuffer)
      Description copied from class: RegexASTNode
      Recursively copy this subtree. This method should be used instead of CopyVisitor if the copying process is required to be thread-safe. The ID and minPath of the copied nodes is left unset.
      Specified by:
      copyRecursive in class Term
      Parameters:
      ast - RegexAST the new nodes should belong to.
      Returns:
      A deep copy of this node.
    • getPrefix

      public String getPrefix()
      Specified by:
      getPrefix in class RegexASTSubtreeRootNode
    • equalsSemantic

      public boolean equalsSemantic(RegexASTNode obj)
      Specified by:
      equalsSemantic in class RegexASTNode
    • toJson

      public JsonValue toJson()