lookahead

Turning to Semantic Lookahead

In my last post I reported that I had finally fixed the way syntactic lookahead works in JavaCC. This leads to the natural question: what about semantic lookahead? Well, what is historically called semantic lookahead in JavaCC is actually misnamed. It’s really just a bit of java code that is used to determine whether to enter an expansion or not. Something like: …

Turning to Semantic Lookahead Read More »

Bugfix! Nested syntactic lookahead now works correctly!

Fixed a Longstanding Bug Known Issue in JavaCC: Nested syntactic lookahead now works! There is a quite serious bug (let’s just call it by what it is, shall we?) of very long standing in JavaCC. Basically, syntactic lookaheads do not nest. This bug is documented in Theodore Norvell’s JavaCC FAQ, which by the way, is the best …

Bugfix! Nested syntactic lookahead now works correctly! Read More »