This is the mail archive of the
mailing list for the GCC project.
Re: gcc compile-time performance
- From: Akim Demaille <akim at epita dot fr>
- To: gcc at gcc dot gnu dot org
- Date: 20 May 2002 14:05:55 +0200
- Subject: Re: gcc compile-time performance
- Distribution: world
- Organization: EPITA / LRDE http://www.lrde.epita.fr
- References: <20020518131640.0CB0AF2A59@nile.gnat.com>
>>>>> "Robert" == Robert Dewar <email@example.com> writes:
>> Parsing C/C++ require semantic actions, so some semantic analysis
>> is inherently part of parsing C/C++.
Robert> No, that's certainly incorrect, it is perfectly possible to
Robert> create a context free grammar that represents a superset of
Robert> C++ in the conventional manner.
The sentence is correct, but I fail to make practical sense of it: we
use deterministic parsing methods, and we certainly don't parse the
whole CFG set. Bison will soon be able to address CFG via GLR, but
for the time being, you have to do with LALR(1).
Additionally, you can't say that C++, or even C, are CFG, for
can be a function call or a variable declaration, depending upon the
context. There are definitely not CFG. But I can see your point with
`superset' here, although `superset' is certainly not a very useful
concept, given that `.*' is also a superset of C++, and better yet: of
all the languages GCC supports and will support (yeah! a single
simple parser for all of them :).