Parser generator toolset for Delphi (Yacc & Lex)
Posted by jpluimers on 2021/08/03
The most current Lex and Yacc for Delphi is [WayBack] GitHub – RomanYankovsky/ndyacclex: Parser generator toolset for Delphi (Yacc & Lex).
It came up during a funny Twitter thread, where one of the Delphi team members asked for it, despite – after decades of asking – there still being no official Delphi grammar available from the Delphi team, nor Google Search skills [WayBack].
Basically a parser generator is only as useful as the grammar you have for it.
There is no open source grammar for Delphi yet, so the best you can start with is from the same author: [WayBack] GitHub – RomanYankovsky/DelphiAST: Abstract syntax tree builder for Delphi
With DelphiAST you can take real Delphi code and get an abstract syntax tree. One unit at time and without a symbol table though.
Relevant tweets:
- [WayBack] Jim McKeeth ❤️ Delphi 🔥🐒🤖🍎 on Twitter: “Is there a better or newer Lex & Yacc for Delphi?”
- [WayBack] CHUA Chee Wee en Twitter: “Challenging just to figure out the Delphi grammar. So, first thing is for RAD Studio docs team to publish the Delphi grammar.… “
- [WayBack] Daniele Teti on Twitter: “Here’s a newer version… “
[WayBack] GitHub – RomanYankovsky/ndyacclex: Parser generator toolset for Delphi (Yacc & Lex).
–jeroen
dummzeuch said
The first two twitter links are broken.