[antlr-interest] Parsing hexadecimal digits...

BLade X blade_x123 at yahoo.com
Tue Apr 29 11:49:22 PDT 2003


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/ 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dxlexer.g
Type: application/octet-stream
Size: 4741 bytes
Desc: dxlexer.g
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20030429/41fec9b8/dxlexer.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dxfile.g
Type: application/octet-stream
Size: 4151 bytes
Desc: dxfile.g
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20030429/41fec9b8/dxfile.obj


More information about the antlr-interest mailing list