|YACC Parsing Question email@example.com (Pradeep) (2005-11-08)|
|Re: YACC Parsing Question firstname.lastname@example.org (Jatin Bhateja) (2005-11-12)|
|Re: YACC Parsing Question email@example.com (firstname.lastname@example.org) (2005-11-12)|
|Date:||12 Nov 2005 16:40:29 -0500|
|Posted-Date:||12 Nov 2005 16:40:28 EST|
It looks like you are adding an identifier to the symbol table when
you hit an IDENTIFIER, rather than when you see a declaration. At
that point your parser doesn't know whether it has a function or
variable declaration (or even if it's a usage of the ident, rather
than a declaration). Therefore you aren't marking it as a function or
a variable, and your later code will not necessarily know either. So
it would seems that is likely to be causing your problems.
Anyway, without seeing exactly what you're doing (and also my knowledge
of yacc has waned over the years as well) I can't be sure that's
causing your problems so there are two things i'd suggest you check
1. Ensure that the function declaration/definition is present in the
symbol table by th time you'd need to use it.
2. That you've got a correct lookup function in your symbol table, ie.
you're not performing string equality by address rather than content.
Return to the
Search the comp.compilers archives again.