-
Notifications
You must be signed in to change notification settings - Fork 25
TechCodeGeneration
Work in progress to explain all cases that CodeGen must handle
-
The generated code must look as close to the source file
-
For a Cobol 85 source file, the generated code must be exactly the source file
-
Category |
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. |
Introduction
TypeCobol language
-
In a nutshell
-
TypeCobol concepts
TypeCobol Editor
(Type)Cobol parser API
TypeCobol architecture
- Glossary
- Main phases
- How to extend the grammar and semantic check (full example)
- File
- Text
- Code analysis steps
- Program class parser
- Type checker
- Error handler
- Grammars Composition
- Code generation
- Compilation process
(Type)Cobol concepts / reference doc
Contributing