LangProc / langproc-2021-lab

2 stars 4 forks source link

Should something like - -2 parse? #88

Open lucianecchi opened 2 years ago

lucianecchi commented 2 years ago

Hi, I am trying to work out a way to properly deal with exponentiation and expressions like -1^-1.5 without having to add a new token type but so far the only way I can think of has as a side effect making - -2 a valid expression. Could it be considered so? Or should it be rejected? Thank you!

ymherklotz commented 2 years ago

Yes I think that's fine, that's a proper math expression, as you are just negating the number twice.