Model classes - JannikArndt/Canal GitHub Wiki
CANAL Model Classes
CobolFile (a real life COBOL file)
|
├── Name (filename without extension)
|
├── Text (original file content)
|
├── FileReference (info about the file, such as:)
│ ├── ProgramName
│ ├── FileExtension
│ ├── Directory
│ ├── FilePath
│ ├── CobolFile (link to parent)
│ └── ReferencedIn (list of procedures that call this file)
|
├── CobolTree (semantic view of the file contents)
| |
│ ├── IdentificationDivision
│ | └── StartIndex, EndIndex (first and last character)
│ |
│ ├── EnvironmentDivision
│ | └── StartIndex, EndIndex (first and last character)
│ |
│ ├── DataDivision
| | ├── StartIndex, EndIndex (first and last character)
│ | ├── WorkingStorageSection
│ | | └── StartIndex, EndIndex (first and last character)
│ | └── LinkageSection
│ | └── StartIndex, EndIndex (first and last character)
│ |
│ └── ProcedureDivision
| ├── StartIndex, EndIndex (first and last character)
| |
| └── Sections (list of all SECTIONs in the PROCEDURE DIVISION)
| ├── StartIndex, EndIndex (first and last character)
| |
| └── Procedures (list of all PROCEDUREs in the SECTION)
| ├── StartIndex, EndIndex (first and last character)
| ├── PerformReferences (all procedures that are performed from this procedure)
| ├── GoToReferences (all procedures that are jumped to from this procedure)
| ├── IsReferencedBy (all other procedures referencing this procedure via PERFORM or GO TO)
| ├── CallReferences (all programs that are called within this procedure)
| └── VariableUsages (all variables in this procedure to how they are used)
|
├── CopyReferences (list of all files that are references via COPY-Statement)
|
├── DivisionsAndSection (contains the character index of all divisions and sections)
|
└── Variables (dictionary of all variables)
|
├── VariableLevel
├── VariableName
├── Picture (PIC X, PIC 9, ...)
├── Variables (children)
├── Redefines (references another variable)
├── Occurs
├── Offset (in bytes)
├── ByteLength
├── ParentVariable (reference to parent)
├── CopyReference (reference to the file where this variable is defined)
├── Index (character where variable is defined, for sorting)
├── VariableDefinition (string representation)
└── Root (goes up the hierarchy to find 01 or 77 element)
Builders
Util.CobolFileBuilder => CobolFile
Util.TextUtil.FindDivisions => DivisionAndSectionFlags
Util.VariablesUtil.AnalyzeVariables => ConcurrentDictionary<string, Variable>