/*********************************************************** * syntax-related definitions for PL/I symbolic debugger * ***********************************************************/ dcl 1 scandf external static, /*put in structure so names are not limited to 6 chars*/ 2 scan_state, /*state saved on %CALL, do-group, %INCLUDE to allow nesting of calls & multiple commands per line*/ ( /* indexes in commandline: */ 3 nextp, /*position of next character to look at (see do_command for meaning of negative value)*/ 3 errorp, /*error location*/ 3 tokenp, /*beginning of current token*/ 3 startp /*beginning of current command*/ ) fixed bin(15) initial(1), 3 commandline char(80) varying initial(''), /*current command line*/ 3 in_include fixed bin(1) initial(0/*false*/), /*true if next command comes from includefile (opened this level)*/ 3 include_open fixed bin(1) initial(0/*false*/), /*true if include open on any level*/ 3 in_do_group fixed bin(1) initial(0/*false*/), /*true if executing a do group*/ 3 saved_workfile_addr fixed bin(23), /*address in workfile of next command*/ /*array of addresses of records in workfile where saved scan_states are stored:*/ 2 scan_state_stack(8) fixed bin(23) initial((8)-1/*null_fileaddr*/), 2 scan_state_nesting_level fixed bin(15) initial(0), /*debprocedure/do-group/include execution nesting level (subscript in scan_state_stack)*/ 2 debprocedure_define_level fixed bin(7) initial(0), /*nesting level of debprocedure/do-group definitions*/ 2 in_set_break fixed bin(1) initial(0/*false*/), /*true if executing a SET BREAK command, for error*/ 2 debprocedure_startp fixed bin(15), /*index in commandline of beginning of first command of do-group or debprocedure (if in first line of do/debprocedure), else 1 (see error)*/ 2 any_replaces fixed bin(1) initial(0/*false*/), /*for DEFINE/%REPLACE*/ 2 replace_count fixed bin(7), /*for DEFINE/%REPLACE*/ 2 replace_max fixed bin(7) initial(10), /*for DEFINE/%REPLACE*/ 2 commandline_size fixed bin(15) initial(80/*length(commandline)*/), 2 ignore_rest_of_line fixed bin(15) initial(81), /*for setting nextp > length(commandline) (=80)*/ 2 lastchar char(1) static, /*last-scanned character (from nextchar)*/ 2 prompt char(12) varying initial('deb>'), /*must be at least big enough for 6-char task name!!'deb>'*/ 2 VT100 fixed bin(1), /*true if TI: is VT100-type terminal, can edit command line*/ 2 control_char_in_last_line fixed bin(1) initial(0/*false*/), /*for control-w, edit_command*/ 2 last_commandline char(80) varying, /*saved previous interactive command line, for control-w*/ ( /* type codes returned by variable (used in subscripted goto's by examine, deposit): */ 2 undefined_type initial(0), 2 fixed_bin_type initial(1), 2 pointer_type initial(2), 2 float_type initial(3), 2 char_varying_type initial(4), 2 char_fixed_type initial(5), 2 bit_type initial(6), 2 decimal_type initial(7), /**later*/ 2 picture_type initial(8), /**later*/ /**maybe later - file type*/ /* type codes returned by nexttoken: */ 2 symbol_type initial(10), 2 string_constant_type initial(11), 2 decimal_constant_type initial(12), 2 octal_constant_type initial(13), 2 punctuation_type initial(14) ) fixed bin(7), 2 cancel char(12) initial(' CANCEL CAN '), /*argument for nxtokenis*/ 2 show char(13) initial(' SHOW SHO SH '); /*argument for nxtokenis*/ dcl includefile file input sequential /*PL/I wont let us: static external*/ env(varying, recsize(80), device(sy), ctlimp), /*text file*/ sysin file input sequential env(fixed, recsize(80), device(ti)); /**%include 'truefalse.inc' ** we cant include here or compiler object for nextchar in scan.pli makes TKB blow up!**/ /* PL/I doesn't know what true & false are - we must tell it: */ dcl ( true initial(1), false initial(0) ) fixed bin(1) static external; /* use fixed bin(1) to get around lack of boolean variables in PL/I without bringing in costly bit-string runtime*/ /* procedures in scan.pli & error.pli: */ dcl nexttoken entry(char(*) varying/*returned string*/) returns(fixed bin(7) /*type code*/), nxtokenis entry(char(*)/*match string*/) returns(fixed bin(1)/*true if matched*/), nxsymtoken entry returns(char(31) varying), nextchar entry returns(char(1)), error entry(char(*)), warning entry(char(*));