DataMuseum.dkPresents historical artifacts from the history of: CR80 Hard and Floppy Disks |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CR80 Hard and Floppy Disks Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 3414 (0xd56) Types: TextFile Names: »PARSER.I«
└─⟦e0c43619c⟧ Bits:30005797 CR80 Disc pack ( Vol:FNJ1 861029/EC CR80 S/W Package II+III+IV+V+VII ) └─ ⟦this⟧ »CSP004_V0801.D!CSS210.D!PARSER.I«
"----------------------------------------------------------------------- " " " MODULE NAME: BOTTOM UP PARSER " MODULE ID NMB: CSS/210 " MODULE VERSION: 601 " MODULE TYPE: IMPORT MODULE " MERGE FILES: - " " SPECIFICATIONS: - " AUTHOR/DATE: LKN/800627 " " DELIVERABLE: YES " SOURCE LANGUAGE: SWELL " COMPILE COMPUTER: CR80 " TARGET COMPUTER: CR80 " OPER. SYSTEM: - " "----------------------------------------------------------------------- " " CHANGE RECORD " " VERSION AUTHOR/DATE DESCRIPTION OF CHANGE " ------- ----------- --------------------- " " V0202 HVE/840120 EXPORT OF PROCEDURE RESET_PARSER( R6 ) " " V0601 PBI/860723 IMPORT OF PROCEDURE NEXTSYMBOL " EXTRA PARAMETER TO PROCEDURE PARSE " ENTRY POINT OF NEXTSYMBOL PROCEDURE " "----------------------------------------------------------------------- "PAGE«ff» IMPORT PROCEDURE PARSE "====================" (STACKATTRIBUTESIZE, MAXSTACKATTRIBUTES: INTEGER; R4; "ENTRY POINT OF SEMANTICS PROCEDURE R5; "PARSE STACK BASE R7; "PARSE TABLE PTR R6); "LINK " THE PARSE PROCEDURE IS THE CONTROLLING PART OF THE PARSING SCHEME. " AT ENTRY THE PARSE PROCEDURE STACKS THE OLD STATE IN THE FIRST PART " OF THE PARSE TABLE (REFERENCED BY R7) AND ESTABLISHES AN INITIAL PARSE " STATE FOR PARSING WITH THE ACTUAL PARSE TABLE. " AT EXIT THE PARSER WILL REESTABLISH THE PARSE STATE AS IT WAS AT ENTRY, " THUS ALLOWING DYNAMIC RESELECTION (STACKING AND UNSTACKING) OF PARSE " TABLES. HOWEVER, A SINGLE PARSE TABLE CANNOT BE USED RECURSIVELY. " DURING EXECUTION THE PARSE PROCEDURE ACTIVATES THE SEMANTICS PROCEDURE " (REFERENCED BY R4) IN THE FOLLOWING CASES: " R1: R2: R5: COMMENTS: " 1 - PARSE STACK PTR AN IDENTIFIER HAS BEEN SCANNED " 2 VALUE PARSE STACK PTR A CONSTANT HAS BEEN SCANNED " 3 SIZE PARSE STACK PTR A STRING HAS BEEN SCANNED " 4 CAUSE - A PARSING ERROR HAS OCCURRED " N (>4) - PARSE STACK PTR PRODUCTION NO 'N' IS RECOGNIZED " (LEFT HAND SYMBOL) " NOTE: ALL REGISTERS MUST BE REESTABLISHED AT RETURN FROM THE SEMAN- " TICS PROCEDURE. IMPORT VAR SYMBOLBUF: ARRAY [0..0] OF CHAR; " WHENEVER AN IDENTIFIER OR A STRING IS RECOGNIZED BY THE PARSING SYSTEM, " THE SYMBOL IS BUFFERED IN THE ARRAY 'SYMBOLBUF', TERMINATED BY TWO " 'NULL' CHARACTERS. " REQUIREMENTS: " " IMPORT PROCEDURE IN_BYTE (R3 'CHARACTER VALUE(RETURN)'; R6 'LINK'); " DURING SCANNING (RECOGNITION OF SYMBOLS OF THE LANGUAGE), THE CHARACTERS " ARE READ ONE BY ONE, BY CALLING THIS PROCEDURE. " " IMPORT VAR CHARCLASSTABLE: ARRAY [0..127] OF BYTE; " THIS TABLE DEFINES THE CLASS AF EACH CHARACTER IN THE RANGE 0..127; " CHARCLASS = (SKIP, ALFA, NUMERIC, DELIMITER, COMMENTCHAR, STRINGCHAR, " HEXCHAR, IGNORE, ESCAPE); IMPORT PROCEDURE RESET_PARSER( R6 ); "===========================" " THIS PROCEDURE IS USED WHENEVER THE PARSER NEED TO BE RESTARTED. " THE PROCEDURE INITIALIZES THE VARIABLE CURRCHARCLASS TO IGNORE. IMPORT PROCEDURE NEXTSYMBOL "=========================" (R1; "SYMBOL NUMBER (RETURN) R2; "ATTRIBUTE (RETURN) R6); "LINK" «a5»