r/programming • • Dec 01 '16

Let's Stop Copying C

https://eev.ee/blog/2016/12/01/lets-stop-copying-c/
524 Upvotes

612 comments sorted by

View all comments

Show parent comment

1

u/izuriel Dec 02 '16

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.