anchor.diff:   */
   
   /** A grammar for ANTLR v4 written in ANTLR v4 */
  -grammar GrammarParser;
  +grammar ANTLRv4Parser;
   
   // The main entry point for parsing a v4 grammar.
   grammarSpec
   	:	DOC_COMMENT?
  -		grammarType id ';'
  +		grammarType id SEMI
   		prequelConstruct*
  -		ruleSpec*
  +		rules
   		modeSpec*
  -        EOF
  +		EOF
   	;
   
   grammarType
  -	:	'lexer' 'grammar'
  -	|	'parser' 'grammar'
  -	|	'grammar'
  -	;
  -
  +	:	(	LEXER GRAMMAR
  +		|	PARSER GRAMMAR
  +		|	GRAMMAR
  +		)
  +	;
  +
  +// This is the list of all constructs that can be declared before
  +// the set of rules that compose the grammar, and is invoked 0..n
  +// times by the grammarPrequel rule.
   prequelConstruct
  -	:	optionsDef
  -	|	// A list of grammars to which this grammar will delegate certain
  -		// parts of the parsing sequence - a set of imported grammars
  -		imports
  -
  -	|	// The declaration of any token types we need that are not already
  -		// specified by a preceeding grammar
  -		tokenDefs
  -
  -	|	action // e.g., @header or @lexer::header
  +	:	optionsSpec
  +	|	delegateGrammars
  +	|	tokensSpec
  +	|	action
   	;
   
   // A list of options that affect analysis and/or code generation
  -optionsDef
  -	:	'options' '{' (option ';')* '}'
  +optionsSpec
  +	:	OPTIONS (option SEMI)* RBRACE
   	;
   
   option
  -	:	id '=' optionValue
  +	:	id ASSIGN optionValue
   	;
   
   optionValue
  
positive.code: 
  lexerRule
  	:	DOC_COMMENT? FRAGMENT?
  		name=TOKEN_REF COLON lexerRuleBlock ';'
  	;
  
  lexerRuleBlock
  
negative.code: 		|
  		)
  	|	ebnf
  	|	ACTION QUESTION? // SEMPRED is ACTION followed by QUESTION
  	;
  
  labeledElement
  	:	id (ASSIGN|PLUS_ASSIGN)
  		(	atom
  		|	block
  		)
  	;
  
  ebnf:	block blockSuffix?
  	;
  
  blockSuffix
  	:	ebnfSuffix // Standard EBNF
  	;
  