anchor.diff:  IDENTIFIER
   	:	LETTER (LETTER|'0'..'9')*
   	;
  -	
  +
  +LABEL	:	':' IDENTIFIER ;
  +
   	STRING_LITERAL
       :  '"' ( EscapeSequence | ~('\\'|'"') )* '"'
       ;
  
positive.code: 	:	 (directive  | module_definition | deferred | statement)+ ;
  
  deferred
  	:	declaration | definition;
  	
  directive
  	:	use_directive;
  
  declaration
  	:	constant_declaration
  	|	variable_declaration
  	| 	subroutine_declaration;
  
  constant_declaration
  	:	'const' type_name IDENTIFIER '=' literal ';';
  
  variable_declaration
  	:	type_name IDENTIFIER ';';
  
  subroutine_declaration
  	:	'sub' type_name? IDENTIFIER option* '(' formal_argument_list ')' ';';
  
  option	:	':' IDENTIFIER ('=' STRING_LITERAL)?;
  
  formal_argument_list
  	:
  	| type_name IDENTIFIER (',' type_name IDENTIFIER)*;
  	
  definition
  	:	;
  	
  module_definition
  	:	'module' IDENTIFIER '{' deferred+ '}';
  	
  type_name
  	:	'int' | 'str' | 'num' | 'pmc';
  
  use_directive
  	:	'use' IDENTIFIER ';';
  
  scoped_name	:	IDENTIFIER '::' IDENTIFIER;
  
  name	:	scoped_name | IDENTIFIER;
  
  statement
  	:labeled_statement |	call;
  	
  labeled_statement
  	:	IDENTIFIER ':' statement;
  	
  call	:	name '(' ')' ';';
  
  literal
      :   HEX_LITERAL
  
negative.code: HexDigit : ('0'..'9'|'a'..'f'|'A'..'F') ;
  
  FLOATING_POINT_LITERAL
      :   '-'? ('0'..'9')+ '.' ('0'..'9')* Exponent? 
      |   '-'? '.' ('0'..'9')+ Exponent? 
      |   '-'? ('0'..'9')+ Exponent  
  	;
  
  fragment
  