Re: Syntax ???
docdwarf_at_panix.com
Date: 03/19/04
- Next message: Vaclav Snajdr: "Re: Linux Cobol Compiler"
- Previous message: Richard: "Re: Perfrom Thru"
- In reply to: William M. Klein: "Re: Syntax ???"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 18 Mar 2004 19:11:08 -0500
In article <D%p6c.47066$aT1.14038@newsread1.news.pas.earthlink.net>,
William M. Klein <wmklein@nospam.netcom.com> wrote:
>The following is from the 2002 ISO Standard (and really did NOT have an exact
>equivalent in any eariler Standard). There was actually a LOT of work done on
>this set of wording - and it still doesn't really answer the question from the
>other thread.
>
>"5.2.1 Syntax rules
>Syntax rules supplement general formats, identify equivalent words, and define
>or clarify the order in which words or elements may be written to form larger
>elements such as phrases, clauses, or statements.
This sounds remarkably close to the http://www.m-w.com definition of
'syntax' as 'the way in which linguistic elements (as words) are put
together to form constitutents (as phrases or clauses')'
>Syntax rules may also impose
>restrictions on individual words or elements, relax restrictions implied by
>words or elements, or define a term that may be used in the remaining syntax
>rules.
>
>The rules of the PICTURE clause specified in 13.16.38.5, Precedence rules, are
>syntax rules.
This appears to agree with my response to Mr Willm in which I mentioned
the data-type changing syntax (in that the target field of a COMPUTE must
be numeric/numeric-edited).
>
>When syntax rules specify that a word is synonymous with, an abbreviation for,
>or equivalent to another word (or words), those words may be written
>interchangeably and have the same meaning."
>
>This definition was added (in part) because the 2002 Standard introduces a
>totally new requirement (believe it or not) that a compiler MUST "flag" invalid
>syntax.
To hack up the annoying 'That was then, this is now'... this is now, what
was that, then? The COBOL mentioned by Mr Stevens is thirty years old...
is it possible that there's been no standard of COBOL syntax ever, before
now?
[snip]
>There are rules in standard COBOL that are not identified as general formats or
>syntax rules, but nevertheless specify elements that are syntactically
>distinguishable.
Here, at least, is a definite statement: there are rules in standard COBOL
that are not identified as syntax rules. It does not state whether there
are rules in standard COBOL which *are* identified as syntax rules... so
my question of 'where is the syntax of COBOL defined?' remains unanswered.
[snip]
>There are general rules in standard COBOL that could have been classified as
>syntax rules.
And once again... something that 'could have been classified as syntax
rules'... but nothing about 'that which has been classified as syntax
rules'. (I am considering, at present, 'syntax' and 'syntax rules' to be
equivalent terms given the citing from www.dictionary.com, AHD 2. Computer
Science. The rules governing the formation of statements in a programming
language)
Mr Klein has already asserted that neither the ANSI Standard of 1974 nor
the ANSI Standard of 1985 "define" (quotations original) syntax... and my
question of 'where, then *is* (or was) it defined?' seems still to be
unanswered. It would be *most* droll if no answer is found, if there is
nothing which can be pointed to and described as 'there is where the
syntax of COBOL is defined'...
... because if the syntax is undefined how, then, can anyone speak of a
syntax error?
DD
><docdwarf@panix.com> wrote in message news:c3btfj$soe$1@panix1.panix.com...
>> In article <l946c.26360$%06.10908@newsread2.news.pas.earthlink.net>,
>> William M. Klein <wmklein@nospam.netcom.com> wrote:
>> >A follow-up on another thread.
>> >
>> >As the '85 (much less '74) Standard does not "define" syntax, I wanted to add my
>> >two (or more) cents to a discussion of what is and is not a "syntax error" in an
>> >'85 Standard conforming compiler.
>>
>> How interesting... before considering this bit o' small change, Mr Klein,
>> would you be so kind as to say *where* the syntax ('syntax' being used in
>> the sense of '1 a : the way in which linguistic elements (as words) are
>> put together to form constitutents (as phrases or clauses') *is* defined?
>>
>> Such a thing does not spring, fully-formed, from some Divine brow... or is
>> it possible, then, that my example of 'PERFORM PARA-A THRU PARA-C IN ORDER
>> GIVING RESULT-FIELD' is, in fact, syntactically valid?
>>
>> (A quick web-search reveals that 'The vendor independent ANSI COBOL
>> committee legislates formal, non-vendor-specific syntax and semantic
>> language standards.' from
>> http://www.csis.ul.ie/cobol/Course/COBOLIntro.htm ... but this is,
>> admittedly, an intro-level course and such things might be taught as a
>> matter of simplicity.)
>>
>> DD
>>
>
>
- Next message: Vaclav Snajdr: "Re: Linux Cobol Compiler"
- Previous message: Richard: "Re: Perfrom Thru"
- In reply to: William M. Klein: "Re: Syntax ???"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|