~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to utils/h2pas/yacclib.pas

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{
2
 
  Yacc Library Unit for TP Yacc
3
 
 
4
 
 
5
 
  Copyright (c) 1990-92  Albert Graef <ag@muwiinfa.geschichte.uni-mainz.de>
6
 
  Copyright (C) 1996     Berend de Boer <berend@pobox.com>
7
 
 
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.
12
 
 
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.
17
 
 
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.
21
 
 
22
 
 
23
 
$Revision: 1.2 $
24
 
$Modtime: 96-08-01 14:04 $
25
 
 
26
 
$History: YACCLIB.PAS $
27
 
 *
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.
32
 
 
33
 
}
34
 
 
35
 
 
36
 
{$I-}
37
 
 
38
 
unit YaccLib;
39
 
 
40
 
(* Yacc Library Unit for TP Yacc Version 3.0, 6-17-91 AG *)
41
 
 
42
 
interface
43
 
 
44
 
const yymaxdepth = 10000;
45
 
  (* default stack size of parser *)
46
 
 
47
 
type YYSType = Integer;
48
 
  (* default value type, may be redefined in Yacc output file *)
49
 
 
50
 
var
51
 
 
52
 
yychar   : Integer; (* current lookahead character *)
53
 
yynerrs  : Integer; (* current number of syntax errors reported by the
54
 
                       parser *)
55
 
yydebug  : Boolean; (* set to true to enable debugging output of parser *)
56
 
 
57
 
line_no : longint;
58
 
 
59
 
procedure yyerror ( msg : String );
60
 
  (* error message printing routine used by the parser *)
61
 
 
62
 
procedure yyclearin;
63
 
  (* delete the current lookahead token *)
64
 
 
65
 
procedure yyaccept;
66
 
  (* trigger accept action of the parser; yyparse accepts returning 0, as if
67
 
     it reached end of input *)
68
 
 
69
 
procedure yyabort;
70
 
  (* like yyaccept, but causes parser to return with value 1, as if an
71
 
     unrecoverable syntax error had been encountered *)
72
 
 
73
 
procedure yyerrlab;
74
 
  (* causes error recovery to be started, as if a syntax error had been
75
 
     encountered *)
76
 
 
77
 
procedure yyerrok;
78
 
  (* when in error mode, resets the parser to its normal mode of
79
 
     operation *)
80
 
 
81
 
(* Flags used internally by the parser routine: *)
82
 
 
83
 
var
84
 
 
85
 
yyflag    : ( yyfnone, yyfaccept, yyfabort, yyferror );
86
 
yyerrflag : Integer;
87
 
 
88
 
implementation
89
 
 
90
 
procedure yyerror ( msg : String );
91
 
  begin
92
 
    writeln('at line ',line_no,' error : ',msg);
93
 
  end(*yyerrmsg*);
94
 
 
95
 
procedure yyclearin;
96
 
  begin
97
 
    yychar := -1;
98
 
  end(*yyclearin*);
99
 
 
100
 
procedure yyaccept;
101
 
  begin
102
 
    yyflag := yyfaccept;
103
 
  end(*yyaccept*);
104
 
 
105
 
procedure yyabort;
106
 
  begin
107
 
    yyflag := yyfabort;
108
 
  end(*yyabort*);
109
 
 
110
 
procedure yyerrlab;
111
 
  begin
112
 
    yyflag := yyferror;
113
 
  end(*yyerrlab*);
114
 
 
115
 
procedure yyerrok;
116
 
  begin
117
 
    yyerrflag := 0;
118
 
  end(*yyerrork*);
119
 
 
120
 
end(*YaccLib*).