anchor.diff:      ;
   
   NORMALSTRING
  -    :  '"' ( EscapeSequence | ~('\\'|'"') )* '"' 
  +    : '"' ( EscapeSequence | ~('\\'|'"') )* '"' 
       ;
   
   CHARSTRING
  -   :	'\'' ( EscapeSequence | ~('\''|'\\') )* '\''
  -   ;
  +    : '\'' ( EscapeSequence | ~('\''|'\\') )* '\''
  +    ;
   
   LONGSTRING
  -    :	'[' '='* '[' .*? ']' '='* ']'	// TODO: the numbers of '=' should be same
  +    : '[' NESTED_STR ']'
  +    ;
  +
  +fragment
  +NESTED_STR
  +    : '=' NESTED_STR '='
  +    | '[' .*? ']'
       ;
   
   INT
  
positive.code:     ;
      
  LINE_COMMENT
      : '--' ~('\n'|'\r')* '\r'? '\n'-> channel(HIDDEN)
      ;    
      
  WS  
      : [ \t\u000C]+ -> skip
  
negative.code: 
      Lua 5.1 grammar written by Nicolai Mainiero
      http://www.antlr3.org/grammar/1178608849736/Lua.g
  
  I tested my grammar with Test suite for Lua 5.2 (http://www.lua.org/tests/5.2/)
  */
  
  grammar Lua;
  
  chunk
      : block EOF
      ;
  
  block
  