tzlaine / parser

A C++ parser combinator library.
Boost Software License 1.0
78 stars 12 forks source link

No mechanism to remove individual symbols or clear symbols object. #183

Open vmauery opened 1 month ago

vmauery commented 1 month ago

I have a usage where the symbols needs to be dynamic (add and remove). It is possible to remove them one by one to rebuild the symbols table, but it would be most convenient to just call symbols.clear() and then add back the new symbols.

vmauery commented 1 month ago

I found I was able to clear the symbol table with symbols.parser_.initialelements.clear(); But I fear that this is cheating, using what looks like what would be private/protected elements without knowing the side effects. Also, the interface might be gone when this goes into Boost. That would break things for me again. Please add this clear mechanism.