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:
commit
021c2f3712
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user