home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d5xx
/
d512
/
m2pascal.lha
/
M2Pascal
/
src
/
OutModule.def
< prev
next >
Wrap
Text File
|
1991-07-20
|
2KB
|
61 lines
DEFINITION MODULE OutModule;
(*
This module is used as a "go-between" between the processing part of the
the program and the file part of the program.
It keeps track of columns outputed for word wrap which goes into effect
if the object line is a lot longer than the source line and won't fit.
Setting the debug option will print the data that is being sent to the
actual external file to the screen.
*)
FROM scan IMPORT IndentArray, STRING;
PROCEDURE output ( indent : IndentArray ;
word : STRING );
(* If there are blanks in the InFile that we are about to read
then this procedure will tack the blanks on to the back of
of the symbol automatically. If the next character is not a blank
then no blanks are added on to the symbol string
*)
PROCEDURE AddBlanks ( VAR symbol : STRING ) ;
PROCEDURE identical ( s1, s1 : STRING ) : BOOLEAN;
(* Read first options of a one or two option command like so:
INC ( i , 1 ) OR INC ( i )
^^^ ^^^ -> returned value
| | -> ptr to next char.
The comma is read and thrown out in the first case.
*)
PROCEDURE FirstOption ( VAR symbol : STRING );
(* Use to get retrieve a second option of a two option command.
This is used after a call to FirstOption().
Here is a picture :
INC ( i , 1 ) ; OR INC ( i ) ;
| | -> start on entry
| | -> finish on exit
*)
PROCEDURE SecondOption ( VAR symbol : STRING);
(* Put the string "begin" in the output file either on the same line
we've been using or on the next line according to the default
parameters.
*)
PROCEDURE PutBEGIN ( indent : IndentArray );
PROCEDURE WriteIndent ( indent : IndentArray );
END OutModule.