From: Mirko
Subject: How would you parse this file into CL?
Date: 
Message-ID: <627ef74f-3a30-439e-99fa-767d4c6ff63e@p28g2000vbn.googlegroups.com>
I would like to read data from an ascii file that is in the following
(tecplot) format:

TITLE     = "Tecplot DataFile : vg_VolTs_Tecplot_plasma_1.dat"
VARIABLES = "x"
"EMwave_HzReal(A/m)"
"EMwave_Eimag_1(V/m)"
ZONE T="Extracted Points"
 STRANDID=0, SOLUTIONTIME=0
 I=184, J=1, K=1, ZONETYPE=Ordered
 DATAPACKING=BLOCK
 DT=(SINGLE SINGLE SINGLE )
 2.673771381E-01 5.378874540E-01 8.083977699E-01 1.078908086E+00
1.349418521E+00
 1.619928837E+00 1.890439153E+00 2.160949469E+00 2.431459904E+00
2.701970100E+00
 2.972480536E+00 ..... this is part of three sequences of 184 numbers
each.

I can think of a brute force approach (read, see what was read, and
proceed, with some kind of state machine), but is there a package that
may make this easier (other than cl-ppcre, which I know of and love)

Thanks,

Mirko

From: Thomas M. Hermann
Subject: Re: How would you parse this file into CL?
Date: 
Message-ID: <h3g2kn$c84$1@news.eternal-september.org>
Mirko wrote:
> I would like to read data from an ascii file that is in the following
> (tecplot) format:
> 
> TITLE     = "Tecplot DataFile : vg_VolTs_Tecplot_plasma_1.dat"
> VARIABLES = "x"
> "EMwave_HzReal(A/m)"
> "EMwave_Eimag_1(V/m)"
> ZONE T="Extracted Points"
>  STRANDID=0, SOLUTIONTIME=0
>  I=184, J=1, K=1, ZONETYPE=Ordered
>  DATAPACKING=BLOCK
>  DT=(SINGLE SINGLE SINGLE )
>  2.673771381E-01 5.378874540E-01 8.083977699E-01 1.078908086E+00
> 1.349418521E+00
>  1.619928837E+00 1.890439153E+00 2.160949469E+00 2.431459904E+00
> 2.701970100E+00
>  2.972480536E+00 ..... this is part of three sequences of 184 numbers
> each.
> 
> I can think of a brute force approach (read, see what was read, and
> proceed, with some kind of state machine), but is there a package that
> may make this easier (other than cl-ppcre, which I know of and love)
> 
> Thanks,
> 
> Mirko

Back in the day, I think I had a parser for this in some other language 
to remain unnamed. I just wrote a lisp parser for a very similar file, 
the LabVIEW measurement data file. I ended up basically writing a 
recursive descent parser. That is probably your best bet. It shouldn't 
be that hard and the file specification is public and documented.

http://download.tecplot.com/docs/360/dataformat.pdf

Hope that helps,

Tom
From: Mirko
Subject: Re: How would you parse this file into CL?
Date: 
Message-ID: <77ac58eb-7d2f-49e3-9806-77cfdeb7d65d@j19g2000vbp.googlegroups.com>
On Jul 13, 3:35 pm, "Thomas M. Hermann" <··········@gmail.com> wrote:
> Mirko wrote:
> > I would like to read data from an ascii file that is in the following
> > (tecplot) format:
>
> > TITLE     = "Tecplot DataFile : vg_VolTs_Tecplot_plasma_1.dat"
> > VARIABLES = "x"
> > "EMwave_HzReal(A/m)"
> > "EMwave_Eimag_1(V/m)"
> > ZONE T="Extracted Points"
> >  STRANDID=0, SOLUTIONTIME=0
> >  I=184, J=1, K=1, ZONETYPE=Ordered
> >  DATAPACKING=BLOCK
> >  DT=(SINGLE SINGLE SINGLE )
> >  2.673771381E-01 5.378874540E-01 8.083977699E-01 1.078908086E+00
> > 1.349418521E+00
> >  1.619928837E+00 1.890439153E+00 2.160949469E+00 2.431459904E+00
> > 2.701970100E+00
> >  2.972480536E+00 ..... this is part of three sequences of 184 numbers
> > each.
>
> > I can think of a brute force approach (read, see what was read, and
> > proceed, with some kind of state machine), but is there a package that
> > may make this easier (other than cl-ppcre, which I know of and love)
>
> > Thanks,
>
> > Mirko
>
> Back in the day, I think I had a parser for this in some other language
> to remain unnamed. I just wrote a lisp parser for a very similar file,
> the LabVIEW measurement data file. I ended up basically writing a
> recursive descent parser. That is probably your best bet. It shouldn't
> be that hard and the file specification is public and documented.
>
> http://download.tecplot.com/docs/360/dataformat.pdf
>
> Hope that helps,
>
> Tom

Yes, I should have mentioned it that I do have access to the
dataformat file that you quoted.

Thanks,