OCamlPro / gnucobol

A clone of the sourceforge GnuCOBOL compiler from COBOL to C.
https://get-superbol.com
GNU Lesser General Public License v3.0
16 stars 21 forks source link

Allow use of external cobc specific preprocessor #80

Closed lefessan closed 1 year ago

lefessan commented 1 year ago

The external preprocessor has to be cobc-aware, i.e. add #area_a directives and remove some paragraphs from the IDENTIFICATION DIVISION.

The basic idea here is that GnuCOBOL preprocessor is not fully compliant to the standard, and making it compliant would require completely rewriting that part. Instead, we propose to give the user the possibility to use another external preprocessor in such cases.

GitMensch commented 1 year ago

As long as there's no free "cobc aware COBOL preprocessor" this Feature Request (FRs should be always created in the GC issue tracker) won't be considered.

And in general it would be more useful to make the preparser working completely instead.

GitMensch commented 1 year ago

Note: especially with make files it is easy to first call the own preprocessor (writing a _p.cob or similar, or even do cobc-intended bigger pre-processing creating a .i file) and then cobc.

Also note that make works quite nice, especially when you include the dependency chain, which is possible via -MT -MD.