source: OGRE/trunk/ogrenew/RenderSystems/GL/src/nvparse/_rc1.0_parser.cpp @ 657

Revision 657, 59.2 KB checked in by mattausch, 18 years ago (diff)

added ogre dependencies and patched ogre sources

Line 
1
2/*  A Bison parser, made from rc1.0_grammar.y
3    by GNU Bison version 1.28  */
4
5#define YYBISON 1  /* Identify Bison output.  */
6
7#define yyparse rc10_parse
8#define yylex rc10_lex
9#define yyerror rc10_error
10#define yylval rc10_lval
11#define yychar rc10_char
12#define yydebug rc10_debug
13#define yynerrs rc10_nerrs
14#define regVariable     257
15#define constVariable   258
16#define color_sum       259
17#define final_product   260
18#define expandString    261
19#define halfBiasString  262
20#define unsignedString  263
21#define unsignedInvertString    264
22#define muxString       265
23#define sumString       266
24#define rgb_portion     267
25#define alpha_portion   268
26#define openParen       269
27#define closeParen      270
28#define openBracket     271
29#define closeBracket    272
30#define semicolon       273
31#define comma   274
32#define dot     275
33#define times   276
34#define minus   277
35#define equals  278
36#define plus    279
37#define bias_by_negative_one_half_scale_by_two  280
38#define bias_by_negative_one_half       281
39#define scale_by_one_half       282
40#define scale_by_two    283
41#define scale_by_four   284
42#define clamp_color_sum 285
43#define lerp    286
44#define fragment_rgb    287
45#define fragment_alpha  288
46#define floatValue      289
47
48#line 2 "rc1.0_grammar.y"
49
50void yyerror(char* s);
51int yylex ( void );
52
53#ifdef _WIN32
54# include <windows.h>
55#endif
56
57#include <stdio.h>
58#include <stdlib.h>
59
60#include "rc1.0_combiners.h"
61#include "nvparse_errors.h"
62#include "nvparse_externs.h"
63
64
65
66#line 19 "rc1.0_grammar.y"
67typedef union {
68  int ival;
69  float fval;
70  RegisterEnum registerEnum;
71  BiasScaleEnum biasScaleEnum;
72  MappedRegisterStruct mappedRegisterStruct;
73  ConstColorStruct constColorStruct;
74  GeneralPortionStruct generalPortionStruct;
75  GeneralFunctionStruct generalFunctionStruct;
76  OpStruct opStruct;
77  GeneralCombinerStruct generalCombinerStruct;
78  GeneralCombinersStruct generalCombinersStruct;
79  FinalProductStruct finalProductStruct;
80  FinalRgbFunctionStruct finalRgbFunctionStruct;
81  FinalAlphaFunctionStruct finalAlphaFunctionStruct;
82  FinalCombinerStruct finalCombinerStruct;
83  CombinersStruct combinersStruct;
84} YYSTYPE;
85#include <stdio.h>
86
87#ifndef __cplusplus
88#ifndef __STDC__
89#define const
90#endif
91#endif
92
93
94
95#define YYFINAL         220
96#define YYFLAG          -32768
97#define YYNTBASE        36
98
99#define YYTRANSLATE(x) ((unsigned)(x) <= 289 ? yytranslate[x] : 57)
100
101static const char yytranslate[] = {     0,
102     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
103     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
104     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
105     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
106     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
107     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
108     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
109     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
110     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
111     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
112     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
113     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
114     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
115     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
116     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
117     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
118     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
119     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
120     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
121     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
122     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
123     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
124     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
125     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
126     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
127     2,     2,     2,     2,     2,     1,     3,     4,     5,     6,
128     7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
129    17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
130    27,    28,    29,    30,    31,    32,    33,    34,    35
131};
132
133#if YYDEBUG != 0
134static const short yyprhs[] = {     0,
135     0,     2,     6,    11,    14,    17,    21,    23,    36,    39,
136    41,    46,    52,    59,    63,    68,    74,    80,    85,    87,
137    89,    91,    94,    99,   105,   110,   116,   121,   126,   129,
138   132,   135,   137,   140,   144,   148,   150,   157,   164,   169,
139   176,   183,   188,   193,   198,   203,   208,   210,   215,   220,
140   222,   227,   232,   234,   239,   244,   247,   251,   255,   260,
141   265,   268,   272,   276,   281,   286,   288,   291,   294,   298,
142   302,   304,   307,   310,   314,   318,   323,   330,   344,   358,
143   370,   377,   386,   391,   398,   403,   405
144};
145
146static const short yyrhs[] = {    37,
147     0,    38,    39,    51,     0,    38,    38,    39,    51,     0,
148    39,    51,     0,    38,    51,     0,    38,    38,    51,     0,
149    51,     0,     4,    24,    15,    35,    20,    35,    20,    35,
150    20,    35,    16,    19,     0,    39,    40,     0,    40,     0,
151    17,    41,    41,    18,     0,    17,    38,    41,    41,    18,
152     0,    17,    38,    38,    41,    41,    18,     0,    17,    41,
153    18,     0,    17,    38,    41,    18,     0,    17,    38,    38,
154    41,    18,     0,    42,    17,    44,    49,    18,     0,    42,
155    17,    44,    18,     0,    13,     0,    14,     0,    56,     0,
156    23,    56,     0,     7,    15,    56,    16,     0,    23,     7,
157    15,    56,    16,     0,     8,    15,    56,    16,     0,    23,
158     8,    15,    56,    16,     0,     9,    15,    56,    16,     0,
159    10,    15,    56,    16,     0,    45,    45,     0,    45,    46,
160     0,    46,    45,     0,    45,     0,    46,    46,     0,    46,
161    46,    47,     0,    46,    46,    48,     0,    46,     0,    56,
162    24,    43,    21,    43,    19,     0,    56,    24,    43,    22,
163    43,    19,     0,    56,    24,    43,    19,     0,    56,    24,
164    11,    15,    16,    19,     0,    56,    24,    12,    15,    16,
165    19,     0,    26,    15,    16,    19,     0,    27,    15,    16,
166    19,     0,    28,    15,    16,    19,     0,    29,    15,    16,
167    19,     0,    30,    15,    16,    19,     0,    56,     0,     9,
168    15,    56,    16,     0,    10,    15,    56,    16,     0,     5,
169     0,     9,    15,     5,    16,     0,    10,    15,     5,    16,
170     0,     6,     0,     9,    15,     6,    16,     0,    10,    15,
171     6,    16,     0,    55,    54,     0,    52,    55,    54,     0,
172    53,    55,    54,     0,    52,    53,    55,    54,     0,    53,
173    52,    55,    54,     0,    54,    55,     0,    52,    54,    55,
174     0,    53,    54,    55,     0,    52,    53,    54,    55,     0,
175    53,    52,    54,    55,     0,    54,     0,    52,    54,     0,
176    53,    54,     0,    52,    53,    54,     0,    53,    52,    54,
177     0,    55,     0,    52,    55,     0,    53,    55,     0,    52,
178    53,    55,     0,    53,    52,    55,     0,    31,    15,    16,
179    19,     0,     6,    24,    50,    22,    50,    19,     0,    33,
180    24,    32,    15,    50,    20,    50,    20,    50,    16,    25,
181    50,    19,     0,    33,    24,    50,    25,    32,    15,    50,
182    20,    50,    20,    50,    16,    19,     0,    33,    24,    32,
183    15,    50,    20,    50,    20,    50,    16,    19,     0,    33,
184    24,    50,    22,    50,    19,     0,    33,    24,    50,    22,
185    50,    25,    50,    19,     0,    33,    24,    50,    19,     0,
186    33,    24,    50,    25,    50,    19,     0,    34,    24,    50,
187    19,     0,     4,     0,     3,     0
188};
189
190#endif
191
192#if YYDEBUG != 0
193static const short yyrline[] = { 0,
194    72,    79,    85,    91,    97,   105,   113,   123,   132,   137,
195   145,   151,   157,   163,   169,   175,   183,   189,   199,   203,
196   209,   215,   221,   227,   233,   239,   245,   251,   259,   265,
197   271,   277,   283,   289,   295,   301,   309,   317,   323,   335,
198   343,   351,   355,   359,   363,   367,   373,   379,   385,   391,
199   397,   403,   409,   415,   421,   429,   435,   441,   447,   453,
200   460,   466,   472,   478,   484,   491,   499,   507,   515,   523,
201   532,   540,   548,   556,   564,   574,   580,   588,   594,   600,
202   610,   622,   632,   646,   660,   668,   672
203};
204#endif
205
206
207#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
208
209static const char * const yytname[] = {   "$","error","$undefined.","regVariable",
210"constVariable","color_sum","final_product","expandString","halfBiasString",
211"unsignedString","unsignedInvertString","muxString","sumString","rgb_portion",
212"alpha_portion","openParen","closeParen","openBracket","closeBracket","semicolon",
213"comma","dot","times","minus","equals","plus","bias_by_negative_one_half_scale_by_two",
214"bias_by_negative_one_half","scale_by_one_half","scale_by_two","scale_by_four",
215"clamp_color_sum","lerp","fragment_rgb","fragment_alpha","floatValue","WholeEnchilada",
216"Combiners","ConstColor","GeneralCombiners","GeneralCombiner","GeneralPortion",
217"PortionDesignator","GeneralMappedRegister","GeneralFunction","Dot","Mul","Mux",
218"Sum","BiasScale","FinalMappedRegister","FinalCombiner","ClampColorSum","FinalProduct",
219"FinalRgbFunction","FinalAlphaFunction","Register", NULL
220};
221#endif
222
223static const short yyr1[] = {     0,
224    36,    37,    37,    37,    37,    37,    37,    38,    39,    39,
225    40,    40,    40,    40,    40,    40,    41,    41,    42,    42,
226    43,    43,    43,    43,    43,    43,    43,    43,    44,    44,
227    44,    44,    44,    44,    44,    44,    45,    46,    46,    47,
228    48,    49,    49,    49,    49,    49,    50,    50,    50,    50,
229    50,    50,    50,    50,    50,    51,    51,    51,    51,    51,
230    51,    51,    51,    51,    51,    51,    51,    51,    51,    51,
231    51,    51,    51,    51,    51,    52,    53,    54,    54,    54,
232    54,    54,    54,    54,    55,    56,    56
233};
234
235static const short yyr2[] = {     0,
236     1,     3,     4,     2,     2,     3,     1,    12,     2,     1,
237     4,     5,     6,     3,     4,     5,     5,     4,     1,     1,
238     1,     2,     4,     5,     4,     5,     4,     4,     2,     2,
239     2,     1,     2,     3,     3,     1,     6,     6,     4,     6,
240     6,     4,     4,     4,     4,     4,     1,     4,     4,     1,
241     4,     4,     1,     4,     4,     2,     3,     3,     4,     4,
242     2,     3,     3,     4,     4,     1,     2,     2,     3,     3,
243     1,     2,     2,     3,     3,     4,     6,    13,    13,    11,
244     6,     8,     4,     6,     4,     1,     1
245};
246
247static const short yydefact[] = {     0,
248     0,     0,     0,     0,     0,     0,     1,     0,     0,    10,
249     7,     0,     0,    66,    71,     0,     0,    19,    20,     0,
250     0,     0,     0,     0,     0,     0,     0,     5,     9,     4,
251     0,    67,    72,     0,    68,    73,    61,    56,     0,    87,
252    86,    50,    53,     0,     0,     0,    47,     0,     0,    14,
253     0,     0,     0,     0,     0,     0,     0,     6,     2,    69,
254    74,    62,    57,    70,    75,    63,    58,     0,     0,     0,
255     0,     0,    15,     0,    11,     0,    32,    36,     0,    76,
256     0,    83,     0,     0,    85,     3,    64,    59,    65,    60,
257     0,     0,     0,     0,     0,     0,     0,     0,    16,     0,
258    12,    18,     0,     0,     0,     0,     0,     0,    29,    30,
259    31,    33,     0,     0,     0,     0,     0,     0,    51,    54,
260    48,    52,    55,    49,    77,    13,     0,     0,     0,     0,
261     0,    17,    34,    35,     0,     0,     0,     0,     0,     0,
262     0,    21,     0,    81,     0,     0,    84,     0,     0,     0,
263     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
264    22,    39,     0,     0,     0,     0,     0,     0,    42,    43,
265    44,    45,    46,     0,     0,     0,     0,     0,     0,     0,
266     0,     0,     0,     0,    82,     0,     0,     0,     0,    23,
267    25,    27,    28,     0,     0,    37,    38,     0,     0,     0,
268     0,     0,    24,    26,     0,     0,     0,    40,    41,    80,
269     0,     0,     8,     0,     0,    78,    79,     0,     0,     0
270};
271
272static const short yydefgoto[] = {   218,
273     7,     8,     9,    10,    21,    22,   141,    76,    77,    78,
274   133,   134,   108,    46,    11,    12,    13,    14,    15,    47
275};
276
277static const short yypact[] = {     4,
278   -17,   -15,    26,    17,    -6,    19,-32768,     4,    68,-32768,
279-32768,     8,   113,    57,    67,    58,   133,-32768,-32768,    26,
280    98,    93,   104,    66,   133,    68,    68,-32768,-32768,-32768,
281    44,    57,    67,    44,    57,    67,-32768,-32768,   118,-32768,
282-32768,-32768,-32768,   144,   146,   153,-32768,    81,   127,-32768,
283   150,   100,   157,   162,    31,   159,    68,-32768,-32768,    57,
284    67,-32768,-32768,    57,    67,-32768,-32768,   161,   152,   160,
285   133,   136,-32768,   165,-32768,    97,   100,   100,   155,-32768,
286   133,-32768,   133,    77,-32768,-32768,-32768,-32768,-32768,-32768,
287   145,   168,   169,   170,   172,   173,   174,   175,-32768,   177,
288-32768,-32768,   176,   178,   181,   182,   183,   184,-32768,-32768,
289-32768,   100,   125,   179,    27,   185,   186,   187,-32768,-32768,
290-32768,-32768,-32768,-32768,-32768,-32768,   188,   190,   192,   193,
291   194,-32768,-32768,-32768,   189,   196,   197,   199,   200,    85,
292   148,-32768,   133,-32768,   133,   133,-32768,   166,   198,   201,
293   202,   203,   204,   106,   100,   100,   100,   100,   209,   210,
294-32768,-32768,   125,   125,   206,   208,   211,   212,-32768,-32768,
295-32768,-32768,-32768,   213,   214,   217,   218,   219,   220,   100,
296   100,   221,   222,   133,-32768,   133,   195,   223,   226,-32768,
297-32768,-32768,-32768,   227,   228,-32768,-32768,   229,   230,   231,
298   232,   233,-32768,-32768,    39,   133,   234,-32768,-32768,-32768,
299   133,   238,-32768,   236,   237,-32768,-32768,   216,   246,-32768
300};
301
302static const short yypgoto[] = {-32768,
303-32768,    76,     3,    -3,    -4,-32768,   -12,-32768,    94,    96,
304-32768,-32768,-32768,   -24,    40,   205,   180,     0,    -9,   -50
305};
306
307
308#define YYLAST          256
309
310
311static const short yytable[] = {    55,
312    56,    79,    33,    36,    37,    29,    16,     1,    17,     2,
313    27,    32,    35,     2,    38,    49,    51,    24,    94,    97,
314     3,    61,    62,    29,    65,    66,    79,    79,    57,     1,
315    60,    23,    63,    64,     4,    67,     5,     6,    18,    19,
316     5,     6,    25,    72,    74,   144,    98,    28,    30,    82,
317    87,   145,    83,    29,    89,    84,   114,   210,   115,   117,
318    88,   135,   142,   211,    90,    58,    59,   100,    40,    41,
319    42,    43,    39,     2,    44,    45,     5,     6,    20,    40,
320    41,    42,    43,    26,     3,    44,    45,    40,    41,   161,
321     6,   159,   160,    18,    19,    48,    86,    54,     4,     5,
322     5,     6,    40,    41,   176,   177,   178,   179,   116,    52,
323    18,    19,   142,   142,   102,    50,   174,   175,   165,    53,
324   166,   167,   103,   104,   105,   106,   107,    40,    41,   194,
325   195,   136,   137,   138,   139,    40,    41,    42,    43,    18,
326    19,    44,    45,     4,    73,     5,     6,   140,    18,    19,
327   182,   183,    68,    99,    40,    41,    92,    93,    69,   198,
328    70,   199,    40,    41,    95,    96,   162,    75,   163,   164,
329   109,   111,   110,   112,    71,    80,    81,    85,   113,   118,
330    91,   212,   101,   119,   120,   121,   214,   122,   123,   124,
331   127,    31,   128,   125,   126,   129,   130,   131,   143,   146,
332   168,   132,     0,   149,   147,   150,   148,   151,   152,   153,
333   155,   156,   154,   157,   158,   219,   169,    34,     0,   170,
334   171,   172,   173,   180,   181,   184,   185,   188,   189,   200,
335   186,   187,   190,   191,   192,   193,     0,     0,   201,   196,
336   197,   202,   203,   204,   205,   220,   207,     0,     0,   206,
337   208,   209,   213,   215,   216,   217
338};
339
340static const short yycheck[] = {    24,
341    25,    52,    12,    13,    14,     9,    24,     4,    24,     6,
342     8,    12,    13,     6,    15,    20,    21,    24,    69,    70,
343    17,    31,    32,    27,    34,    35,    77,    78,    26,     4,
344    31,    15,    33,    34,    31,    36,    33,    34,    13,    14,
345    33,    34,    24,    48,    49,    19,    71,     8,     9,    19,
346    60,    25,    22,    57,    64,    25,    81,    19,    83,    84,
347    61,   112,   113,    25,    65,    26,    27,    72,     3,     4,
348     5,     6,    15,     6,     9,    10,    33,    34,     3,     3,
349     4,     5,     6,     8,    17,     9,    10,     3,     4,   140,
350    34,     7,     8,    13,    14,    20,    57,    32,    31,    33,
351    33,    34,     3,     4,   155,   156,   157,   158,    32,    17,
352    13,    14,   163,   164,    18,    18,    11,    12,   143,    16,
353   145,   146,    26,    27,    28,    29,    30,     3,     4,   180,
354   181,     7,     8,     9,    10,     3,     4,     5,     6,    13,
355    14,     9,    10,    31,    18,    33,    34,    23,    13,    14,
356   163,   164,    35,    18,     3,     4,     5,     6,    15,   184,
357    15,   186,     3,     4,     5,     6,    19,    18,    21,    22,
358    77,    78,    77,    78,    22,    19,    15,    19,    24,    35,
359    20,   206,    18,    16,    16,    16,   211,    16,    16,    16,
360    15,    12,    15,    19,    18,    15,    15,    15,    20,    15,
361    35,    18,    -1,    16,    19,    16,    20,    16,    16,    16,
362    15,    15,    24,    15,    15,     0,    19,    13,    -1,    19,
363    19,    19,    19,    15,    15,    20,    19,    15,    15,    35,
364    20,    20,    16,    16,    16,    16,    -1,    -1,    16,    19,
365    19,    16,    16,    16,    16,     0,    16,    -1,    -1,    20,
366    19,    19,    19,    16,    19,    19
367};
368/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
369#line 3 "/usr/share/bison.simple"
370/* This file comes from bison-1.28.  */
371
372/* Skeleton output parser for bison,
373   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
374
375   This program is free software; you can redistribute it and/or modify
376   it under the terms of the GNU General Public License as published by
377   the Free Software Foundation; either version 2, or (at your option)
378   any later version.
379
380   This program is distributed in the hope that it will be useful,
381   but WITHOUT ANY WARRANTY; without even the implied warranty of
382   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
383   GNU General Public License for more details.
384
385   You should have received a copy of the GNU General Public License
386   along with this program; if not, write to the Free Software
387   Foundation, Inc., 59 Temple Place - Suite 330,
388   Boston, MA 02111-1307, USA.  */
389
390/* As a special exception, when this file is copied by Bison into a
391   Bison output file, you may use that output file without restriction.
392   This special exception was added by the Free Software Foundation
393   in version 1.24 of Bison.  */
394
395/* This is the parser code that is written into each bison parser
396  when the %semantic_parser declaration is not specified in the grammar.
397  It was written by Richard Stallman by simplifying the hairy parser
398  used when %semantic_parser is specified.  */
399
400#ifndef YYSTACK_USE_ALLOCA
401#ifdef alloca
402#define YYSTACK_USE_ALLOCA
403#else /* alloca not defined */
404#ifdef __GNUC__
405#define YYSTACK_USE_ALLOCA
406#define alloca __builtin_alloca
407#else /* not GNU C.  */
408#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
409#define YYSTACK_USE_ALLOCA
410#include <alloca.h>
411#else /* not sparc */
412/* We think this test detects Watcom and Microsoft C.  */
413/* This used to test MSDOS, but that is a bad idea
414   since that symbol is in the user namespace.  */
415#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
416#if 0 /* No need for malloc.h, which pollutes the namespace;
417         instead, just don't use alloca.  */
418#include <malloc.h>
419#endif
420#else /* not MSDOS, or __TURBOC__ */
421#if defined(_AIX)
422/* I don't know what this was needed for, but it pollutes the namespace.
423   So I turned it off.   rms, 2 May 1997.  */
424/* #include <malloc.h>  */
425 #pragma alloca
426#define YYSTACK_USE_ALLOCA
427#else /* not MSDOS, or __TURBOC__, or _AIX */
428#if 0
429#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
430                 and on HPUX 10.  Eventually we can turn this on.  */
431#define YYSTACK_USE_ALLOCA
432#define alloca __builtin_alloca
433#endif /* __hpux */
434#endif
435#endif /* not _AIX */
436#endif /* not MSDOS, or __TURBOC__ */
437#endif /* not sparc */
438#endif /* not GNU C */
439#endif /* alloca not defined */
440#endif /* YYSTACK_USE_ALLOCA not defined */
441
442#ifdef YYSTACK_USE_ALLOCA
443#define YYSTACK_ALLOC alloca
444#else
445#define YYSTACK_ALLOC malloc
446#endif
447
448/* Note: there must be only one dollar sign in this file.
449   It is replaced by the list of actions, each action
450   as one case of the switch.  */
451
452#define yyerrok         (yyerrstatus = 0)
453#define yyclearin       (yychar = YYEMPTY)
454#define YYEMPTY         -2
455#define YYEOF           0
456#define YYACCEPT        goto yyacceptlab
457#define YYABORT         goto yyabortlab
458#define YYERROR         goto yyerrlab1
459/* Like YYERROR except do call yyerror.
460   This remains here temporarily to ease the
461   transition to the new meaning of YYERROR, for GCC.
462   Once GCC version 2 has supplanted version 1, this can go.  */
463#define YYFAIL          goto yyerrlab
464#define YYRECOVERING()  (!!yyerrstatus)
465#define YYBACKUP(token, value) \
466do                                                              \
467  if (yychar == YYEMPTY && yylen == 1)                          \
468    { yychar = (token), yylval = (value);                       \
469      yychar1 = YYTRANSLATE (yychar);                           \
470      YYPOPSTACK;                                               \
471      goto yybackup;                                            \
472    }                                                           \
473  else                                                          \
474    { yyerror ("syntax error: cannot back up"); YYERROR; }      \
475while (0)
476
477#define YYTERROR        1
478#define YYERRCODE       256
479
480#ifndef YYPURE
481#define YYLEX           yylex()
482#endif
483
484#ifdef YYPURE
485#ifdef YYLSP_NEEDED
486#ifdef YYLEX_PARAM
487#define YYLEX           yylex(&yylval, &yylloc, YYLEX_PARAM)
488#else
489#define YYLEX           yylex(&yylval, &yylloc)
490#endif
491#else /* not YYLSP_NEEDED */
492#ifdef YYLEX_PARAM
493#define YYLEX           yylex(&yylval, YYLEX_PARAM)
494#else
495#define YYLEX           yylex(&yylval)
496#endif
497#endif /* not YYLSP_NEEDED */
498#endif
499
500/* If nonreentrant, generate the variables here */
501
502#ifndef YYPURE
503
504int     yychar;                 /*  the lookahead symbol                */
505YYSTYPE yylval;                 /*  the semantic value of the           */
506                                /*  lookahead symbol                    */
507
508#ifdef YYLSP_NEEDED
509YYLTYPE yylloc;                 /*  location data for the lookahead     */
510                                /*  symbol                              */
511#endif
512
513int yynerrs;                    /*  number of parse errors so far       */
514#endif  /* not YYPURE */
515
516#if YYDEBUG != 0
517int yydebug;                    /*  nonzero means print parse trace     */
518/* Since this is uninitialized, it does not stop multiple parsers
519   from coexisting.  */
520#endif
521
522/*  YYINITDEPTH indicates the initial size of the parser's stacks       */
523
524#ifndef YYINITDEPTH
525#define YYINITDEPTH 200
526#endif
527
528/*  YYMAXDEPTH is the maximum size the stacks can grow to
529    (effective only if the built-in stack extension method is used).  */
530
531#if YYMAXDEPTH == 0
532#undef YYMAXDEPTH
533#endif
534
535#ifndef YYMAXDEPTH
536#define YYMAXDEPTH 10000
537#endif
538
539/* Define __yy_memcpy.  Note that the size argument
540   should be passed with type unsigned int, because that is what the non-GCC
541   definitions require.  With GCC, __builtin_memcpy takes an arg
542   of type size_t, but it can handle unsigned int.  */
543
544#if __GNUC__ > 1                /* GNU C and GNU C++ define this.  */
545#define __yy_memcpy(TO,FROM,COUNT)      __builtin_memcpy(TO,FROM,COUNT)
546#else                           /* not GNU C or C++ */
547#ifndef __cplusplus
548
549/* This is the most reliable way to avoid incompatibilities
550   in available built-in functions on various systems.  */
551static void
552__yy_memcpy (to, from, count)
553     char *to;
554     char *from;
555     unsigned int count;
556{
557  register char *f = from;
558  register char *t = to;
559  register int i = count;
560
561  while (i-- > 0)
562    *t++ = *f++;
563}
564
565#else /* __cplusplus */
566
567/* This is the most reliable way to avoid incompatibilities
568   in available built-in functions on various systems.  */
569static void
570__yy_memcpy (char *to, char *from, unsigned int count)
571{
572  register char *t = to;
573  register char *f = from;
574  register int i = count;
575
576  while (i-- > 0)
577    *t++ = *f++;
578}
579
580#endif
581#endif
582
583#line 217 "/usr/share/bison.simple"
584
585/* The user can define YYPARSE_PARAM as the name of an argument to be passed
586   into yyparse.  The argument should have type void *.
587   It should actually point to an object.
588   Grammar actions can access the variable by casting it
589   to the proper pointer type.  */
590
591#ifdef YYPARSE_PARAM
592#ifdef __cplusplus
593#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
594#define YYPARSE_PARAM_DECL
595#else /* not __cplusplus */
596#define YYPARSE_PARAM_ARG YYPARSE_PARAM
597#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
598#endif /* not __cplusplus */
599#else /* not YYPARSE_PARAM */
600#define YYPARSE_PARAM_ARG
601#define YYPARSE_PARAM_DECL
602#endif /* not YYPARSE_PARAM */
603
604/* Prevent warning if -Wstrict-prototypes.  */
605#ifdef __GNUC__
606#ifdef YYPARSE_PARAM
607int yyparse (void *);
608#else
609int yyparse (void);
610#endif
611#endif
612
613int
614yyparse(YYPARSE_PARAM_ARG)
615     YYPARSE_PARAM_DECL
616{
617  register int yystate;
618  register int yyn;
619  register short *yyssp;
620  register YYSTYPE *yyvsp;
621  int yyerrstatus;      /*  number of tokens to shift before error messages enabled */
622  int yychar1 = 0;              /*  lookahead token as an internal (translated) token number */
623
624  short yyssa[YYINITDEPTH];     /*  the state stack                     */
625  YYSTYPE yyvsa[YYINITDEPTH];   /*  the semantic value stack            */
626
627  short *yyss = yyssa;          /*  refer to the stacks thru separate pointers */
628  YYSTYPE *yyvs = yyvsa;        /*  to allow yyoverflow to reallocate them elsewhere */
629
630#ifdef YYLSP_NEEDED
631  YYLTYPE yylsa[YYINITDEPTH];   /*  the location stack                  */
632  YYLTYPE *yyls = yylsa;
633  YYLTYPE *yylsp;
634
635#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
636#else
637#define YYPOPSTACK   (yyvsp--, yyssp--)
638#endif
639
640  int yystacksize = YYINITDEPTH;
641  int yyfree_stacks = 0;
642
643#ifdef YYPURE
644  int yychar;
645  YYSTYPE yylval;
646  int yynerrs;
647#ifdef YYLSP_NEEDED
648  YYLTYPE yylloc;
649#endif
650#endif
651
652  YYSTYPE yyval;                /*  the variable used to return         */
653                                /*  semantic values from the action     */
654                                /*  routines                            */
655
656  int yylen;
657
658#if YYDEBUG != 0
659  if (yydebug)
660    fprintf(stderr, "Starting parse\n");
661#endif
662
663  yystate = 0;
664  yyerrstatus = 0;
665  yynerrs = 0;
666  yychar = YYEMPTY;             /* Cause a token to be read.  */
667
668  /* Initialize stack pointers.
669     Waste one element of value and location stack
670     so that they stay on the same level as the state stack.
671     The wasted elements are never initialized.  */
672
673  yyssp = yyss - 1;
674  yyvsp = yyvs;
675#ifdef YYLSP_NEEDED
676  yylsp = yyls;
677#endif
678
679/* Push a new state, which is found in  yystate  .  */
680/* In all cases, when you get here, the value and location stacks
681   have just been pushed. so pushing a state here evens the stacks.  */
682yynewstate:
683
684  *++yyssp = yystate;
685
686  if (yyssp >= yyss + yystacksize - 1)
687    {
688      /* Give user a chance to reallocate the stack */
689      /* Use copies of these so that the &'s don't force the real ones into memory. */
690      YYSTYPE *yyvs1 = yyvs;
691      short *yyss1 = yyss;
692#ifdef YYLSP_NEEDED
693      YYLTYPE *yyls1 = yyls;
694#endif
695
696      /* Get the current used size of the three stacks, in elements.  */
697      int size = yyssp - yyss + 1;
698
699#ifdef yyoverflow
700      /* Each stack pointer address is followed by the size of
701         the data in use in that stack, in bytes.  */
702#ifdef YYLSP_NEEDED
703      /* This used to be a conditional around just the two extra args,
704         but that might be undefined if yyoverflow is a macro.  */
705      yyoverflow("parser stack overflow",
706                 &yyss1, size * sizeof (*yyssp),
707                 &yyvs1, size * sizeof (*yyvsp),
708                 &yyls1, size * sizeof (*yylsp),
709                 &yystacksize);
710#else
711      yyoverflow("parser stack overflow",
712                 &yyss1, size * sizeof (*yyssp),
713                 &yyvs1, size * sizeof (*yyvsp),
714                 &yystacksize);
715#endif
716
717      yyss = yyss1; yyvs = yyvs1;
718#ifdef YYLSP_NEEDED
719      yyls = yyls1;
720#endif
721#else /* no yyoverflow */
722      /* Extend the stack our own way.  */
723      if (yystacksize >= YYMAXDEPTH)
724        {
725          yyerror("parser stack overflow");
726          if (yyfree_stacks)
727            {
728              free (yyss);
729              free (yyvs);
730#ifdef YYLSP_NEEDED
731              free (yyls);
732#endif
733            }
734          return 2;
735        }
736      yystacksize *= 2;
737      if (yystacksize > YYMAXDEPTH)
738        yystacksize = YYMAXDEPTH;
739#ifndef YYSTACK_USE_ALLOCA
740      yyfree_stacks = 1;
741#endif
742      yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
743      __yy_memcpy ((char *)yyss, (char *)yyss1,
744                   size * (unsigned int) sizeof (*yyssp));
745      yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
746      __yy_memcpy ((char *)yyvs, (char *)yyvs1,
747                   size * (unsigned int) sizeof (*yyvsp));
748#ifdef YYLSP_NEEDED
749      yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
750      __yy_memcpy ((char *)yyls, (char *)yyls1,
751                   size * (unsigned int) sizeof (*yylsp));
752#endif
753#endif /* no yyoverflow */
754
755      yyssp = yyss + size - 1;
756      yyvsp = yyvs + size - 1;
757#ifdef YYLSP_NEEDED
758      yylsp = yyls + size - 1;
759#endif
760
761#if YYDEBUG != 0
762      if (yydebug)
763        fprintf(stderr, "Stack size increased to %d\n", yystacksize);
764#endif
765
766      if (yyssp >= yyss + yystacksize - 1)
767        YYABORT;
768    }
769
770#if YYDEBUG != 0
771  if (yydebug)
772    fprintf(stderr, "Entering state %d\n", yystate);
773#endif
774
775  goto yybackup;
776 yybackup:
777
778/* Do appropriate processing given the current state.  */
779/* Read a lookahead token if we need one and don't already have one.  */
780/* yyresume: */
781
782  /* First try to decide what to do without reference to lookahead token.  */
783
784  yyn = yypact[yystate];
785  if (yyn == YYFLAG)
786    goto yydefault;
787
788  /* Not known => get a lookahead token if don't already have one.  */
789
790  /* yychar is either YYEMPTY or YYEOF
791     or a valid token in external form.  */
792
793  if (yychar == YYEMPTY)
794    {
795#if YYDEBUG != 0
796      if (yydebug)
797        fprintf(stderr, "Reading a token: ");
798#endif
799      yychar = YYLEX;
800    }
801
802  /* Convert token to internal form (in yychar1) for indexing tables with */
803
804  if (yychar <= 0)              /* This means end of input. */
805    {
806      yychar1 = 0;
807      yychar = YYEOF;           /* Don't call YYLEX any more */
808
809#if YYDEBUG != 0
810      if (yydebug)
811        fprintf(stderr, "Now at end of input.\n");
812#endif
813    }
814  else
815    {
816      yychar1 = YYTRANSLATE(yychar);
817
818#if YYDEBUG != 0
819      if (yydebug)
820        {
821          fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
822          /* Give the individual parser a way to print the precise meaning
823             of a token, for further debugging info.  */
824#ifdef YYPRINT
825          YYPRINT (stderr, yychar, yylval);
826#endif
827          fprintf (stderr, ")\n");
828        }
829#endif
830    }
831
832  yyn += yychar1;
833  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
834    goto yydefault;
835
836  yyn = yytable[yyn];
837
838  /* yyn is what to do for this token type in this state.
839     Negative => reduce, -yyn is rule number.
840     Positive => shift, yyn is new state.
841       New state is final state => don't bother to shift,
842       just return success.
843     0, or most negative number => error.  */
844
845  if (yyn < 0)
846    {
847      if (yyn == YYFLAG)
848        goto yyerrlab;
849      yyn = -yyn;
850      goto yyreduce;
851    }
852  else if (yyn == 0)
853    goto yyerrlab;
854
855  if (yyn == YYFINAL)
856    YYACCEPT;
857
858  /* Shift the lookahead token.  */
859
860#if YYDEBUG != 0
861  if (yydebug)
862    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
863#endif
864
865  /* Discard the token being shifted unless it is eof.  */
866  if (yychar != YYEOF)
867    yychar = YYEMPTY;
868
869  *++yyvsp = yylval;
870#ifdef YYLSP_NEEDED
871  *++yylsp = yylloc;
872#endif
873
874  /* count tokens shifted since error; after three, turn off error status.  */
875  if (yyerrstatus) yyerrstatus--;
876
877  yystate = yyn;
878  goto yynewstate;
879
880/* Do the default action for the current state.  */
881yydefault:
882
883  yyn = yydefact[yystate];
884  if (yyn == 0)
885    goto yyerrlab;
886
887/* Do a reduction.  yyn is the number of a rule to reduce with.  */
888yyreduce:
889  yylen = yyr2[yyn];
890  if (yylen > 0)
891    yyval = yyvsp[1-yylen]; /* implement default value of the action */
892
893#if YYDEBUG != 0
894  if (yydebug)
895    {
896      int i;
897
898      fprintf (stderr, "Reducing via rule %d (line %d), ",
899               yyn, yyrline[yyn]);
900
901      /* Print the symbols being reduced, and their result.  */
902      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
903        fprintf (stderr, "%s ", yytname[yyrhs[i]]);
904      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
905    }
906#endif
907
908
909  switch (yyn) {
910
911case 1:
912#line 73 "rc1.0_grammar.y"
913{
914                        yyvsp[0].combinersStruct.Validate();
915                        yyvsp[0].combinersStruct.Invoke();
916                ;
917    break;}
918case 2:
919#line 80 "rc1.0_grammar.y"
920{
921                        CombinersStruct combinersStruct;
922                        combinersStruct.Init(yyvsp[-1].generalCombinersStruct, yyvsp[0].finalCombinerStruct, yyvsp[-2].constColorStruct);
923                        yyval.combinersStruct = combinersStruct;
924                ;
925    break;}
926case 3:
927#line 86 "rc1.0_grammar.y"
928{
929                        CombinersStruct combinersStruct;
930                        combinersStruct.Init(yyvsp[-1].generalCombinersStruct, yyvsp[0].finalCombinerStruct, yyvsp[-3].constColorStruct, yyvsp[-2].constColorStruct);
931                        yyval.combinersStruct = combinersStruct;
932                ;
933    break;}
934case 4:
935#line 92 "rc1.0_grammar.y"
936{
937                        CombinersStruct combinersStruct;
938                        combinersStruct.Init(yyvsp[-1].generalCombinersStruct, yyvsp[0].finalCombinerStruct);
939                        yyval.combinersStruct = combinersStruct;
940                ;
941    break;}
942case 5:
943#line 98 "rc1.0_grammar.y"
944{
945                        GeneralCombinersStruct generalCombinersStruct;
946                        generalCombinersStruct.Init();
947                        CombinersStruct combinersStruct;
948                        combinersStruct.Init(generalCombinersStruct, yyvsp[0].finalCombinerStruct, yyvsp[-1].constColorStruct);
949                        yyval.combinersStruct = combinersStruct;
950                ;
951    break;}
952case 6:
953#line 106 "rc1.0_grammar.y"
954{
955                        GeneralCombinersStruct generalCombinersStruct;
956                        generalCombinersStruct.Init();
957                        CombinersStruct combinersStruct;
958                        combinersStruct.Init(generalCombinersStruct, yyvsp[0].finalCombinerStruct, yyvsp[-2].constColorStruct, yyvsp[-1].constColorStruct);
959                        yyval.combinersStruct = combinersStruct;
960                ;
961    break;}
962case 7:
963#line 114 "rc1.0_grammar.y"
964{
965                        GeneralCombinersStruct generalCombinersStruct;
966                        generalCombinersStruct.Init();
967                        CombinersStruct combinersStruct;
968                        combinersStruct.Init(generalCombinersStruct, yyvsp[0].finalCombinerStruct);
969                        yyval.combinersStruct = combinersStruct;
970                ;
971    break;}
972case 8:
973#line 124 "rc1.0_grammar.y"
974{
975                        ConstColorStruct constColorStruct;
976                        constColorStruct.Init(yyvsp[-11].registerEnum, yyvsp[-8].fval, yyvsp[-6].fval, yyvsp[-4].fval, yyvsp[-2].fval);
977                        yyval.constColorStruct = constColorStruct;
978                ;
979    break;}
980case 9:
981#line 133 "rc1.0_grammar.y"
982{
983                        yyvsp[-1].generalCombinersStruct += yyvsp[0].generalCombinerStruct;
984                        yyval.generalCombinersStruct = yyvsp[-1].generalCombinersStruct;
985                ;
986    break;}
987case 10:
988#line 138 "rc1.0_grammar.y"
989{
990                        GeneralCombinersStruct generalCombinersStruct;
991                        generalCombinersStruct.Init(yyvsp[0].generalCombinerStruct);
992                        yyval.generalCombinersStruct = generalCombinersStruct;
993                ;
994    break;}
995case 11:
996#line 146 "rc1.0_grammar.y"
997{
998                        GeneralCombinerStruct generalCombinerStruct;
999                        generalCombinerStruct.Init(yyvsp[-2].generalPortionStruct, yyvsp[-1].generalPortionStruct);
1000                        yyval.generalCombinerStruct = generalCombinerStruct;
1001                ;
1002    break;}
1003case 12:
1004#line 152 "rc1.0_grammar.y"
1005{
1006                        GeneralCombinerStruct generalCombinerStruct;
1007                        generalCombinerStruct.Init(yyvsp[-2].generalPortionStruct, yyvsp[-1].generalPortionStruct, yyvsp[-3].constColorStruct);
1008                        yyval.generalCombinerStruct = generalCombinerStruct;
1009                ;
1010    break;}
1011case 13:
1012#line 158 "rc1.0_grammar.y"
1013{
1014                        GeneralCombinerStruct generalCombinerStruct;
1015                        generalCombinerStruct.Init(yyvsp[-2].generalPortionStruct, yyvsp[-1].generalPortionStruct, yyvsp[-4].constColorStruct, yyvsp[-3].constColorStruct);
1016                        yyval.generalCombinerStruct = generalCombinerStruct;
1017                ;
1018    break;}
1019case 14:
1020#line 164 "rc1.0_grammar.y"
1021{
1022                        GeneralCombinerStruct generalCombinerStruct;
1023                        generalCombinerStruct.Init(yyvsp[-1].generalPortionStruct);
1024                        yyval.generalCombinerStruct = generalCombinerStruct;
1025                ;
1026    break;}
1027case 15:
1028#line 170 "rc1.0_grammar.y"
1029{
1030                        GeneralCombinerStruct generalCombinerStruct;
1031                        generalCombinerStruct.Init(yyvsp[-1].generalPortionStruct, yyvsp[-2].constColorStruct);
1032                        yyval.generalCombinerStruct = generalCombinerStruct;
1033                ;
1034    break;}
1035case 16:
1036#line 176 "rc1.0_grammar.y"
1037{
1038                        GeneralCombinerStruct generalCombinerStruct;
1039                        generalCombinerStruct.Init(yyvsp[-1].generalPortionStruct, yyvsp[-3].constColorStruct, yyvsp[-2].constColorStruct);
1040                        yyval.generalCombinerStruct = generalCombinerStruct;
1041                ;
1042    break;}
1043case 17:
1044#line 184 "rc1.0_grammar.y"
1045{
1046                        GeneralPortionStruct generalPortionStruct;
1047                        generalPortionStruct.Init(yyvsp[-4].ival, yyvsp[-2].generalFunctionStruct, yyvsp[-1].biasScaleEnum);
1048                        yyval.generalPortionStruct = generalPortionStruct;
1049                ;
1050    break;}
1051case 18:
1052#line 190 "rc1.0_grammar.y"
1053{
1054                        BiasScaleEnum noScale;
1055                        noScale.word = RCP_SCALE_BY_ONE;
1056                        GeneralPortionStruct generalPortionStruct;
1057                        generalPortionStruct.Init(yyvsp[-3].ival, yyvsp[-1].generalFunctionStruct, noScale);
1058                        yyval.generalPortionStruct = generalPortionStruct;
1059                ;
1060    break;}
1061case 19:
1062#line 200 "rc1.0_grammar.y"
1063{
1064                        yyval.ival = yyvsp[0].ival;
1065                ;
1066    break;}
1067case 20:
1068#line 204 "rc1.0_grammar.y"
1069{
1070                        yyval.ival = yyvsp[0].ival;
1071                ;
1072    break;}
1073case 21:
1074#line 210 "rc1.0_grammar.y"
1075{
1076                        MappedRegisterStruct reg;
1077                        reg.Init(yyvsp[0].registerEnum, GL_SIGNED_IDENTITY_NV);
1078                        yyval.mappedRegisterStruct = reg;
1079                ;
1080    break;}
1081case 22:
1082#line 216 "rc1.0_grammar.y"
1083{
1084                        MappedRegisterStruct reg;
1085                        reg.Init(yyvsp[0].registerEnum, GL_SIGNED_NEGATE_NV);
1086                        yyval.mappedRegisterStruct = reg;
1087                ;
1088    break;}
1089case 23:
1090#line 222 "rc1.0_grammar.y"
1091{
1092                        MappedRegisterStruct reg;
1093                        reg.Init(yyvsp[-1].registerEnum, GL_EXPAND_NORMAL_NV);
1094                        yyval.mappedRegisterStruct = reg;
1095                ;
1096    break;}
1097case 24:
1098#line 228 "rc1.0_grammar.y"
1099{
1100                        MappedRegisterStruct reg;
1101                        reg.Init(yyvsp[-1].registerEnum, GL_EXPAND_NEGATE_NV);
1102                        yyval.mappedRegisterStruct = reg;
1103                ;
1104    break;}
1105case 25:
1106#line 234 "rc1.0_grammar.y"
1107{
1108                        MappedRegisterStruct reg;
1109                        reg.Init(yyvsp[-1].registerEnum, GL_HALF_BIAS_NORMAL_NV);
1110                        yyval.mappedRegisterStruct = reg;
1111                ;
1112    break;}
1113case 26:
1114#line 240 "rc1.0_grammar.y"
1115{
1116                        MappedRegisterStruct reg;
1117                        reg.Init(yyvsp[-1].registerEnum, GL_HALF_BIAS_NEGATE_NV);
1118                        yyval.mappedRegisterStruct = reg;
1119                ;
1120    break;}
1121case 27:
1122#line 246 "rc1.0_grammar.y"
1123{
1124                        MappedRegisterStruct reg;
1125                        reg.Init(yyvsp[-1].registerEnum, GL_UNSIGNED_IDENTITY_NV);
1126                        yyval.mappedRegisterStruct = reg;
1127                ;
1128    break;}
1129case 28:
1130#line 252 "rc1.0_grammar.y"
1131{
1132                        MappedRegisterStruct reg;
1133                        reg.Init(yyvsp[-1].registerEnum, GL_UNSIGNED_INVERT_NV);
1134                        yyval.mappedRegisterStruct = reg;
1135                ;
1136    break;}
1137case 29:
1138#line 260 "rc1.0_grammar.y"
1139{
1140                        GeneralFunctionStruct generalFunction;
1141                        generalFunction.Init(yyvsp[-1].opStruct, yyvsp[0].opStruct);
1142                        yyval.generalFunctionStruct = generalFunction;
1143                ;
1144    break;}
1145case 30:
1146#line 266 "rc1.0_grammar.y"
1147{
1148                        GeneralFunctionStruct generalFunction;
1149                        generalFunction.Init(yyvsp[-1].opStruct, yyvsp[0].opStruct);
1150                        yyval.generalFunctionStruct = generalFunction;
1151                ;
1152    break;}
1153case 31:
1154#line 272 "rc1.0_grammar.y"
1155{
1156                        GeneralFunctionStruct generalFunction;
1157                        generalFunction.Init(yyvsp[-1].opStruct, yyvsp[0].opStruct);
1158                        yyval.generalFunctionStruct = generalFunction;
1159                ;
1160    break;}
1161case 32:
1162#line 278 "rc1.0_grammar.y"
1163{
1164                        GeneralFunctionStruct generalFunction;
1165                        generalFunction.Init(yyvsp[0].opStruct);
1166                        yyval.generalFunctionStruct = generalFunction;
1167                ;
1168    break;}
1169case 33:
1170#line 284 "rc1.0_grammar.y"
1171{
1172                        GeneralFunctionStruct generalFunction;
1173                        generalFunction.Init(yyvsp[-1].opStruct, yyvsp[0].opStruct);
1174                        yyval.generalFunctionStruct = generalFunction;
1175                ;
1176    break;}
1177case 34:
1178#line 290 "rc1.0_grammar.y"
1179{
1180                        GeneralFunctionStruct generalFunction;
1181                        generalFunction.Init(yyvsp[-2].opStruct, yyvsp[-1].opStruct, yyvsp[0].opStruct);
1182                        yyval.generalFunctionStruct = generalFunction;
1183                ;
1184    break;}
1185case 35:
1186#line 296 "rc1.0_grammar.y"
1187{
1188                        GeneralFunctionStruct generalFunction;
1189                        generalFunction.Init(yyvsp[-2].opStruct, yyvsp[-1].opStruct, yyvsp[0].opStruct);
1190                        yyval.generalFunctionStruct = generalFunction;
1191                ;
1192    break;}
1193case 36:
1194#line 302 "rc1.0_grammar.y"
1195{
1196                        GeneralFunctionStruct generalFunction;
1197                        generalFunction.Init(yyvsp[0].opStruct);
1198                        yyval.generalFunctionStruct = generalFunction;
1199                ;
1200    break;}
1201case 37:
1202#line 310 "rc1.0_grammar.y"
1203{
1204                        OpStruct dotFunction;
1205                        dotFunction.Init(RCP_DOT, yyvsp[-5].registerEnum, yyvsp[-3].mappedRegisterStruct, yyvsp[-1].mappedRegisterStruct);
1206                        yyval.opStruct = dotFunction;
1207                ;
1208    break;}
1209case 38:
1210#line 318 "rc1.0_grammar.y"
1211{
1212                        OpStruct mulFunction;
1213                        mulFunction.Init(RCP_MUL, yyvsp[-5].registerEnum, yyvsp[-3].mappedRegisterStruct, yyvsp[-1].mappedRegisterStruct);
1214                        yyval.opStruct = mulFunction;
1215                ;
1216    break;}
1217case 39:
1218#line 324 "rc1.0_grammar.y"
1219{
1220                        RegisterEnum zero;
1221                        zero.word = RCP_ZERO;
1222                        MappedRegisterStruct one;
1223                        one.Init(zero, GL_UNSIGNED_INVERT_NV);
1224                        OpStruct mulFunction;
1225                        mulFunction.Init(RCP_MUL, yyvsp[-3].registerEnum, yyvsp[-1].mappedRegisterStruct, one);
1226                        yyval.opStruct = mulFunction;
1227                ;
1228    break;}
1229case 40:
1230#line 336 "rc1.0_grammar.y"
1231{
1232                        OpStruct muxFunction;
1233                        muxFunction.Init(RCP_MUX, yyvsp[-5].registerEnum);
1234                        yyval.opStruct = muxFunction;
1235                ;
1236    break;}
1237case 41:
1238#line 344 "rc1.0_grammar.y"
1239{
1240                        OpStruct sumFunction;
1241                        sumFunction.Init(RCP_SUM, yyvsp[-5].registerEnum);
1242                        yyval.opStruct = sumFunction;
1243                ;
1244    break;}
1245case 42:
1246#line 352 "rc1.0_grammar.y"
1247{
1248                        yyval.biasScaleEnum = yyvsp[-3].biasScaleEnum;
1249                ;
1250    break;}
1251case 43:
1252#line 356 "rc1.0_grammar.y"
1253{
1254                        yyval.biasScaleEnum = yyvsp[-3].biasScaleEnum;
1255                ;
1256    break;}
1257case 44:
1258#line 360 "rc1.0_grammar.y"
1259{
1260                        yyval.biasScaleEnum = yyvsp[-3].biasScaleEnum;
1261                ;
1262    break;}
1263case 45:
1264#line 364 "rc1.0_grammar.y"
1265{
1266                        yyval.biasScaleEnum = yyvsp[-3].biasScaleEnum;
1267                ;
1268    break;}
1269case 46:
1270#line 368 "rc1.0_grammar.y"
1271{
1272                        yyval.biasScaleEnum = yyvsp[-3].biasScaleEnum;
1273                ;
1274    break;}
1275case 47:
1276#line 374 "rc1.0_grammar.y"
1277{
1278                        MappedRegisterStruct reg;
1279                        reg.Init(yyvsp[0].registerEnum, GL_UNSIGNED_IDENTITY_NV);
1280                        yyval.mappedRegisterStruct = reg;
1281                ;
1282    break;}
1283case 48:
1284#line 380 "rc1.0_grammar.y"
1285{
1286                        MappedRegisterStruct reg;
1287                        reg.Init(yyvsp[-1].registerEnum, GL_UNSIGNED_IDENTITY_NV);
1288                        yyval.mappedRegisterStruct = reg;
1289                ;
1290    break;}
1291case 49:
1292#line 386 "rc1.0_grammar.y"
1293{
1294                        MappedRegisterStruct reg;
1295                        reg.Init(yyvsp[-1].registerEnum, GL_UNSIGNED_INVERT_NV);
1296                        yyval.mappedRegisterStruct = reg;
1297                ;
1298    break;}
1299case 50:
1300#line 392 "rc1.0_grammar.y"
1301{
1302                        MappedRegisterStruct reg;
1303                        reg.Init(yyvsp[0].registerEnum);
1304                        yyval.mappedRegisterStruct = reg;
1305                ;
1306    break;}
1307case 51:
1308#line 398 "rc1.0_grammar.y"
1309{
1310                        MappedRegisterStruct reg;
1311                        reg.Init(yyvsp[-1].registerEnum, GL_UNSIGNED_IDENTITY_NV);
1312                        yyval.mappedRegisterStruct = reg;
1313                ;
1314    break;}
1315case 52:
1316#line 404 "rc1.0_grammar.y"
1317{
1318                        MappedRegisterStruct reg;
1319                        reg.Init(yyvsp[-1].registerEnum, GL_UNSIGNED_INVERT_NV);
1320                        yyval.mappedRegisterStruct = reg;
1321                ;
1322    break;}
1323case 53:
1324#line 410 "rc1.0_grammar.y"
1325{
1326                        MappedRegisterStruct reg;
1327                        reg.Init(yyvsp[0].registerEnum);
1328                        yyval.mappedRegisterStruct = reg;
1329                ;
1330    break;}
1331case 54:
1332#line 416 "rc1.0_grammar.y"
1333{
1334                        MappedRegisterStruct reg;
1335                        reg.Init(yyvsp[-1].registerEnum, GL_UNSIGNED_IDENTITY_NV);
1336                        yyval.mappedRegisterStruct = reg;
1337                ;
1338    break;}
1339case 55:
1340#line 422 "rc1.0_grammar.y"
1341{
1342                        MappedRegisterStruct reg;
1343                        reg.Init(yyvsp[-1].registerEnum, GL_UNSIGNED_INVERT_NV);
1344                        yyval.mappedRegisterStruct = reg;
1345                ;
1346    break;}
1347case 56:
1348#line 430 "rc1.0_grammar.y"
1349{
1350                        FinalCombinerStruct finalCombinerStruct;
1351                        finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, yyvsp[-1].finalAlphaFunctionStruct, false);
1352                        yyval.finalCombinerStruct = finalCombinerStruct;
1353                ;
1354    break;}
1355case 57:
1356#line 436 "rc1.0_grammar.y"
1357{
1358                        FinalCombinerStruct finalCombinerStruct;
1359                        finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, yyvsp[-1].finalAlphaFunctionStruct, true);
1360                        yyval.finalCombinerStruct = finalCombinerStruct;
1361                ;
1362    break;}
1363case 58:
1364#line 442 "rc1.0_grammar.y"
1365{
1366                        FinalCombinerStruct finalCombinerStruct;
1367                        finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, yyvsp[-1].finalAlphaFunctionStruct, false, yyvsp[-2].finalProductStruct);
1368                        yyval.finalCombinerStruct = finalCombinerStruct;
1369                ;
1370    break;}
1371case 59:
1372#line 448 "rc1.0_grammar.y"
1373{
1374                        FinalCombinerStruct finalCombinerStruct;
1375                        finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, yyvsp[-1].finalAlphaFunctionStruct, true, yyvsp[-2].finalProductStruct);
1376                        yyval.finalCombinerStruct = finalCombinerStruct;
1377                ;
1378    break;}
1379case 60:
1380#line 454 "rc1.0_grammar.y"
1381{
1382                        FinalCombinerStruct finalCombinerStruct;
1383                        finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, yyvsp[-1].finalAlphaFunctionStruct, true, yyvsp[-3].finalProductStruct);
1384                        yyval.finalCombinerStruct = finalCombinerStruct;
1385                ;
1386    break;}
1387case 61:
1388#line 461 "rc1.0_grammar.y"
1389{
1390                        FinalCombinerStruct finalCombinerStruct;
1391                        finalCombinerStruct.Init(yyvsp[-1].finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, false);
1392                        yyval.finalCombinerStruct = finalCombinerStruct;
1393                ;
1394    break;}
1395case 62:
1396#line 467 "rc1.0_grammar.y"
1397{
1398                        FinalCombinerStruct finalCombinerStruct;
1399                        finalCombinerStruct.Init(yyvsp[-1].finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, true);
1400                        yyval.finalCombinerStruct = finalCombinerStruct;
1401                ;
1402    break;}
1403case 63:
1404#line 473 "rc1.0_grammar.y"
1405{
1406                        FinalCombinerStruct finalCombinerStruct;
1407                        finalCombinerStruct.Init(yyvsp[-1].finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, false, yyvsp[-2].finalProductStruct);
1408                        yyval.finalCombinerStruct = finalCombinerStruct;
1409                ;
1410    break;}
1411case 64:
1412#line 479 "rc1.0_grammar.y"
1413{
1414                        FinalCombinerStruct finalCombinerStruct;
1415                        finalCombinerStruct.Init(yyvsp[-1].finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, true, yyvsp[-2].finalProductStruct);
1416                        yyval.finalCombinerStruct = finalCombinerStruct;
1417                ;
1418    break;}
1419case 65:
1420#line 485 "rc1.0_grammar.y"
1421{
1422                        FinalCombinerStruct finalCombinerStruct;
1423                        finalCombinerStruct.Init(yyvsp[-1].finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, true, yyvsp[-3].finalProductStruct);
1424                        yyval.finalCombinerStruct = finalCombinerStruct;
1425                ;
1426    break;}
1427case 66:
1428#line 492 "rc1.0_grammar.y"
1429{
1430                        FinalCombinerStruct finalCombinerStruct;
1431                        FinalAlphaFunctionStruct finalAlphaFunctionStruct;
1432                        finalAlphaFunctionStruct.ZeroOut();
1433                        finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, finalAlphaFunctionStruct, false);
1434                        yyval.finalCombinerStruct = finalCombinerStruct;
1435                ;
1436    break;}
1437case 67:
1438#line 500 "rc1.0_grammar.y"
1439{
1440                        FinalCombinerStruct finalCombinerStruct;
1441                        FinalAlphaFunctionStruct finalAlphaFunctionStruct;
1442                        finalAlphaFunctionStruct.ZeroOut();
1443                        finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, finalAlphaFunctionStruct, true);
1444                        yyval.finalCombinerStruct = finalCombinerStruct;
1445                ;
1446    break;}
1447case 68:
1448#line 508 "rc1.0_grammar.y"
1449{
1450                        FinalCombinerStruct finalCombinerStruct;
1451                        FinalAlphaFunctionStruct finalAlphaFunctionStruct;
1452                        finalAlphaFunctionStruct.ZeroOut();
1453                        finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, finalAlphaFunctionStruct, false, yyvsp[-1].finalProductStruct);
1454                        yyval.finalCombinerStruct = finalCombinerStruct;
1455                ;
1456    break;}
1457case 69:
1458#line 516 "rc1.0_grammar.y"
1459{
1460                        FinalCombinerStruct finalCombinerStruct;
1461                        FinalAlphaFunctionStruct finalAlphaFunctionStruct;
1462                        finalAlphaFunctionStruct.ZeroOut();
1463                        finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, finalAlphaFunctionStruct, true, yyvsp[-1].finalProductStruct);
1464                        yyval.finalCombinerStruct = finalCombinerStruct;
1465                ;
1466    break;}
1467case 70:
1468#line 524 "rc1.0_grammar.y"
1469{
1470                        FinalCombinerStruct finalCombinerStruct;
1471                        FinalAlphaFunctionStruct finalAlphaFunctionStruct;
1472                        finalAlphaFunctionStruct.ZeroOut();
1473                        finalCombinerStruct.Init(yyvsp[0].finalRgbFunctionStruct, finalAlphaFunctionStruct, true, yyvsp[-2].finalProductStruct);
1474                        yyval.finalCombinerStruct = finalCombinerStruct;
1475                ;
1476    break;}
1477case 71:
1478#line 533 "rc1.0_grammar.y"
1479{
1480                        FinalCombinerStruct finalCombinerStruct;
1481                        FinalRgbFunctionStruct finalRgbFunctionStruct;
1482                        finalRgbFunctionStruct.ZeroOut();
1483                        finalCombinerStruct.Init(finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, false);
1484                        yyval.finalCombinerStruct = finalCombinerStruct;
1485                ;
1486    break;}
1487case 72:
1488#line 541 "rc1.0_grammar.y"
1489{
1490                        FinalCombinerStruct finalCombinerStruct;
1491                        FinalRgbFunctionStruct finalRgbFunctionStruct;
1492                        finalRgbFunctionStruct.ZeroOut();
1493                        finalCombinerStruct.Init(finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, true);
1494                        yyval.finalCombinerStruct = finalCombinerStruct;
1495                ;
1496    break;}
1497case 73:
1498#line 549 "rc1.0_grammar.y"
1499{
1500                        FinalCombinerStruct finalCombinerStruct;
1501                        FinalRgbFunctionStruct finalRgbFunctionStruct;
1502                        finalRgbFunctionStruct.ZeroOut();
1503                        finalCombinerStruct.Init(finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, false, yyvsp[-1].finalProductStruct);
1504                        yyval.finalCombinerStruct = finalCombinerStruct;
1505                ;
1506    break;}
1507case 74:
1508#line 557 "rc1.0_grammar.y"
1509{
1510                        FinalCombinerStruct finalCombinerStruct;
1511                        FinalRgbFunctionStruct finalRgbFunctionStruct;
1512                        finalRgbFunctionStruct.ZeroOut();
1513                        finalCombinerStruct.Init(finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, true, yyvsp[-1].finalProductStruct);
1514                        yyval.finalCombinerStruct = finalCombinerStruct;
1515                ;
1516    break;}
1517case 75:
1518#line 565 "rc1.0_grammar.y"
1519{
1520                        FinalCombinerStruct finalCombinerStruct;
1521                        FinalRgbFunctionStruct finalRgbFunctionStruct;
1522                        finalRgbFunctionStruct.ZeroOut();
1523                        finalCombinerStruct.Init(finalRgbFunctionStruct, yyvsp[0].finalAlphaFunctionStruct, true, yyvsp[-2].finalProductStruct);
1524                        yyval.finalCombinerStruct = finalCombinerStruct;
1525                ;
1526    break;}
1527case 76:
1528#line 575 "rc1.0_grammar.y"
1529{
1530                        yyval.ival = yyvsp[-3].ival;
1531                ;
1532    break;}
1533case 77:
1534#line 581 "rc1.0_grammar.y"
1535{
1536                        FinalProductStruct finalProductStruct;
1537                        finalProductStruct.Init(yyvsp[-3].mappedRegisterStruct, yyvsp[-1].mappedRegisterStruct);
1538                        yyval.finalProductStruct = finalProductStruct;
1539                ;
1540    break;}
1541case 78:
1542#line 589 "rc1.0_grammar.y"
1543{
1544                        FinalRgbFunctionStruct finalRgbFunctionStruct;
1545                        finalRgbFunctionStruct.Init(yyvsp[-8].mappedRegisterStruct, yyvsp[-6].mappedRegisterStruct, yyvsp[-4].mappedRegisterStruct, yyvsp[-1].mappedRegisterStruct);
1546                        yyval.finalRgbFunctionStruct = finalRgbFunctionStruct;
1547                ;
1548    break;}
1549case 79:
1550#line 595 "rc1.0_grammar.y"
1551{
1552                        FinalRgbFunctionStruct finalRgbFunctionStruct;
1553                        finalRgbFunctionStruct.Init(yyvsp[-6].mappedRegisterStruct, yyvsp[-4].mappedRegisterStruct, yyvsp[-2].mappedRegisterStruct, yyvsp[-10].mappedRegisterStruct);
1554                        yyval.finalRgbFunctionStruct = finalRgbFunctionStruct;
1555                ;
1556    break;}
1557case 80:
1558#line 601 "rc1.0_grammar.y"
1559{
1560                        RegisterEnum zero;
1561                        zero.word = RCP_ZERO;
1562                        MappedRegisterStruct reg;
1563                        reg.Init(zero, GL_UNSIGNED_IDENTITY_NV);
1564                        FinalRgbFunctionStruct finalRgbFunctionStruct;
1565                        finalRgbFunctionStruct.Init(yyvsp[-6].mappedRegisterStruct, yyvsp[-4].mappedRegisterStruct, yyvsp[-2].mappedRegisterStruct, reg);
1566                        yyval.finalRgbFunctionStruct = finalRgbFunctionStruct;
1567                ;
1568    break;}
1569case 81:
1570#line 611 "rc1.0_grammar.y"
1571{
1572                        RegisterEnum zero;
1573                        zero.word = RCP_ZERO;
1574                        MappedRegisterStruct reg1;
1575                        reg1.Init(zero, GL_UNSIGNED_IDENTITY_NV);
1576                        MappedRegisterStruct reg2;
1577                        reg2.Init(zero, GL_UNSIGNED_IDENTITY_NV);
1578                        FinalRgbFunctionStruct finalRgbFunctionStruct;
1579                        finalRgbFunctionStruct.Init(yyvsp[-3].mappedRegisterStruct, yyvsp[-1].mappedRegisterStruct, reg1, reg2);
1580                        yyval.finalRgbFunctionStruct = finalRgbFunctionStruct;
1581                ;
1582    break;}
1583case 82:
1584#line 623 "rc1.0_grammar.y"
1585{
1586                        RegisterEnum zero;
1587                        zero.word = RCP_ZERO;
1588                        MappedRegisterStruct reg1;
1589                        reg1.Init(zero, GL_UNSIGNED_IDENTITY_NV);
1590                        FinalRgbFunctionStruct finalRgbFunctionStruct;
1591                        finalRgbFunctionStruct.Init(yyvsp[-5].mappedRegisterStruct, yyvsp[-3].mappedRegisterStruct, reg1, yyvsp[-1].mappedRegisterStruct);
1592                        yyval.finalRgbFunctionStruct = finalRgbFunctionStruct;
1593                ;
1594    break;}
1595case 83:
1596#line 633 "rc1.0_grammar.y"
1597{
1598                        RegisterEnum zero;
1599                        zero.word = RCP_ZERO;
1600                        MappedRegisterStruct reg1;
1601                        reg1.Init(zero, GL_UNSIGNED_IDENTITY_NV);
1602                        MappedRegisterStruct reg2;
1603                        reg2.Init(zero, GL_UNSIGNED_IDENTITY_NV);
1604                        MappedRegisterStruct reg3;
1605                        reg3.Init(zero, GL_UNSIGNED_IDENTITY_NV);
1606                        FinalRgbFunctionStruct finalRgbFunctionStruct;
1607                        finalRgbFunctionStruct.Init(reg1, reg2, reg3, yyvsp[-1].mappedRegisterStruct);
1608                        yyval.finalRgbFunctionStruct = finalRgbFunctionStruct;
1609                ;
1610    break;}
1611case 84:
1612#line 647 "rc1.0_grammar.y"
1613{
1614                        RegisterEnum zero;
1615                        zero.word = RCP_ZERO;
1616                        MappedRegisterStruct reg2;
1617                        reg2.Init(zero, GL_UNSIGNED_INVERT_NV);
1618                        MappedRegisterStruct reg3;
1619                        reg3.Init(zero, GL_UNSIGNED_IDENTITY_NV);
1620                        FinalRgbFunctionStruct finalRgbFunctionStruct;
1621                        finalRgbFunctionStruct.Init(yyvsp[-3].mappedRegisterStruct, reg2, reg3, yyvsp[-1].mappedRegisterStruct);
1622                        yyval.finalRgbFunctionStruct = finalRgbFunctionStruct;
1623                ;
1624    break;}
1625case 85:
1626#line 661 "rc1.0_grammar.y"
1627{
1628                        FinalAlphaFunctionStruct finalAlphaFunctionStruct;
1629                        finalAlphaFunctionStruct.Init(yyvsp[-1].mappedRegisterStruct);
1630                        yyval.finalAlphaFunctionStruct = finalAlphaFunctionStruct;
1631                ;
1632    break;}
1633case 86:
1634#line 669 "rc1.0_grammar.y"
1635{
1636                        yyval.registerEnum = yyvsp[0].registerEnum;
1637                ;
1638    break;}
1639case 87:
1640#line 673 "rc1.0_grammar.y"
1641{
1642                        yyval.registerEnum = yyvsp[0].registerEnum;
1643                ;
1644    break;}
1645}
1646   /* the action file gets copied in in place of this dollarsign */
1647#line 543 "/usr/share/bison.simple"
1648
1649  yyvsp -= yylen;
1650  yyssp -= yylen;
1651#ifdef YYLSP_NEEDED
1652  yylsp -= yylen;
1653#endif
1654
1655#if YYDEBUG != 0
1656  if (yydebug)
1657    {
1658      short *ssp1 = yyss - 1;
1659      fprintf (stderr, "state stack now");
1660      while (ssp1 != yyssp)
1661        fprintf (stderr, " %d", *++ssp1);
1662      fprintf (stderr, "\n");
1663    }
1664#endif
1665
1666  *++yyvsp = yyval;
1667
1668#ifdef YYLSP_NEEDED
1669  yylsp++;
1670  if (yylen == 0)
1671    {
1672      yylsp->first_line = yylloc.first_line;
1673      yylsp->first_column = yylloc.first_column;
1674      yylsp->last_line = (yylsp-1)->last_line;
1675      yylsp->last_column = (yylsp-1)->last_column;
1676      yylsp->text = 0;
1677    }
1678  else
1679    {
1680      yylsp->last_line = (yylsp+yylen-1)->last_line;
1681      yylsp->last_column = (yylsp+yylen-1)->last_column;
1682    }
1683#endif
1684
1685  /* Now "shift" the result of the reduction.
1686     Determine what state that goes to,
1687     based on the state we popped back to
1688     and the rule number reduced by.  */
1689
1690  yyn = yyr1[yyn];
1691
1692  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
1693  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1694    yystate = yytable[yystate];
1695  else
1696    yystate = yydefgoto[yyn - YYNTBASE];
1697
1698  goto yynewstate;
1699
1700yyerrlab:   /* here on detecting error */
1701
1702  if (! yyerrstatus)
1703    /* If not already recovering from an error, report this error.  */
1704    {
1705      ++yynerrs;
1706
1707#ifdef YYERROR_VERBOSE
1708      yyn = yypact[yystate];
1709
1710      if (yyn > YYFLAG && yyn < YYLAST)
1711        {
1712          int size = 0;
1713          char *msg;
1714          int x, count;
1715
1716          count = 0;
1717          /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
1718          for (x = (yyn < 0 ? -yyn : 0);
1719               x < (sizeof(yytname) / sizeof(char *)); x++)
1720            if (yycheck[x + yyn] == x)
1721              size += strlen(yytname[x]) + 15, count++;
1722          msg = (char *) malloc(size + 15);
1723          if (msg != 0)
1724            {
1725              strcpy(msg, "parse error");
1726
1727              if (count < 5)
1728                {
1729                  count = 0;
1730                  for (x = (yyn < 0 ? -yyn : 0);
1731                       x < (sizeof(yytname) / sizeof(char *)); x++)
1732                    if (yycheck[x + yyn] == x)
1733                      {
1734                        strcat(msg, count == 0 ? ", expecting `" : " or `");
1735                        strcat(msg, yytname[x]);
1736                        strcat(msg, "'");
1737                        count++;
1738                      }
1739                }
1740              yyerror(msg);
1741              free(msg);
1742            }
1743          else
1744            yyerror ("parse error; also virtual memory exceeded");
1745        }
1746      else
1747#endif /* YYERROR_VERBOSE */
1748        yyerror("parse error");
1749    }
1750
1751  goto yyerrlab1;
1752yyerrlab1:   /* here on error raised explicitly by an action */
1753
1754  if (yyerrstatus == 3)
1755    {
1756      /* if just tried and failed to reuse lookahead token after an error, discard it.  */
1757
1758      /* return failure if at end of input */
1759      if (yychar == YYEOF)
1760        YYABORT;
1761
1762#if YYDEBUG != 0
1763      if (yydebug)
1764        fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
1765#endif
1766
1767      yychar = YYEMPTY;
1768    }
1769
1770  /* Else will try to reuse lookahead token
1771     after shifting the error token.  */
1772
1773  yyerrstatus = 3;              /* Each real token shifted decrements this */
1774
1775  goto yyerrhandle;
1776
1777yyerrdefault:  /* current state does not do anything special for the error token. */
1778
1779#if 0
1780  /* This is wrong; only states that explicitly want error tokens
1781     should shift them.  */
1782  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
1783  if (yyn) goto yydefault;
1784#endif
1785
1786yyerrpop:   /* pop the current state because it cannot handle the error token */
1787
1788  if (yyssp == yyss) YYABORT;
1789  yyvsp--;
1790  yystate = *--yyssp;
1791#ifdef YYLSP_NEEDED
1792  yylsp--;
1793#endif
1794
1795#if YYDEBUG != 0
1796  if (yydebug)
1797    {
1798      short *ssp1 = yyss - 1;
1799      fprintf (stderr, "Error: state stack now");
1800      while (ssp1 != yyssp)
1801        fprintf (stderr, " %d", *++ssp1);
1802      fprintf (stderr, "\n");
1803    }
1804#endif
1805
1806yyerrhandle:
1807
1808  yyn = yypact[yystate];
1809  if (yyn == YYFLAG)
1810    goto yyerrdefault;
1811
1812  yyn += YYTERROR;
1813  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1814    goto yyerrdefault;
1815
1816  yyn = yytable[yyn];
1817  if (yyn < 0)
1818    {
1819      if (yyn == YYFLAG)
1820        goto yyerrpop;
1821      yyn = -yyn;
1822      goto yyreduce;
1823    }
1824  else if (yyn == 0)
1825    goto yyerrpop;
1826
1827  if (yyn == YYFINAL)
1828    YYACCEPT;
1829
1830#if YYDEBUG != 0
1831  if (yydebug)
1832    fprintf(stderr, "Shifting error token, ");
1833#endif
1834
1835  *++yyvsp = yylval;
1836#ifdef YYLSP_NEEDED
1837  *++yylsp = yylloc;
1838#endif
1839
1840  yystate = yyn;
1841  goto yynewstate;
1842
1843 yyacceptlab:
1844  /* YYACCEPT comes here.  */
1845  if (yyfree_stacks)
1846    {
1847      free (yyss);
1848      free (yyvs);
1849#ifdef YYLSP_NEEDED
1850      free (yyls);
1851#endif
1852    }
1853  return 0;
1854
1855 yyabortlab:
1856  /* YYABORT comes here.  */
1857  if (yyfree_stacks)
1858    {
1859      free (yyss);
1860      free (yyvs);
1861#ifdef YYLSP_NEEDED
1862      free (yyls);
1863#endif
1864    }
1865  return 1;
1866}
1867#line 678 "rc1.0_grammar.y"
1868
1869void yyerror(char* s)
1870{
1871     errors.set("unrecognized token");
1872}
Note: See TracBrowser for help on using the repository browser.