Skip to content

TechCodeGeneration

Olivier Smedile edited this page Dec 12, 2016 · 4 revisions

Work in progress to explain all cases that CodeGen must handle

|Term |Antlr | What should be done for Alpha| |--- |--- |--- | |Blank line | No | Create a Node and a CodeElement for the whole line | |Debug line | No | Currently Debugging mode is not possible. Create a Node and a CodeElement for the whole line | |Compiler directive on a single line with no other CE | Yes | Parsed by Antlr but no matching CE or Node. Create a Node and a CodeElement for the whole line. | |Compiler directive on a multiple line with no other CE | Yes | Parsed by Antlr but no matching CE or Node. Create a Node and a CodeElement for all lines. |

Category

Input code

Generated code

Blank line

* This is a comment line

Exactly as input

* This is a comment line

Debug line

D This is a Debug line

Exactly as input

D This is a Debug line

Compiler directive

D This is a Debug line

Exactly as input

D This is a Debug line

Compiler directive on a single line with no other Cobol code

replace ==:a:== by ==b==.

Exactly as input

replace ==:a:== by ==b==.

Compiler directive on multiple lines with no other Cobol code

replace ==:a:== 
        by ==b==.

Exactly as input

replace ==:a:== 
        by ==b==.

Compiler directive on a single with other Cobol code

01 MyData. COPY MyCopy.

Exactly as input

01 MyData. COPY MyCopy.

Compiler directive on multiple lines with other Cobol code

01 MyData. COPY 
   MyCopy.

Exactly as input

01 MyData. COPY 
   MyCopy.
Clone this wiki locally