Parsing in Turbo Pascal: TPLex and TPYacc

Hello everybody

I need to translate a family of text files from one format to another
- a bit like making a C to Pascal translator, but much easier. I have
come across the excellent TPLex and TPYacc by Albert Graef (look for (180Kbytes) and Herr Graef's
package contains useful example files, but does not include an example
which directly attacks my problem.

For example, can anyone describe the translation of this toy example

  NAME = Object_1
 TYPE = Integer: length = 32
 TITLE = "Main segment"
    NAME = Object_2
    TYPE = ShortInteger: length = 8
    TITLE = "<sometitle>"

into a similar, but different form like this (B):-

Object heading "Main Segment"
 Name: Object_1
 length = 32
 Object heading "<sometitle>"
  length = 8

I shall be grateful for any help. I can erect correct Lex and grammars
for "lexing" and parsing snippet A, but don't know how to emit the
text for B.

Michael Glover -
(Surrey, UK )
(Change "usss" to "uk" to reply/access web site)