annotate src/audacious/intl/plural.y @ 3530:08dae20c75f0 trunk

Don't store default playlist in the playlists/ directory.
author Kieran Clancy <clancy.kieran+audacious@gmail.com>
date Sat, 15 Sep 2007 18:10:55 +0930
parents 59452118044d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1 %{
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2 /* Expression parsing for plural form selection.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3 Copyright (C) 2000, 2001 Free Software Foundation, Inc.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
4 Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
5
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
6 This program is free software; you can redistribute it and/or modify it
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
7 under the terms of the GNU Library General Public License as published
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
8 by the Free Software Foundation; either version 2, or (at your option)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
9 any later version.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
10
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
11 This program is distributed in the hope that it will be useful,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
14 Library General Public License for more details.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
15
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
16 You should have received a copy of the GNU Library General Public
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
17 License along with this program; if not, write to the Free Software
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
19 USA. */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
20
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
21 /* The bison generated parser uses alloca. AIX 3 forces us to put this
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
22 declaration at the beginning of the file. The declaration in bison's
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
23 skeleton file comes too late. This must come before <config.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
24 because <config.h> may include arbitrary system headers. */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
25 #if defined _AIX && !defined __GNUC__
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
26 #pragma alloca
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
27 #endif
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
28
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
29 #ifdef HAVE_CONFIG_H
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
30 # include <config.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
31 #endif
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
32
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
33 #include <stddef.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
34 #include <stdlib.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
35 #include "plural-exp.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
36
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
37 /* The main function generated by the parser is called __gettextparse,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
38 but we want it to be called PLURAL_PARSE. */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
39 #ifndef _LIBC
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
40 # define __gettextparse PLURAL_PARSE
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
41 #endif
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
42
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
43 #define YYLEX_PARAM &((struct parse_args *) arg)->cp
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
44 #define YYPARSE_PARAM arg
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
45 %}
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
46 %pure_parser
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
47 %expect 7
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
48
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
49 %union {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
50 unsigned long int num;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
51 enum operator op;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
52 struct expression *exp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
53 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
54
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
55 %{
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
56 /* Prototypes for local functions. */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
57 static struct expression *new_exp PARAMS ((int nargs, enum operator op,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
58 struct expression * const *args));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
59 static inline struct expression *new_exp_0 PARAMS ((enum operator op));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
60 static inline struct expression *new_exp_1 PARAMS ((enum operator op,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
61 struct expression *right));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
62 static struct expression *new_exp_2 PARAMS ((enum operator op,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
63 struct expression *left,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
64 struct expression *right));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
65 static inline struct expression *new_exp_3 PARAMS ((enum operator op,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
66 struct expression *bexp,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
67 struct expression *tbranch,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
68 struct expression *fbranch));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
69 static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
70 static void yyerror PARAMS ((const char *str));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
71
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
72 /* Allocation of expressions. */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
73
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
74 static struct expression *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
75 new_exp (nargs, op, args)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
76 int nargs;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
77 enum operator op;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
78 struct expression * const *args;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
79 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
80 int i;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
81 struct expression *newp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
82
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
83 /* If any of the argument could not be malloc'ed, just return NULL. */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
84 for (i = nargs - 1; i >= 0; i--)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
85 if (args[i] == NULL)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
86 goto fail;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
87
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
88 /* Allocate a new expression. */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
89 newp = (struct expression *) malloc (sizeof (*newp));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
90 if (newp != NULL)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
91 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
92 newp->nargs = nargs;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
93 newp->operation = op;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
94 for (i = nargs - 1; i >= 0; i--)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
95 newp->val.args[i] = args[i];
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
96 return newp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
97 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
98
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
99 fail:
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
100 for (i = nargs - 1; i >= 0; i--)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
101 FREE_EXPRESSION (args[i]);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
102
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
103 return NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
104 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
105
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
106 static inline struct expression *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
107 new_exp_0 (op)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
108 enum operator op;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
109 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
110 return new_exp (0, op, NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
111 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
112
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
113 static inline struct expression *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
114 new_exp_1 (op, right)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
115 enum operator op;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
116 struct expression *right;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
117 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
118 struct expression *args[1];
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
119
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
120 args[0] = right;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
121 return new_exp (1, op, args);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
122 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
123
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
124 static struct expression *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
125 new_exp_2 (op, left, right)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
126 enum operator op;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
127 struct expression *left;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
128 struct expression *right;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
129 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
130 struct expression *args[2];
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
131
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
132 args[0] = left;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
133 args[1] = right;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
134 return new_exp (2, op, args);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
135 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
136
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
137 static inline struct expression *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
138 new_exp_3 (op, bexp, tbranch, fbranch)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
139 enum operator op;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
140 struct expression *bexp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
141 struct expression *tbranch;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
142 struct expression *fbranch;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
143 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
144 struct expression *args[3];
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
145
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
146 args[0] = bexp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
147 args[1] = tbranch;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
148 args[2] = fbranch;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
149 return new_exp (3, op, args);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
150 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
151
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
152 %}
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
153
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
154 /* This declares that all operators have the same associativity and the
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
155 precedence order as in C. See [Harbison, Steele: C, A Reference Manual].
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
156 There is no unary minus and no bitwise operators.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
157 Operators with the same syntactic behaviour have been merged into a single
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
158 token, to save space in the array generated by bison. */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
159 %right '?' /* ? */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
160 %left '|' /* || */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
161 %left '&' /* && */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
162 %left EQUOP2 /* == != */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
163 %left CMPOP2 /* < > <= >= */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
164 %left ADDOP2 /* + - */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
165 %left MULOP2 /* * / % */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
166 %right '!' /* ! */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
167
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
168 %token <op> EQUOP2 CMPOP2 ADDOP2 MULOP2
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
169 %token <num> NUMBER
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
170 %type <exp> exp
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
171
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
172 %%
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
173
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
174 start: exp
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
175 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
176 if ($1 == NULL)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
177 YYABORT;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
178 ((struct parse_args *) arg)->res = $1;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
179 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
180 ;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
181
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
182 exp: exp '?' exp ':' exp
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
183 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
184 $$ = new_exp_3 (qmop, $1, $3, $5);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
185 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
186 | exp '|' exp
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
187 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
188 $$ = new_exp_2 (lor, $1, $3);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
189 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
190 | exp '&' exp
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
191 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
192 $$ = new_exp_2 (land, $1, $3);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
193 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
194 | exp EQUOP2 exp
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
195 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
196 $$ = new_exp_2 ($2, $1, $3);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
197 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
198 | exp CMPOP2 exp
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
199 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
200 $$ = new_exp_2 ($2, $1, $3);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
201 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
202 | exp ADDOP2 exp
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
203 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
204 $$ = new_exp_2 ($2, $1, $3);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
205 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
206 | exp MULOP2 exp
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
207 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
208 $$ = new_exp_2 ($2, $1, $3);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
209 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
210 | '!' exp
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
211 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
212 $$ = new_exp_1 (lnot, $2);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
213 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
214 | 'n'
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
215 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
216 $$ = new_exp_0 (var);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
217 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
218 | NUMBER
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
219 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
220 if (($$ = new_exp_0 (num)) != NULL)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
221 $$->val.num = $1;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
222 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
223 | '(' exp ')'
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
224 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
225 $$ = $2;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
226 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
227 ;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
228
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
229 %%
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
230
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
231 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
232 internal_function
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
233 FREE_EXPRESSION (exp)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
234 struct expression *exp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
235 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
236 if (exp == NULL)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
237 return;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
238
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
239 /* Handle the recursive case. */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
240 switch (exp->nargs)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
241 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
242 case 3:
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
243 FREE_EXPRESSION (exp->val.args[2]);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
244 /* FALLTHROUGH */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
245 case 2:
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
246 FREE_EXPRESSION (exp->val.args[1]);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
247 /* FALLTHROUGH */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
248 case 1:
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
249 FREE_EXPRESSION (exp->val.args[0]);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
250 /* FALLTHROUGH */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
251 default:
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
252 break;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
253 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
254
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
255 free (exp);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
256 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
257
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
258
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
259 static int
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
260 yylex (lval, pexp)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
261 YYSTYPE *lval;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
262 const char **pexp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
263 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
264 const char *exp = *pexp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
265 int result;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
266
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
267 while (1)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
268 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
269 if (exp[0] == '\0')
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
270 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
271 *pexp = exp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
272 return YYEOF;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
273 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
274
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
275 if (exp[0] != ' ' && exp[0] != '\t')
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
276 break;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
277
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
278 ++exp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
279 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
280
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
281 result = *exp++;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
282 switch (result)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
283 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
284 case '0': case '1': case '2': case '3': case '4':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
285 case '5': case '6': case '7': case '8': case '9':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
286 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
287 unsigned long int n = result - '0';
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
288 while (exp[0] >= '0' && exp[0] <= '9')
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
289 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
290 n *= 10;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
291 n += exp[0] - '0';
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
292 ++exp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
293 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
294 lval->num = n;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
295 result = NUMBER;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
296 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
297 break;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
298
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
299 case '=':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
300 if (exp[0] == '=')
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
301 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
302 ++exp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
303 lval->op = equal;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
304 result = EQUOP2;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
305 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
306 else
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
307 result = YYERRCODE;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
308 break;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
309
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
310 case '!':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
311 if (exp[0] == '=')
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
312 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
313 ++exp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
314 lval->op = not_equal;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
315 result = EQUOP2;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
316 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
317 break;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
318
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
319 case '&':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
320 case '|':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
321 if (exp[0] == result)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
322 ++exp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
323 else
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
324 result = YYERRCODE;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
325 break;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
326
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
327 case '<':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
328 if (exp[0] == '=')
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
329 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
330 ++exp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
331 lval->op = less_or_equal;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
332 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
333 else
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
334 lval->op = less_than;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
335 result = CMPOP2;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
336 break;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
337
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
338 case '>':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
339 if (exp[0] == '=')
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
340 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
341 ++exp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
342 lval->op = greater_or_equal;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
343 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
344 else
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
345 lval->op = greater_than;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
346 result = CMPOP2;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
347 break;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
348
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
349 case '*':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
350 lval->op = mult;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
351 result = MULOP2;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
352 break;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
353
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
354 case '/':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
355 lval->op = divide;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
356 result = MULOP2;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
357 break;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
358
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
359 case '%':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
360 lval->op = module;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
361 result = MULOP2;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
362 break;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
363
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
364 case '+':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
365 lval->op = plus;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
366 result = ADDOP2;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
367 break;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
368
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
369 case '-':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
370 lval->op = minus;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
371 result = ADDOP2;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
372 break;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
373
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
374 case 'n':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
375 case '?':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
376 case ':':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
377 case '(':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
378 case ')':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
379 /* Nothing, just return the character. */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
380 break;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
381
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
382 case ';':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
383 case '\n':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
384 case '\0':
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
385 /* Be safe and let the user call this function again. */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
386 --exp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
387 result = YYEOF;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
388 break;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
389
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
390 default:
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
391 result = YYERRCODE;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
392 #if YYDEBUG != 0
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
393 --exp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
394 #endif
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
395 break;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
396 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
397
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
398 *pexp = exp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
399
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
400 return result;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
401 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
402
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
403
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
404 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
405 yyerror (str)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
406 const char *str;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
407 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
408 /* Do nothing. We don't print error messages here. */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
409 }