[antlr-interest] "dynamic" whitespace?

Skip Sailors ssailors at wpc-edi.com
Thu Dec 10 00:40:48 PST 2009


Thank you, Jim, that's the sort of thing I was looking for.  These are
EDI records.  I wouldn't say the format wasn't designed for lexing and
parsing, exactly, but I am pretty sure they weren't designed with a
parser generator in mind.

I am going to read up on this @lexer::members{} thing.

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Jim Idle
Sent: Wednesday, December 09, 2009 3:57 PM
Cc: antlr-interest at antlr.org
Subject: Re: [antlr-interest] "dynamic" whitespace?

It seems more likely that this record format was not designed for lexing
and parsing like this and whatever you do it will be a bit of a mess. I
think you just need a trivial program to 'parse' this. I suspect that
you have already spent more time the list than it would have done to
write the program ;-)

However I suspect that you are talking EDI records and I believe that I
already proposed one possible solution for that - nobody came back and
said if it works for EDI formats though. Use markmail search:

http://markmail.org/message/6g3qgvkwog24xep5



Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Peter Boughton
> Sent: Wednesday, December 09, 2009 3:46 PM
> To: Skip Sailors
> Cc: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] "dynamic" whitespace?
> 
> Well it doesn't necessarily have to be a traditional/printed character
> - maybe stuff in low ASCII or high Unicode ranges could be guaranteed
> not to appear?
> 
> Alternatively, as Nick suggests, some form of escaping - e.g. prefix
> all non-delimiting delimiter characters with an escape character, for
> example backslash, and that way, you could safely escape everything
> (with original backslashes would be doubled up).
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address




List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address


More information about the antlr-interest mailing list