🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.sgml
Article #27

Re: It's Not Just for Text Anymore

#27
From: Aksnes Knut-Havard
Date: Wed, 22 Jul 1992 10:25
45 lines
2835 bytes
>>>>> On Tue, 21 Jul 1992 22:09:35 GMT, drraymon@watdragon.waterloo.edu (Darrell Raymond) said:

>>The BNF used to define Algol and C, and the railroad track diagrams used
>>to define Pascal (and presumably Modula 2) cannot handle the
>>context-sensitive construct DR cited (viz. X**n Y**n) any more than SGML
>>can, but the grammars are still useful for those working with those
>>languages.

>   This example doesn't work for several reasons.  First, the BNF of C 
> doesn't define C - that requires a lot of semantic information as well 
> (I haven't thought about it enough, but it may be that it even requires 
> Turing equivalence).  Second, the construct "X**n Y**n" is in fact 
> context-free.  Third, the construct "ww", which is the one I actually 
> mentioned, has no special semantics in C, or any other programming 
> language that I am aware of - it just means "do w and do w again".  So 
> recognizing it is not important.  Finally, are you confusing two 
> languages? - namely, the language consisting of the set of strings that 
> represent valid C programs (which is context free) and the language 
> accepted by any given C program (which, in general, is recursively 
> enumerable)?

The set of all strings representing valid C programs can not be
described by a context free grammar, a superset of all valid C programs
can be recognised by a context free grammar. To recognize correct C
programs you will need a semantical analysis as well. 

When using context sensitive grammars you can do some type checking
in the syntactical analysis phase.


>>SGML's most serious problems as a practical tool seem to me
>>not its lack of non-CF power but the number of bells and whistles it has.
>  	.
>  	.
>>Darrell, what on earth are you up to now?

>   Trying to establish formal arguments in favor of eliminating bells
> and whistles.  Question: could markup itself be one of them?

> -Darrell. 
--
-------------------------------------------------------------------------------
Name:	Knut-Hevard Aksnes (ECMA 94) or		Knut-Haavard Aksnes (ASCII)
Ericsson signature: HI/ETN/U/IT KNA		Phone: +47 41 19481
Email: etnkna@etn.ericsson.se (internet)  ETN.ETNKNA (memo)
Technical Details
Message-ID: <ETNKNA.92Jul22122415@hisoy2.etn.ericsson.se>
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!unipalm!uknet!mcsun!sunic!ericom!ericom!etnkna
References: <710783547snx@sgmlinc.com> <92202.164904U35395@uicvm.uic.edu> <BrrEw0.MsA@watdragon.waterloo.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!unipalm!uknet!mcsun!sunic!ericom!ericom!etnkna
From: etnkna@hisoy2.etn.ericsson.se (Aksnes Knut-Havard)
Newsgroups: comp.text.sgml
Subject: Re: It's Not Just for Text Anymore
Message-ID: <ETNKNA.92Jul22122415@hisoy2.etn.ericsson.se>
Date: 22 Jul 92 10:25:08 GMT
References: <710783547snx@sgmlinc.com> <92202.164904U35395@uicvm.uic.edu>
 <BrrEw0.MsA@watdragon.waterloo.edu>
Sender: news@ericsson.se
Organization: Ericsson Telecom AS
Lines: 45
In-Reply-To: drraymon@watdragon.waterloo.edu's message of Tue, 21 Jul 1992 22:09:35 GMT
Nntp-Posting-Host: hisoy2.etn.ericsson.se