Open sebastianriese opened 11 years ago
Some work done. We implement a mechanism similar to yacc/bison. The rough idea is described in the dragon book: Add an ERROR symbol, when matching an error symbol ignore unmatching tokens, add productions to reduce ERROR on certain look-aheads.
TODO: Thorough testing, useful error messages, useful error reporting mechanism (perhaps related to issue #14, perhaps we should use logging or an error sink interface to be supplied by the user)
Add support for error recovery in the parser. See the Dragon Book for ideas. Good error messages for parsing errors would also be very desirable.