|Ambiguous AST ? email@example.com (2002-03-09)|
|Re: Ambiguous AST ? firstname.lastname@example.org (Ira D. Baxter) (2002-03-11)|
|Re: Ambiguous AST ? email@example.com (Joachim Durchholz) (2002-03-11)|
|Re: Ambiguous AST ? firstname.lastname@example.org (2002-03-11)|
|From:||Joachim Durchholz <email@example.com>|
|Date:||11 Mar 2002 02:17:02 -0500|
|Posted-Date:||11 Mar 2002 02:17:01 EST|
Nicolás Ojeda Bär wrote:
> My question is the following: since I have no way of knowing which
> case it is without symbol table information (which I have not
> collected during parsing time), would it be
> practical/logical/realistic to have an "ambiguous" ast data structure
> (an ast node that doesn't specify which of the two cases I have
> encountered) and then translate that (during semantic analysis) to the
> corresponding data structure (according to the info collected while
> processing the declarations).
It's really not different from type information. It's possible to have
types in the syntax, but nobody does this because it's impractical. Same
with function call vs. variable name: simply call the syntactic entity
"atomic_expression" or "entity" or "name" or whatever suits your
terminology best, and affix the variable/function call distinction just
as you'd affix type information.
Return to the
Search the comp.compilers archives again.