1 /* A Bison parser, made by GNU Bison 1.875d. */
2
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
20
21 /* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction.
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
25
26 /* Written by Richard Stallman by simplifying the original so called
27 ``semantic'' parser. */
28
29 /* All symbols defined below should begin with yy or YY, to avoid
30 infringing on user name space. This should be done even for local
31 variables, as they might otherwise be expanded by user macros.
32 There are some unavoidable exceptions within include files to
33 define necessary library symbols; they are noted "INFRINGES ON
34 USER NAME SPACE" below. */
35
36 /* Identify Bison output. */
37 #define YYBISON 1
38
39 /* Skeleton name. */
40 #define YYSKELETON_NAME "yacc.c"
41
42 /* Pure parsers. */
43 #define YYPURE 0
44
45 /* Using locations. */
46 #define YYLSP_NEEDED 0
47
48
49
50 /* Tokens. */
51 #ifndef YYTOKENTYPE
52 # define YYTOKENTYPE
53 /* Put the tokens into the symbol table, so that GDB and other debuggers
54 know about them. */
55 enum yytokentype {
56 T_EBC = 258,
57 T_GBC = 259,
58 T_CABS = 260,
59 T_CABSP = 261,
60 T_ABS = 262,
61 T_ABSP = 263,
62 T_NOT = 264,
63 T_MOLECULE = 265,
64 T_MULTIPLICITY = 266,
65 T_CHARGE = 267,
66 T_METHOD = 268,
67 T_BASIS = 269,
68 T_AUXBASIS = 270,
69 T_EQUALS = 271,
70 T_OPTIMIZE = 272,
71 T_GRADIENT = 273,
72 T_BEG_OPT = 274,
73 T_END_OPT = 275,
74 T_CARTESIAN = 276,
75 T_INTERNAL = 277,
76 T_REDUNDANT = 278,
77 T_RESTART = 279,
78 T_CHECKPOINT = 280,
79 T_COLON = 281,
80 T_XC = 282,
81 T_SYMMETRY = 283,
82 T_MEMORY = 284,
83 T_BOHR = 285,
84 T_ANGSTROM = 286,
85 T_GRID = 287,
86 T_FREQUENCIES = 288,
87 T_DOCC = 289,
88 T_SOCC = 290,
89 T_FROZEN_DOCC = 291,
90 T_FROZEN_UOCC = 292,
91 T_ALPHA = 293,
92 T_BETA = 294,
93 T_OO_INPUT_KEYWORD = 295,
94 T_STRING = 296,
95 T_BOOL = 297
96 };
97 #endif
98 #define T_EBC 258
99 #define T_GBC 259
100 #define T_CABS 260
101 #define T_CABSP 261
102 #define T_ABS 262
103 #define T_ABSP 263
104 #define T_NOT 264
105 #define T_MOLECULE 265
106 #define T_MULTIPLICITY 266
107 #define T_CHARGE 267
108 #define T_METHOD 268
109 #define T_BASIS 269
110 #define T_AUXBASIS 270
111 #define T_EQUALS 271
112 #define T_OPTIMIZE 272
113 #define T_GRADIENT 273
114 #define T_BEG_OPT 274
115 #define T_END_OPT 275
116 #define T_CARTESIAN 276
117 #define T_INTERNAL 277
118 #define T_REDUNDANT 278
119 #define T_RESTART 279
120 #define T_CHECKPOINT 280
121 #define T_COLON 281
122 #define T_XC 282
123 #define T_SYMMETRY 283
124 #define T_MEMORY 284
125 #define T_BOHR 285
126 #define T_ANGSTROM 286
127 #define T_GRID 287
128 #define T_FREQUENCIES 288
129 #define T_DOCC 289
130 #define T_SOCC 290
131 #define T_FROZEN_DOCC 291
132 #define T_FROZEN_UOCC 292
133 #define T_ALPHA 293
134 #define T_BETA 294
135 #define T_OO_INPUT_KEYWORD 295
136 #define T_STRING 296
137 #define T_BOOL 297
138
139
140
141
142 /* Copy the first part of user declarations. */
143 #line 1 "parse.yy"
144
145 #ifdef DEC
146 #include <math.h>
147 #else
148 #include <stdlib.h>
149 #endif
150 #include <string.h>
151 #ifdef BISON
152 #define YYDEBUG 0
153 #if YYDEBUG != 0
154 int yydebug =1;
155 #endif /* YYDEBUG != 0 */
156 #endif /* BISON */
157 #if defined(SABER)
158 #define xmalloc malloc
159 #endif
160 #if defined(SGI)
161 #include <alloca.h>
162 #endif
163 #include "mpqcin.h"
164 #define yyerror sc::MPQCIn::yerror
165 #define yyparse sc::MPQCIn::yparse
166 #define yylex sc::MPQCIn::ylex
167 #define yynerrs MPQCInyynerrs
168 #define yychar MPQCInyychar
169
170
171 /* Enabling traces. */
172 #ifndef YYDEBUG
173 # define YYDEBUG 0
174 #endif
175
176 /* Enabling verbose error messages. */
177 #ifdef YYERROR_VERBOSE
178 # undef YYERROR_VERBOSE
179 # define YYERROR_VERBOSE 1
180 #else
181 # define YYERROR_VERBOSE 0
182 #endif
183
184 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
185 #line 28 "parse.yy"
186 typedef union YYSTYPE {
187 char *str;
188 int i;
189 std::vector<int> *nniv;
190 } YYSTYPE;
191 /* Line 191 of yacc.c. */
192 #line 193 "parse.tmp.cc"
193 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
194 # define YYSTYPE_IS_DECLARED 1
195 # define YYSTYPE_IS_TRIVIAL 1
196 #endif
197
198
199
200 /* Copy the second part of user declarations. */
201
202
203 /* Line 214 of yacc.c. */
204 #line 205 "parse.tmp.cc"
205
206 #if ! defined (yyoverflow) || YYERROR_VERBOSE
207
208 # ifndef YYFREE
209 # define YYFREE free
210 # endif
211 # ifndef YYMALLOC
212 # define YYMALLOC malloc
213 # endif
214
215 /* The parser invokes alloca or malloc; define the necessary symbols. */
216
217 # ifdef YYSTACK_USE_ALLOCA
218 # if YYSTACK_USE_ALLOCA
219 # define YYSTACK_ALLOC alloca
220 # endif
221 # else
222 # if defined (alloca) || defined (_ALLOCA_H)
223 # define YYSTACK_ALLOC alloca
224 # else
225 # ifdef __GNUC__
226 # define YYSTACK_ALLOC __builtin_alloca
227 # endif
228 # endif
229 # endif
230
231 # ifdef YYSTACK_ALLOC
232 /* Pacify GCC's `empty if-body' warning. */
233 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
234 # else
235 # if defined (__STDC__) || defined (__cplusplus)
236 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
237 # define YYSIZE_T size_t
238 # endif
239 # define YYSTACK_ALLOC YYMALLOC
240 # define YYSTACK_FREE YYFREE
241 # endif
242 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
243
244
245 #if (! defined (yyoverflow) \
246 && (! defined (__cplusplus) \
247 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
248
249 /* A type that is properly aligned for any stack member. */
250 union yyalloc
251 {
252 short int yyss;
253 YYSTYPE yyvs;
254 };
255
256 /* The size of the maximum gap between one aligned stack and the next. */
257 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
258
259 /* The size of an array large to enough to hold all stacks, each with
260 N elements. */
261 # define YYSTACK_BYTES(N) \
262 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
263 + YYSTACK_GAP_MAXIMUM)
264
265 /* Copy COUNT objects from FROM to TO. The source and destination do
266 not overlap. */
267 # ifndef YYCOPY
268 # if defined (__GNUC__) && 1 < __GNUC__
269 # define YYCOPY(To, From, Count) \
270 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
271 # else
272 # define YYCOPY(To, From, Count) \
273 do \
274 { \
275 register YYSIZE_T yyi; \
276 for (yyi = 0; yyi < (Count); yyi++) \
277 (To)[yyi] = (From)[yyi]; \
278 } \
279 while (0)
280 # endif
281 # endif
282
283 /* Relocate STACK from its old location to the new one. The
284 local variables YYSIZE and YYSTACKSIZE give the old and new number of
285 elements in the stack, and YYPTR gives the new location of the
286 stack. Advance YYPTR to a properly aligned location for the next
287 stack. */
288 # define YYSTACK_RELOCATE(Stack) \
289 do \
290 { \
291 YYSIZE_T yynewbytes; \
292 YYCOPY (&yyptr->Stack, Stack, yysize); \
293 Stack = &yyptr->Stack; \
294 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
295 yyptr += yynewbytes / sizeof (*yyptr); \
296 } \
297 while (0)
298
299 #endif
300
301 #if defined (__STDC__) || defined (__cplusplus)
302 typedef signed char yysigned_char;
303 #else
304 typedef short int yysigned_char;
305 #endif
306
307 /* YYFINAL -- State number of the termination state. */
308 #define YYFINAL 3
309 /* YYLAST -- Last index in YYTABLE. */
310 #define YYLAST 96
311
312 /* YYNTOKENS -- Number of terminals. */
313 #define YYNTOKENS 43
314 /* YYNNTS -- Number of nonterminals. */
315 #define YYNNTS 24
316 /* YYNRULES -- Number of rules. */
317 #define YYNRULES 66
318 /* YYNRULES -- Number of states. */
319 #define YYNSTATES 119
320
321 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
322 #define YYUNDEFTOK 2
323 #define YYMAXUTOK 297
324
325 #define YYTRANSLATE(YYX) \
326 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
327
328 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
329 static const unsigned char yytranslate[] =
330 {
331 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
332 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
333 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
334 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
335 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
336 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
337 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
338 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
339 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
340 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
341 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
342 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
343 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
344 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
345 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
346 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
347 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
348 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
349 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
350 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
351 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
352 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
353 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
354 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
355 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
356 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
357 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
358 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
359 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
360 35, 36, 37, 38, 39, 40, 41, 42
361 };
362
363 #if YYDEBUG
364 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
365 YYRHS. */
366 static const unsigned char yyprhs[] =
367 {
368 0, 0, 3, 5, 8, 9, 10, 15, 19, 23,
369 27, 32, 36, 40, 45, 49, 53, 57, 61, 65,
370 69, 73, 77, 81, 85, 89, 91, 95, 98, 99,
371 103, 104, 107, 108, 110, 112, 114, 117, 120, 121,
372 127, 131, 132, 135, 136, 140, 144, 145, 148, 149,
373 151, 153, 157, 158, 161, 162, 166, 170, 172, 174,
374 177, 180, 182, 184, 186, 188, 190
375 };
376
377 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
378 static const yysigned_char yyrhs[] =
379 {
380 44, 0, -1, 45, -1, 45, 46, -1, -1, -1,
381 10, 26, 47, 53, -1, 11, 26, 65, -1, 29,
382 26, 65, -1, 12, 26, 65, -1, 13, 26, 65,
383 62, -1, 14, 26, 65, -1, 15, 26, 65, -1,
384 17, 26, 66, 50, -1, 18, 26, 66, -1, 33,
385 26, 66, -1, 24, 26, 66, -1, 25, 26, 66,
386 -1, 28, 26, 65, -1, 34, 26, 48, -1, 35,
387 26, 48, -1, 38, 26, 48, -1, 39, 26, 48,
388 -1, 36, 26, 48, -1, 37, 26, 48, -1, 65,
389 -1, 19, 49, 20, -1, 49, 65, -1, -1, 19,
390 51, 20, -1, -1, 51, 52, -1, -1, 21, -1,
391 22, -1, 23, -1, 59, 54, -1, 54, 55, -1,
392 -1, 65, 65, 65, 65, 56, -1, 19, 57, 20,
393 -1, -1, 57, 58, -1, -1, 12, 16, 65, -1,
394 19, 60, 20, -1, -1, 60, 61, -1, -1, 30,
395 -1, 31, -1, 19, 63, 20, -1, -1, 63, 64,
396 -1, -1, 27, 16, 65, -1, 32, 16, 65, -1,
397 3, -1, 4, -1, 9, 3, -1, 9, 4, -1,
398 5, -1, 7, -1, 6, -1, 8, -1, 41, -1,
399 42, -1
400 };
401
402 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
403 static const unsigned char yyrline[] =
404 {
405 0, 50, 50, 53, 54, 57, 57, 59, 61, 63,
406 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
407 85, 87, 89, 91, 93, 98, 99, 104, 105, 109,
408 110, 114, 115, 119, 120, 121, 124, 127, 128, 131,
409 136, 137, 141, 142, 146, 150, 151, 155, 156, 160,
410 161, 165, 166, 170, 171, 175, 176, 177, 178, 179,
411 180, 181, 182, 183, 184, 187, 190
412 };
413 #endif
414
415 #if YYDEBUG || YYERROR_VERBOSE
416 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
417 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
418 static const char *const yytname[] =
419 {
420 "$end", "error", "$undefined", "T_EBC", "T_GBC", "T_CABS", "T_CABSP",
421 "T_ABS", "T_ABSP", "T_NOT", "T_MOLECULE", "T_MULTIPLICITY", "T_CHARGE",
422 "T_METHOD", "T_BASIS", "T_AUXBASIS", "T_EQUALS", "T_OPTIMIZE",
423 "T_GRADIENT", "T_BEG_OPT", "T_END_OPT", "T_CARTESIAN", "T_INTERNAL",
424 "T_REDUNDANT", "T_RESTART", "T_CHECKPOINT", "T_COLON", "T_XC",
425 "T_SYMMETRY", "T_MEMORY", "T_BOHR", "T_ANGSTROM", "T_GRID",
426 "T_FREQUENCIES", "T_DOCC", "T_SOCC", "T_FROZEN_DOCC", "T_FROZEN_UOCC",
427 "T_ALPHA", "T_BETA", "T_OO_INPUT_KEYWORD", "T_STRING", "T_BOOL",
428 "$accept", "input", "assignments", "assignment", "@1",
429 "nonnegative_int_vector", "nonnegative_int_sequence",
430 "optimize_options_list", "optimize_options", "optimize_option",
431 "molecule", "atoms", "atom", "atom_options_list", "atom_options",
432 "atom_option", "molecule_options_list", "molecule_options",
433 "molecule_option", "method_options_list", "method_options",
434 "method_option", "string", "bool", 0
435 };
436 #endif
437
438 # ifdef YYPRINT
439 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
440 token YYLEX-NUM. */
441 static const unsigned short int yytoknum[] =
442 {
443 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
444 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
445 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
446 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
447 295, 296, 297
448 };
449 # endif
450
451 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
452 static const unsigned char yyr1[] =
453 {
454 0, 43, 44, 45, 45, 47, 46, 46, 46, 46,
455 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
456 46, 46, 46, 46, 46, 48, 48, 49, 49, 50,
457 50, 51, 51, 52, 52, 52, 53, 54, 54, 55,
458 56, 56, 57, 57, 58, 59, 59, 60, 60, 61,
459 61, 62, 62, 63, 63, 64, 64, 64, 64, 64,
460 64, 64, 64, 64, 64, 65, 66
461 };
462
463 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
464 static const unsigned char yyr2[] =
465 {
466 0, 2, 1, 2, 0, 0, 4, 3, 3, 3,
467 4, 3, 3, 4, 3, 3, 3, 3, 3, 3,
468 3, 3, 3, 3, 3, 1, 3, 2, 0, 3,
469 0, 2, 0, 1, 1, 1, 2, 2, 0, 5,
470 3, 0, 2, 0, 3, 3, 0, 2, 0, 1,
471 1, 3, 0, 2, 0, 3, 3, 1, 1, 2,
472 2, 1, 1, 1, 1, 1, 1
473 };
474
475 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
476 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
477 means the default is an error. */
478 static const unsigned char yydefact[] =
479 {
480 4, 0, 2, 1, 0, 0, 0, 0, 0, 0,
481 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
482 0, 0, 0, 3, 5, 0, 0, 0, 0, 0,
483 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
484 0, 0, 0, 46, 65, 7, 9, 52, 11, 12,
485 66, 30, 14, 16, 17, 18, 8, 15, 28, 19,
486 25, 20, 23, 24, 21, 22, 48, 6, 38, 54,
487 10, 32, 13, 0, 0, 36, 0, 0, 26, 27,
488 45, 49, 50, 47, 37, 0, 57, 58, 61, 63,
489 62, 64, 0, 51, 0, 0, 53, 29, 33, 34,
490 35, 31, 0, 59, 60, 0, 0, 0, 55, 56,
491 41, 43, 39, 0, 0, 40, 42, 0, 44
492 };
493
494 /* YYDEFGOTO[NTERM-NUM]. */
495 static const yysigned_char yydefgoto[] =
496 {
497 -1, 1, 2, 23, 43, 59, 73, 72, 77, 101,
498 67, 75, 84, 112, 113, 116, 68, 74, 83, 70,
499 76, 96, 60, 51
500 };
501
502 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
503 STATE-NUM. */
504 #define YYPACT_NINF -26
505 static const yysigned_char yypact[] =
506 {
507 -26, 6, 1, -26, -18, -9, -2, 23, 28, 29,
508 31, 40, 42, 43, 50, 52, 53, 57, 58, 59,
509 60, 61, 62, -26, -26, 18, 18, 18, 18, 18,
510 25, 25, 25, 25, 18, 18, 25, -14, -14, -14,
511 -14, -14, -14, 70, -26, -26, -26, 71, -26, -26,
512 -26, 72, -26, -26, -26, -26, -26, -26, -26, -26,
513 -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
514 -26, -26, -26, -13, 2, 18, 38, 41, -26, -26,
515 -26, -26, -26, -26, -26, 18, -26, -26, -26, -26,
516 -26, -26, 17, -26, 77, 78, -26, -26, -26, -26,
517 -26, -26, 18, -26, -26, 18, 18, 18, -26, -26,
518 76, -26, -26, 11, 80, -26, -26, 18, -26
519 };
520
521 /* YYPGOTO[NTERM-NUM]. */
522 static const yysigned_char yypgoto[] =
523 {
524 -26, -26, -26, -26, -26, 33, -26, -26, -26, -26,
525 -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
526 -26, -26, -25, 20
527 };
528
529 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
530 positive, shift that token. If negative, reduce the rule which
531 number is the opposite. If zero, do what YYDEFACT says.
532 If YYTABLE_NINF, syntax error. */
533 #define YYTABLE_NINF -1
534 static const unsigned char yytable[] =
535 {
536 45, 46, 47, 48, 49, 58, 3, 78, 24, 55,
537 56, 4, 5, 6, 7, 8, 9, 25, 10, 11,
538 103, 104, 80, 114, 26, 12, 13, 44, 44, 14,
539 15, 115, 81, 82, 16, 17, 18, 19, 20, 21,
540 22, 86, 87, 88, 89, 90, 91, 92, 79, 27,
541 85, 52, 53, 54, 28, 29, 57, 30, 93, 44,
542 102, 97, 98, 99, 100, 94, 31, 50, 32, 33,
543 95, 61, 62, 63, 64, 65, 34, 107, 35, 36,
544 108, 109, 110, 37, 38, 39, 40, 41, 42, 66,
545 69, 71, 118, 105, 106, 111, 117
546 };
547
548 static const unsigned char yycheck[] =
549 {
550 25, 26, 27, 28, 29, 19, 0, 20, 26, 34,
551 35, 10, 11, 12, 13, 14, 15, 26, 17, 18,
552 3, 4, 20, 12, 26, 24, 25, 41, 41, 28,
553 29, 20, 30, 31, 33, 34, 35, 36, 37, 38,
554 39, 3, 4, 5, 6, 7, 8, 9, 73, 26,
555 75, 31, 32, 33, 26, 26, 36, 26, 20, 41,
556 85, 20, 21, 22, 23, 27, 26, 42, 26, 26,
557 32, 38, 39, 40, 41, 42, 26, 102, 26, 26,
558 105, 106, 107, 26, 26, 26, 26, 26, 26, 19,
559 19, 19, 117, 16, 16, 19, 16
560 };
561
562 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
563 symbol of state STATE-NUM. */
564 static const unsigned char yystos[] =
565 {
566 0, 44, 45, 0, 10, 11, 12, 13, 14, 15,
567 17, 18, 24, 25, 28, 29, 33, 34, 35, 36,
568 37, 38, 39, 46, 26, 26, 26, 26, 26, 26,
569 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
570 26, 26, 26, 47, 41, 65, 65, 65, 65, 65,
571 42, 66, 66, 66, 66, 65, 65, 66, 19, 48,
572 65, 48, 48, 48, 48, 48, 19, 53, 59, 19,
573 62, 19, 50, 49, 60, 54, 63, 51, 20, 65,
574 20, 30, 31, 61, 55, 65, 3, 4, 5, 6,
575 7, 8, 9, 20, 27, 32, 64, 20, 21, 22,
576 23, 52, 65, 3, 4, 16, 16, 65, 65, 65,
577 65, 19, 56, 57, 12, 20, 58, 16, 65
578 };
579
580 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
581 # define YYSIZE_T __SIZE_TYPE__
582 #endif
583 #if ! defined (YYSIZE_T) && defined (size_t)
584 # define YYSIZE_T size_t
585 #endif
586 #if ! defined (YYSIZE_T)
587 # if defined (__STDC__) || defined (__cplusplus)
588 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
589 # define YYSIZE_T size_t
590 # endif
591 #endif
592 #if ! defined (YYSIZE_T)
593 # define YYSIZE_T unsigned int
594 #endif
595
596 #define yyerrok (yyerrstatus = 0)
597 #define yyclearin (yychar = YYEMPTY)
598 #define YYEMPTY (-2)
599 #define YYEOF 0
600
601 #define YYACCEPT goto yyacceptlab
602 #define YYABORT goto yyabortlab
603 #define YYERROR goto yyerrorlab
604
605
606 /* Like YYERROR except do call yyerror. This remains here temporarily
607 to ease the transition to the new meaning of YYERROR, for GCC.
608 Once GCC version 2 has supplanted version 1, this can go. */
609
610 #define YYFAIL goto yyerrlab
611
612 #define YYRECOVERING() (!!yyerrstatus)
613
614 #define YYBACKUP(Token, Value) \
615 do \
616 if (yychar == YYEMPTY && yylen == 1) \
617 { \
618 yychar = (Token); \
619 MPQCInylval = (Value); \
620 yytoken = YYTRANSLATE (yychar); \
621 YYPOPSTACK; \
622 goto yybackup; \
623 } \
624 else \
625 { \
626 yyerror ("syntax error: cannot back up");\
627 YYERROR; \
628 } \
629 while (0)
630
631 #define YYTERROR 1
632 #define YYERRCODE 256
633
634 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
635 are run). */
636
637 #ifndef YYLLOC_DEFAULT
638 # define YYLLOC_DEFAULT(Current, Rhs, N) \
639 ((Current).first_line = (Rhs)[1].first_line, \
640 (Current).first_column = (Rhs)[1].first_column, \
641 (Current).last_line = (Rhs)[N].last_line, \
642 (Current).last_column = (Rhs)[N].last_column)
643 #endif
644
645 /* YYLEX -- calling `yylex' with the right arguments. */
646
647 #ifdef YYLEX_PARAM
648 # define YYLEX yylex (YYLEX_PARAM)
649 #else
650 # define YYLEX yylex ()
651 #endif
652
653 /* Enable debugging if requested. */
654 #if YYDEBUG
655
656 # ifndef YYFPRINTF
657 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
658 # define YYFPRINTF fprintf
659 # endif
660
661 # define YYDPRINTF(Args) \
662 do { \
663 if (yydebug) \
664 YYFPRINTF Args; \
665 } while (0)
666
667 # define YYDSYMPRINT(Args) \
668 do { \
669 if (yydebug) \
670 yysymprint Args; \
671 } while (0)
672
673 # define YYDSYMPRINTF(Title, Token, Value, Location) \
674 do { \
675 if (yydebug) \
676 { \
677 YYFPRINTF (stderr, "%s ", Title); \
678 yysymprint (stderr, \
679 Token, Value); \
680 YYFPRINTF (stderr, "\n"); \
681 } \
682 } while (0)
683
684 /*------------------------------------------------------------------.
685 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
686 | TOP (included). |
687 `------------------------------------------------------------------*/
688
689 #if defined (__STDC__) || defined (__cplusplus)
690 static void
yy_stack_print(short int * bottom,short int * top)691 yy_stack_print (short int *bottom, short int *top)
692 #else
693 static void
694 yy_stack_print (bottom, top)
695 short int *bottom;
696 short int *top;
697 #endif
698 {
699 YYFPRINTF (stderr, "Stack now");
700 for (/* Nothing. */; bottom <= top; ++bottom)
701 YYFPRINTF (stderr, " %d", *bottom);
702 YYFPRINTF (stderr, "\n");
703 }
704
705 # define YY_STACK_PRINT(Bottom, Top) \
706 do { \
707 if (yydebug) \
708 yy_stack_print ((Bottom), (Top)); \
709 } while (0)
710
711
712 /*------------------------------------------------.
713 | Report that the YYRULE is going to be reduced. |
714 `------------------------------------------------*/
715
716 #if defined (__STDC__) || defined (__cplusplus)
717 static void
yy_reduce_print(int yyrule)718 yy_reduce_print (int yyrule)
719 #else
720 static void
721 yy_reduce_print (yyrule)
722 int yyrule;
723 #endif
724 {
725 int yyi;
726 unsigned int yylno = yyrline[yyrule];
727 YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
728 yyrule - 1, yylno);
729 /* Print the symbols being reduced, and their result. */
730 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
731 YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
732 YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
733 }
734
735 # define YY_REDUCE_PRINT(Rule) \
736 do { \
737 if (yydebug) \
738 yy_reduce_print (Rule); \
739 } while (0)
740
741 /* Nonzero means print parse trace. It is left uninitialized so that
742 multiple parsers can coexist. */
743 int yydebug;
744 #else /* !YYDEBUG */
745 # define YYDPRINTF(Args)
746 # define YYDSYMPRINT(Args)
747 # define YYDSYMPRINTF(Title, Token, Value, Location)
748 # define YY_STACK_PRINT(Bottom, Top)
749 # define YY_REDUCE_PRINT(Rule)
750 #endif /* !YYDEBUG */
751
752
753 /* YYINITDEPTH -- initial size of the parser's stacks. */
754 #ifndef YYINITDEPTH
755 # define YYINITDEPTH 200
756 #endif
757
758 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
759 if the built-in stack extension method is used).
760
761 Do not make this value too large; the results are undefined if
762 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
763 evaluated with infinite-precision integer arithmetic. */
764
765 #if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
766 # undef YYMAXDEPTH
767 #endif
768
769 #ifndef YYMAXDEPTH
770 # define YYMAXDEPTH 10000
771 #endif
772
773
774
775 #if YYERROR_VERBOSE
776
777 # ifndef yystrlen
778 # if defined (__GLIBC__) && defined (_STRING_H)
779 # define yystrlen strlen
780 # else
781 /* Return the length of YYSTR. */
782 static YYSIZE_T
783 # if defined (__STDC__) || defined (__cplusplus)
yystrlen(const char * yystr)784 yystrlen (const char *yystr)
785 # else
786 yystrlen (yystr)
787 const char *yystr;
788 # endif
789 {
790 register const char *yys = yystr;
791
792 while (*yys++ != '\0')
793 continue;
794
795 return yys - yystr - 1;
796 }
797 # endif
798 # endif
799
800 # ifndef yystpcpy
801 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
802 # define yystpcpy stpcpy
803 # else
804 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
805 YYDEST. */
806 static char *
807 # if defined (__STDC__) || defined (__cplusplus)
yystpcpy(char * yydest,const char * yysrc)808 yystpcpy (char *yydest, const char *yysrc)
809 # else
810 yystpcpy (yydest, yysrc)
811 char *yydest;
812 const char *yysrc;
813 # endif
814 {
815 register char *yyd = yydest;
816 register const char *yys = yysrc;
817
818 while ((*yyd++ = *yys++) != '\0')
819 continue;
820
821 return yyd - 1;
822 }
823 # endif
824 # endif
825
826 #endif /* !YYERROR_VERBOSE */
827
828
829
830 #if YYDEBUG
831 /*--------------------------------.
832 | Print this symbol on YYOUTPUT. |
833 `--------------------------------*/
834
835 #if defined (__STDC__) || defined (__cplusplus)
836 static void
yysymprint(FILE * yyoutput,int yytype,YYSTYPE * yyvaluep)837 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
838 #else
839 static void
840 yysymprint (yyoutput, yytype, yyvaluep)
841 FILE *yyoutput;
842 int yytype;
843 YYSTYPE *yyvaluep;
844 #endif
845 {
846 /* Pacify ``unused variable'' warnings. */
847 (void) yyvaluep;
848
849 if (yytype < YYNTOKENS)
850 {
851 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
852 # ifdef YYPRINT
853 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
854 # endif
855 }
856 else
857 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
858
859 switch (yytype)
860 {
861 default:
862 break;
863 }
864 YYFPRINTF (yyoutput, ")");
865 }
866
867 #endif /* ! YYDEBUG */
868 /*-----------------------------------------------.
869 | Release the memory associated to this symbol. |
870 `-----------------------------------------------*/
871
872 #if defined (__STDC__) || defined (__cplusplus)
873 static void
yydestruct(int yytype,YYSTYPE * yyvaluep)874 yydestruct (int yytype, YYSTYPE *yyvaluep)
875 #else
876 static void
877 yydestruct (yytype, yyvaluep)
878 int yytype;
879 YYSTYPE *yyvaluep;
880 #endif
881 {
882 /* Pacify ``unused variable'' warnings. */
883 (void) yyvaluep;
884
885 switch (yytype)
886 {
887
888 default:
889 break;
890 }
891 }
892
893
894 /* Prevent warnings from -Wmissing-prototypes. */
895
896 #ifdef YYPARSE_PARAM
897 # if defined (__STDC__) || defined (__cplusplus)
898
899 # else
900
901 # endif
902 #else /* ! YYPARSE_PARAM */
903 #if defined (__STDC__) || defined (__cplusplus)
904
905 #else
906
907 #endif
908 #endif /* ! YYPARSE_PARAM */
909
910
911
912 /* The lookahead symbol. */
913 int yychar;
914
915 /* The semantic value of the lookahead symbol. */
916 YYSTYPE MPQCInylval;
917
918 /* Number of syntax errors so far. */
919 int yynerrs;
920
921
922
923 /*----------.
924 | yyparse. |
925 `----------*/
926
927 #ifdef YYPARSE_PARAM
928 # if defined (__STDC__) || defined (__cplusplus)
yyparse(void * YYPARSE_PARAM)929 int yyparse (void *YYPARSE_PARAM)
930 # else
931 int yyparse (YYPARSE_PARAM)
932 void *YYPARSE_PARAM;
933 # endif
934 #else /* ! YYPARSE_PARAM */
935 #if defined (__STDC__) || defined (__cplusplus)
936 int
937 yyparse (void)
938 #else
939 int
940 yyparse ()
941
942 #endif
943 #endif
944 {
945
946 register int yystate;
947 register int yyn;
948 int yyresult;
949 /* Number of tokens to shift before error messages enabled. */
950 int yyerrstatus;
951 /* Lookahead token as an internal (translated) token number. */
952 int yytoken = 0;
953
954 /* Three stacks and their tools:
955 `yyss': related to states,
956 `yyvs': related to semantic values,
957 `yyls': related to locations.
958
959 Refer to the stacks thru separate pointers, to allow yyoverflow
960 to reallocate them elsewhere. */
961
962 /* The state stack. */
963 short int yyssa[YYINITDEPTH];
964 short int *yyss = yyssa;
965 register short int *yyssp;
966
967 /* The semantic value stack. */
968 YYSTYPE yyvsa[YYINITDEPTH];
969 YYSTYPE *yyvs = yyvsa;
970 register YYSTYPE *yyvsp;
971
972
973
974 #define YYPOPSTACK (yyvsp--, yyssp--)
975
976 YYSIZE_T yystacksize = YYINITDEPTH;
977
978 /* The variables used to return semantic value and location from the
979 action routines. */
980 YYSTYPE yyval;
981
982
983 /* When reducing, the number of symbols on the RHS of the reduced
984 rule. */
985 int yylen;
986
987 YYDPRINTF ((stderr, "Starting parse\n"));
988
989 yystate = 0;
990 yyerrstatus = 0;
991 yynerrs = 0;
992 yychar = YYEMPTY; /* Cause a token to be read. */
993
994 /* Initialize stack pointers.
995 Waste one element of value and location stack
996 so that they stay on the same level as the state stack.
997 The wasted elements are never initialized. */
998
999 yyssp = yyss;
1000 yyvsp = yyvs;
1001
1002
1003 goto yysetstate;
1004
1005 /*------------------------------------------------------------.
1006 | yynewstate -- Push a new state, which is found in yystate. |
1007 `------------------------------------------------------------*/
1008 yynewstate:
1009 /* In all cases, when you get here, the value and location stacks
1010 have just been pushed. so pushing a state here evens the stacks.
1011 */
1012 yyssp++;
1013
1014 yysetstate:
1015 *yyssp = yystate;
1016
1017 if (yyss + yystacksize - 1 <= yyssp)
1018 {
1019 /* Get the current used size of the three stacks, in elements. */
1020 YYSIZE_T yysize = yyssp - yyss + 1;
1021
1022 #ifdef yyoverflow
1023 {
1024 /* Give user a chance to reallocate the stack. Use copies of
1025 these so that the &'s don't force the real ones into
1026 memory. */
1027 YYSTYPE *yyvs1 = yyvs;
1028 short int *yyss1 = yyss;
1029
1030
1031 /* Each stack pointer address is followed by the size of the
1032 data in use in that stack, in bytes. This used to be a
1033 conditional around just the two extra args, but that might
1034 be undefined if yyoverflow is a macro. */
1035 yyoverflow ("parser stack overflow",
1036 &yyss1, yysize * sizeof (*yyssp),
1037 &yyvs1, yysize * sizeof (*yyvsp),
1038
1039 &yystacksize);
1040
1041 yyss = yyss1;
1042 yyvs = yyvs1;
1043 }
1044 #else /* no yyoverflow */
1045 # ifndef YYSTACK_RELOCATE
1046 goto yyoverflowlab;
1047 # else
1048 /* Extend the stack our own way. */
1049 if (YYMAXDEPTH <= yystacksize)
1050 goto yyoverflowlab;
1051 yystacksize *= 2;
1052 if (YYMAXDEPTH < yystacksize)
1053 yystacksize = YYMAXDEPTH;
1054
1055 {
1056 short int *yyss1 = yyss;
1057 union yyalloc *yyptr =
1058 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1059 if (! yyptr)
1060 goto yyoverflowlab;
1061 YYSTACK_RELOCATE (yyss);
1062 YYSTACK_RELOCATE (yyvs);
1063
1064 # undef YYSTACK_RELOCATE
1065 if (yyss1 != yyssa)
1066 YYSTACK_FREE (yyss1);
1067 }
1068 # endif
1069 #endif /* no yyoverflow */
1070
1071 yyssp = yyss + yysize - 1;
1072 yyvsp = yyvs + yysize - 1;
1073
1074
1075 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1076 (unsigned long int) yystacksize));
1077
1078 if (yyss + yystacksize - 1 <= yyssp)
1079 YYABORT;
1080 }
1081
1082 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1083
1084 goto yybackup;
1085
1086 /*-----------.
1087 | yybackup. |
1088 `-----------*/
1089 yybackup:
1090
1091 /* Do appropriate processing given the current state. */
1092 /* Read a lookahead token if we need one and don't already have one. */
1093 /* yyresume: */
1094
1095 /* First try to decide what to do without reference to lookahead token. */
1096
1097 yyn = yypact[yystate];
1098 if (yyn == YYPACT_NINF)
1099 goto yydefault;
1100
1101 /* Not known => get a lookahead token if don't already have one. */
1102
1103 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1104 if (yychar == YYEMPTY)
1105 {
1106 YYDPRINTF ((stderr, "Reading a token: "));
1107 yychar = YYLEX;
1108 }
1109
1110 if (yychar <= YYEOF)
1111 {
1112 yychar = yytoken = YYEOF;
1113 YYDPRINTF ((stderr, "Now at end of input.\n"));
1114 }
1115 else
1116 {
1117 yytoken = YYTRANSLATE (yychar);
1118 YYDSYMPRINTF ("Next token is", yytoken, &MPQCInylval, &yylloc);
1119 }
1120
1121 /* If the proper action on seeing token YYTOKEN is to reduce or to
1122 detect an error, take that action. */
1123 yyn += yytoken;
1124 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1125 goto yydefault;
1126 yyn = yytable[yyn];
1127 if (yyn <= 0)
1128 {
1129 if (yyn == 0 || yyn == YYTABLE_NINF)
1130 goto yyerrlab;
1131 yyn = -yyn;
1132 goto yyreduce;
1133 }
1134
1135 if (yyn == YYFINAL)
1136 YYACCEPT;
1137
1138 /* Shift the lookahead token. */
1139 YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
1140
1141 /* Discard the token being shifted unless it is eof. */
1142 if (yychar != YYEOF)
1143 yychar = YYEMPTY;
1144
1145 *++yyvsp = MPQCInylval;
1146
1147
1148 /* Count tokens shifted since error; after three, turn off error
1149 status. */
1150 if (yyerrstatus)
1151 yyerrstatus--;
1152
1153 yystate = yyn;
1154 goto yynewstate;
1155
1156
1157 /*-----------------------------------------------------------.
1158 | yydefault -- do the default action for the current state. |
1159 `-----------------------------------------------------------*/
1160 yydefault:
1161 yyn = yydefact[yystate];
1162 if (yyn == 0)
1163 goto yyerrlab;
1164 goto yyreduce;
1165
1166
1167 /*-----------------------------.
1168 | yyreduce -- Do a reduction. |
1169 `-----------------------------*/
1170 yyreduce:
1171 /* yyn is the number of a rule to reduce with. */
1172 yylen = yyr2[yyn];
1173
1174 /* If YYLEN is nonzero, implement the default value of the action:
1175 `$$ = $1'.
1176
1177 Otherwise, the following line sets YYVAL to garbage.
1178 This behavior is undocumented and Bison
1179 users should not rely upon it. Assigning to YYVAL
1180 unconditionally makes the parser a bit smaller, and it avoids a
1181 GCC warning that YYVAL may be used uninitialized. */
1182 yyval = yyvsp[1-yylen];
1183
1184
1185 YY_REDUCE_PRINT (yyn);
1186 switch (yyn)
1187 {
1188 case 5:
1189 #line 57 "parse.yy"
1190 { begin_molecule(); ;}
1191 break;
1192
1193 case 6:
1194 #line 58 "parse.yy"
1195 { end_molecule(); ;}
1196 break;
1197
1198 case 7:
1199 #line 60 "parse.yy"
1200 { set_multiplicity(yyvsp[0].str); ;}
1201 break;
1202
1203 case 8:
1204 #line 62 "parse.yy"
1205 { set_memory(yyvsp[0].str); ;}
1206 break;
1207
1208 case 9:
1209 #line 64 "parse.yy"
1210 { set_charge(yyvsp[0].str); ;}
1211 break;
1212
1213 case 10:
1214 #line 66 "parse.yy"
1215 { set_method(yyvsp[-1].str); ;}
1216 break;
1217
1218 case 11:
1219 #line 68 "parse.yy"
1220 { set_basis(yyvsp[0].str); ;}
1221 break;
1222
1223 case 12:
1224 #line 70 "parse.yy"
1225 { set_auxbasis(yyvsp[0].str); ;}
1226 break;
1227
1228 case 13:
1229 #line 72 "parse.yy"
1230 { set_optimize(yyvsp[-1].i); ;}
1231 break;
1232
1233 case 14:
1234 #line 74 "parse.yy"
1235 { set_gradient(yyvsp[0].i); ;}
1236 break;
1237
1238 case 15:
1239 #line 76 "parse.yy"
1240 { set_frequencies(yyvsp[0].i); ;}
1241 break;
1242
1243 case 16:
1244 #line 78 "parse.yy"
1245 { set_restart(yyvsp[0].i); ;}
1246 break;
1247
1248 case 17:
1249 #line 80 "parse.yy"
1250 { set_checkpoint(yyvsp[0].i); ;}
1251 break;
1252
1253 case 18:
1254 #line 82 "parse.yy"
1255 { set_symmetry(yyvsp[0].str); ;}
1256 break;
1257
1258 case 19:
1259 #line 84 "parse.yy"
1260 { set_docc(yyvsp[0].nniv); ;}
1261 break;
1262
1263 case 20:
1264 #line 86 "parse.yy"
1265 { set_socc(yyvsp[0].nniv); ;}
1266 break;
1267
1268 case 21:
1269 #line 88 "parse.yy"
1270 { set_alpha(yyvsp[0].nniv); ;}
1271 break;
1272
1273 case 22:
1274 #line 90 "parse.yy"
1275 { set_beta(yyvsp[0].nniv); ;}
1276 break;
1277
1278 case 23:
1279 #line 92 "parse.yy"
1280 { set_frozen_docc(yyvsp[0].nniv); ;}
1281 break;
1282
1283 case 24:
1284 #line 94 "parse.yy"
1285 { set_frozen_uocc(yyvsp[0].nniv); ;}
1286 break;
1287
1288 case 25:
1289 #line 98 "parse.yy"
1290 { yyval.nniv = make_nnivec(0,yyvsp[0].str); ;}
1291 break;
1292
1293 case 26:
1294 #line 100 "parse.yy"
1295 { yyval.nniv = yyvsp[-1].nniv; ;}
1296 break;
1297
1298 case 27:
1299 #line 104 "parse.yy"
1300 { yyval.nniv = make_nnivec(yyvsp[-1].nniv,yyvsp[0].str); ;}
1301 break;
1302
1303 case 28:
1304 #line 105 "parse.yy"
1305 { yyval.nniv = make_nnivec(0,0); ;}
1306 break;
1307
1308 case 33:
1309 #line 119 "parse.yy"
1310 { set_opt_type(T_CARTESIAN); ;}
1311 break;
1312
1313 case 34:
1314 #line 120 "parse.yy"
1315 { set_opt_type(T_INTERNAL); ;}
1316 break;
1317
1318 case 35:
1319 #line 121 "parse.yy"
1320 { set_redund_coor(1); ;}
1321 break;
1322
1323 case 39:
1324 #line 132 "parse.yy"
1325 { add_atom(yyvsp[-4].str,yyvsp[-3].str,yyvsp[-2].str,yyvsp[-1].str); ;}
1326 break;
1327
1328 case 44:
1329 #line 146 "parse.yy"
1330 { set_atom_charge(yyvsp[0].str); ;}
1331 break;
1332
1333 case 49:
1334 #line 160 "parse.yy"
1335 { set_molecule_bohr(1); ;}
1336 break;
1337
1338 case 50:
1339 #line 161 "parse.yy"
1340 { set_molecule_bohr(0); ;}
1341 break;
1342
1343 case 55:
1344 #line 175 "parse.yy"
1345 { set_method_xc(yyvsp[0].str); ;}
1346 break;
1347
1348 case 56:
1349 #line 176 "parse.yy"
1350 { set_method_grid(yyvsp[0].str); ;}
1351 break;
1352
1353 case 57:
1354 #line 177 "parse.yy"
1355 { set_method_ebc("true"); ;}
1356 break;
1357
1358 case 58:
1359 #line 178 "parse.yy"
1360 { set_method_gbc("true"); ;}
1361 break;
1362
1363 case 59:
1364 #line 179 "parse.yy"
1365 { set_method_ebc("false"); ;}
1366 break;
1367
1368 case 60:
1369 #line 180 "parse.yy"
1370 { set_method_gbc("false"); ;}
1371 break;
1372
1373 case 61:
1374 #line 181 "parse.yy"
1375 { set_method_absmethod("cabs"); ;}
1376 break;
1377
1378 case 62:
1379 #line 182 "parse.yy"
1380 { set_method_absmethod("abs"); ;}
1381 break;
1382
1383 case 63:
1384 #line 183 "parse.yy"
1385 { set_method_absmethod("cabs+"); ;}
1386 break;
1387
1388 case 64:
1389 #line 184 "parse.yy"
1390 { set_method_absmethod("abs+"); ;}
1391 break;
1392
1393 case 65:
1394 #line 187 "parse.yy"
1395 { yyval.str = yyvsp[0].str; ;}
1396 break;
1397
1398 case 66:
1399 #line 190 "parse.yy"
1400 { yyval.i = yyvsp[0].i; ;}
1401 break;
1402
1403
1404 }
1405
1406 /* Line 1010 of yacc.c. */
1407 #line 1408 "parse.tmp.cc"
1408
1409 yyvsp -= yylen;
1410 yyssp -= yylen;
1411
1412
1413 YY_STACK_PRINT (yyss, yyssp);
1414
1415 *++yyvsp = yyval;
1416
1417
1418 /* Now `shift' the result of the reduction. Determine what state
1419 that goes to, based on the state we popped back to and the rule
1420 number reduced by. */
1421
1422 yyn = yyr1[yyn];
1423
1424 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1425 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1426 yystate = yytable[yystate];
1427 else
1428 yystate = yydefgoto[yyn - YYNTOKENS];
1429
1430 goto yynewstate;
1431
1432
1433 /*------------------------------------.
1434 | yyerrlab -- here on detecting error |
1435 `------------------------------------*/
1436 yyerrlab:
1437 /* If not already recovering from an error, report this error. */
1438 if (!yyerrstatus)
1439 {
1440 ++yynerrs;
1441 #if YYERROR_VERBOSE
1442 yyn = yypact[yystate];
1443
1444 if (YYPACT_NINF < yyn && yyn < YYLAST)
1445 {
1446 YYSIZE_T yysize = 0;
1447 int yytype = YYTRANSLATE (yychar);
1448 const char* yyprefix;
1449 char *yymsg;
1450 int yyx;
1451
1452 /* Start YYX at -YYN if negative to avoid negative indexes in
1453 YYCHECK. */
1454 int yyxbegin = yyn < 0 ? -yyn : 0;
1455
1456 /* Stay within bounds of both yycheck and yytname. */
1457 int yychecklim = YYLAST - yyn;
1458 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1459 int yycount = 0;
1460
1461 yyprefix = ", expecting ";
1462 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1463 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1464 {
1465 yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
1466 yycount += 1;
1467 if (yycount == 5)
1468 {
1469 yysize = 0;
1470 break;
1471 }
1472 }
1473 yysize += (sizeof ("syntax error, unexpected ")
1474 + yystrlen (yytname[yytype]));
1475 yymsg = (char *) YYSTACK_ALLOC (yysize);
1476 if (yymsg != 0)
1477 {
1478 char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
1479 yyp = yystpcpy (yyp, yytname[yytype]);
1480
1481 if (yycount < 5)
1482 {
1483 yyprefix = ", expecting ";
1484 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1485 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1486 {
1487 yyp = yystpcpy (yyp, yyprefix);
1488 yyp = yystpcpy (yyp, yytname[yyx]);
1489 yyprefix = " or ";
1490 }
1491 }
1492 yyerror (yymsg);
1493 YYSTACK_FREE (yymsg);
1494 }
1495 else
1496 yyerror ("syntax error; also virtual memory exhausted");
1497 }
1498 else
1499 #endif /* YYERROR_VERBOSE */
1500 yyerror ("syntax error");
1501 }
1502
1503
1504
1505 if (yyerrstatus == 3)
1506 {
1507 /* If just tried and failed to reuse lookahead token after an
1508 error, discard it. */
1509
1510 if (yychar <= YYEOF)
1511 {
1512 /* If at end of input, pop the error token,
1513 then the rest of the stack, then return failure. */
1514 if (yychar == YYEOF)
1515 for (;;)
1516 {
1517 YYPOPSTACK;
1518 if (yyssp == yyss)
1519 YYABORT;
1520 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1521 yydestruct (yystos[*yyssp], yyvsp);
1522 }
1523 }
1524 else
1525 {
1526 YYDSYMPRINTF ("Error: discarding", yytoken, &MPQCInylval, &yylloc);
1527 yydestruct (yytoken, &MPQCInylval);
1528 yychar = YYEMPTY;
1529
1530 }
1531 }
1532
1533 /* Else will try to reuse lookahead token after shifting the error
1534 token. */
1535 goto yyerrlab1;
1536
1537
1538 /*---------------------------------------------------.
1539 | yyerrorlab -- error raised explicitly by YYERROR. |
1540 `---------------------------------------------------*/
1541 yyerrorlab:
1542
1543 #ifdef __GNUC__
1544 /* Pacify GCC when the user code never invokes YYERROR and the label
1545 yyerrorlab therefore never appears in user code. */
1546 if (0)
1547 goto yyerrorlab;
1548 #endif
1549
1550 yyvsp -= yylen;
1551 yyssp -= yylen;
1552 yystate = *yyssp;
1553 goto yyerrlab1;
1554
1555
1556 /*-------------------------------------------------------------.
1557 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1558 `-------------------------------------------------------------*/
1559 yyerrlab1:
1560 yyerrstatus = 3; /* Each real token shifted decrements this. */
1561
1562 for (;;)
1563 {
1564 yyn = yypact[yystate];
1565 if (yyn != YYPACT_NINF)
1566 {
1567 yyn += YYTERROR;
1568 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1569 {
1570 yyn = yytable[yyn];
1571 if (0 < yyn)
1572 break;
1573 }
1574 }
1575
1576 /* Pop the current state because it cannot handle the error token. */
1577 if (yyssp == yyss)
1578 YYABORT;
1579
1580 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1581 yydestruct (yystos[yystate], yyvsp);
1582 YYPOPSTACK;
1583 yystate = *yyssp;
1584 YY_STACK_PRINT (yyss, yyssp);
1585 }
1586
1587 if (yyn == YYFINAL)
1588 YYACCEPT;
1589
1590 YYDPRINTF ((stderr, "Shifting error token, "));
1591
1592 *++yyvsp = MPQCInylval;
1593
1594
1595 yystate = yyn;
1596 goto yynewstate;
1597
1598
1599 /*-------------------------------------.
1600 | yyacceptlab -- YYACCEPT comes here. |
1601 `-------------------------------------*/
1602 yyacceptlab:
1603 yyresult = 0;
1604 goto yyreturn;
1605
1606 /*-----------------------------------.
1607 | yyabortlab -- YYABORT comes here. |
1608 `-----------------------------------*/
1609 yyabortlab:
1610 yyresult = 1;
1611 goto yyreturn;
1612
1613 #ifndef yyoverflow
1614 /*----------------------------------------------.
1615 | yyoverflowlab -- parser overflow comes here. |
1616 `----------------------------------------------*/
1617 yyoverflowlab:
1618 yyerror ("parser stack overflow");
1619 yyresult = 2;
1620 /* Fall through. */
1621 #endif
1622
1623 yyreturn:
1624 #ifndef yyoverflow
1625 if (yyss != yyssa)
1626 YYSTACK_FREE (yyss);
1627 #endif
1628 return yyresult;
1629 }
1630
1631
1632 #line 193 "parse.yy"
1633
1634
1635