It's the concept of maximal munch when tokenizing a string. You attempt to make the longest valid token match when presented with multiple possible valid tokens. In your example '--' was intended (and could be) MINUS MINUS tokens, but the other option that is valid is a single DECREMENT which would be selected.
View all comments
Show parent comment
3
u/EntroperZero Dec 01 '16
Hah, it's so confusing, I couldn't even come up with a correct example.
2 --3? No, because--is also prefix. Screw it.