rollup merge of #20310: fhahn/issue-15877-model-lexer-range

This patch for #15877 uses Antlr's input lookahead (`_input.LA(1) != '.'`) to solve the conflict between the LIT_FLOAT and the range syntax.

Note that in order to execute the grammar tests, #20245 should land first.
This commit is contained in:
Alex Crichton 2014-12-29 16:36:55 -08:00
commit 021c2f3712
1 changed files with 2 additions and 1 deletions

View File

@ -112,7 +112,8 @@ LIT_INTEGER
;
LIT_FLOAT
: [0-9][0-9_]* ('.' | ('.' [0-9][0-9_]*)? ([eE] [-+]? [0-9][0-9_]*)? SUFFIX?)
: [0-9][0-9_]* ( '.' {_input.LA(1) != '.'}?
| ('.' [0-9][0-9_]*)? ([eE] [-+]? [0-9][0-9_]*)? SUFFIX?)
;
LIT_STR