From: | Hans-Peter Diettrich <DrDiettrich1@aol.com> |
Newsgroups: | comp.compilers |
Date: | 23 Dec 2006 13:37:52 -0500 |
Organization: | Compilers Central |
References: | 06-09-029 06-09-042 06-09-048 06-09-060 06-09-078 06-09-093 06-12-064 06-12-066 06-12-071 06-12-089 |
Keywords: | parse |
Posted-Date: | 23 Dec 2006 13:37:52 EST |
Robert A Duff wrote:
> Therefore, we don't know (based purely on a context-free grammar)
> whether Y is a subtree of the call or not. We don't even know how
> many nodes there are (call, indexing, call and indexing, dereference
> and call and indexing). Therefore, we must restructure the tree (a
> little) based on semantic information.
When in Ada *intentionally* the syntax for calls and array indexing is
the same, a parser IMO should produce the same tree structure for both
cases. Different handling is required only in further compiler stages
(semantical checks, code generation...), which could work with tree
node attributes, instead of restructuring the parse tree.
DoDi
Return to the
comp.compilers page.
Search the
comp.compilers archives again.