anchor.diff:            | frequency
             ;
   
  +// http://www.fortran.com/FortranForTheIBM704.pdf#18
   arithmeticFormula : (VAR_ID | FUNC_CANDIDATE | subscript) '=' expression;
   
  +// http://www.fortran.com/FortranForTheIBM704.pdf#19
   uncondGoto   : 'GO' 'TO' statementNumber;
   assignedGoto : 'GO' 'TO' variable ',' '(' statementNumber (',' statementNumber)* ')';
   assign       : 'ASSIGN' statementNumber 'TO' variable;
   computedGoto : 'GO' 'TO' '(' statementNumber (',' statementNumber)* ')' ',' variable;
   
  +// http://www.fortran.com/FortranForTheIBM704.pdf#20
   ifStatement           : 'IF' '(' condition=expression ')' lessThan=statementNumber ','
                           equal=statementNumber ',' greaterThan=statementNumber;
   senseLight            : 'SENSE' 'LIGHT' light=ufixedConst;
  
positive.code: // equal to ufixedConst, but nice to separate semantically
  statementNumber     : NUMBER;
  
  expression : sign? unsigned=unsignedExpression;
  unsignedExpression : '(' expression ')' | variable | subscript | functionCall | ufixedConst | ufloatConst;
  
  functionCall : function=FUNC_CANDIDATE '(' expression (',' expression)* ')';
  
  ufixedConst : NUMBER ;
  ufloatConst : integer=NUMBER? '.' (fraction=NUMBER
                | fractionE=FLOAT_FRAC expSign=sign? exponent=ufixedConst)? ;
  
negative.code: ifDivideCheck         : 'IF' 'DIVIDE' 'CHECK'
                          on=statementNumber ',' off=statementNumber;
  
  // http://www.fortran.com/FortranForTheIBM704.pdf#22
  doLoop       : 'DO' range=statementNumber index=variable '=' first=loopBoundary ','
                 last=loopBoundary (',' step=loopBoundary)?;
  loopBoundary : ufixedConst|variable;
  // http://www.fortran.com/FortranForTheIBM704.pdf#24
  continueStmt : 'CONTINUE';
  // http://www.fortran.com/FortranForTheIBM704.pdf#21
  pause        : 'PAUSE' consoleOutput=ufixedConst?;
  stop         : 'STOP'  consoleOutput=ufixedConst?;
  
  // TODO I/O rules
  // http://www.fortran.com/FortranForTheIBM704.pdf#26
  
  // http://www.fortran.com/FortranForTheIBM704.pdf#37
  dimension   : 'DIMENSION' allocation (',' allocation)*;
  allocation  : var=VAR_ID '(' ufixedConst (',' ufixedConst (',' ufixedConst)? )? ')';
  // http://www.fortran.com/FortranForTheIBM704.pdf#38
  equivalence : 'EQUIVALENCE' group (',' group)*;
  group     : '(' quantity (',' quantity)+ ')';
  quantity    : FUNC_CANDIDATE | VAR_ID ('(' location=ufixedConst ')')?;
  // http://www.fortran.com/FortranForTheIBM704.pdf#39
  frequency   : 'FREQUENCY' estimate (',' estimate)*;
  estimate    : statementNumber '(' ufixedConst (',' ufixedConst)* ')';
  
  // http://www.fortran.com/FortranForTheIBM704.pdf#12
  variable   : VAR_ID | FUNC_CANDIDATE;
  // http://www.fortran.com/FortranForTheIBM704.pdf#13
  subscript  : var=VAR_ID '(' subscriptExpression (','
                              subscriptExpression (','
                              subscriptExpression )? )? ')';
  