MatchSet matchOp;
if ( invert ) matchOp = new MatchNotSet(this, setAST);
else matchOp = new MatchSet(this, setAST);
if ( labelAST!=null ) {
String label = labelAST.getText();
RuleFunction rf = getCurrentRuleFunction();
if ( labelAST.parent.getType() == ANTLRParser.PLUS_ASSIGN ) {
defineImplicitLabel(setAST, matchOp);
TokenListDecl l = getTokenListLabelDecl(label);
rf.addContextDecl(setAST.getAltLabel(), l);
}
else {
Decl d = getTokenLabelDecl(label);
matchOp.labels.add(d);
rf.addContextDecl(setAST.getAltLabel(), d);
}
}
if ( controller.needsImplicitLabel(setAST, matchOp) ) defineImplicitLabel(setAST, matchOp);
AddToLabelList listLabelOp = getAddToListOpIfListLabelPresent(matchOp, labelAST);
return list(matchOp, listLabelOp);