Related articles |
---|
Parsing Extensible Languages johnl@ima.UUCP (1986-04-10) |
Re: Parsing Extensible Languages johnl@ima.UUCP (1986-04-12) |
Re: Parsing Extensible Languages johnl@ima.UUCP (1986-04-16) |
Relay-Version: | version B 2.10.2 9/12/84; site mit-prep.ARPA |
Posting-Version: | version B 2.10.2 9/18/84; site ima.UUCP |
From: | johnl@ima.UUCP (Compilers moderator) |
Newsgroups: | mod.compilers |
Date: | 16 Apr 86 00:03:51 GMT |
Article-I.D.: | ima.198 |
Posted: | Tue Apr 15 19:03:51 1986 |
Date-Received: | 17 Apr 86 13:02:51 GMT |
Originally-from: | larus@kim.berkeley.edu (James Larus) |
EL1 is an ``extensible'' language, although in practice that term is an
exaggeration. It is extensible in a variety of directions that were
foreseen and planned for by its authors. In practice, I have found
languages like LISP and Smalltalk, which give an ordinary programmer
the same facilities as the system's authors, to be far more easily
extended.
EL1's parsing is done by a conventional SLR (or LALR, I don't remember
which) parser produced by a parser generator written in EL1. The
syntax is extend by allowing a programmer to define ``synonyms'' for
existing keywords in the language. For example, I can say that
FOO <==> IF and BAR <==> THEN, and the statement
FOO A=3 BAR CALL_HOME()
will be parsed into the internal, LISP-like, form just as an IF-THEN
statement would be, except that the keyword IF is replaced by FOO,
etc. A programmer CANNOT extend the language's grammar on the fly.
Expressions are treated similarly. A programmer can define new infix,
prefix, and matchfix operators that have assignable precedence and
associativity.
I believe that if you look at the early work in EL1, they considered
using Early's algorithm, but rapidly gave up the idea as it requires
large amounts of space as well as time. (I am not sure that space is
as much of a problem as it was in the early 70's on a KA10.) One
correction, is that EL1 was Ben Wegbreit's PhD dissertation, not Tom
Cheatham's. Wegbreit published a number of papers on various aspects
of EL1, for example:
Ben Wegbreit, "The Treatment of Data Types in {EL1}", CACM, May 1974,
p251-264.
There was also a programmer's manual available from the Harvard CS
division a couple of years ago. I'm not sure if it is still in print.
For that matter, I'm not sure if EL1 is still running on any machines
anymore.
/Jim, larus@kim.berkeley.edu (James Larus)
--
-----------------------------------------------------------------------------
Send submissions to: ima!compilers
ima is reachable as { ucbvax!cbosgd | ihnp4 | cca | bbncca | think |
uiucdcs | allegra | inmet | yale | harvard }!ima!...
Arpa mail may make it to ima!compilers@CCA-UNIX or ima!compilers@BBNCCA
Return to the
comp.compilers page.
Search the
comp.compilers archives again.