Browsable COBOL 1.0 Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: cobol/bruneliere/extracted
Source used for this grammar: Hugo Brunelière, COBOL 1.0, COBOL.ecore, 2005/08/08

Summary

Syntax

COBOLUsageValue ::=
	[cuv_binary]::ε
	[cuv_dbcs]::ε
	[cuv_double]::ε
	[cuv_display]::ε
	[cuv_float]::ε
	[cuv_index]::ε
	[cuv_objectReference]::ε
	[cuv_packedDecimal]::ε
	[cuv_pointer]::ε
	[cuv_procedurePointer]::ε
COBOLInitialValueKind ::=
	[civk_string_value]::ε
	[civk_low_value]::ε
	[civk_high_value]::ε
	[civk_zero_value]::ε
	[civk_quotes]::ε
	[civk_null]::ε
	[civk_all_literal]::ε
COBOLElement ::=
	COBOLRedefiningElement
COBOLElement ::=
	[level]::String [refined]::Boolean [name]::String [sharedType]::COBOLClassifier [group]::COBOLComposedType [initial]::COBOLElementInitialValue+ [contains]::COBOL88Element+ [source]::COBOLSourceText [array]::COBOLFixedLengthArray
COBOLClassifier ::=
	COBOLSimpleType
COBOLClassifier ::=
	COBOLComposedType
COBOLClassifier ::=
	[typeded]::Boolean [name]::String [typedElements]::COBOLElement+
COBOLSimpleType ::=
	[usageValue]::COBOLUsageValue [pictureString]::String [usage]::Boolean
COBOLComposedType ::=
	[elements]::COBOLElement+
COBOLElementInitialValue ::=
	[initVal]::String [valueKind]::COBOLInitialValueKind
COBOL88Element ::=
	[name]::String [has]::COBOL88ElementValue+
COBOL88ElementValue ::=
	[lowerLimit]::String [upperLimit]::String [range]::Boolean
COBOLRedefiningElement ::=
	[redefines]::COBOLElement
COBOL66Element ::=
	[name]::String [end]::COBOLElement [start]::COBOLElement
COBOLSourceText ::=
	[source]::String [fileName]::String
COBOLFixedLengthArray ::=
	COBOLVariableLengthArray
COBOLFixedLengthArray ::=
	[maxUpper]::Integer
COBOLVariableLengthArray ::=
	[minUpper]::Integer [dependingOn]::COBOLElement
Integer ::=
	integer
String ::=
	string
Boolean ::=
	"true"
	"false"

GrammarLabMaintained by Dr. Vadim Zaytsev a.k.a. @grammarware. Last updated in September 2015. []