anchor.diff:  
   fragment EXP : E DIGITS;
   
  -fragment DIGITS : '0'..'9'*;
  +fragment DIGITS : '0'..'9'+;
   
   fragment E :('e'|'E') ('+'|'-')?;
   
  -fragment WHITE_SPACE    : (' ' | '\r' | '\t' | '\u000C' | '\n')*;+fragment WHITESPACE : (' ' | '\r' | '\t' | '\u000C' | '\n')*;
positive.code:                 | '\\f'
                  | '\\n'
                  | '\\r'
                  | '\\t'     
                  | '\\u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT;
  
  fragment HEX_DIGIT : ('0'..'9'|'a'..'f'|'A'..'F');
  
  NUMBER  : INT FRAC? EXP?;
  
  fragment INT : '-'? DIGITS;
  
  
negative.code:  * Contributors:
   *     Blaise Doughan - 2.4 - initial implementation
   ******************************************************************************/
  
  grammar JSON;
  options
  {
          language=Java;
          output=AST;
  }
  
  OBJECT : '{' (PAIR (',' PAIR)*)? '}';
  
  fragment PAIR : WHITESPACE STRING WHITESPACE ':' WHITESPACE VALUE WHITESPACE;
  
  fragment ARRAY : '[' WHITESPACE (VALUE ( WHITESPACE ',' WHITESPACE VALUE)*)? WHITESPACE ']';
  
  fragment VALUE : STRING
          |        NUMBER
          |        OBJECT
          |        ARRAY
          |        'true'
          |        'false'
          |        'null';
  
  fragment STRING  : '"' CHAR* '"';
  
  fragment CHAR   : ~('"'| '\\')
                  | '\\"'
  