Syntactical charts of COBOL 61
暂无分享,去创建一个
The detailed specifications of COl:lOt. 6l are to be found in COBOL-6I, Rcci.sed S[Jec(/icaliot,.x J'or a Common Business Oriented Language, published by the U. S. i)epart-merit of lJefense.t Unfort unat(,ly, inlerprelation of these specifications requires extensive searching to locate all of the (lelails of the language. In the early stages of the definition of the Canal compiler for lhe Burroughs BS000, we were eouvinced that a simplitied condensed version of the COBOL speeifiealions would material|3" aid us. [{eeog-nizing that there are strong similarities between certain characteristics of ALGOl, and C()BoL, we devised a (~ot)oL syntactical chart, modeled after the At,(;ot, syntae(ieai chart, e Expressing Col)at, syntax in such a form allows l)recise delinition of the hmguage, att(l achieves a certain degree of sintplifieation througll the elimination of redundancies. The. features of COl;OL which suggest such a. tl'eatlnollt are: 1. COBOl, eonstrucls are defined in terms of other constructs in lhe language (e.g. tile definition of a paragraph is used when defining a section; tit(', definition of a sentence is used when defining a paragraph). 2. Each eOl|strtlet is eon~posed of other t!Ollstrtlels ttlld basic syntbols. Basic symbols are lhe key words, oplional words, and the CaBot, character set, as listed in the COBOL-61 iSpecijicatio~l.s. 3. Each construct has :t fixed numl)er of alt(,rnalive definitions. The construct in many cases is used in its ()wn definition. 4. By substituting all definilions of a eoIlslrtlci, each construe(; is ullintal:ely expressal)le in terms of basic syntbols. In order to express the ('aBeL syntax in eha)'| forni, tt special notation was devised, which may be likene/l to (lad used in the COBOI.-6I NpectJications as follows [see attached Char(1, Boxes (A)-((0]: The two symbols shown in Box (At of Chart I are used inter-ehangea.bly. They eontaili (he COBOL basic symbols. Key words (underlined in the C0130L-61 Spee(lications) appear in boldface type. Optional words-included for readability-appear capitalized in a lighter typef~tee. Letlers, digits, and special char aeters represent themselves. The eirele is also used to refer (o explanatory notes. The name of a construct appears within the syml)ol shown in Box (D), Chart 1, when the construct is initially (lefined. The vertical lines [illustrated in Box (C)] emanating from this syinbol indicate each of the alternatiw~ definitions of the construct. When more than one vertical line appears, a choice aInotlg I he alternatives nmst be made. The wu'tieal lim~s are, thus, simihu, to the braees{ } …
[1] Warren Taylor,et al. A syntactical chart of ALGOL 60 , 1961, CACM.