Search in sources :

Example 1 with InvokeRule

use of org.antlr.v4.codegen.model.InvokeRule in project antlr4 by antlr.

the class ParserFactory method ruleRef.

@Override
public List<SrcOp> ruleRef(GrammarAST ID, GrammarAST label, GrammarAST args) {
    InvokeRule invokeOp = new InvokeRule(this, ID, label);
    // If no manual label and action refs as token/rule not label, we need to define implicit label
    if (controller.needsImplicitLabel(ID, invokeOp))
        defineImplicitLabel(ID, invokeOp);
    AddToLabelList listLabelOp = getAddToListOpIfListLabelPresent(invokeOp, label);
    return list(invokeOp, listLabelOp);
}
Also used : InvokeRule(org.antlr.v4.codegen.model.InvokeRule) AddToLabelList(org.antlr.v4.codegen.model.AddToLabelList)

Aggregations

AddToLabelList (org.antlr.v4.codegen.model.AddToLabelList)1 InvokeRule (org.antlr.v4.codegen.model.InvokeRule)1