DEFINITION MODULE PicPasses; (* Author .. Sohail Aslam Date .. 08/18/84 Lang .. VAX-11 Modula-2 PassOne implements a recursive descent parser for PIC. Commands are parsed and PicADT routines are invoked to generate a list of PIC elements. After this activity is over, the entire set of PIC commands have been parsed and a ready list of PIC elements created. PassTwo then calls on DrawPictures to do the actual plotting of elements collected in pass one. *) FROM DIG IMPORT GDeviceType; EXPORT QUALIFIED (* VAR *) Pass1Debug, (* PROC *) PassOne, PassTwo ; VAR Pass1Debug : BOOLEAN; PROCEDURE PassOne( EchoCmds : BOOLEAN (* in *)): BOOLEAN; (* This procedure does the the parsing of all the PIC commands until EOF. If echo is true, input commands will be echoed. *) PROCEDURE PassTwo( GfileName : ARRAY OF CHAR (* in *); Device : GDeviceType (* in *); BaudRate : INTEGER (* in *); HardX : REAL (* in *); HardY : REAL (* in *) ); (* This does the actual plotting of the elements. Device can be hp7221, hp7550, hp7580, hp7470, hp7475, hp7220, vt125, tek. HardX and HardY, in inches define the absolute limit for the picture. No element will be drawn outside this boundary. The grahpics commands are written out to GfileName. GfileName is created as a fixed length records file, 512 bytes/rec. The information is written out as binary WORDS. The BaudRate is the speed with which the Computer is to talk to the Graphics device. *) END PicPasses.