r/ProgrammingLanguages • u/compilersarefun • Apr 22 '26
Gecko: a fast GLR parser with automatic syntax error recovery
https://vnmakarov.github.io/parsing/compilers/c/open-source/2026/04/22/gecko-glr.html
12
Upvotes
6
u/TheChief275 Apr 22 '26
The AST node specifying seems like a very interesting idea. However, the current notation reads more like cryptic comments without the additional explanation
7
u/yjlom Apr 22 '26
That's already the name of the Netscape/Firefox web engine, fyi.
1
u/gasche Apr 23 '26
This looks impressive! Some random comments:
{gcc,clag} -fsyntax-only, builds a custom AST that is useful for the compiler after it, and may involve arbitrary computations. The numbers suggest that Gecko is 2-3x faster than these parsers, but how much of that comes from better parsing implementation, and how much comes from doing less work because of lack of semantic actions?