/* START OF: rdc_end_.incl.pl1 * * * * * * * * * * * * * * * * */ /****^ HISTORY COMMENTS: 1) change(86-02-14,GWMay), approve(), audit(), install(): old history comments: 0) Created: April, 1974 by G. C. Dixon 1) Modified: Feb, 1975 by G. C. Dixon a) support for Version 2.0 of reduction_compiler. 2) Modified: Feb, 1981 by G. C. Dixon a) support for Version 2.2 of reduction_compiler 3) Modified: Aug, 1983 by G. C. Dixon - support for Version 2.3 of reductions command. 2) change(86-03-04,GDixon), approve(86-03-04,MCR7362), audit(86-03-17,GWMay), install(86-03-17,MR12.0-1032): Changed how the PUSH DOWN LANGUAGE (SPDL) definition of is implemented to avoid references through a null pointer. The two accepted uses are: / / ... / ... \ A | Pthis_token (points to top of push down stack) which checks to see if the push down stack is totally exhausted (ie, Ptoken = null); and: / SPEC1 ... SPECN / ... / ... \ A | Pthis_token (points to top of push down stack) which checks to see whether SPECN is topmost on the push down stack AND is the final token in the input list. END HISTORY COMMENTS */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* NAME: rdc_end_.incl.pl1 */ /* */ /* This include segment is used by compilers generated by the reduction_compiler. */ /* Such compilers include a SEMANTIC_ANALYSIS subroutine generated by the */ /* reduction_compiler. This subroutine compares a chain of input tokens with token */ /* requirements specified in reductions. The code in this include segment performs the */ /* actual comparisons. This code is the middle part of the SEMANTIC_ANALYSIS procedure. */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ TRACING = TRACING; /* Kludge to prevent pl1 from making TRACING */ /* options(constant) because it is never set. */ NRED = 1; go to RD_TEST_REDUCTION; RD_NEXT_REDUCTION: NRED = NRED + 1; RD_TEST_REDUCTION: PRED = addr(REDUCTION(NRED)); Ptoken = Pthis_token; do I = RED.TOKEN_REQD.IFIRST to RED.TOKEN_REQD.ILAST by DIRECTION; PTOKEN_REQD = addr(TOKEN_REQUIREMENT(I)); if Ptoken = null then do; if TOKEN_REQD.FORM = 0 then /* No more tokens. Only matches spec. */ if TOKEN_REQD.TYPE = 1 then go to RD_TEST_TOKEN(1); go to RD_NEXT_REDUCTION; end; if TOKEN_REQD.FORM = 0 then do; /* built-in syntax function. */ go to RD_TEST_TOKEN(TOKEN_REQD.TYPE); RD_TEST_TOKEN(1): if SPDL then /* */ /* In push-down-language, there are 2 */ /* interpretations of . */ if RED.TOKEN_REQD.IFIRST = RED.TOKEN_REQD.ILAST & Ptoken = null then /* When is only spec, the spec asks */ go to RD_MATCH_NO_TOKEN; /* "Is push down stack empty (all input gone)?" */ else if RED.TOKEN_REQD.IFIRST^= RED.TOKEN_REQD.ILAST & RED.TOKEN_REQD.IFIRST = I & token.Pnext = null then /* For SPEC1 ... SPECN , the spec asks */ go to RD_MATCH_NO_TOKEN; /* "Are the topmost tokens on stack SPEC1 - SPECN,*/ /* and is SPECN the final input token?" */ else go to RD_NEXT_REDUCTION; /* Those are the only two defs allowed in push */ /* down language mode for . */ else if Ptoken = null then go to RD_MATCH_NO_TOKEN; go to RD_NEXT_REDUCTION; RD_TEST_TOKEN(2): go to RD_MATCH; /* */ RD_TEST_TOKEN(3): if token.Lvalue > 0 & /* */ token.Lvalue <= 32 & ^token.S.quoted_string then if search(substr(token_value,1,1),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") > 0 then if verify(token_value,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_$") = 0 then go to RD_MATCH; go to RD_NEXT_REDUCTION; RD_TEST_TOKEN(4): /* */ if token.Nvalue ^= 0 then /* token already determined to be a number. */ go to RD_MATCH; if token.S.quoted_string then go to RD_NEXT_REDUCTION; NUMBER = cv_dec_check_ (token_value, CODE); if CODE = 0 then do; token.Nvalue = NUMBER; go to RD_MATCH; end; go to RD_NEXT_REDUCTION; RD_TEST_TOKEN(5): if token.Lvalue = 1 then /* */ if token_value = BACKSPACE & ^token.S.quoted_string then go to RD_MATCH; go to RD_NEXT_REDUCTION; RD_TEST_TOKEN(6): if token.S.quoted_string then /* */ go to RD_MATCH; go to RD_NEXT_REDUCTION; end; else if TOKEN_REQD.FORM > 0 then do; /* absolute syntax specification. */ if token.S.quoted_string then go to RD_NEXT_REDUCTION; PTOKEN_REQD_VALUE = addr(substr(TOKEN_STRINGS,TOKEN_REQD_STRING.I)); LTOKEN_REQD_VALUE = TOKEN_REQD_STRING.L; if token_value = TOKEN_REQD_VALUE then go to RD_MATCH; go to RD_NEXT_REDUCTION; end; /* END OF: rdc_end_.incl.pl1 * * * * * * * * * * * * * * * * */ */ ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group Bull including Bull HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell Bull Inc., Groupe Bull and Bull HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, Bull or Bull HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by Bull HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved */