Re: Re: software design clarification

Stefan Seefeld <[email protected]> Wed, 09 May 2007 14:35:51 -0400
Newsgroups gmane.comp.documentation.synopsis
Message-ID <[email protected]>
Gilles J. Seguin wrote:

> GCC and Synopsis parsers are identical at the behavior level.
> For Type analysis Synopsis try to do same thing at same place
> but is doing it partially or not at all.  That means GCC type analysis
> can be hook up on Synopsis, the only major difference now is
> the mangling.

Not quite. Algorithmically they may be similar (well, no wonder as
I basically try to imitate what the 'new' GCC C++ compiler frontend is doing),
but the representations they build during parsing isn't the same (phew ! ;-) )

And, as a good chunk of type analysis has to be done during parsing (at
least when following the GCC model), this can't easily be hooked up.
So, it's really one or the other: if we use gcc as the C++ frontend,
we have to read in the generated representation after the full parsing
is complete. We certainly can't parse in Synopsis, feed the results to
GCC for type analysis, and get the final results back.

FWIW, the picture is basically the same with Keystone (where 'Token Completion'
is used, what Markus appears to be alluding to). Elsa is different, as there
multiple parse tree candidates are kept around, and the correct branch is then
selected later on when some semantic analysis is possible.

Regards,
		Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...