From: mw@fct.unl.pt (Michel Wermelinger)
Newsgroups: comp.lang.pascal
Subject: Re: A pascal language-based editor
Date: 8 Apr 92 13:58:06 GMT
Organization: Universidade Nova de Lisboa -- Lisbon, Portugal

[Sorry for the delay of this reply.]

In article <92088.133259MAB01020@ufrj.bitnet> MAB01020@ufrj.bitnet (Marta Domingos Andrade) writes:

   I would like to know if there is any Pascal language-based
   editor available. If so, please, tell me ...

Well, some years ago I wrote an editor called PEPP (the Portuguese
abbreviation for "To Edit Pascal Programs") which enables one to
quickly write Pascal keywords and to edit the program at the procedure
level, i.e., there is a window showing all procedure headers (useful
whan you don't remember the name of some procedure and what its
arguments are) which you may edit in the following way: if you delete
a header, you're deleting the associated procedure; if you change the
order of the headers, you're changing the order of the procedures; if
you select a header, a second window will show the corresponding
procedure body.

PEPP is written in Pascal itself. It was programmed for the Data
General MV/10000 computer, whose Pascal compiler handles conformant
arrays and data structures over 64Kb big. Besides that, you will only
have to change the I/O procedures, especially the one which reads a
key without echoing. The monitor is assumed to handle the ANSI escape
sequences.

Afterwards I have greatly simplified PEPP and added Wirth's Pascal-S
interpreter (more specifically, the version described by Michael Rees
and Dave Robson in their "Practical Compiling with Pascal-S" book). I
called the result AIPO ("celery" in Portuguese) which stands for
"Introductory Environment for Programming". AIPO has been used in the
past three years by the several hundreds of undergraduate students who
attended introductory courses on programming at this faculty. AIPO has
several advantages:

	- the integration of an editor and an interpreter makes the
	edit-compile-execute cycle very short (indeed, the compilation
	to intermediate code is almost instantaneous);

	- when there are compilation errors, the cursor is positioned
	upon the place where the first one occurred and an error
	message is issued; the student may ask for more help and a
	screenful of text appears explaining the probable source of
	error; if necessary the text will also include information
	about Pascal (e.g. what is an identifier, how to declare
	types, etc.); furthermore, a simple keystroke will move the
	cursor to the next error position.

The major drawback of AIPO is the limited expressive power of Pascal-S
(no files, no subranges, no pointers, no variant records, etc.)
although most of the missing constructs aren't taught at the
introductury level anyway. Nevertheless, AIPO includes facilities to
call the compilers that the computer system supports and to place the
results in another buffer the editor, so you don't have to leave AIPO.

AIPO might interest anyone who has to teach Pascal on a computer with
no decent Pascal environment (like a slow compiler with weird error
messages). PEPP and AIPO are publicly available, as long as they aren't
used for commercial purposes and follow the GNU Public License terms.
Unfortunately, documentation and all messages of both editors are in
Portuguese but if there is enough interest I will translate them. 

--
-------
Michel Wermelinger aka mw@fct.unl.pt
Dept. de Informatica, Univ. Nova de Lisboa, 
Quinta da Torre, 2825 Monte da Caparica, PORTUGAL