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 1,045 of 2,753   
   pupeno@pupeno.com to All   
   Production missing on page 9 of Compiler   
   31 Aug 07 17:34:57   
   
   Hello,   
      
   I'm reading Compiler Construction, by Niklaus Wirth, available on   
   http://www.oberon.ethz.ch/WirthPubl/CBEAll.pdf and on page 9 he shows   
   this little piece of BNF:   
      
   E = T | A "+" T.   
   T = F | T "*" F.   
   F = V | "(" E ")".   
   V = "a" | "b" | "c" | "d".   
      
   A is being used on the right hand side without it being defined on the   
   left hand side first. What am I missing?   
      
   The only thing I can think of is that it is missing a production at   
   first, like:   
      
   A = E   
      
   >From this BNF it writes this "programs" (on page 10):   
      
   a*b+c   
   a+b*c   
   (a+b)*(c+d)   
      
   Thanks.   
      
   --- 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