Re: Re: software design clarification

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

>> 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.
> 
> You just said that GCC is doing type analysis during parsing.
> Synopsis is doing type analysis during parsing too, right ?

Right. What I'm saying is that Synopsis can't easily call into GCC
for type analysis, as there is a huge number of such calls to be made
for a single translation unit.
What can be done (and what is demonstrated with GCCXML) is that GCC
does the parsing and feeds the results into another tool (such as Synopsis)
for further analysis / processing.

>>  We certainly can't parse in Synopsis, feed the results to
>> GCC for type analysis, and get the final results back.
> 
> That will be naive,
> I said that during parsing, both GCC and Synopsis must either
> fill the, what you call Symbol, or query the name-lookup.
> And both are doing it at same time when questioning what is that token.
> That is, we have done syntax analysis, look at same amount of tokens
> forward and are still stuck, means the thing is ambiguous.
> The ambiguity is resolved by doing semantic analysis.

Yes.

> Following GCC mechanism for semantic analysis will accelerate
> that design section.
> 
> Final result must be homomorphism, will be very very unhappy if not.

Yes. :-)

Regards,
		Stefan

-- 

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