This is the mail archive of the
mailing list for the Archer project.
Re: Parser rewritting
On 03/30/2010 02:18 PM, Tom Tromey wrote:
Also, there is no good way in bison to disable a production only when
the parsing language is C++. You can play games by returning different
tokens in different modes, or you can run a preprocessor on the grammar,
but both of those are pretty ugly.
Do we really need to worry about C vs C++? How dangerous would it be to
simply assume C++? [I know there is a subtle difference between the two,
I just wonder whether it would matter that much in usage to warrant
treating the two differently/independently.]
I also worry more about three other areas that might influence
1) Java? Okay, we could probably work around this by using the current
parser for java (ick!) [Do we even consider adding java to the mix worth
it? I don't, but that's just my opinion...]
2) Linespec re-evaluation: Let's face it, a number of us have had to
deal with problems in linespec.c, and we all know it's a nightmare.
Anyone (else) interested in moving to expressions-based linespec processing?
3) Symbol table cleanups: I get a sinking feeling that the symbol table
API may need some work before any attempt at writing a new parser my be
Specifically, when a symbol lookup happens, we should get ALL matching
symbols, not just the first one found. [Maybe that's just me?] I know
this was a constant barricade when trying to implement overload
resolution in the parser. And to this day, we cannot implement overload
resolution on a non-class function. A nice side-effect of this: it would
help with symbol completion.
Heck, I might even just settle for something that says there are