2
Yacc Library Unit for TP Yacc
5
Copyright (c) 1990-92 Albert Graef <ag@muwiinfa.geschichte.uni-mainz.de>
6
Copyright (C) 1996 Berend de Boer <berend@pobox.com>
8
This program is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 2 of the License, or
11
(at your option) any later version.
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
18
You should have received a copy of the GNU General Public License
19
along with this program; if not, write to the Free Software
20
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24
$Modtime: 96-08-01 14:04 $
26
$History: YACCLIB.PAS $
28
* ***************** Version 2 *****************
29
* User: Berend Date: 96-10-10 Time: 21:16
30
* Updated in $/Lex and Yacc/tply
31
* Updated for protected mode, windows and Delphi 1.X and 2.X.
40
(* Yacc Library Unit for TP Yacc Version 3.0, 6-17-91 AG *)
44
const yymaxdepth = 10000;
45
(* default stack size of parser *)
47
type YYSType = Integer;
48
(* default value type, may be redefined in Yacc output file *)
52
yychar : Integer; (* current lookahead character *)
53
yynerrs : Integer; (* current number of syntax errors reported by the
55
yydebug : Boolean; (* set to true to enable debugging output of parser *)
59
procedure yyerror ( msg : String );
60
(* error message printing routine used by the parser *)
63
(* delete the current lookahead token *)
66
(* trigger accept action of the parser; yyparse accepts returning 0, as if
67
it reached end of input *)
70
(* like yyaccept, but causes parser to return with value 1, as if an
71
unrecoverable syntax error had been encountered *)
74
(* causes error recovery to be started, as if a syntax error had been
78
(* when in error mode, resets the parser to its normal mode of
81
(* Flags used internally by the parser routine: *)
85
yyflag : ( yyfnone, yyfaccept, yyfabort, yyferror );
90
procedure yyerror ( msg : String );
92
writeln('at line ',line_no,' error : ',msg);