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,541 of 2,753    |
|    Hans-Peter Diettrich to John Williams    |
|    Re: Error handling with Coco/r    |
|    07 Dec 08 05:32:14    |
   
   From: DrDiettrich1@aol.com   
      
   John Williams schrieb:   
   > I'm using the tool Coco/r to build a grammar for a programming language. My   
   > token section is something like this:   
   >   
   > id = letter { letter | digit }.   
   > integer = digit { digit }   
   > | digit { hexDigit } "H".   
      
   Make your token syntax LL, as supported by CoCo/R.   
      
   The selection amongst decimal and hexadecimal numbers should occur   
   *before* the digits are scanned, e.g. by "$"{hexDigit}, not afterwards.   
   When the lexer has to switch from decimal to hex mode when a hex digit   
   is encountered, a trailing "H" is quite superfluous.   
      
   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