at15 / reika

[WIP] A DSL for query and benchmark TSDB
MIT License
1 stars 0 forks source link

[antlr] Support negative number #18

Closed at15 closed 6 years ago

at15 commented 6 years ago

We need negative number, but if we put the sign into the token INT and DOUBLE, it would create trouble for 1 - 2, it is no longer INT MINUS INT, but INT INT.

// what we want
irk> -1
-1 : float
irk > 1 - 2
-1 : float
at15 commented 6 years ago

oops, just tried it again 1 + 2 - 3 is broken .... line 1:3 missing ';' at '-'