Skip to main content

module lang::cobol85::\syntax::Main

rascal-0.43.3
org.rascalmpl.cobol-air-0.1.2

The complete COBOL-85 grammar, with the start nonterminal Cobol85 for a source file.

Usage​

import lang::cobol85::\syntax::Main;

Dependencies​

extend lang::cobol85::\syntax::Program;
extend lang::cobol85::\syntax::ProcedureDivision;
extend lang::cobol85::\syntax::IdentificationDivision;
extend lang::cobol85::\syntax::Condition;
extend lang::cobol85::\syntax::DataDescriptionEntry;
extend lang::cobol85::\syntax::ConfigurationSection;
extend lang::cobol85::\syntax::InputOutputSection;
extend lang::cobol85::\syntax::DataDivision;
extend lang::cobol85::\syntax::Lexical;
extend lang::cobol85::\syntax::Statement;
extend lang::cobol85::\syntax::Expression;
extend lang::cobol85::\syntax::EnvironmentDivision;
extend lang::cobol85::\syntax::FileDescriptionEntry;
extend lang::cobol85::\syntax::ReportSection;

Description​

This is the top module of the grammar. It extends all other syntax modules, including the optional Report Writer, and defines the start nonterminal Cobol85: a source file is a list of one or more programs, each ending with or without END PROGRAM. Clients parse with this start nonterminal, preferably through the parse functions of the Parser module, which run the preprocessor first; the preprocessor fills the margins and glues continuation lines in the way the grammar expects. The Copybook module offers a second start nonterminal for copybooks.

syntax Cobol85​

start syntax Cobol85 = CobolSourceProgram+;