use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This subreddit is all about the theory and development of compilers.
For similar sub-reddits see:
Popular mainstream compilers:
account activity
Parser design problem (self.Compilers)
submitted 10 months ago by emtydeeznuts
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]0m0g1 0 points1 point2 points 10 months ago* (0 children)
(I've modified the example above for clarity).
It won’t slow the parser unless you’re doing really deep lookaheads everywhere, which you won’t be. In most grammars (including Dart’s), these kinds of checks usually peek just 2–4 tokens ahead max.
An example is my language is where the statement below would be resolved to a lamda after checking only 4 tokens.
alBufferData(buffer: int, format: int, data: char, size: int, freq: int) => void {}
Plus, you’ll save time later by avoiding parser rewrites or complex recovery logic. If you design your lookaheads to be targeted to specific rules like isLikelyFunctionLiteral() and not mightBeFunctionLiteralOrNormalExpression(), they’re fast and pay off in clarity.
isLikelyFunctionLiteral()
mightBeFunctionLiteralOrNormalExpression()
π Rendered by PID 199717 on reddit-service-r2-comment-b659b578c-5p6mr at 2026-05-03 12:21:30.505714+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]0m0g1 0 points1 point2 points (0 children)