Search in sources :

Example 1 with WildcardTransition

use of org.antlr.v4.runtime.atn.WildcardTransition in project antlr4 by antlr.

the class ParserATNFactory method wildcard.

/** Build an atom with all possible values in its label. */
@Override
public Handle wildcard(GrammarAST node) {
    ATNState left = newState(node);
    ATNState right = newState(node);
    left.addTransition(new WildcardTransition(right));
    node.atnState = left;
    return new Handle(left, right);
}
Also used : WildcardTransition(org.antlr.v4.runtime.atn.WildcardTransition) ATNState(org.antlr.v4.runtime.atn.ATNState)

Aggregations

ATNState (org.antlr.v4.runtime.atn.ATNState)1 WildcardTransition (org.antlr.v4.runtime.atn.WildcardTransition)1