On Sun, 2025-02-16 at 13:08 -0500, Paul Koning via cctalk wrote: > Parsing -- splitting text into tokens (lexing) and building parse > trees -- is part of the compiler's job but usually the easiest part. > Not quite as easy if you want good error messages or error recovery.
I put an LR parser generator that includes Tom Pennello's Forward Move Algorithm for error recovery at https://sourceforge.net/projects/lr-and-lex-gen-fortran/files//?upload_just_completed=truehttps://sourceforge.net/projects/lr-and-lex-gen-fortran/files// It uses Dave Pager's algorithm to generate LALR where possible, and LR where necessary, that is, when states with identical core cannot be merged because of lookahead conflicts. I stopped working on it when I retired. The full exploitation of the extra information in the LR table isn't implemented in the simple parser inside of the parser generator.