uwol / proleap-cobol-parser

ProLeap ANTLR4-based parser for COBOL
MIT License
136 stars 74 forks source link

Format of preprocessed Cobolfiles #19

Closed Reinhard-Prehofer closed 7 years ago

Reinhard-Prehofer commented 7 years ago

Writing the preprocessed Cobolfiles to disk

            CobolPreprocessor.CobolSourceFormatEnum format = CobolPreprocessor.CobolSourceFormatEnum.FIXED;
            String preProcessedInput = new CobolPreprocessorImpl().process(inputFile, copyBookFiles,format);
            File preprocessedFile = new File(cobolFileName + "_preprocessed.cbl");
            FileUtils.writeStringToFile(preprocessedFile, preProcessedInput);

and checking the output, it's a bit unusal that the wrong sequence for an inline comment ist used: >* instead of the ANSI-2005 *> I would recommend to use the ANSI-inline comment format and additionally position the Asterisk ( ) into the 7th column. Currently the '>' sign is in column 7 and '' in column 8 ... thus a compilation of the preprocessed inputfile fails.

       DATE-WRITTEN. >*CE   06.1993.
      >*CE =================================================================
      >*CE     Dieses Programm liest die allgemeinen Vorlaufanweisungen,   *
      >*CE     die ein Programm benötigt.                                  *
...etc...

referring to inline comments of MF-documentation: http://documentation.microfocus.com/help/index.jsp?topic=%2Fcom.microfocus.eclipse.infocenter.studee60ux%2FHRLHLHCPRO01U990.html

uwol commented 7 years ago

Thanks for the pull request! The PR has been merged, thereby should be fixed.