home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
archives
/
computervision.tar.gz
/
computervision.tar
/
kermit.parser
< prev
next >
Wrap
Text File
|
1987-02-19
|
3KB
|
103 lines
; 16 aug 85 esj remove server commands that were added as aliases
; 12 aug 85 esj add extra aliases
; 6 aug 85 esj set dot count to 0 on every command
; 26 jly 85 esj detach kermit port on quit.
* 15-Jul-85 lec; TPL conversion.
;--------------------------------------< parser >---------------------------
E:F
E'O PARSER.
;----------------------------------------------------------------------------
;
; Purpose
; the main parser at the command level of kermit
; Input
; none
; Output
; none
; Inserts
/INCLUDE BYU.PROG.KERMIT.SYM.EQU.KERDEF
; Globals
G'L HOSTON
G'L DODOTCT
; Locals
I'R BLIN(132)
I'R STATUS
I:R OPTION(4)
; Method
; initialize keyword character string
; convert character string to integer array with an EOS at end
; of the integer array
; do forever
;---------------------------< start of code >-------------------------------
STATUS=YES
W'E (STATUS.EQ.YES)
; set dot count to 0
DODOTCT = 0
W'R HOSTON .E. YES
; when running local kermit, put prompt in caps
E'E TYPOUT.(9, $KERMIT-CV$)
O'E
; when running remote kermit, put prompt in lowercase
E'E TYPOUT.(9, $kermit-cv$)
E'L
W:R NEWCMD.($> $,1,0) .G. 0
E:E IDENT.(OPTION)
;it is the keyword CONNECT
W'R COMPNAM.(OPTION,$CONNECT $) .E. 0 .OR.
1 COMPNAM.(OPTION,$CON $) .E. 0 .OR.
1 COMPNAM.(OPTION,$C $) .E. 0
E'E SCONNECT.
;it is the keyword QUIT or EXIT
O'R COMPNAM.(OPTION,$QUIT $) .E. 0 .OR.
1 COMPNAM.(OPTION,$EXIT $) .E. 0 .OR.
1 COMPNAM.(OPTION,$Q $) .E. 0 .OR.
1 COMPNAM.(OPTION,$E $) .E. 0
E'E DETACH.($KM$)
E:E TYPEMSG.($Leaving KERMIT now...!$)
STATUS = $NO$
;it is the keyword HELP
O'R COMPNAM.(OPTION,$HELP $) .E. 0
E'E SHELP.
;it is the keyword RECEIVE
O'R COMPNAM.(OPTION,$RECEIVE $) .E. 0 .OR.
1 COMPNAM.(OPTION,$REC $) .E. 0 .OR.
1 COMPNAM.(OPTION,$R $) .E. 0
E'E SRECEIVE.
;it is the keyword SET
O'R COMPNAM.(OPTION,$SET $) .E. 0
E'E SSET.(BLIN)
;it is the keyword SEND
O'R COMPNAM.(OPTION,$SEND $) .E. 0
E'E SSEND.
;it is the keyword STATUS
O'R COMPNAM.(OPTION,$STATUS $) .E. 0
E'E SSTATUS.
O'E
E:E TYPEMSG.($Unrecognized command type "HELP"!$)
E'L
E:L
E'W
F'N
E:N