Google
 

Trailing-Edge - PDP-10 Archives - integ_tools_tops20_v7_30-apr-86_dumper - tools/com/pli.edt
There are 3 other files named pli.edt in the archive. Click here to see a list.
SET truncate
SET search unbounded
set mode change
define key control R as "S/?'Old/New: '/."
define key control G as "SN."
define key 3 as 'ext set scr 80.'
define key gold 3 as 'ext set scr 132.'
! PLI.EDT - PL/I language synthesizer
!
! ************ TEST CONSTRUCTS ************
!
!	GOLD A means insert "select/case action label"
def key GOLD A as 'tc  i[/*%(action label)%*/]: ^M ti tab i/*%(action expr)%*/; ^M ^M td tab i/*%(action line)%*/ -"[".'
!
!	GOLD C means insert "CASE" template
def key GOLD C as 'tc  iCASE /*%(case-index)%*/ FROM /*%(ctce)%*/ TO /*%(ctce)%*/ OF ^M tab iSET ^M ^M tab i[/*%(action label)%*/]: ^M ti tab i/*%(action expr)%*/; ^M ^M td tab i/*%(case line)%*/ ^M tab iTES; -"CASE %" +"%".'
!
!	GOLD I is used to insert "IF...THEN...ELSE" construct
def key GOLD I as 'tc  iIF /*%(if-expr)%*/ ^M tab iTHEN ^M ti tab i/*%(then-clause)%*/ ^M td tab iELSE ^M ti tab i/*%(else-clause)%*/ td -"IF /" +"/".'
!
!	GOLD S is used to insert a "SELECTONE" template
def key GOLD S as 'tc  iSELECTONE /*%(selector)%*/ OF ^M tab iSET ^M ^M tab i[/*%(action label)%*/]: ^M ti tab i/*%(action expr)%*/; ^M ^M td tab i/*%(select line)%*/ ^M tab iTES; ^M -"SELECTONE %" +"%".'
!
!	GOLD T is used to insert an "IF...THEN" template
def key GOLD T as 'tc  iIF /*%(if-expr)%*/ ^M tab iTHEN ^M ti tab i/*%(then-clause)%*/ td tab -"IF /" +"/".'
!
! ************ Loop Control ************
!
!	GOLD E is used to insert a "DO...WHILE" template
def key gold E as 'tc  iDO WHILE( /*%(while-test)%*/ ); ^M ti tab i/*%(loop-body)%*/ ^M td tab iEND; -"DO" +"/".'
!
!	GOLD L is used to insert a "DO...UNTIL" template
def key gold L as 'tc  iDO UNTIL( /*%(until-test)%*/ ); ^M ti tab i/*%(loop-body)%*/ ^M td tab iEND; -"DO" +"/".'
!
!	GOLD N is used to insert an "counted DO loop" template
def key GOLD N as 'tc  iDO /*%(loopvar)%*/ = /*%(first)%*/ TO /*%(last)%*/ BY /*%(increment)%*/; ^M ti tab i/*%(loop body)%*/ ^M td tab iEND; -"DO" +"/".'
!
!	GOLD U is used to insert a "counted DO...UNTIL" template
def key GOLD U as 'tc  iDO /*%(loopvar)%*/ = /*%(first)%*/ TO /*%(last)%*/ BY /*%(increment)%*/ UNTIL( /*%(until-test)%*/ ); ^M ti tab i/*%(loop body)%*/ ^M td tab iEND; -"DO" +"/".'
!
!	GOLD W is used to insert a "counted DO...WHILE" template
def key GOLD W as 'tc  iDO /*%(loopvar)%*/ = /*%(first)%*/ TO /*%(last)%*/ BY /*%(increment)%*/ WHILE( /*%(while-test)%*/ ); ^M ti tab i/*%(loop body)%*/ ^M td tab iEND; -"DO" +"/".'
!
! ************ Block Templates ************
!
!	GOLD B means insert "BEGIN...END" block
def key GOLD B as 'tc  iBEGIN; ^M tab i/*%(block-body)%*/ ^M tab iEND; -"BEGIN" +"/".'
!
!	GOLD D means insert "DO...END" block
def key GOLD D as 'tc  iDO; ^M tab i/*%(block-body)%*/ ^M tab iEND; -"DO" +"/".'
!
!
!   Multi-language Functions (tailored for PL/I)
!
!--
!+
!   Major Template Function
!-
!   GOLD = -- insert a template
DEFINE KEY GOLD %= AS "(+c-c^M-c)i ^M ext inc EDT$PLI_TEMPLATE:?'Major template: '.PLI ; c ; d-c -'' dl +'%(/*'."
!+
!   Syntactic Marker Functions
!-
!	GOLD /  is used to locate and delete Syntactic Marker
def key GOLD / as "(KS +'/*%(' +c) d+')%*/' d-c d+4c."
!
!	GOLD . is used to locate Syntactic Marker
def key GOLD . as "'/*%('."
!
!	GOLD > is used to insert Syntactic Marker
def key GOLD > as "(i/*%(  )%*/ -5c)."
!
!+
!   Special RETURN Functions
!-
!   GOLD ! -- insert a comment template
DEFINEtKEYiGOLD+%!^ASt"tci-'    ^M tab i---*/ ^M -'!' cut+el=beginline cut+el=endcomment paste=beginline d-c."
!
!   GOLD ? -- inquire what to put at the start of the line
DEFINE KEY GOLD ? AS "i?'New start of line sequence: '  -2'' d+3c cut+''=beginline d+3c."
!
!   GOLD <space> -- restore the normal RETURN function
DEFINE KEY GOLD %  AS "paste=endcomment i  cut-c=beginline +el ext clear endcomment."
!
!   CONTROL M -- autoindent each line
DEFINE KEY CONTROL M AS '^M tab paste=beginline d-c.'
!
!   BEGINLINE buffer -- initially contains one blank
C; i  cut-c=beginline EX
!
!+
!   Special Tabbing Functions
!-
!   CONTROL I -- insert a ^I
DEFINE KEY CONTROL I AS '^I.'
!
!   GOLD CONTROL I -- adjust indent of selected region
DEFINE KEY GOLD CONTROL I AS 'TADJSR.'
!
!   PL/I tab setting -- 4 spaces/indent
SET TAB 4
!
!   Initial indent level -- 0 (instead of 1)
C; TD EX
!
!+
!   WORD and SENTENCE Entities
!-
SET ENTITY WORD '	 

()[]{}<>,+-*/|\&=^~`'
SET ENTITY SENTENCE ";"