-
Notifications
You must be signed in to change notification settings - Fork 25
ArchitectureGlossary
fm-117 edited this page Dec 16, 2020
·
17 revisions
Some definitions useful to understand the main concepts of TypeCobol:
Concept | Definition |
---|---|
Token | Elementary text part of source code. A token cannot be subdivided, tokens are produced during Scanning step |
SyntaxProperty | Used to associate a Token to a value. It's especially useful for codegen and languageServer |
SymbolDefinition | One or more token used to define something. It can be a variable, a program name, a file name, ... |
SymbolReference | One or more token used to reference something. It can be a variable, a program name, a file name, ... |
URI | Deprecated. It's a duplicate of SymbolReference/SymbolDefinition. It'll be deleted |
StorageArea | Represent a memory zone associated with a reference. |
Variable | Can be a StorageArea or a constant value (like a literal) |
CodeElement | A CodeElement is an object which represent a Cobol statement. Eg. MoveStatement, InitializeStatement. CodeElement cannot be linked together. An IfStatement cannot contains another statement. You have to use Node for that |
Node | A node is usually associated with a CodeElement. Node can be linked together in a tree structure. So you can have an IfNode which contains other Node |
Example:
01 Var1 pic X.
01 Var2 pic X.
move Var1 to Var2
On the first line: 01
, Var1
, pic
, X
, .
are tokens.
See classes : TypeCobol.Compiler.Scanner.Token
and TypeCobol.Compiler.Scanner.Scanner
Example:
01 Var1 PIC X(02) GLOBAL.
The GLOBAL
keyword will be turned into a SyntaxProperty<bool>
which associates the GLOBAL
keyword with the logical value true
. It materializes the presence of the GLOBAL modifier for this data definition.
See classes : TypeCobol.Compiler.CodeElements.SyntaxProperty
and TypeCobol.Compiler.Parser.CodeElementBuilder
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