|Columns in flex. Regan.Russell@jcu.edu.au (Regan Russell) (1995-01-23)|
|Re: Columns in flex. C.A.Elliott@dcs.warwick.ac.uk (1995-01-27)|
|Re: Columns in flex. email@example.com (Virendra K. Mehta) (1995-01-27)|
|Re: Columns in flex. firstname.lastname@example.org (1995-01-27)|
|Re: Columns in flex. email@example.com (1995-01-31)|
|Re: Columns in flex. firstname.lastname@example.org (1995-01-28)|
|From:||"Virendra K. Mehta" <email@example.com>|
|Date:||Fri, 27 Jan 1995 04:03:55 GMT|
I had written a COBOL parser once for a language translator (which I can't put
in public domain as it is the property of my company). However I came across
the same problem as you did, that of fixed format and column sensitive
characters like '*', '/', '+' which come in the 7th column or the optional
numbers that come in cols 1-6, and the comments that come after column 72 (I
The solution was pretty simple. Since most COBOL implementations allow for
macros (mine was VS-COBOL II for ES/9000), I had to write a preprocessor
anyway. I took care of all these things there, and then generated a free
format output which could be used by the parser.
Later I integrated all that into the main parser itself, but this did seem a
simple and modular approach on the whole.
[ Regan Russell penned : ]
|o| Q: How do I do column sensitive scanning in flex ?
|o| Q: Or should I write my own scanner ?
Virendra K Mehta Wipro Systems Ltd.
Return to the
Search the comp.compilers archives again.