home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 868 of 2,753   
   Hans-Peter Diettrich to Robert A Duff   
   Re: Generating a simple hand-coded like    
   23 Dec 06 13:37:52   
   
   From: DrDiettrich1@aol.com   
      
   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   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca