[antlr-interest] "dynamic" whitespace?

Skip Sailors ssailors at wpc-edi.com
Wed Dec 9 15:37:36 PST 2009


Well, interesting thought, thanks.  That defers the problem a bit, but I'm not sure it solves.  I can't pick a static character that will never be used in the message.  If, for instance, I pick '|' as the static line delimiter, and replace all the dynamic ones with this, but there is already a '|' in the message somewhere I am going to find an extra line in the message and my parser trips.  If I first look for all the places where '|' occurs and replace it with a '<' and then replace the delimiter with a '|' I have the same problem with '<', and that strategy seems to spin out of control.

-----Original Message-----
From: Peter Boughton [mailto:boughtonp at gmail.com] 
Sent: Wednesday, December 09, 2009 3:22 PM
To: Skip Sailors; antlr-interest at antlr.org
Subject: Re: [antlr-interest] "dynamic" whitespace?

I'm not an ANTLR expert, but it seems that if you've got fixed width
data like this, then it's best to use regular string processing on the
data first, to extract and convert the dynamic delimiters to static
ones, and after that pass the processed result into ANTLR to do the
rest with?


More information about the antlr-interest mailing list