Fw: [antlr-interest] Records - working

Phil Ritchie endigitalmind at yahoo.co.uk
Sun Jul 16 23:11:39 PDT 2006



----- Forwarded Message ----
From: Phil Ritchie <endigitalmind at yahoo.co.uk>
To: antlr-interest at antlr.org
Sent: Monday, 17 July, 2006 6:48:27 AM
Subject: Re: [antlr-interest] Records


----- Original Message ----
From: Terence Parr <parrt at cs.usfca.edu>
To: Antlr Interest <antlr-interest at antlr.org>
Sent: Sunday, 16 July, 2006 11:05:28 PM
Subject: Re: [antlr-interest] Records


On Jul 16, 2006, at 2:53 PM, Phil Ritchie wrote:

> [Using ANTLRWorks 1.0ea11]
>
> I'm creating a grammar to parse a record oriented file. (I know,  
> there are more appropriate ways.) Everything works just dandy for  
> the first record but then parsing stops. I have defined my start  
> rule as:
>
> file    :    record+
>         ;
>
> The whole definition of record appears to be fine so I'm stumped.

Whitespace issue?  Returning newline as a real token on the main  
"channel"?

Ter

Don't you just hate it when software does what you specify and not, when late at night and tired, you just wanted it to pick up on your intentions? ;-)
 
Although I'd added the definition for 'file' (multiple records) to my grammar I was specifying the start rule as 'record'.

Phil.


More information about the antlr-interest mailing list