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,540 of 2,753   
   John Williams to All   
   Error handling with Coco/r   
   07 Dec 08 01:38:36   
   
   From: johnwilliams40@live.com   
      
   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?   
      
   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