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 20 forks source link

Add >>IMP INCLUDE directive #143

Open engboris opened 3 months ago

engboris commented 3 months ago

Closes #114 and completes FR176 on SourceForge.

A new directive >> IMP INCLUDE FILE_1 ... FILE_n is introduced, allowing to include multiple C headers. Only files with name finishing by .h are allowed.

I'm not sure about that but I marked the feature with /* GnuCOBOL 3.3 extension*/.

GitMensch commented 3 months ago

We don't need two lists, but we need to reset the list for each source file specified on the command line to the state from cobc command line.

Therefore either backup the whole list and restore it (similar to cb_source_format) or just use two lists and reset the second before each new source file. I'm ok with both ways but think the two-list approach is easier to handle.

engboris commented 1 week ago

@GitMensch Could you check this? It was almost finished and it was a rather minor change but I wasn't sure about the tests. Thank you!

GitMensch commented 1 week ago

I've rebased this PR and adjusted the "real" test for IMP INCLUDE. There are still open changes (see review notes), but I'm sure @engboris will have a look at those over the next days (or hours)?