anchor.diff:  	;
   
   lexerCommandExpr
  +@init {
  +	enterLexerCommandExpr($start);
  +}
  +@after {
  +	exitLexerCommandExpr($start);
  +}
   	:	ID 
   	|	INT
   	;
   	
   element
  +@init {
  +	enterElement($start);
  +}
  +@after {
  +	exitElement($start);
  +}
   	:	labeledElement
   	|	atom
   	|	subrule
  
positive.code:     ;
  
  elementOptions
      :	^(ELEMENT_OPTIONS elementOption[(GrammarASTWithOptions)$start.getParent()]+)
      ;
  
  elementOption[GrammarASTWithOptions t]
      :	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);}
      ;
negative.code:     ;
  
  actionElement
  @init {
  	enterActionElement($start);
  }
  @after {
  	exitActionElement($start);
  }
  	:	ACTION
  	|   ^(ACTION elementOptions)
  	|   SEMPRED
  