Re: If you were inventing CoBOL...

From: William M. Klein (wmklein_at_nospam.netcom.com)
Date: 09/14/04


Date: Tue, 14 Sep 2004 21:47:03 GMT


> Yes, they do. (For simplicity, I omitted + Punctuation.) I can't think
> of a case where Cobol's procedure division syntax violates English
> syntax. Can you?

Please tell me how the following follows the "rules of English syntax.

  Section-1 Section.
    Paragraph-2.

Other examples,

If A = "B"
    Next Sentence
 .

(Possibly "go to Next-Sentence" would be valid English grammar)

also from the world of "better left behind"

   Go To .
(the altered go to)

What about

  Move Function Current-Date (1:8) to wherever

Or even

Evaluate True
   When A = "B"
    When C = "D"
             Continue
End-Evaluate

wouldn't parse very well in English grammar as I know it

-- 
Bill Klein
 wmklein <at> ix.netcom.com
"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message 
news:icmek0dhec01s1pjkbbg26o6pk6p7ahmdh@4ax.com...
> On Tue, 14 Sep 2004 08:13:02 -0700, "Chuck Stevens"
> <charles.stevens@unisys.com> wrote:
>
> Richard wrote:
>>>>In fact Cobol doesn't have a 'grammar' at all, let alone the English
>>>>one, it has a syntax (which is very much a subset of grammar), and not
>>>>that of English but a highly stylised and contrived one of its own.
>
>>> Vocabulary describes valid combinations of letters to form words.
>>> Syntax describes valid combinations of words to form sentences.
>>> Grammar is Vocabulary + Syntax. It defines a language.
>>
>>I would contend that the Reserved Word List and the rules for formation of
>>COBOL words are suffucient to define the *vocabulary*, that the syntax and
>>general rules are sufficient to define valid "utterances" (in terms of
>>spoken languages) or perhaps better "constructs" in terms of written
>>language and therefore describe the *syntax*.
>>
>>If, as you state, "Grammar is Vocabulary + Syntax", by your own definition
>>the rules of COBOL constitute a *grammar* for that language.
>
> Yes, they do. (For simplicity, I omitted + Punctuation.) I can't think
> of a case where Cobol's procedure division syntax violates English
> syntax. Can you? The rule-breaker is INVOKE (or CALL) taking as its
> object a method name written as a non-gerundial verb. Defenders of
> INVOKE can say 'The standard didn't tell you how to name a method.
> Don't blame Cobol because YOU chose the ungrammatical word.'
>
> INVOKE syntax is not an error, but I see it as a pitfall -- "a hidden
> or not easily recognized danger or difficulty." For this reason, I
> prefer Inline Invocation.
>
> Some might say Inline Invocation and Object Oriented in general break
> the rules of English, because English is not an object-initial
> language. In fact, there are NO object-initial natural languages on
> Earth. (Which explains why the Jedi language sounds alien.) That's not
> 100% true. Counter-examples are "For whom the bell tolls" and "What do
> you treasure?" 


Relevant Pages

  • Re: Misplaced parenthesis
    ... The entire purpose of the parser component of a compiler is syntax ... Now the language, accepted by the compiler, is a subset of the ... grammar that describes an superset of the OPL language. ...
    (comp.lang.pascal.delphi.misc)
  • Re: Running out of breath
    ... > My first language is Finnish. ... > often in English than in Finnish when reading aloud. ... analyze a sentence's syntax and grammar. ...
    (sci.lang)
  • Re: Killing VB softly with his song, Killing VB softly...with a song.............
    ... much less a preference for a compiled language. ... The topic is about syntax and grammar and only ... If you want to limit the discussion to the fact the Java, JavaScript, C#, J# ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Formal grammar & syntax of formal languages
    ... The situation is something like to an algorithm definition. ... The syntax of the language is ... implemets some algorithm, not generative grammar, but recognizing one. ...
    (comp.compilers)
  • Re: _Verum Et Factum Convertuntur_ (or: Surprised By Syntax)
    ... it would not be an adequate substitute for English. ... >distinction that language B makes, then it is 'worse' or 'at a lower level'. ... >> You do not see the importance of syntax, ... >semantics, but it is an analogy or a metaphor: ...
    (sci.lang)