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 774 of 2,753   
   Hans-Peter Diettrich to Barry Kelly   
   Re: Delphi formal grammar?   
   20 Aug 06 23:51:44   
   
   From: DrDiettrich1@aol.com   
      
   Barry Kelly wrote:   
      
   > Yes, you can't (easily) parse ConstExprs using LL(1) without type   
   > information. Specifically, structured constants are somewhat awkward   
   > to distinguish from parenthesized expressions:   
   >   
   >   var   
   >     x: Integer = (Foo + Bar);   
   >     y: TRecord = (Foo : Bar);   
   >     z: TArray  = (Foo , Bar);   
      
   Good example of the difficulties. Nontheless all these can be summarized   
   as Initializers, with optional elements or repetitions, as indicated by   
   the ":" or ",". If required, a finer distinction between the various   
   initializers can be made when processing the parse trees.   
      
   In contrast to C, I never found symbol table information required for   
   properly parsing OPL sources. More problems arise from the semicolons,   
   introduced by unreflected extensions of the Pascal grammar :-(   
      
   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