-
Notifications
You must be signed in to change notification settings - Fork 25
GrammarComposition
The following composition diagrams shows the dependencies between ANTLR grammar files used for parsing TypeCobol source codes.
-
CobolBase: Keywords definition and simple rules describing what contitutes a literal, a figurative constant or a special register
-
CobolCompilerDirectives: Used by the preprocessor. Contains compiler-directing statements.
-
CodeElements: Used by the parser during the syntactic analysis (this first parsing phase build
CodeElements
objects, hence the name). This grammar is really just a link to the real grammar we want the parser to parse:- if we want to parse TypeCobol we include TypeCobolCodeElements
- if we just want to parse Cobol 85 we include CobolCodeElements
-
CobolCodeElements: Rules to build
CodeElements
for the COBOL 85 language. -
Cobol2002CodeElements: Rules to build
CodeElements
for the COBOL 2002 language. This grammar includes the CobolCodeElements grammar and modifies the conflicting rules (because of the new behaviors brought to COBOL 85 by COBOL 2002).Disclaimer: The TypeCobol project doesn't aim at implementing the whole COBOL 2002 specification, but instead just some features that are particulary useful in the context of the TypeCobol language.
-
CobolProgramClass: Used by the parser during the semantic analysis (this second parsing phase build either a
Program
or aClass
object, hence the name). -
TypeCobolCodeElements: Rules to build
CodeElements
for the TypeCobol language. This grammar includes the Cobol2002CodeElements grammar and modifies the conflicting rules (because of the new behaviors brought to COBOL 2002 by TypeCobol).
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