[notes]
This is a regression test for #239 "recoursive parser using implicit tokens
ignore white space lexer rule".  https://github.com/antlr/antlr4/issues/239

[type]
Parser

[grammar]
grammar Expr;
prog : expression EOF;
expression
    : ID '(' expression (',' expression)* ')'      # doFunction
    | '(' expression ')'# doParenthesis
    | '!' expression    # doNot
    | '-' expression    # doNegate
    | '+' expression    # doPositiv
    | expression '^' expression  # doPower
    | expression '*' expression  # doMultipy
    | expression '/' expression  # doDivide
    | expression '%' expression  # doModulo
    | expression '-' expression  # doMinus
    | expression '+' expression  # doPlus
    | expression '=' expression  # doEqual
    | expression '!=' expression # doNotEqual
    | expression '>' expression  # doGreather
    | expression '>=' expression # doGreatherEqual
    | expression '\<' expression  # doLesser
    | expression '\<=' expression # doLesserEqual
    | expression K_IN '(' expression (',' expression)* ')'  # doIn
    | expression ( '&' | K_AND) expression# doAnd
    | expression ( '|' | K_OR) expression # doOr
    | '[' expression (',' expression)* ']'# newArray
    | K_TRUE   # newTrueBoolean
    | K_FALSE  # newFalseBoolean
    | NUMBER   # newNumber
    | DATE     # newDateTime
    | ID       # newIdentifier
    | SQ_STRING# newString
    | K_NULL   # newNull
    ;

// Fragments
fragment DIGIT    : '0' .. '9';
fragment UPPER    : 'A' .. 'Z';
fragment LOWER    : 'a' .. 'z';
fragment LETTER   : LOWER | UPPER;
fragment WORD     : LETTER | '_' | '$' | '#' | '.';
fragment ALPHANUM : WORD | DIGIT;

// Tokens
ID     : LETTER ALPHANUM*;
NUMBER : DIGIT+ ('.' DIGIT+)? (('e'|'E')('+'|'-')? DIGIT+)?;
DATE   : '\'' DIGIT DIGIT DIGIT DIGIT '-' DIGIT DIGIT '-' DIGIT DIGIT (' ' DIGIT DIGIT ':' DIGIT DIGIT ':' DIGIT DIGIT ('.' DIGIT+)?)? '\'';
SQ_STRING       : '\'' ('\'\'' | ~'\'')* '\'';
DQ_STRING       : '"' ('\\\\"' | ~'"')* '"';
WS     : [ \t\n\r]+ -> skip ;
COMMENTS        : ('/*' .*? '*' '/' | '//' ~'\n'* '\n' ) -> skip;

[start]
prog

[input]
Test(1,3)

