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,545 of 2,753   
   vrotaru.md@gmail.com to John Williams   
   Re: Error handling with Coco/r   
   13 Dec 08 10:15:05   
   
   On Dec 7, 2:38 am, John Williams  wrote:   
   > 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".   
   >   
   > The problem is that a wrong hexadecimal number in an assignment such as "a   
   :=   
   > 32GH;" is identified as an error by the syntax analyzer. I would like to   
   > produce a more meaningful message such as "invalid hexadecimal" so I think   
   I   
   > need to detect errors at lexer level. Is there any option in Coco/r or   
   should   
   > I have to modify the scanner by hand?   
      
   I've played a bit lately and I guess you can probably modify the   
   Scanner.frame. I did it with the purpose of switching off some   
   spurious warnings.   
      
   --- 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