You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2fd35df83a
The prior code constructed the location of nonterminal maches out of the the state of the stream after parsing. This isn't right for a few reasons: 1. It doesn't get starting location correctly. 2. It doesn't behave when the non-terminal production did not actually consume tokens for its parse. This patch modifies the parsers to also pass along a "last-consumed-token"; it, along with a few other changes, provides the parsers enough information to accurately construct the locations, even when no tokens have been consumed during the parse. We synthesize a sentinel last-consumed-token token to take location from the head of the stream. original commit: 6e21e34ec7c7a3e9cf23a3f24bfafd6155e1f14a |
12 years ago | |
---|---|---|
collects | 12 years ago |