> On 2017-05-03 00:53, Marc Santhoff wrote:
>>  Does such grammar exist?

Well, it depends on what you are trying to solve.
If you want to parse Pascal using FPC - that's one way. 
If you want to get some king of AST using any available [command-line] tools - 
that's another one.

Talking about latter - I would take LPEG (Lua+PEG) and create a parser myself. 
It comes quite simple and intuitive (contrary to LL,LR,LALR,...).
Most of Object Pascal is done right (minus sets/open arrays), so it can be 
parsed statically pretty easily.
See http://lua-users.org/wiki/LpegRecipes for inspiration.

-- 
Regards,
Denis Golovan
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to