|Recognition of typedefs in C ? firstname.lastname@example.org (David Pereira) (2001-01-18)|
|Re: Recognition of typedefs in C ? email@example.com (2001-01-19)|
|Re: Recognition of typedefs in C ? firstname.lastname@example.org (Anthony PIRON) (2001-01-19)|
|Re: Recognition of typedefs in C ? Joachim.Pimiskern@de.bosch.com (Joachim Pimiskern) (2001-01-19)|
|Re: Recognition of typedefs in C ? email@example.com (Jos A. Horsmeier) (2001-01-26)|
|From:||Joachim Pimiskern <Joachim.Pimiskern@de.bosch.com>|
|Date:||19 Jan 2001 23:28:15 -0500|
|Organization:||Robert Bosch GmbH|
|Posted-Date:||19 Jan 2001 23:28:15 EST|
David Pereira schrieb:
> At first glance, it seemed that building a table of typedef names
> was enough - the lexer would consult this table and return TYPENAME
> if the name was found in this table, otherwise IDENTIFIER.
Use a stack of hashtables. Whenever a new brace is entered, push a new
hashtable onto the stack, and pop it, when leaving a context.
If an identifier cannot be found in the last context, search in the
table before, and so on.
[That's a fine way to handle scopes, but it doesn't help with the
ambiguity between type and variable names. -John]
Return to the
Search the comp.compilers archives again.