anchor.diff:      ;
   
   elementOptions
  +@init {
  +	enterElementOptions($start);
  +}
  +@after {
  +	exitElementOptions($start);
  +}
       :	^(ELEMENT_OPTIONS elementOption[(GrammarASTWithOptions)$start.getParent()]+)
       ;
   
   elementOption[GrammarASTWithOptions t]
  +@init {
  +	enterElementOption($start);
  +}
  +@after {
  +	exitElementOption($start);
  +}
       :	ID								{elementOption(t, $ID, null);}
       |   ^(ASSIGN id=ID v=ID)			{elementOption(t, $id, $v);}
       |   ^(ASSIGN ID v=STRING_LITERAL)	{elementOption(t, $ID, $v);}
       |   ^(ASSIGN ID v=ACTION)			{elementOption(t, $ID, $v);}
  -    ;+    ;
  
positive.code:     
  alternative
  @init {
  	discoverAlt((AltAST)$start);
  }
  @after {
  	finishAlt((AltAST)$start);
  }
  	:	^(ALT element+)
  	|	^(ALT EPSILON)
      ;
  
  lexerCommand
  	:	^(LEXER_ACTION_CALL ID lexerCommandExpr)
          {lexerCallCommand(currentOuterAltNumber, $ID, $lexerCommandExpr.start);}
  	|	ID
  
negative.code: 	;
  
  labeledLexerElement
  @init {
  	enterLabeledLexerElement($start);
  }
  @after {
  	exitLabeledLexerElement($start);
  }
      :   ^((ASSIGN|PLUS_ASSIGN) ID (lexerAtom|block))
  	;
  	
  lexerBlock
  @init {
  	enterLexerBlock($start);
  }
  @after {
  	exitLexerBlock($start);
  }
   	:	^(BLOCK optionsSpec? lexerAlternative+)
      ;
  
  lexerAtom
  @init {
  	enterLexerAtom($start);
  }
  @after {
  	exitLexerAtom($start);
  }
      :   terminal
      |   ^(NOT blockSet)
      |   blockSet
  