[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [open-cobol-list] pretty print
From: |
john Culleton |
Subject: |
Re: [open-cobol-list] pretty print |
Date: |
Fri, 17 Aug 2012 09:51:40 -0400 |
On Thu, 16 Aug 2012 17:33:13 -0600
Michael Welter <address@hidden> wrote:
> Hello,
>
> I would like to parse my COBOL program (with COPY statements) and
> then traverse the parse tree and pretty print the COBOL.
>
> Is there a plugin interface to OC?
> Can anyone point me to a section of the code that traverses the parse
> tree?
>
> Thanks
> Mike
>
A COBOL program in source form is a text file. I suggest that you
write a COBOL program that takes a given source file as input and
then opens each copy statement in turn, adding its code to the
output, and when a copy statement is encountered then closing the
current file, opening the copy file encountered etc. In other
words one can write a COBOL program to do what you want.
When you complete that task I hope you share it with the rest of
us.
--
John Culleton
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
Police Procedural and Expose: "Death Wore Black"
"Create Book Covers with Scribus"
http://www.booklocker.com/books/4055.html