anchor.diff:  public void lexerCallCommand(int outerAltNumber, GrammarAST ID, GrammarAST arg) { }
   public void lexerCommand(int outerAltNumber, GrammarAST ID) { }
   
  +protected void enterGrammarSpec(GrammarAST tree) { }
  +protected void exitGrammarSpec(GrammarAST tree) { }
  +
  +protected void enterPrequelConstructs(GrammarAST tree) { }
  +protected void exitPrequelConstructs(GrammarAST tree) { }
  +
  +protected void enterPrequelConstruct(GrammarAST tree) { }
  +protected void exitPrequelConstruct(GrammarAST tree) { }
  +
  +protected void enterOptionsSpec(GrammarAST tree) { }
  +protected void exitOptionsSpec(GrammarAST tree) { }
  +
  +protected void enterOption(GrammarAST tree) { }
  +protected void exitOption(GrammarAST tree) { }
  +
  +protected void enterOptionValue(GrammarAST tree) { }
  +protected void exitOptionValue(GrammarAST tree) { }
  +
  +protected void enterDelegateGrammars(GrammarAST tree) { }
  +protected void exitDelegateGrammars(GrammarAST tree) { }
  +
  +protected void enterDelegateGrammar(GrammarAST tree) { }
  +protected void exitDelegateGrammar(GrammarAST tree) { }
  +
  +protected void enterTokensSpec(GrammarAST tree) { }
  +protected void exitTokensSpec(GrammarAST tree) { }
  +
  +protected void enterTokenSpec(GrammarAST tree) { }
  +protected void exitTokenSpec(GrammarAST tree) { }
  +
  +protected void enterAction(GrammarAST tree) { }
  +protected void exitAction(GrammarAST tree) { }
  +
  +protected void enterRules(GrammarAST tree) { }
  +protected void exitRules(GrammarAST tree) { }
  +
  +protected void enterMode(GrammarAST tree) { }
  +protected void exitMode(GrammarAST tree) { }
  +
  +protected void enterLexerRule(GrammarAST tree) { }
  +protected void exitLexerRule(GrammarAST tree) { }
  +
  +protected void enterRule(GrammarAST tree) { }
  +protected void exitRule(GrammarAST tree) { }
  +
  +protected void enterExceptionGroup(GrammarAST tree) { }
  +protected void exitExceptionGroup(GrammarAST tree) { }
  +
  +protected void enterExceptionHandler(GrammarAST tree) { }
  +protected void exitExceptionHandler(GrammarAST tree) { }
  +
  +protected void enterFinallyClause(GrammarAST tree) { }
  +protected void exitFinallyClause(GrammarAST tree) { }
  +
  +protected void enterLocals(GrammarAST tree) { }
  +protected void exitLocals(GrammarAST tree) { }
  +
  +protected void enterRuleReturns(GrammarAST tree) { }
  +protected void exitRuleReturns(GrammarAST tree) { }
  +
  +protected void enterThrowsSpec(GrammarAST tree) { }
  +protected void exitThrowsSpec(GrammarAST tree) { }
  +
  +protected void enterRuleAction(GrammarAST tree) { }
  +protected void exitRuleAction(GrammarAST tree) { }
  +
  +protected void enterRuleModifier(GrammarAST tree) { }
  +protected void exitRuleModifier(GrammarAST tree) { }
  +
  +protected void enterLexerRuleBlock(GrammarAST tree) { }
  +protected void exitLexerRuleBlock(GrammarAST tree) { }
  +
  +protected void enterRuleBlock(GrammarAST tree) { }
  +protected void exitRuleBlock(GrammarAST tree) { }
  +
  +protected void enterLexerOuterAlternative(AltAST tree) { }
  +protected void exitLexerOuterAlternative(AltAST tree) { }
  +
  +protected void enterOuterAlternative(AltAST tree) { }
  +protected void exitOuterAlternative(AltAST tree) { }
  +
  +protected void enterLexerAlternative(GrammarAST tree) { }
  +protected void exitLexerAlternative(GrammarAST tree) { }
  +
  +protected void enterLexerElements(GrammarAST tree) { }
  +protected void exitLexerElements(GrammarAST tree) { }
  +
  +protected void enterLexerElement(GrammarAST tree) { }
  +protected void exitLexerElement(GrammarAST tree) { }
  +
  +protected void enterLabeledLexerElement(GrammarAST tree) { }
  +protected void exitLabeledLexerElement(GrammarAST tree) { }
  +
  +protected void enterLexerBlock(GrammarAST tree) { }
  +protected void exitLexerBlock(GrammarAST tree) { }
  +
  +protected void enterLexerAtom(GrammarAST tree) { }
  +protected void exitLexerAtom(GrammarAST tree) { }
  +
  +protected void enterActionElement(GrammarAST tree) { }
  +protected void exitActionElement(GrammarAST tree) { }
  +
  +protected void enterAlternative(AltAST tree) { }
  +protected void exitAlternative(AltAST tree) { }
  +
  +protected void enterLexerCommand(GrammarAST tree) { }
  +protected void exitLexerCommand(GrammarAST tree) { }
  +
  +protected void enterLexerCommandExpr(GrammarAST tree) { }
  +protected void exitLexerCommandExpr(GrammarAST tree) { }
  +
  +protected void enterElement(GrammarAST tree) { }
  +protected void exitElement(GrammarAST tree) { }
  +
  +protected void enterAstOperand(GrammarAST tree) { }
  +protected void exitAstOperand(GrammarAST tree) { }
  +
  +protected void enterLabeledElement(GrammarAST tree) { }
  +protected void exitLabeledElement(GrammarAST tree) { }
  +
  +protected void enterSubrule(GrammarAST tree) { }
  +protected void exitSubrule(GrammarAST tree) { }
  +
  +protected void enterLexerSubrule(GrammarAST tree) { }
  +protected void exitLexerSubrule(GrammarAST tree) { }
  +
  +protected void enterBlockSuffix(GrammarAST tree) { }
  +protected void exitBlockSuffix(GrammarAST tree) { }
  +
  +protected void enterEbnfSuffix(GrammarAST tree) { }
  +protected void exitEbnfSuffix(GrammarAST tree) { }
  +
  +protected void enterAtom(GrammarAST tree) { }
  +protected void exitAtom(GrammarAST tree) { }
  +
  +protected void enterBlockSet(GrammarAST tree) { }
  +protected void exitBlockSet(GrammarAST tree) { }
  +
  +protected void enterSetElement(GrammarAST tree) { }
  +protected void exitSetElement(GrammarAST tree) { }
  +
  +protected void enterBlock(GrammarAST tree) { }
  +protected void exitBlock(GrammarAST tree) { }
  +
  +protected void enterRuleref(GrammarAST tree) { }
  +protected void exitRuleref(GrammarAST tree) { }
  +
  +protected void enterRange(GrammarAST tree) { }
  +protected void exitRange(GrammarAST tree) { }
  +
  +protected void enterTerminal(GrammarAST tree) { }
  +protected void exitTerminal(GrammarAST tree) { }
  +
  +protected void enterElementOptions(GrammarAST tree) { }
  +protected void exitElementOptions(GrammarAST tree) { }
  +
  +protected void enterElementOption(GrammarAST tree) { }
  +protected void exitElementOption(GrammarAST tree) { }
  +
   	public void traceIn(String ruleName, int ruleIndex)  {
   		System.err.println("enter "+ruleName+": "+input.LT(1));
   	}
  
