|Postscript as a target language? firstname.lastname@example.org (1993-08-08)|
|Re: Postscript as a target language? email@example.com (1993-08-09)|
|Re: Postscript as a target language? firstname.lastname@example.org (1993-08-09)|
|Re: Postscript as a target language? email@example.com (1993-08-09)|
|Re: Postscript as a target language? firstname.lastname@example.org (Chris DONAWA) (1993-08-09)|
|Re: Postscript as a target language? email@example.com (1993-08-10)|
|From:||firstname.lastname@example.org (Ciaran McHale)|
|Organization:||DSG, Dept. of Computer Science, Trinity College Dublin|
|Date:||Mon, 9 Aug 1993 10:39:04 GMT|
email@example.com (Al Stavely) writes:
>[Al is considering the use of PostScript as a target assembly language
>for a compilers course he will be teaching]
>Is this a completely silly idea? Does anyone have any thoughts on this, or
>any experiences to share?
Two disadvantages which I can see are:
o Error handling/reporting is PostScript is rather poor which
can make it difficult to locate errors in the generated code.
You can look on the Adobe ftp site, ftp.adobe.com, in the
Programs directory for some software which will improve the
quality of the error diagnostics but it is still poor relative
to messages one might hope to get from, say, a C compiler such
as "Error on line 245 near `foobar': semicolon was expected".
(In case you don't have ftp access, an automated mail server
mirrors the ftp site; send an email with _just_ "help" in the
Subject: line and an empty text body to
"firstname.lastname@example.org" for further details.
o The PostScript concept of dictionaries means that the binding
of variables is completely independent from which procedure is
currently executing. Your students may find this difficult to
grasp if the only languages with which they are currently
familiar have variables whose lifespan is related to the
lexical scope in which they appear. It _is_ possible to have
the concept of "local" variables in PostScript but you get it
by following a programming convention rather than it being
provided for you automatically by the PostScript interpreter.
Assuming your students are not already familiar with the
concept of dictionaries, I don't know how difficult/easy it
would be for them to grasp the essentials so that they could
be comfortable using dictionaries. I certainly remember
finding it difficult to grasp the concepts involved though I
learned PostScript from books rather than being taught by a
teacher. Alternatively, one _could_ simply ignore this issues
and use just a single dictionary (perhaps the default one
"userdict") thus treating all variables as global.
You might also consider posting to comp.lang.postscript for comments.
---- Ciaran McHale (email@example.com)
\bi/ Dist. Systems Group, Department of Computer Science, Trinity College,
\/ Dublin 2, Ireland. Telephone: +353-1-7021539 FAX: +353-1-6772204
Return to the
Search the comp.compilers archives again.