This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc] patch for pr8880


>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:

Tom> c-exp.y does sometimes differentiate the cases; it will emit an
Tom> OP_SCOPE in the qualified case.  I think we do mishandle either
Tom> "::name" or "::name::name" here, in the sense that these aren't
Tom> distinguished from a name without a leading "::".

Sami mentioned that this was handled on expr-cumulative.

I looked, and it does seem to be partially handled, but I think there
are still bugs.  Also, parts of the implementation are bad -- checking
for "::" in lookup_symbol_in_language is a no-no.

I may end up redoing this; if you're actively working in this area, let
me know, and I will back off.

Tom> I've been sort of nosing around PR 9496 and PR 8693, but I haven't
Tom> really committed yet.  There is a big comment before the qualified_type
Tom> production that explains the problem.

Tom> I was thinking that maybe we could try to do more in the lexer and
Tom> differentiate between the kinds of qualified names there.  This is
Tom> probably simplest, though I suspect it may cause us some pain later on.

Tom> The other idea I had was to require bison and somehow use the GLR parser
Tom> feature to let us differentiate the cases.  It is a little hard to see
Tom> exactly how this would work, but I haven't looked at it too deeply yet.

I think in the short term I am going to try hacking the lexer here.
This should let us solve a number of frequently-reported bugs without
undue pain or regressions.

In the longer term, though, we will have to push all this into the
parser, the comment before the use of find_template_name_end explains
why.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]