From: Tom Tromey <tromey@redhat.com>
To: Sami Wagiaalla <swagiaal@redhat.com>
Cc: archer@sourceware.org
Subject: Re: [rfc] patch for pr8880
Date: Thu, 11 Feb 2010 21:00:00 -0000 [thread overview]
Message-ID: <m3hbpnqyhv.fsf@fleche.redhat.com> (raw)
In-Reply-To: <m3zl3iyocn.fsf@fleche.redhat.com> (Tom Tromey's message of "Tue, 09 Feb 2010 16:35:20 -0700")
>>>>> "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
next prev parent reply other threads:[~2010-02-11 21:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-08 16:35 Sami Wagiaalla
2010-02-08 17:30 ` Tom Tromey
2010-02-09 19:23 ` Sami Wagiaalla
2010-02-09 23:35 ` Tom Tromey
2010-02-11 21:00 ` Tom Tromey [this message]
2010-02-12 15:44 ` Sami Wagiaalla
2010-02-18 19:45 ` Sami Wagiaalla
2010-02-19 23:23 ` Tom Tromey
2010-02-22 16:37 ` Sami Wagiaalla
2010-02-23 22:32 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3hbpnqyhv.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=archer@sourceware.org \
--cc=swagiaal@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).