I did not say that it was analytically ambiguous. My point was that there is
little value, if any in a grammar which basically boils down to

(LTR* NL)* ;

Jim

> -----Original Message-----
> From: William Clodius [mailto:[email protected]]
> Sent: Friday, July 30, 2010 7:40 PM
> To: Jim Idle
> Cc: [email protected]
> Subject: Re: [antlr-interest] Fixed field
> 
> 
> On Jul 30, 2010, at 11:26 AM, Jim Idle wrote:
> 
> > I think that you are barking up the wrong tree here. All your rules
> > are completely ambiguous and if any of the fields do not exactly
> > correspond to the number of letters, this will all fall over. ANTLR is
> > not really meant for parsing fixed width fields where each field is just
some
> arbitrary text.
> > You should just use something like awk to do this, or even a very
> > simple java class that just reads a buffered input stream line by line
> > and picks out the fields.
> >
> > Jim
> <snip>
> 
> Ambiguity is not a problem here, per se. If the grammar were completely
> ambiguous I would expect ANTLR to report problems before he has a chance
> to parse a file. I suspect his specific problem can be fixed by requiring
that
> agenda end with an end of file token. However you are correct that
> automated lexing tools such as ANTLR are not designed for fixed width
fields
> and the convolutions required to handle such fields are as easily handed
by
> handwritten lexers, which in turn are more amenable to error reporting.


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

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to