anchor.diff:  	            && _currentRuleType == Token.INVALID_TYPE) { // enter prequel construct ending with an RBRACE
   	        _currentRuleType = PREQUEL_CONSTRUCT;
   	    }
  -	    else if (_type == RBRACE && _currentRuleType == PREQUEL_CONSTRUCT) { // exit prequel construct
  -	        _currentRuleType = Token.INVALID_TYPE;
  +	    else if (_type == ANTLRv4Lexer.OPTIONS && _currentRuleType == ANTLRv4Lexer.TOKEN_REF) {
  +             _currentRuleType = OPTIONS_CONSTRUCT;
  +	    } else if (_type == RBRACE) {
  +	        if (_currentRuleType == PREQUEL_CONSTRUCT) { // exit prequel construct
  +	            _currentRuleType = Token.INVALID_TYPE;
  +	        }
  +	        else if (_currentRuleType == OPTIONS_CONSTRUCT) { // exit options
  +	            _currentRuleType = ANTLRv4Lexer.TOKEN_REF;
  +	        }
   	    }
           else if (_type == AT && _currentRuleType == Token.INVALID_TYPE) { // enter action
               _currentRuleType = AT;
  
positive.code: 
  @members {
      // Generic type for OPTIONS, TOKENS and CHANNELS
      private int PREQUEL_CONSTRUCT = -10;
  
  	/** Track whether we are inside of a rule and whether it is lexical parser.
  	 *  _currentRuleType==Token.INVALID_TYPE means that we are outside of a rule.
  
negative.code: 				_currentRuleType = _type;                 // set to inside lexer or parser rule
  			}
  		}
  		else if (_type == SEMI) {
  		    if (_currentRuleType != OPTIONS_CONSTRUCT) { // ';' in options { .... }. Don't change anything.
  			    _currentRuleType = Token.INVALID_TYPE; // exit rule def
  			}
  		}
  
  		return super.emit();
  