[antlr-interest] Re: Positioning input stream (was EOL sequen ce)

Anthony W Youngman Anthony.Youngman at ECA-International.com
Fri Dec 19 02:31:01 PST 2003


I believe there is a FORTRAN grammar somewhere. If you want to know how
to handle fixed length I suspect that would be an excellent example to
study (for those new fogeys out there, semantics are dependent on column
position :-)

Cheers,
Wol

-----Original Message-----
From: mzukowski at yci.com [mailto:mzukowski at yci.com] 
Sent: 18 December 2003 16:53
To: antlr-interest at yahoogroups.com
Subject: RE: [antlr-interest] Re: Positioning input stream (was EOL
sequen ce)


Solution?  Do it in the lexer and switch lexer states when you know
you're
going to read a fixed amount of data.  And before switching call the WS
rule
to read all of the whitespace before the data.  I believe there is a
note on
the antlr website or FAQ or manual about reading fixed length records
for
more details.




***********************************************************************************

This transmission is intended for the named recipient only. It may contain private and confidential information. If this has come to you in error you must not act on anything disclosed in it, nor must you copy it, modify it, disseminate it in any way, or show it to anyone. Please e-mail the sender to inform us of the transmission error or telephone ECA International immediately and delete the e-mail from your information system.

Telephone numbers for ECA International offices are: Sydney +61 (0)2 9911 7799, Hong Kong + 852 2121 2388, London +44 (0)20 7351 5000 and New York +1 212 582 2333.

***********************************************************************************


 

Yahoo! Groups Links

To visit your group on the web, go to:
 http://groups.yahoo.com/group/antlr-interest/

To unsubscribe from this group, send an email to:
 antlr-interest-unsubscribe at yahoogroups.com

Your use of Yahoo! Groups is subject to:
 http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list