Class AnyElementToken


  • public final class AnyElementToken
    extends ElementToken
    special Token that matchs any element. this token is used only for error recovery, to compute "residual of elements of concern"(EoCR). EoCR is defined as follows
     EoCR(exp) := exp/e1 | exp/e2 | ... | exp/en
     
     {ei} = elements of concern
     exp/ei = residual(exp,ei)
     '|' represents choice
     
    • Field Detail

      • theInstance

        public static final Token theInstance
        use this singleton instance instead of creating an object.
    • Constructor Detail

      • AnyElementToken

        private AnyElementToken()
    • Method Detail

      • match

        public boolean match​(ElementExp exp)
        Description copied from class: Token
        returns true if the given ElementExp can consume this token
        Overrides:
        match in class ElementToken