positive.code:     ;
  
  optionValue returns [String v]
  @init {$v = $start.token.getText();}
      :   ID
      |   STRING_LITERAL
      |   INT
      ;
  
  delegateGrammars
  	:   ^(IMPORT delegateGrammar+)
  	;
  
  delegateGrammar
      :   ^(ASSIGN label=ID id=ID)	{importGrammar($label, $id);}
      |   id=ID						{importGrammar(null, $id);}
      ;
  
  tokensSpec
  	:   ^(TOKENS_SPEC tokenSpec+)
  	;
  
  tokenSpec
  	:	ID							{defineToken($ID);}
  	;
  
  action
  	:	^(AT sc=ID? name=ID ACTION) {globalNamedAction($sc, $name, (ActionAST)$ACTION);}
  	;
  
  rules
      : ^(RULES {discoverRules($RULES);} (rule|lexerRule)* {finishRules($RULES);})
      ;
  
  
negative.code: 	;
  
  block
  @init {
  	enterBlock($start);
  }
  @after {
  	exitBlock($start);
  }
      :	^(BLOCK optionsSpec? ruleAction* ACTION? alternative+)
      ;
  
  ruleref
  @init {
  	enterRuleref($start);
  }
  @after {
  	exitRuleref($start);
  }
      :	^(RULE_REF arg=ARG_ACTION?)
      	{
      	ruleRef($RULE_REF, (ActionAST)$ARG_ACTION);
  