home *** CD-ROM | disk | FTP | other *** search
- { SKELDTBL: Contains the procedure to read debugging tables. }
- { Copyright (C) 1984 by QCAD Systems Inc., All Rights Reserved. }
-
- {..................}
- procedure READ_DEBUGGING_TABLES;
- { This procedure takes up where read_table_files leaves off.
- The rest of the tables are purely for debugging purposes
- (specifically, to provide parser stack dump capability),
- and may be omitted without affecting the parsing. }
- var PX, TX: int; { token, token character array indices }
- INDEX: int; { for loops }
-
- {. . . . . . . . .}
- procedure READ_TOKEN(PX: int);
- { read the px-th token table entry. }
- var TOK_NAME: string80;
- I: byte;
- begin
- tokx[px] := tx;
- read_string(tok_name);
- tok_name := concat(tok_name, ' ');
- tok_name[length(tok_name)]:=chr(0);
- for i := 1 to length(tok_name) do begin
- tokchar[tx] := tok_name[i];
- tx := tx+1
- end
- end;
-
- begin { read_debugging_tables }
- for index := 1 to lookstate do
- insym[index] := next_value;
- verify(-1);
- for index := 1 to reducelen do
- prodx[index] := next_value;
- verify(-1);
- for index := 1 to prodtoks do
- prods[index] := next_value;
- verify(-1);
- tx := 1;
- for px := 1 to all_toks do
- read_token(px)
- { omit the last verify, because it's gonna do another read }
- end { read_debugging_tables };
-
-
-