SQLite Forum

lemon - optional namespace support
Login
> His LALR parser is a joy to use (and read rules written for) compared to yacc or bison.

100% agreed!

> Please appreciate that my suggestions are not intended as "a better way" from a pure programming perspective. Rather, I had hoped that an even less extensive set of changes would enhance the prospects for Lemon becoming a more general purpose tool without first splitting from the SQLite project.

Yes, that was exactly what I was originally aiming for. It took another nudge from Richard for me to realise that since I was only ever using an anonymous namespace anyhow, we could just as well just support `static` for internal linkage and the job is already done.

I am personally not a fan of the various C++ wrapping for these types of tools anyhow. They are either awkward, out-of-sync or don't match anything close to my usage. With Lemon, I found that I can pack all of my heavy data into my own classes as `%extra_context`, define my own `%token_type` and then the rest of handling Lemon in my class is trivial (max 10 lines of wrapping).