[antlr-interest] Re: Parsing hexadecimal digits...

blade_x123 blade_x123 at yahoo.com
Wed Apr 30 10:32:13 PDT 2003


Hi,
 Ignore this message, I solved the problem by moving the parsing to
the lexer.

Thanks,
Manju

--- In antlr-interest at yahoogroups.com, BLade X <blade_x123 at y...> wrote:
> Hi,
>  I have this problem. I am trying to parse a file
> where the hexadeciaml digits don't have a 0x prefix.
> But they only occur in one place (hopefully, that is
> what I am assuming till now and it seems to be valid).
>  I am unable to parse them because my lexer thinks
> they are normal numbers if they start with a digit,
> but it only thinks they are hex if they start with
> a,b,c,d,e or f. I have attached my lexer and parser
> files below.
>  In the parser files the hex digits only occur in
> osfUUID. Also if I make a separate field for
> hexadecimal literals and remove the parsing of hex
> numbers from the normal numeric literals, the programs
> crashes saying abnormal program termination with code
> 03. 
>  I am a newbie to this, so most of my lexer file comes
> from other lexers that are given as examples with
> antlr. So please forgive me if there are any mistakes.
> 
> Thanks in advance,
> Manju
> 
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list