I am learning parsing, bison & lex. I am looking for a clear & complete tutorial/example that demonstrates all of:
- C++ (not C) Abstract Syntax Tree.
- Re-entrant lexer.
- Re-entrant parser.
- Reading from a string (vs. from file) would be nice as well.
I have found multiple examples and tutorials, but each typically meets only few of the above requirements. So far my best tutorial is from Chapter 3-2 in the Oreilly book by John Levine - it has AST; all C though, meets only Re_1 above. I welcome recommendations for nice examples / tutorials, real life open source projects. For example I saw MySql .yy file - looks well written, but too big/complex for beginner like me.