🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #6375

Re: Language Design

#6375
From: Norman Graham
Date: Sat, 01 Apr 1989 00:36
25 lines
1884 bytes
From article <125@ixi.UUCP>, by clive@ixi.UUCP (Clive):
> This approached this problem by defining the grammar using another (context-free)
> grammar (hence the term 'two-level grammar'). This meant that things like not using
> a variable before it was defined were specified in the *grammar* - very nifty.


Of course these two-level grammars are *substantially* more powerful
than context-free grammars.  Two-level grammars are capable of generating
recursively-enumerable sets (ie. those things that can be recognized only
by something with the power of a Turing machine).  This class of languages
is much larger than both the Context-Free and Context-Sensitive languages.

However, Two-level grammars can also be used to generate the Context-Free
and Context-Sensitive languages that we use for programming.  Two-level
grammars provide a compact and elegant (some would say 'cryptic' :-)
notation for the description of programming language syntax without
the need to escape to a natural language.  Personally, I would love
to see more language designers take advantage of this tool.


-- 
Norman Graham                            Oklahoma State University
  Internet:  norman@a.cs.okstate.edu     Computing and Information Sciences
      UUCP:  {cbosgd, rutgers}           219 Mathematical Sciences Building
              !okstate!norman            Stillwater, OK  74078-0599
Technical Details
Message-ID: <4549@okstate.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!osu-cis!netsys!rutgers!okstate!norman
References: <5200040@m.cs.uiuc.edu> <12443@watdragon.waterloo.edu> <125@ixi.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!osu-cis!netsys!rutgers!okstate!norman
From: norman@a.cs.okstate.edu (Norman Graham)
Newsgroups: comp.lang.misc
Subject: Re: Language Design
Summary: Two-level grammars (was Re: Language Design)
Message-ID: <4549@okstate.UUCP>
Date: 1 Apr 89 00:36:09 GMT
References: <5200040@m.cs.uiuc.edu> <12443@watdragon.waterloo.edu> <125@ixi.UUCP>
Organization: Oklahoma State Univ., Stillwater
Lines: 25