|Semantics make a grammar ambiguous email@example.com (Bill A) (1999-04-26)|
|Re: Semantics make a grammar ambiguous firstname.lastname@example.org (Robert Sherry) (1999-04-29)|
|Re: Semantics make a grammar ambiguous email@example.com (1999-04-30)|
|Re: Semantics make a grammar ambiguous firstname.lastname@example.org (Bill A.) (1999-04-30)|
|Re: Semantics make a grammar ambiguous email@example.com (Tzvetan Mikov) (1999-05-03)|
|Re: Semantics make a grammar ambiguous firstname.lastname@example.org (1999-05-07)|
|Date:||30 Apr 1999 22:58:47 -0400|
|Organization:||Deja News - The Leader in Internet Discussion|
Robert Sherry <email@example.com> wrote:
> The C compilers that I have worked on kept type names in a
> different name space ( symbol table ) then variable names. In
> addition, type names and variable names both came back from the
> scanner as a token of type ID. I gather that your scanner does the
> lookup into the symbol table. This might be the cause of your
> problem. However, if you were to switch to having it return ID for all
> variables and type names you might introduce shift/reduce conflicts in
> your grammar.
This is the method that I'm using - separate type and symbol tables.
Then, you can also add your 'intrinsic' types to the type table and write
kooky stuff like this:
['course this means that your scanner can't lookup symbols in *either* table]
Return to the
Search the comp.compilers archives again.