A Scanner for Fixed Column Data

Dave Lloyd <dave@occl-cam.demon.co.uk>
Wed, 13 Sep 1995 09:47:24 GMT

          From comp.compilers

Related articles
A Scanner for Fixed Column Data slm29688@ggr.co.uk (1995-09-01)
A Scanner for Fixed Column Data dave@occl-cam.demon.co.uk (Dave Lloyd) (1995-09-13)
| List of all articles for this month |
Newsgroups: comp.compilers
From: Dave Lloyd <dave@occl-cam.demon.co.uk>
Keywords: lex
Organization: Compilers Central
References: 95-09-043
Date: Wed, 13 Sep 1995 09:47:24 GMT

Sounds like you've got the output of a Fortran program there and should use a
simple Fortran program to read it with some suitable format -
(A6,X4,A40,A9,X3,A4) should do your first line. The other sensible way of
parsing fixed format Fortran output is to read the whole line in and break it
up manually at the column boundaries i.e., line [1:6], line [11:50], etc.
General grammar parsers like flex and bison are not designed for this sort of
horror!


G'luck,
----------------------------------------------------------------------
Dave Lloyd Email: Dave@occl-cam.demon.co.uk
Oxford and Cambridge Compilers Ltd Phone: (44) 1223 572074
55 Brampton Rd, Cambridge CB1 3HJ, UK
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.