[antlr-interest] Help with pesky Lexer determinism

Nigel Sheridan-Smith nbsherid at secsme.org.au
Thu Jun 9 22:31:14 PDT 2005


> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Mark Bednarczyk
> Sent: Tuesday, 7 June 2005 10:16 AM
> To: ANTLR Interest
> Subject: RE: [antlr-interest] Help with pesky Lexer determinism
> 
> Well I have another problem that is a little more involved so
> maybe I can just get a couple of quick pointers. Same issue but
> now with IPv6 address that actually steps of the toes on the
> IDENT rule since IPv6 address is comprised of HEX digits so
> 'a'..'f' overlap with IDENT rule of 'a'..'z'.
> 


Here's a first cut attempt at solving these issues (attached)... obviously
you still need some more checks inserted to guarantee that the tokens are
valid.

Also, it doesn't deal with negative numbers (mantissa or exponent).
Furthermore, I have an inkling that IPv4 numbers can be in different forms
(decimal, hexadecimal, dotted and non-dotted forms, etc).

Not sure how much time I will have to finish this for you...

Nigel

--
Nigel Sheridan-Smith
PhD research student

Faculty of Engineering
University of Technology, Sydney
Phone: 02 9514 7946
Fax: 02 9514 2435



-------------- next part --------------
A non-text attachment was scrubbed...
Name: IPv6Test.java
Type: text/java
Size: 424 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20050610/29c57cd4/IPv6Test.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipv6test.g
Type: application/octet-stream
Size: 2567 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20050610/29c57cd4/ipv6test.obj


More information about the antlr-interest mailing list