Line data Source code
1 : /* A Bison parser, made by GNU Bison 2.5. */
2 :
3 : /* Bison implementation for Yacc-like parsers in C
4 :
5 : Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
6 :
7 : This program is free software: you can redistribute it and/or modify
8 : it under the terms of the GNU General Public License as published by
9 : the Free Software Foundation, either version 3 of the License, or
10 : (at your option) any later version.
11 :
12 : This program is distributed in the hope that it will be useful,
13 : but WITHOUT ANY WARRANTY; without even the implied warranty of
14 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 : GNU General Public License for more details.
16 :
17 : You should have received a copy of the GNU General Public License
18 : along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 :
20 : /* As a special exception, you may create a larger work that contains
21 : part or all of the Bison parser skeleton and distribute that work
22 : under terms of your choice, so long as that work isn't itself a
23 : parser generator using the skeleton or a modified version thereof
24 : as a parser skeleton. Alternatively, if you modify or redistribute
25 : the parser skeleton itself, you may (at your option) remove this
26 : special exception, which will cause the skeleton and the resulting
27 : Bison output files to be licensed under the GNU General Public
28 : License without this special exception.
29 :
30 : This special exception was added by the Free Software Foundation in
31 : version 2.2 of Bison. */
32 :
33 : /* C LALR(1) parser skeleton written by Richard Stallman, by
34 : simplifying the original so-called "semantic" parser. */
35 :
36 : /* All symbols defined below should begin with yy or YY, to avoid
37 : infringing on user name space. This should be done even for local
38 : variables, as they might otherwise be expanded by user macros.
39 : There are some unavoidable exceptions within include files to
40 : define necessary library symbols; they are noted "INFRINGES ON
41 : USER NAME SPACE" below. */
42 :
43 : /* Identify Bison output. */
44 : #define YYBISON 1
45 :
46 : /* Bison version. */
47 : #define YYBISON_VERSION "2.5"
48 :
49 : /* Skeleton name. */
50 : #define YYSKELETON_NAME "yacc.c"
51 :
52 : /* Pure parsers. */
53 : #define YYPURE 0
54 :
55 : /* Push parsers. */
56 : #define YYPUSH 0
57 :
58 : /* Pull parsers. */
59 : #define YYPULL 1
60 :
61 : /* Using locations. */
62 : #define YYLSP_NEEDED 0
63 :
64 :
65 :
66 : /* Copy the first part of user declarations. */
67 :
68 : /* Line 268 of yacc.c */
69 : #line 1 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
70 :
71 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
72 : /*
73 : * This file is part of the LibreOffice project.
74 : *
75 : * This Source Code Form is subject to the terms of the Mozilla Public
76 : * License, v. 2.0. If a copy of the MPL was not distributed with this
77 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
78 : *
79 : * This file incorporates work covered by the following license notice:
80 : *
81 : * Licensed to the Apache Software Foundation (ASF) under one or more
82 : * contributor license agreements. See the NOTICE file distributed
83 : * with this work for additional information regarding copyright
84 : * ownership. The ASF licenses this file to you under the Apache
85 : * License, Version 2.0 (the "License"); you may not use this file
86 : * except in compliance with the License. You may obtain a copy of
87 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
88 : */
89 :
90 : #include <stdio.h>
91 : #include <ctype.h>
92 : #include <string.h>
93 :
94 : #include <rtl/strbuf.hxx>
95 : #include <tools/rc.h>
96 : #include <rscerror.h>
97 : #include <rsctools.hxx>
98 : #include <rscclass.hxx>
99 : #include <rsccont.hxx>
100 : #include <rsctree.hxx>
101 : #include <rscdb.hxx>
102 : #include <rscdef.hxx>
103 : #include <rscpar.hxx>
104 :
105 : #include <rsclex.hxx>
106 :
107 : /************** V a r i a b l e n ****************************************/
108 : ObjectStack S;
109 : RscTop * pCurClass;
110 : sal_uInt32 nCurMask;
111 : char szErrBuf[ 100 ];
112 :
113 : /************** H i l f s F u n k t i o n e n ****************************/
114 : RSCINST GetVarInst( const RSCINST & rInst, const char * pVarName )
115 : {
116 : RSCINST aInst;
117 :
118 : aInst = rInst.pClass->GetVariable( rInst, pHS->getID( pVarName ),
119 : RSCINST() );
120 :
121 : if( !aInst.pData )
122 : pTC->pEH->Error( ERR_NOVARIABLENAME, rInst.pClass, RscId() );
123 :
124 : return( aInst );
125 : }
126 :
127 : void SetNumber( const RSCINST & rInst, const char * pVarName, sal_Int32 lValue )
128 : {
129 : RSCINST aInst;
130 :
131 : aInst = GetVarInst( rInst, pVarName );
132 :
133 : if( aInst.pData ){
134 : ERRTYPE aError;
135 : aError = aInst.pClass->SetNumber( aInst, lValue );
136 :
137 : if( aError.IsError() )
138 : pTC->pEH->Error( aError, aInst.pClass, RscId() );
139 : }
140 : }
141 :
142 : void SetConst( const RSCINST & rInst, const char * pVarName,
143 : Atom nValueId, sal_Int32 nVal )
144 : {
145 : RSCINST aInst;
146 :
147 : aInst = GetVarInst( rInst, pVarName );
148 : if( aInst.pData )
149 : {
150 : ERRTYPE aError;
151 : aError = aInst.pClass->SetConst( aInst, nValueId, nVal );
152 :
153 : if( aError.IsError() )
154 : pTC->pEH->Error( aError, aInst.pClass, RscId() );
155 : }
156 : }
157 :
158 : void SetString( const RSCINST & rInst, const char * pVarName, const char * pStr )
159 : {
160 : RSCINST aInst;
161 :
162 : aInst = GetVarInst( rInst, pVarName );
163 : if( aInst.pData ){
164 : ERRTYPE aError;
165 : aError = aInst.pClass->SetString( aInst, pStr );
166 :
167 : if( aError.IsError() )
168 : pTC->pEH->Error( aError, aInst.pClass, RscId() );
169 : }
170 : }
171 :
172 : RscId MakeRscId( RscExpType aExpType )
173 : {
174 : if( !aExpType.IsNothing() )
175 : {
176 : sal_Int32 lValue(0);
177 :
178 : if( !aExpType.Evaluate( &lValue ) )
179 : pTC->pEH->Error( ERR_ZERODIVISION, NULL, RscId() );
180 : if( lValue < 1 || lValue > (sal_Int32)0x7FFF )
181 : {
182 : pTC->pEH->Error( ERR_IDRANGE, NULL, RscId(),
183 : rtl::OString::valueOf(lValue).getStr() );
184 : }
185 :
186 : if( aExpType.IsDefinition() )
187 : return RscId( aExpType.aExp.pDef );
188 : else
189 : return RscId( lValue );
190 : }
191 : return RscId();
192 : }
193 :
194 : sal_Bool DoClassHeader( RSCHEADER * pHeader, sal_Bool bMember )
195 : {
196 : RSCINST aCopyInst;
197 : RscId aName1 = MakeRscId( pHeader->nName1 );
198 : RscId aName2 = MakeRscId( pHeader->nName2 );
199 :
200 : if( pHeader->pRefClass )
201 : aCopyInst.pClass = pHeader->pRefClass;
202 : else
203 : aCopyInst.pClass = pHeader->pClass;
204 :
205 : if( TYPE_COPY == pHeader->nTyp )
206 : {
207 : ObjNode * pCopyObj = aCopyInst.pClass->GetObjNode( aName2 );
208 :
209 : if( !pCopyObj )
210 : {
211 : rtl::OStringBuffer aMsg( pHS->getString( aCopyInst.pClass->GetId() ) );
212 : aMsg.append(' ');
213 : aMsg.append(aName2.GetName());
214 : pTC->pEH->Error( ERR_NOCOPYOBJ, pHeader->pClass, aName1,
215 : aMsg.getStr() );
216 : }
217 : else
218 : aCopyInst.pData = pCopyObj->GetRscObj();
219 : }
220 :
221 : if( bMember )
222 : {
223 : // Angabe von Superklassen oder abgeleiteten Klassen ist jetzt erlaubt
224 : if( S.Top().pClass->InHierarchy( pHeader->pClass )
225 : || pHeader->pClass->InHierarchy( S.Top().pClass) )
226 : {
227 : if( aCopyInst.IsInst() )
228 : {
229 : RSCINST aTmpI( S.Top() );
230 : aTmpI.pClass->Destroy( aTmpI );
231 : aTmpI.pClass->Create( &aTmpI, aCopyInst );
232 : }
233 : }
234 : else
235 : pTC->pEH->Error( ERR_FALSETYPE, S.Top().pClass, aName1,
236 : pHS->getString( pHeader->pClass->GetId() ).getStr() );
237 : }
238 : else
239 : {
240 : if( S.IsEmpty() )
241 : {
242 : if( (sal_Int32)aName1 < 256 )
243 : pTC->pEH->Error( WRN_GLOBALID, pHeader->pClass, aName1 );
244 :
245 : if( aCopyInst.IsInst() )
246 : S.Push( pHeader->pClass->Create( NULL, aCopyInst ) );
247 : else
248 : S.Push( pHeader->pClass->Create( NULL, RSCINST() ) );
249 :
250 : ObjNode * pNode = new ObjNode( aName1, S.Top().pData,
251 : pFI->GetFileIndex() );
252 : pTC->pEH->StdOut( ".", RscVerbosityVerbose );
253 :
254 : if( !aName1.IsId() )
255 : pTC->pEH->Error( ERR_IDEXPECTED, pHeader->pClass, aName1 );
256 : else if( !pHeader->pClass->PutObjNode( pNode ) )
257 : pTC->pEH->Error( ERR_DOUBLEID, pHeader->pClass, aName1 );
258 : }
259 : else
260 : {
261 : RSCINST aTmpI;
262 : ERRTYPE aError;
263 :
264 : if( (sal_Int32)aName1 >= 256 && aName1.IsId() )
265 : pTC->pEH->Error( WRN_LOCALID, pHeader->pClass, aName1 );
266 : aError = S.Top().pClass->GetElement( S.Top(), aName1,
267 : pHeader->pClass, aCopyInst, &aTmpI );
268 :
269 : if( aError.IsWarning() )
270 : pTC->pEH->Error( aError, pHeader->pClass, aName1 );
271 : else if( aError.IsError() )
272 : {
273 : if( ERR_CONT_INVALIDTYPE == aError )
274 : pTC->pEH->Error( aError, S.Top().pClass, aName1,
275 : pHS->getString( pHeader->pClass->GetId() ).getStr() );
276 : else
277 : pTC->pEH->Error( aError, S.Top().pClass, aName1 );
278 : S.Top().pClass->GetElement( S.Top(), RscId(),
279 : pHeader->pClass, RSCINST(), &aTmpI );
280 :
281 : if( !aTmpI.IsInst() )
282 : return( sal_False );
283 : }
284 : S.Push( aTmpI );
285 : }
286 : }
287 : if( TYPE_REF == pHeader->nTyp )
288 : {
289 : ERRTYPE aError;
290 :
291 : aError = S.Top().pClass->SetRef( S.Top(), aName2 );
292 : pTC->pEH->Error( aError, S.Top().pClass, aName1 );
293 : }
294 :
295 : return( sal_True );
296 : }
297 :
298 : RSCINST GetFirstTupelEle( const RSCINST & rTop )
299 : { // Aufwaertskompatible, Tupel probieren
300 : RSCINST aInst;
301 : ERRTYPE aErr;
302 :
303 : aErr = rTop.pClass->GetElement( rTop, RscId(), NULL, RSCINST(), &aInst );
304 : if( !aErr.IsError() )
305 : aInst = aInst.pClass->GetTupelVar( aInst, 0, RSCINST() );
306 : return aInst;
307 : }
308 :
309 : /************** Y a c c C o d e ****************************************/
310 : //#define YYDEBUG 1
311 :
312 : #define TYPE_Atom 0
313 : #define TYPE_RESID 1
314 :
315 : #ifdef UNX
316 : #define YYMAXDEPTH 2000
317 : #else
318 : #define YYMAXDEPTH 800
319 : #endif
320 :
321 : #if defined _MSC_VER
322 : #pragma warning(push, 1)
323 : #pragma warning(disable:4129 4273 4701 4702)
324 : #endif
325 : #if defined __GNUC__
326 : #define GCC_VERSION (__GNUC__ * 10000 \
327 : + __GNUC_MINOR__ * 100 \
328 : + __GNUC_PATCHLEVEL__)
329 : /* Diagnostics pragma was introduced with gcc-4.2.1 */
330 : #if GCC_VERSION >= 40201
331 : #pragma GCC diagnostic ignored "-Wwrite-strings"
332 : #endif
333 : #elif defined __SUNPRO_CC
334 : #pragma disable_warn
335 : #endif
336 :
337 :
338 : /* Line 268 of yacc.c */
339 : #line 340 "/usr/local/src/libreoffice/workdir/unxlngi6.pro/YaccTarget/rsc/source/parser/rscyacc.cxx"
340 :
341 : /* Enabling traces. */
342 : #ifndef YYDEBUG
343 : # define YYDEBUG 0
344 : #endif
345 :
346 : /* Enabling verbose error messages. */
347 : #ifdef YYERROR_VERBOSE
348 : # undef YYERROR_VERBOSE
349 : # define YYERROR_VERBOSE 1
350 : #else
351 : # define YYERROR_VERBOSE 0
352 : #endif
353 :
354 : /* Enabling the token table. */
355 : #ifndef YYTOKEN_TABLE
356 : # define YYTOKEN_TABLE 0
357 : #endif
358 :
359 :
360 : /* Tokens. */
361 : #ifndef YYTOKENTYPE
362 : # define YYTOKENTYPE
363 : /* Put the tokens into the symbol table, so that GDB and other debuggers
364 : know about them. */
365 : enum yytokentype {
366 : NUMBER = 258,
367 : SYMBOL = 259,
368 : RSCDEFINE = 260,
369 : STRING = 261,
370 : INCLUDE_STRING = 262,
371 : CHARACTER = 263,
372 : BOOLEAN = 264,
373 : LINE = 265,
374 : AUTO_ID = 266,
375 : NOT = 267,
376 : XSCALE = 268,
377 : YSCALE = 269,
378 : RGB = 270,
379 : GEOMETRY = 271,
380 : POSITION = 272,
381 : DIMENSION = 273,
382 : INZOOMOUTPUTSIZE = 274,
383 : FLOATINGPOS = 275,
384 : DEFINE = 276,
385 : INCLUDE = 277,
386 : MACROTARGET = 278,
387 : DEFAULT = 279,
388 : CLASSNAME = 280,
389 : VARNAME = 281,
390 : CONSTNAME = 282,
391 : CLASS = 283,
392 : EXTENDABLE = 284,
393 : WRITEIFSET = 285,
394 : RIGHTSHIFT = 286,
395 : LEFTSHIFT = 287,
396 : UNARYMINUS = 288,
397 : UNARYPLUS = 289
398 : };
399 : #endif
400 :
401 :
402 :
403 : #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
404 : typedef union YYSTYPE
405 : {
406 :
407 : /* Line 293 of yacc.c */
408 : #line 271 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
409 :
410 : Atom varid;
411 : struct {
412 : Atom hashid;
413 : sal_Int32 nValue;
414 : } constname;
415 : RscTop * pClass;
416 : RSCHEADER header;
417 : struct {
418 : CLASS_DATA pData;
419 : RscTop * pClass;
420 : } instance;
421 : sal_Int32 value;
422 : sal_uInt16 ushort;
423 : short exp_short;
424 : char * string;
425 : sal_Bool svbool;
426 : REF_ENUM copyref;
427 : RscDefine * defineele;
428 : CharSet charset;
429 : RscExpType macrostruct;
430 :
431 :
432 :
433 : /* Line 293 of yacc.c */
434 : #line 435 "/usr/local/src/libreoffice/workdir/unxlngi6.pro/YaccTarget/rsc/source/parser/rscyacc.cxx"
435 : } YYSTYPE;
436 : # define YYSTYPE_IS_TRIVIAL 1
437 : # define yystype YYSTYPE /* obsolescent; will be withdrawn */
438 : # define YYSTYPE_IS_DECLARED 1
439 : #endif
440 :
441 :
442 : /* Copy the second part of user declarations. */
443 :
444 :
445 : /* Line 343 of yacc.c */
446 : #line 447 "/usr/local/src/libreoffice/workdir/unxlngi6.pro/YaccTarget/rsc/source/parser/rscyacc.cxx"
447 :
448 : #ifdef short
449 : # undef short
450 : #endif
451 :
452 : #ifdef YYTYPE_UINT8
453 : typedef YYTYPE_UINT8 yytype_uint8;
454 : #else
455 : typedef unsigned char yytype_uint8;
456 : #endif
457 :
458 : #ifdef YYTYPE_INT8
459 : typedef YYTYPE_INT8 yytype_int8;
460 : #elif (defined __STDC__ || defined __C99__FUNC__ \
461 : || defined __cplusplus || defined _MSC_VER)
462 : typedef signed char yytype_int8;
463 : #else
464 : typedef short int yytype_int8;
465 : #endif
466 :
467 : #ifdef YYTYPE_UINT16
468 : typedef YYTYPE_UINT16 yytype_uint16;
469 : #else
470 : typedef unsigned short int yytype_uint16;
471 : #endif
472 :
473 : #ifdef YYTYPE_INT16
474 : typedef YYTYPE_INT16 yytype_int16;
475 : #else
476 : typedef short int yytype_int16;
477 : #endif
478 :
479 : #ifndef YYSIZE_T
480 : # ifdef __SIZE_TYPE__
481 : # define YYSIZE_T __SIZE_TYPE__
482 : # elif defined size_t
483 : # define YYSIZE_T size_t
484 : # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
485 : || defined __cplusplus || defined _MSC_VER)
486 : # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
487 : # define YYSIZE_T size_t
488 : # else
489 : # define YYSIZE_T unsigned int
490 : # endif
491 : #endif
492 :
493 : #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
494 :
495 : #ifndef YY_
496 : # if defined YYENABLE_NLS && YYENABLE_NLS
497 : # if ENABLE_NLS
498 : # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
499 : # define YY_(msgid) dgettext ("bison-runtime", msgid)
500 : # endif
501 : # endif
502 : # ifndef YY_
503 : # define YY_(msgid) msgid
504 : # endif
505 : #endif
506 :
507 : /* Suppress unused-variable warnings by "using" E. */
508 : #if ! defined lint || defined __GNUC__
509 : # define YYUSE(e) ((void) (e))
510 : #else
511 : # define YYUSE(e) /* empty */
512 : #endif
513 :
514 : /* Identity function, used to suppress warnings about constant conditions. */
515 : #ifndef lint
516 : # define YYID(n) (n)
517 : #else
518 : #if (defined __STDC__ || defined __C99__FUNC__ \
519 : || defined __cplusplus || defined _MSC_VER)
520 : static int
521 : YYID (int yyi)
522 : #else
523 : static int
524 : YYID (yyi)
525 : int yyi;
526 : #endif
527 : {
528 : return yyi;
529 : }
530 : #endif
531 :
532 : #if ! defined yyoverflow || YYERROR_VERBOSE
533 :
534 : /* The parser invokes alloca or malloc; define the necessary symbols. */
535 :
536 : # ifdef YYSTACK_USE_ALLOCA
537 : # if YYSTACK_USE_ALLOCA
538 : # ifdef __GNUC__
539 : # define YYSTACK_ALLOC __builtin_alloca
540 : # elif defined __BUILTIN_VA_ARG_INCR
541 : # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
542 : # elif defined _AIX
543 : # define YYSTACK_ALLOC __alloca
544 : # elif defined _MSC_VER
545 : # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
546 : # define alloca _alloca
547 : # else
548 : # define YYSTACK_ALLOC alloca
549 : # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
550 : || defined __cplusplus || defined _MSC_VER)
551 : # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
552 : # ifndef EXIT_SUCCESS
553 : # define EXIT_SUCCESS 0
554 : # endif
555 : # endif
556 : # endif
557 : # endif
558 : # endif
559 :
560 : # ifdef YYSTACK_ALLOC
561 : /* Pacify GCC's `empty if-body' warning. */
562 : # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
563 : # ifndef YYSTACK_ALLOC_MAXIMUM
564 : /* The OS might guarantee only one guard page at the bottom of the stack,
565 : and a page size can be as small as 4096 bytes. So we cannot safely
566 : invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
567 : to allow for a few compiler-allocated temporary stack slots. */
568 : # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
569 : # endif
570 : # else
571 : # define YYSTACK_ALLOC YYMALLOC
572 : # define YYSTACK_FREE YYFREE
573 : # ifndef YYSTACK_ALLOC_MAXIMUM
574 : # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
575 : # endif
576 : # if (defined __cplusplus && ! defined EXIT_SUCCESS \
577 : && ! ((defined YYMALLOC || defined malloc) \
578 : && (defined YYFREE || defined free)))
579 : # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
580 : # ifndef EXIT_SUCCESS
581 : # define EXIT_SUCCESS 0
582 : # endif
583 : # endif
584 : # ifndef YYMALLOC
585 : # define YYMALLOC malloc
586 : # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
587 : || defined __cplusplus || defined _MSC_VER)
588 : void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
589 : # endif
590 : # endif
591 : # ifndef YYFREE
592 : # define YYFREE free
593 : # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
594 : || defined __cplusplus || defined _MSC_VER)
595 : void free (void *); /* INFRINGES ON USER NAME SPACE */
596 : # endif
597 : # endif
598 : # endif
599 : #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
600 :
601 :
602 : #if (! defined yyoverflow \
603 : && (! defined __cplusplus \
604 : || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
605 :
606 : /* A type that is properly aligned for any stack member. */
607 : union yyalloc
608 : {
609 : yytype_int16 yyss_alloc;
610 : YYSTYPE yyvs_alloc;
611 : };
612 :
613 : /* The size of the maximum gap between one aligned stack and the next. */
614 : # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
615 :
616 : /* The size of an array large to enough to hold all stacks, each with
617 : N elements. */
618 : # define YYSTACK_BYTES(N) \
619 : ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
620 : + YYSTACK_GAP_MAXIMUM)
621 :
622 : # define YYCOPY_NEEDED 1
623 :
624 : /* Relocate STACK from its old location to the new one. The
625 : local variables YYSIZE and YYSTACKSIZE give the old and new number of
626 : elements in the stack, and YYPTR gives the new location of the
627 : stack. Advance YYPTR to a properly aligned location for the next
628 : stack. */
629 : # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
630 : do \
631 : { \
632 : YYSIZE_T yynewbytes; \
633 : YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
634 : Stack = &yyptr->Stack_alloc; \
635 : yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
636 : yyptr += yynewbytes / sizeof (*yyptr); \
637 : } \
638 : while (YYID (0))
639 :
640 : #endif
641 :
642 : #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
643 : /* Copy COUNT objects from FROM to TO. The source and destination do
644 : not overlap. */
645 : # ifndef YYCOPY
646 : # if defined __GNUC__ && 1 < __GNUC__
647 : # define YYCOPY(To, From, Count) \
648 : __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
649 : # else
650 : # define YYCOPY(To, From, Count) \
651 : do \
652 : { \
653 : YYSIZE_T yyi; \
654 : for (yyi = 0; yyi < (Count); yyi++) \
655 : (To)[yyi] = (From)[yyi]; \
656 : } \
657 : while (YYID (0))
658 : # endif
659 : # endif
660 : #endif /* !YYCOPY_NEEDED */
661 :
662 : /* YYFINAL -- State number of the termination state. */
663 : #define YYFINAL 9
664 : /* YYLAST -- Last index in YYTABLE. */
665 : #define YYLAST 321
666 :
667 : /* YYNTOKENS -- Number of terminals. */
668 : #define YYNTOKENS 54
669 : /* YYNNTS -- Number of nonterminals. */
670 : #define YYNNTS 39
671 : /* YYNRULES -- Number of rules. */
672 : #define YYNRULES 117
673 : /* YYNRULES -- Number of states. */
674 : #define YYNSTATES 259
675 :
676 : /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
677 : #define YYUNDEFTOK 2
678 : #define YYMAXUTOK 289
679 :
680 : #define YYTRANSLATE(YYX) \
681 : ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
682 :
683 : /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
684 : static const yytype_uint8 yytranslate[] =
685 : {
686 : 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
687 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
688 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
689 : 2, 2, 2, 2, 2, 44, 2, 2, 32, 2,
690 : 42, 43, 37, 35, 41, 36, 2, 38, 2, 2,
691 : 2, 2, 2, 2, 2, 2, 2, 2, 48, 45,
692 : 51, 52, 53, 2, 2, 2, 2, 2, 2, 2,
693 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
694 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
695 : 2, 49, 2, 50, 2, 2, 2, 2, 2, 2,
696 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
697 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
698 : 2, 2, 2, 46, 31, 47, 2, 2, 2, 2,
699 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
700 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
701 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
702 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
703 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
704 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
705 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
706 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
707 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
708 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
709 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
710 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
711 : 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
712 : 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
713 : 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
714 : 25, 26, 27, 28, 29, 30, 33, 34, 39, 40
715 : };
716 :
717 : #if YYDEBUG
718 : /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
719 : YYRHS. */
720 : static const yytype_uint16 yyprhs[] =
721 : {
722 : 0, 0, 3, 4, 7, 10, 12, 17, 22, 26,
723 : 30, 33, 39, 42, 48, 54, 55, 59, 63, 67,
724 : 70, 73, 74, 76, 80, 82, 84, 87, 89, 91,
725 : 93, 95, 101, 106, 109, 113, 118, 120, 124, 127,
726 : 129, 131, 134, 136, 137, 139, 140, 142, 143, 145,
727 : 149, 152, 156, 159, 168, 177, 188, 202, 212, 222,
728 : 232, 241, 251, 260, 264, 271, 278, 281, 287, 293,
729 : 294, 295, 296, 297, 299, 300, 302, 303, 308, 312,
730 : 316, 319, 320, 322, 324, 327, 329, 331, 333, 338,
731 : 344, 353, 365, 380, 382, 384, 386, 389, 391, 393,
732 : 395, 398, 401, 405, 409, 413, 417, 421, 425, 429,
733 : 433, 437, 440, 442, 444, 445, 450, 455
734 : };
735 :
736 : /* YYRHS -- A `-1'-separated list of the rules' RHS. */
737 : static const yytype_int8 yyrhs[] =
738 : {
739 : 55, 0, -1, -1, 55, 56, -1, 23, 89, -1,
740 : 92, -1, 44, 21, 4, 89, -1, 44, 21, 5,
741 : 89, -1, 44, 22, 6, -1, 44, 22, 7, -1,
742 : 63, 45, -1, 57, 46, 58, 47, 45, -1, 57,
743 : 45, -1, 28, 4, 90, 48, 25, -1, 28, 25,
744 : 90, 48, 25, -1, -1, 59, 45, 58, -1, 60,
745 : 61, 4, -1, 60, 61, 26, -1, 60, 29, -1,
746 : 60, 30, -1, -1, 62, -1, 62, 49, 50, -1,
747 : 25, -1, 4, -1, 64, 67, -1, 64, -1, 66,
748 : -1, 51, -1, 41, -1, 25, 90, 65, 25, 90,
749 : -1, 25, 90, 65, 90, -1, 25, 90, -1, 25,
750 : 65, 90, -1, 25, 65, 25, 90, -1, 25, -1,
751 : 46, 68, 47, -1, 46, 47, -1, 87, -1, 72,
752 : -1, 68, 72, -1, 27, -1, -1, 27, -1, -1,
753 : 27, -1, -1, 92, -1, 74, 86, 45, -1, 63,
754 : 45, -1, 73, 67, 45, -1, 73, 45, -1, 13,
755 : 52, 42, 88, 41, 88, 43, 45, -1, 14, 52,
756 : 42, 88, 41, 88, 43, 45, -1, 15, 52, 42,
757 : 88, 41, 88, 41, 88, 43, 45, -1, 16, 52,
758 : 71, 42, 88, 41, 88, 41, 88, 41, 88, 43,
759 : 45, -1, 17, 52, 69, 42, 88, 41, 88, 43,
760 : 45, -1, 18, 52, 70, 42, 88, 41, 88, 43,
761 : 45, -1, 19, 52, 27, 42, 88, 41, 88, 43,
762 : 45, -1, 19, 52, 42, 88, 41, 88, 43, 45,
763 : -1, 20, 52, 27, 42, 88, 41, 88, 43, 45,
764 : -1, 20, 52, 42, 88, 41, 88, 43, 45, -1,
765 : 26, 52, 66, -1, 26, 49, 27, 50, 52, 66,
766 : -1, 26, 49, 4, 50, 52, 66, -1, 26, 52,
767 : -1, 26, 49, 27, 50, 52, -1, 26, 49, 4,
768 : 50, 52, -1, -1, -1, -1, -1, 86, -1, -1,
769 : 85, -1, -1, 83, 80, 81, 45, -1, 83, 84,
770 : 45, -1, 83, 63, 45, -1, 83, 92, -1, -1,
771 : 89, -1, 27, -1, 12, 27, -1, 9, -1, 87,
772 : -1, 24, -1, 46, 82, 83, 47, -1, 51, 75,
773 : 79, 45, 53, -1, 51, 75, 79, 45, 76, 79,
774 : 45, 53, -1, 51, 75, 79, 45, 76, 79, 45,
775 : 77, 79, 45, 53, -1, 51, 75, 79, 45, 76,
776 : 79, 45, 77, 79, 45, 78, 79, 45, 53, -1,
777 : 84, -1, 85, -1, 6, -1, 87, 6, -1, 89,
778 : -1, 5, -1, 3, -1, 36, 89, -1, 35, 89,
779 : -1, 89, 35, 89, -1, 89, 36, 89, -1, 89,
780 : 37, 89, -1, 89, 38, 89, -1, 89, 32, 89,
781 : -1, 89, 31, 89, -1, 42, 89, 43, -1, 89,
782 : 34, 89, -1, 89, 33, 89, -1, 90, 92, -1,
783 : 89, -1, 3, -1, -1, 44, 10, 3, 6, -1,
784 : 44, 3, 6, 91, -1, 44, 3, -1
785 : };
786 :
787 : /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
788 : static const yytype_uint16 yyrline[] =
789 : {
790 : 0, 360, 360, 362, 363, 376, 377, 411, 415, 418,
791 : 421, 429, 430, 434, 447, 454, 456, 460, 467, 475,
792 : 479, 484, 490, 494, 516, 520, 530, 537, 553, 562,
793 : 566, 573, 581, 589, 597, 605, 613, 623, 624, 625,
794 : 632, 633, 637, 641, 645, 649, 653, 658, 662, 663,
795 : 667, 668, 680, 696, 701, 706, 713, 721, 727, 733,
796 : 740, 745, 752, 760, 779, 807, 839, 853, 877, 905,
797 : 921, 937, 953, 967, 975, 992, 1000, 1010, 1011, 1012,
798 : 1013, 1014, 1018, 1055, 1072, 1089, 1106, 1123, 1127, 1128,
799 : 1129, 1130, 1132, 1137, 1138, 1143, 1147, 1157, 1167, 1172,
800 : 1177, 1191, 1195, 1206, 1217, 1228, 1245, 1256, 1267, 1271,
801 : 1282, 1296, 1297, 1314, 1318, 1323, 1333, 1343
802 : };
803 : #endif
804 :
805 : #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
806 : /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
807 : First, the terminals, then, starting at YYNTOKENS, nonterminals. */
808 : static const char *const yytname[] =
809 : {
810 : "$end", "error", "$undefined", "NUMBER", "SYMBOL", "RSCDEFINE",
811 : "STRING", "INCLUDE_STRING", "CHARACTER", "BOOLEAN", "LINE", "AUTO_ID",
812 : "NOT", "XSCALE", "YSCALE", "RGB", "GEOMETRY", "POSITION", "DIMENSION",
813 : "INZOOMOUTPUTSIZE", "FLOATINGPOS", "DEFINE", "INCLUDE", "MACROTARGET",
814 : "DEFAULT", "CLASSNAME", "VARNAME", "CONSTNAME", "CLASS", "EXTENDABLE",
815 : "WRITEIFSET", "'|'", "'&'", "RIGHTSHIFT", "LEFTSHIFT", "'+'", "'-'",
816 : "'*'", "'/'", "UNARYMINUS", "UNARYPLUS", "','", "'('", "')'", "'#'",
817 : "';'", "'{'", "'}'", "':'", "'['", "']'", "'<'", "'='", "'>'", "$accept",
818 : "resource_definitions", "resource_definition",
819 : "new_class_definition_header", "new_class_definition_body",
820 : "property_definition", "type_flags", "type", "type_base",
821 : "class_definition", "class_header", "copy_ref", "class_header_body",
822 : "class_body", "var_definitions", "xy_mapmode", "wh_mapmode",
823 : "xywh_mapmode", "var_definition", "var_header_class", "var_header",
824 : "tupel_header0", "tupel_header1", "tupel_header2", "tupel_header3",
825 : "tupel_body", "var_list_header", "list_body", "list_header", "list",
826 : "var_bodysimple", "var_bodycomplex", "var_body", "string_multiline",
827 : "long_expression", "macro_expression", "id_expression", "DUMMY_NUMBER",
828 : "line_number", 0
829 : };
830 : #endif
831 :
832 : # ifdef YYPRINT
833 : /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
834 : token YYLEX-NUM. */
835 : static const yytype_uint16 yytoknum[] =
836 : {
837 : 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
838 : 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
839 : 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
840 : 285, 124, 38, 286, 287, 43, 45, 42, 47, 288,
841 : 289, 44, 40, 41, 35, 59, 123, 125, 58, 91,
842 : 93, 60, 61, 62
843 : };
844 : # endif
845 :
846 : /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
847 : static const yytype_uint8 yyr1[] =
848 : {
849 : 0, 54, 55, 55, 55, 56, 56, 56, 56, 56,
850 : 56, 56, 56, 57, 57, 58, 58, 59, 59, 60,
851 : 60, 60, 61, 61, 62, 62, 63, 63, 64, 65,
852 : 65, 66, 66, 66, 66, 66, 66, 67, 67, 67,
853 : 68, 68, 69, 69, 70, 70, 71, 71, 72, 72,
854 : 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
855 : 72, 72, 72, 73, 73, 73, 74, 74, 74, 75,
856 : 76, 77, 78, 79, 80, 81, 82, 83, 83, 83,
857 : 83, 83, 84, 84, 84, 84, 84, 84, 85, 85,
858 : 85, 85, 85, 86, 86, 87, 87, 88, 89, 89,
859 : 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
860 : 89, 90, 90, 91, 91, 92, 92, 92
861 : };
862 :
863 : /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
864 : static const yytype_uint8 yyr2[] =
865 : {
866 : 0, 2, 0, 2, 2, 1, 4, 4, 3, 3,
867 : 2, 5, 2, 5, 5, 0, 3, 3, 3, 2,
868 : 2, 0, 1, 3, 1, 1, 2, 1, 1, 1,
869 : 1, 5, 4, 2, 3, 4, 1, 3, 2, 1,
870 : 1, 2, 1, 0, 1, 0, 1, 0, 1, 3,
871 : 2, 3, 2, 8, 8, 10, 13, 9, 9, 9,
872 : 8, 9, 8, 3, 6, 6, 2, 5, 5, 0,
873 : 0, 0, 0, 1, 0, 1, 0, 4, 3, 3,
874 : 2, 0, 1, 1, 2, 1, 1, 1, 4, 5,
875 : 8, 11, 14, 1, 1, 1, 2, 1, 1, 1,
876 : 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
877 : 3, 2, 1, 1, 0, 4, 4, 2
878 : };
879 :
880 : /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
881 : Performed when YYTABLE doesn't specify something else to do. Zero
882 : means the default is an error. */
883 : static const yytype_uint8 yydefact[] =
884 : {
885 : 2, 0, 0, 99, 98, 0, 0, 0, 4, 1,
886 : 36, 0, 0, 3, 0, 0, 27, 28, 5, 101,
887 : 100, 0, 0, 0, 0, 0, 0, 0, 0, 0,
888 : 30, 29, 0, 112, 33, 0, 0, 117, 0, 0,
889 : 0, 12, 21, 10, 95, 0, 26, 39, 108, 107,
890 : 106, 110, 109, 102, 103, 104, 105, 0, 34, 0,
891 : 0, 111, 0, 0, 114, 0, 0, 0, 8, 9,
892 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
893 : 0, 0, 38, 0, 0, 40, 0, 0, 48, 96,
894 : 35, 0, 32, 0, 0, 113, 116, 115, 6, 7,
895 : 0, 21, 25, 24, 19, 20, 0, 22, 0, 0,
896 : 0, 47, 43, 45, 0, 0, 0, 66, 50, 37,
897 : 41, 52, 0, 85, 0, 87, 83, 76, 69, 93,
898 : 94, 0, 86, 82, 31, 13, 14, 11, 16, 17,
899 : 18, 0, 0, 0, 0, 46, 0, 42, 0, 44,
900 : 0, 0, 0, 0, 0, 0, 0, 63, 51, 84,
901 : 81, 0, 49, 23, 0, 97, 0, 0, 0, 0,
902 : 0, 0, 0, 0, 0, 0, 0, 74, 0, 73,
903 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
904 : 68, 67, 88, 0, 0, 0, 80, 70, 0, 0,
905 : 0, 0, 0, 0, 0, 0, 0, 0, 65, 64,
906 : 79, 0, 75, 78, 89, 0, 0, 0, 0, 0,
907 : 0, 0, 0, 0, 0, 0, 77, 0, 53, 54,
908 : 0, 0, 0, 0, 0, 60, 0, 62, 71, 0,
909 : 0, 57, 58, 59, 61, 90, 0, 55, 0, 0,
910 : 0, 72, 0, 91, 0, 56, 0, 0, 92
911 : };
912 :
913 : /* YYDEFGOTO[NTERM-NUM]. */
914 : static const yytype_int16 yydefgoto[] =
915 : {
916 : -1, 2, 13, 14, 70, 71, 72, 106, 107, 83,
917 : 16, 32, 17, 46, 84, 148, 150, 146, 85, 86,
918 : 87, 161, 215, 246, 254, 178, 194, 211, 160, 177,
919 : 129, 130, 179, 132, 164, 165, 34, 96, 61
920 : };
921 :
922 : /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
923 : STATE-NUM. */
924 : #define YYPACT_NINF -138
925 : static const yytype_int16 yypact[] =
926 : {
927 : -3, 11, 13, -138, -138, 11, 11, 11, 237, -138,
928 : 102, 26, 89, -138, 87, -16, 9, -138, -138, -138,
929 : -138, 224, 11, 11, 11, 11, 11, 11, 11, 11,
930 : -138, -138, 159, 237, 44, 11, 11, 42, 36, 131,
931 : 134, -138, 49, -138, -138, 192, -138, 77, -138, 244,
932 : 250, 90, 90, 108, 108, -138, -138, 11, 54, 69,
933 : 162, -138, 16, 72, 111, 115, 11, 11, -138, -138,
934 : 82, 97, 33, 95, 98, 104, 105, 107, 109, 114,
935 : 116, 70, -138, 118, 207, -138, 4, 88, -138, -138,
936 : 54, 11, 54, 129, 144, -138, -138, -138, 237, 237,
937 : 127, 49, -138, -138, -138, -138, 14, 125, 133, 137,
938 : 138, 156, 158, 164, -10, 34, 15, 161, -138, -138,
939 : -138, -138, 147, -138, 169, -138, -138, -138, -138, -138,
940 : -138, 154, 77, 237, 54, -138, -138, -138, -138, -138,
941 : -138, 139, 11, 11, 11, -138, 160, -138, 171, -138,
942 : 173, 174, 11, 177, 11, 150, 153, -138, -138, -138,
943 : -138, 88, -138, -138, 187, 237, 188, 189, 11, 11,
944 : 11, 11, 190, 11, 193, 183, 185, 146, 195, -138,
945 : 11, 11, 11, 197, 200, 201, 202, 11, 203, 11,
946 : 161, 161, -138, 204, 62, 205, -138, 194, 209, 220,
947 : 223, 11, 11, 11, 11, 222, 11, 246, -138, -138,
948 : -138, 221, -138, -138, -138, 88, 245, 247, 11, 252,
949 : 248, 251, 253, 254, 255, 256, -138, 257, -138, -138,
950 : 260, 11, 259, 261, 262, -138, 263, -138, 242, 264,
951 : 269, -138, -138, -138, -138, -138, 88, -138, 11, 266,
952 : 270, 265, 267, -138, 88, -138, 271, 268, -138
953 : };
954 :
955 : /* YYPGOTO[NTERM-NUM]. */
956 : static const yytype_int16 yypgoto[] =
957 : {
958 : -138, -138, -138, -138, 145, -138, -138, -138, -138, 1,
959 : -138, 214, -116, 211, -138, -138, -138, -138, 216, -138,
960 : -138, -138, -138, -138, -138, -137, -138, -138, -138, -138,
961 : 128, 120, 228, -9, -100, -1, -24, -138, 0
962 : };
963 :
964 : /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
965 : positive, shift that token. If negative, reduce the rule which
966 : number is the opposite. If YYTABLE_NINF, syntax error. */
967 : #define YYTABLE_NINF -16
968 : static const yytype_int16 yytable[] =
969 : {
970 : 8, 157, 18, 15, 19, 20, 21, 47, 58, 33,
971 : 44, 62, 63, 9, 3, 44, 4, 151, 139, 155,
972 : 1, 49, 50, 51, 52, 53, 54, 55, 56, 43,
973 : 35, 33, 152, 90, 33, 33, 92, 102, 10, 65,
974 : 140, 11, 156, 166, 167, 88, 5, 6, 64, 121,
975 : 45, 36, 172, 7, 174, 45, 33, 12, 103, 33,
976 : 59, 153, 104, 105, 93, 98, 99, 134, 183, 184,
977 : 185, 186, 37, 188, 208, 209, 154, 47, 227, 38,
978 : 198, 199, 200, 89, 88, 30, 133, 205, 59, 207,
979 : 33, 3, 37, 4, 44, 31, -15, 123, 59, 38,
980 : 124, 219, 220, 221, 222, 3, 224, 4, 127, 249,
981 : 39, 40, 125, 128, 95, 126, 59, 256, 230, 116,
982 : 94, 97, 117, 5, 6, 26, 27, 28, 29, 100,
983 : 7, 240, 41, 42, 127, 66, 67, 5, 6, 128,
984 : 68, 69, 101, 30, 7, 28, 29, 108, 250, 3,
985 : 109, 4, 44, 31, 135, 123, 110, 111, 124, 112,
986 : 133, 113, 3, 118, 4, 3, 114, 4, 115, 136,
987 : 125, 10, 137, 126, 141, 142, 133, 196, 193, 143,
988 : 144, 5, 6, 145, 57, 147, 10, 91, 7, 163,
989 : 59, 149, 158, 192, 5, 6, 159, 5, 6, 162,
990 : 175, 7, 168, 176, 7, 73, 74, 75, 76, 77,
991 : 78, 79, 80, 169, 133, 170, 171, 10, 81, 173,
992 : 73, 74, 75, 76, 77, 78, 79, 80, 180, 181,
993 : 182, 187, 10, 81, 189, 190, 59, 191, 201, 82,
994 : 197, 202, 203, 204, 206, 133, 138, 214, 60, 210,
995 : 213, 59, 216, 133, 119, 22, 23, 24, 25, 26,
996 : 27, 28, 29, 217, 218, 223, 226, 48, 22, 23,
997 : 24, 25, 26, 27, 28, 29, 23, 24, 25, 26,
998 : 27, 28, 29, 24, 25, 26, 27, 28, 29, 225,
999 : 228, 232, 229, 231, 233, 245, 234, 122, 236, 235,
1000 : 120, 237, 238, 239, 241, 195, 242, 243, 244, 247,
1001 : 248, 251, 255, 252, 212, 131, 257, 0, 253, 0,
1002 : 0, 258
1003 : };
1004 :
1005 : #define yypact_value_is_default(yystate) \
1006 : ((yystate) == (-138))
1007 :
1008 : #define yytable_value_is_error(yytable_value) \
1009 : YYID (0)
1010 :
1011 : static const yytype_int16 yycheck[] =
1012 : {
1013 : 1, 117, 2, 2, 5, 6, 7, 16, 32, 10,
1014 : 6, 35, 36, 0, 3, 6, 5, 27, 4, 4,
1015 : 23, 22, 23, 24, 25, 26, 27, 28, 29, 45,
1016 : 4, 32, 42, 57, 35, 36, 60, 4, 25, 3,
1017 : 26, 28, 27, 143, 144, 45, 35, 36, 6, 45,
1018 : 46, 25, 152, 42, 154, 46, 57, 44, 25, 60,
1019 : 44, 27, 29, 30, 48, 66, 67, 91, 168, 169,
1020 : 170, 171, 3, 173, 190, 191, 42, 86, 215, 10,
1021 : 180, 181, 182, 6, 84, 41, 87, 187, 44, 189,
1022 : 91, 3, 3, 5, 6, 51, 47, 9, 44, 10,
1023 : 12, 201, 202, 203, 204, 3, 206, 5, 46, 246,
1024 : 21, 22, 24, 51, 3, 27, 44, 254, 218, 49,
1025 : 48, 6, 52, 35, 36, 35, 36, 37, 38, 47,
1026 : 42, 231, 45, 46, 46, 4, 5, 35, 36, 51,
1027 : 6, 7, 45, 41, 42, 37, 38, 52, 248, 3,
1028 : 52, 5, 6, 51, 25, 9, 52, 52, 12, 52,
1029 : 161, 52, 3, 45, 5, 3, 52, 5, 52, 25,
1030 : 24, 25, 45, 27, 49, 42, 177, 177, 177, 42,
1031 : 42, 35, 36, 27, 25, 27, 25, 25, 42, 50,
1032 : 44, 27, 45, 47, 35, 36, 27, 35, 36, 45,
1033 : 50, 42, 42, 50, 42, 13, 14, 15, 16, 17,
1034 : 18, 19, 20, 42, 215, 42, 42, 25, 26, 42,
1035 : 13, 14, 15, 16, 17, 18, 19, 20, 41, 41,
1036 : 41, 41, 25, 26, 41, 52, 44, 52, 41, 47,
1037 : 45, 41, 41, 41, 41, 246, 101, 53, 34, 45,
1038 : 45, 44, 43, 254, 47, 31, 32, 33, 34, 35,
1039 : 36, 37, 38, 43, 41, 43, 45, 43, 31, 32,
1040 : 33, 34, 35, 36, 37, 38, 32, 33, 34, 35,
1041 : 36, 37, 38, 33, 34, 35, 36, 37, 38, 43,
1042 : 45, 43, 45, 41, 43, 53, 43, 86, 43, 45,
1043 : 84, 45, 45, 43, 45, 177, 45, 45, 45, 45,
1044 : 41, 45, 45, 43, 194, 87, 45, -1, 53, -1,
1045 : -1, 53
1046 : };
1047 :
1048 : /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1049 : symbol of state STATE-NUM. */
1050 : static const yytype_uint8 yystos[] =
1051 : {
1052 : 0, 23, 55, 3, 5, 35, 36, 42, 89, 0,
1053 : 25, 28, 44, 56, 57, 63, 64, 66, 92, 89,
1054 : 89, 89, 31, 32, 33, 34, 35, 36, 37, 38,
1055 : 41, 51, 65, 89, 90, 4, 25, 3, 10, 21,
1056 : 22, 45, 46, 45, 6, 46, 67, 87, 43, 89,
1057 : 89, 89, 89, 89, 89, 89, 89, 25, 90, 44,
1058 : 65, 92, 90, 90, 6, 3, 4, 5, 6, 7,
1059 : 58, 59, 60, 13, 14, 15, 16, 17, 18, 19,
1060 : 20, 26, 47, 63, 68, 72, 73, 74, 92, 6,
1061 : 90, 25, 90, 48, 48, 3, 91, 6, 89, 89,
1062 : 47, 45, 4, 25, 29, 30, 61, 62, 52, 52,
1063 : 52, 52, 52, 52, 52, 52, 49, 52, 45, 47,
1064 : 72, 45, 67, 9, 12, 24, 27, 46, 51, 84,
1065 : 85, 86, 87, 89, 90, 25, 25, 45, 58, 4,
1066 : 26, 49, 42, 42, 42, 27, 71, 27, 69, 27,
1067 : 70, 27, 42, 27, 42, 4, 27, 66, 45, 27,
1068 : 82, 75, 45, 50, 88, 89, 88, 88, 42, 42,
1069 : 42, 42, 88, 42, 88, 50, 50, 83, 79, 86,
1070 : 41, 41, 41, 88, 88, 88, 88, 41, 88, 41,
1071 : 52, 52, 47, 63, 80, 84, 92, 45, 88, 88,
1072 : 88, 41, 41, 41, 41, 88, 41, 88, 66, 66,
1073 : 45, 81, 85, 45, 53, 76, 43, 43, 41, 88,
1074 : 88, 88, 88, 43, 88, 43, 45, 79, 45, 45,
1075 : 88, 41, 43, 43, 43, 45, 43, 45, 45, 43,
1076 : 88, 45, 45, 45, 45, 53, 77, 45, 41, 79,
1077 : 88, 45, 43, 53, 78, 45, 79, 45, 53
1078 : };
1079 :
1080 : #define yyerrok (yyerrstatus = 0)
1081 : #define yyclearin (yychar = YYEMPTY)
1082 : #define YYEMPTY (-2)
1083 : #define YYEOF 0
1084 :
1085 : #define YYACCEPT goto yyacceptlab
1086 : #define YYABORT goto yyabortlab
1087 : #define YYERROR goto yyerrorlab
1088 :
1089 :
1090 : /* Like YYERROR except do call yyerror. This remains here temporarily
1091 : to ease the transition to the new meaning of YYERROR, for GCC.
1092 : Once GCC version 2 has supplanted version 1, this can go. However,
1093 : YYFAIL appears to be in use. Nevertheless, it is formally deprecated
1094 : in Bison 2.4.2's NEWS entry, where a plan to phase it out is
1095 : discussed. */
1096 :
1097 : #define YYFAIL goto yyerrlab
1098 : #if defined YYFAIL
1099 : /* This is here to suppress warnings from the GCC cpp's
1100 : -Wunused-macros. Normally we don't worry about that warning, but
1101 : some users do, and we want to make it easy for users to remove
1102 : YYFAIL uses, which will produce warnings from Bison 2.5. */
1103 : #endif
1104 :
1105 : #define YYRECOVERING() (!!yyerrstatus)
1106 :
1107 : #define YYBACKUP(Token, Value) \
1108 : do \
1109 : if (yychar == YYEMPTY && yylen == 1) \
1110 : { \
1111 : yychar = (Token); \
1112 : yylval = (Value); \
1113 : YYPOPSTACK (1); \
1114 : goto yybackup; \
1115 : } \
1116 : else \
1117 : { \
1118 : yyerror (YY_("syntax error: cannot back up")); \
1119 : YYERROR; \
1120 : } \
1121 : while (YYID (0))
1122 :
1123 :
1124 : #define YYTERROR 1
1125 : #define YYERRCODE 256
1126 :
1127 :
1128 : /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1129 : If N is 0, then set CURRENT to the empty location which ends
1130 : the previous symbol: RHS[0] (always defined). */
1131 :
1132 : #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1133 : #ifndef YYLLOC_DEFAULT
1134 : # define YYLLOC_DEFAULT(Current, Rhs, N) \
1135 : do \
1136 : if (YYID (N)) \
1137 : { \
1138 : (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1139 : (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1140 : (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1141 : (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1142 : } \
1143 : else \
1144 : { \
1145 : (Current).first_line = (Current).last_line = \
1146 : YYRHSLOC (Rhs, 0).last_line; \
1147 : (Current).first_column = (Current).last_column = \
1148 : YYRHSLOC (Rhs, 0).last_column; \
1149 : } \
1150 : while (YYID (0))
1151 : #endif
1152 :
1153 :
1154 : /* This macro is provided for backward compatibility. */
1155 :
1156 : #ifndef YY_LOCATION_PRINT
1157 : # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1158 : #endif
1159 :
1160 :
1161 : /* YYLEX -- calling `yylex' with the right arguments. */
1162 :
1163 : #ifdef YYLEX_PARAM
1164 : # define YYLEX yylex (YYLEX_PARAM)
1165 : #else
1166 : # define YYLEX yylex ()
1167 : #endif
1168 :
1169 : /* Enable debugging if requested. */
1170 : #if YYDEBUG
1171 :
1172 : # ifndef YYFPRINTF
1173 : # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1174 : # define YYFPRINTF fprintf
1175 : # endif
1176 :
1177 : # define YYDPRINTF(Args) \
1178 : do { \
1179 : if (yydebug) \
1180 : YYFPRINTF Args; \
1181 : } while (YYID (0))
1182 :
1183 : # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1184 : do { \
1185 : if (yydebug) \
1186 : { \
1187 : YYFPRINTF (stderr, "%s ", Title); \
1188 : yy_symbol_print (stderr, \
1189 : Type, Value); \
1190 : YYFPRINTF (stderr, "\n"); \
1191 : } \
1192 : } while (YYID (0))
1193 :
1194 :
1195 : /*--------------------------------.
1196 : | Print this symbol on YYOUTPUT. |
1197 : `--------------------------------*/
1198 :
1199 : /*ARGSUSED*/
1200 : #if (defined __STDC__ || defined __C99__FUNC__ \
1201 : || defined __cplusplus || defined _MSC_VER)
1202 : static void
1203 : yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1204 : #else
1205 : static void
1206 : yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1207 : FILE *yyoutput;
1208 : int yytype;
1209 : YYSTYPE const * const yyvaluep;
1210 : #endif
1211 : {
1212 : if (!yyvaluep)
1213 : return;
1214 : # ifdef YYPRINT
1215 : if (yytype < YYNTOKENS)
1216 : YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1217 : # else
1218 : YYUSE (yyoutput);
1219 : # endif
1220 : switch (yytype)
1221 : {
1222 : default:
1223 : break;
1224 : }
1225 : }
1226 :
1227 :
1228 : /*--------------------------------.
1229 : | Print this symbol on YYOUTPUT. |
1230 : `--------------------------------*/
1231 :
1232 : #if (defined __STDC__ || defined __C99__FUNC__ \
1233 : || defined __cplusplus || defined _MSC_VER)
1234 : static void
1235 : yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1236 : #else
1237 : static void
1238 : yy_symbol_print (yyoutput, yytype, yyvaluep)
1239 : FILE *yyoutput;
1240 : int yytype;
1241 : YYSTYPE const * const yyvaluep;
1242 : #endif
1243 : {
1244 : if (yytype < YYNTOKENS)
1245 : YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1246 : else
1247 : YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1248 :
1249 : yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1250 : YYFPRINTF (yyoutput, ")");
1251 : }
1252 :
1253 : /*------------------------------------------------------------------.
1254 : | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1255 : | TOP (included). |
1256 : `------------------------------------------------------------------*/
1257 :
1258 : #if (defined __STDC__ || defined __C99__FUNC__ \
1259 : || defined __cplusplus || defined _MSC_VER)
1260 : static void
1261 : yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1262 : #else
1263 : static void
1264 : yy_stack_print (yybottom, yytop)
1265 : yytype_int16 *yybottom;
1266 : yytype_int16 *yytop;
1267 : #endif
1268 : {
1269 : YYFPRINTF (stderr, "Stack now");
1270 : for (; yybottom <= yytop; yybottom++)
1271 : {
1272 : int yybot = *yybottom;
1273 : YYFPRINTF (stderr, " %d", yybot);
1274 : }
1275 : YYFPRINTF (stderr, "\n");
1276 : }
1277 :
1278 : # define YY_STACK_PRINT(Bottom, Top) \
1279 : do { \
1280 : if (yydebug) \
1281 : yy_stack_print ((Bottom), (Top)); \
1282 : } while (YYID (0))
1283 :
1284 :
1285 : /*------------------------------------------------.
1286 : | Report that the YYRULE is going to be reduced. |
1287 : `------------------------------------------------*/
1288 :
1289 : #if (defined __STDC__ || defined __C99__FUNC__ \
1290 : || defined __cplusplus || defined _MSC_VER)
1291 : static void
1292 : yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1293 : #else
1294 : static void
1295 : yy_reduce_print (yyvsp, yyrule)
1296 : YYSTYPE *yyvsp;
1297 : int yyrule;
1298 : #endif
1299 : {
1300 : int yynrhs = yyr2[yyrule];
1301 : int yyi;
1302 : unsigned long int yylno = yyrline[yyrule];
1303 : YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1304 : yyrule - 1, yylno);
1305 : /* The symbols being reduced. */
1306 : for (yyi = 0; yyi < yynrhs; yyi++)
1307 : {
1308 : YYFPRINTF (stderr, " $%d = ", yyi + 1);
1309 : yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1310 : &(yyvsp[(yyi + 1) - (yynrhs)])
1311 : );
1312 : YYFPRINTF (stderr, "\n");
1313 : }
1314 : }
1315 :
1316 : # define YY_REDUCE_PRINT(Rule) \
1317 : do { \
1318 : if (yydebug) \
1319 : yy_reduce_print (yyvsp, Rule); \
1320 : } while (YYID (0))
1321 :
1322 : /* Nonzero means print parse trace. It is left uninitialized so that
1323 : multiple parsers can coexist. */
1324 : int yydebug;
1325 : #else /* !YYDEBUG */
1326 : # define YYDPRINTF(Args)
1327 : # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1328 : # define YY_STACK_PRINT(Bottom, Top)
1329 : # define YY_REDUCE_PRINT(Rule)
1330 : #endif /* !YYDEBUG */
1331 :
1332 :
1333 : /* YYINITDEPTH -- initial size of the parser's stacks. */
1334 : #ifndef YYINITDEPTH
1335 : # define YYINITDEPTH 200
1336 : #endif
1337 :
1338 : /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1339 : if the built-in stack extension method is used).
1340 :
1341 : Do not make this value too large; the results are undefined if
1342 : YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1343 : evaluated with infinite-precision integer arithmetic. */
1344 :
1345 : #ifndef YYMAXDEPTH
1346 : # define YYMAXDEPTH 10000
1347 : #endif
1348 :
1349 :
1350 : #if YYERROR_VERBOSE
1351 :
1352 : # ifndef yystrlen
1353 : # if defined __GLIBC__ && defined _STRING_H
1354 : # define yystrlen strlen
1355 : # else
1356 : /* Return the length of YYSTR. */
1357 : #if (defined __STDC__ || defined __C99__FUNC__ \
1358 : || defined __cplusplus || defined _MSC_VER)
1359 : static YYSIZE_T
1360 : yystrlen (const char *yystr)
1361 : #else
1362 : static YYSIZE_T
1363 : yystrlen (yystr)
1364 : const char *yystr;
1365 : #endif
1366 : {
1367 : YYSIZE_T yylen;
1368 : for (yylen = 0; yystr[yylen]; yylen++)
1369 : continue;
1370 : return yylen;
1371 : }
1372 : # endif
1373 : # endif
1374 :
1375 : # ifndef yystpcpy
1376 : # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1377 : # define yystpcpy stpcpy
1378 : # else
1379 : /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1380 : YYDEST. */
1381 : #if (defined __STDC__ || defined __C99__FUNC__ \
1382 : || defined __cplusplus || defined _MSC_VER)
1383 : static char *
1384 : yystpcpy (char *yydest, const char *yysrc)
1385 : #else
1386 : static char *
1387 : yystpcpy (yydest, yysrc)
1388 : char *yydest;
1389 : const char *yysrc;
1390 : #endif
1391 : {
1392 : char *yyd = yydest;
1393 : const char *yys = yysrc;
1394 :
1395 : while ((*yyd++ = *yys++) != '\0')
1396 : continue;
1397 :
1398 : return yyd - 1;
1399 : }
1400 : # endif
1401 : # endif
1402 :
1403 : # ifndef yytnamerr
1404 : /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1405 : quotes and backslashes, so that it's suitable for yyerror. The
1406 : heuristic is that double-quoting is unnecessary unless the string
1407 : contains an apostrophe, a comma, or backslash (other than
1408 : backslash-backslash). YYSTR is taken from yytname. If YYRES is
1409 : null, do not copy; instead, return the length of what the result
1410 : would have been. */
1411 : static YYSIZE_T
1412 : yytnamerr (char *yyres, const char *yystr)
1413 : {
1414 : if (*yystr == '"')
1415 : {
1416 : YYSIZE_T yyn = 0;
1417 : char const *yyp = yystr;
1418 :
1419 : for (;;)
1420 : switch (*++yyp)
1421 : {
1422 : case '\'':
1423 : case ',':
1424 : goto do_not_strip_quotes;
1425 :
1426 : case '\\':
1427 : if (*++yyp != '\\')
1428 : goto do_not_strip_quotes;
1429 : /* Fall through. */
1430 : default:
1431 : if (yyres)
1432 : yyres[yyn] = *yyp;
1433 : yyn++;
1434 : break;
1435 :
1436 : case '"':
1437 : if (yyres)
1438 : yyres[yyn] = '\0';
1439 : return yyn;
1440 : }
1441 : do_not_strip_quotes: ;
1442 : }
1443 :
1444 : if (! yyres)
1445 : return yystrlen (yystr);
1446 :
1447 : return yystpcpy (yyres, yystr) - yyres;
1448 : }
1449 : # endif
1450 :
1451 : /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1452 : about the unexpected token YYTOKEN for the state stack whose top is
1453 : YYSSP.
1454 :
1455 : Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1456 : not large enough to hold the message. In that case, also set
1457 : *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1458 : required number of bytes is too large to store. */
1459 : static int
1460 : yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1461 : yytype_int16 *yyssp, int yytoken)
1462 : {
1463 : YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
1464 : YYSIZE_T yysize = yysize0;
1465 : YYSIZE_T yysize1;
1466 : enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1467 : /* Internationalized format string. */
1468 : const char *yyformat = 0;
1469 : /* Arguments of yyformat. */
1470 : char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1471 : /* Number of reported tokens (one for the "unexpected", one per
1472 : "expected"). */
1473 : int yycount = 0;
1474 :
1475 : /* There are many possibilities here to consider:
1476 : - Assume YYFAIL is not used. It's too flawed to consider. See
1477 : <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1478 : for details. YYERROR is fine as it does not invoke this
1479 : function.
1480 : - If this state is a consistent state with a default action, then
1481 : the only way this function was invoked is if the default action
1482 : is an error action. In that case, don't check for expected
1483 : tokens because there are none.
1484 : - The only way there can be no lookahead present (in yychar) is if
1485 : this state is a consistent state with a default action. Thus,
1486 : detecting the absence of a lookahead is sufficient to determine
1487 : that there is no unexpected or expected token to report. In that
1488 : case, just report a simple "syntax error".
1489 : - Don't assume there isn't a lookahead just because this state is a
1490 : consistent state with a default action. There might have been a
1491 : previous inconsistent state, consistent state with a non-default
1492 : action, or user semantic action that manipulated yychar.
1493 : - Of course, the expected token list depends on states to have
1494 : correct lookahead information, and it depends on the parser not
1495 : to perform extra reductions after fetching a lookahead from the
1496 : scanner and before detecting a syntax error. Thus, state merging
1497 : (from LALR or IELR) and default reductions corrupt the expected
1498 : token list. However, the list is correct for canonical LR with
1499 : one exception: it will still contain any token that will not be
1500 : accepted due to an error action in a later state.
1501 : */
1502 : if (yytoken != YYEMPTY)
1503 : {
1504 : int yyn = yypact[*yyssp];
1505 : yyarg[yycount++] = yytname[yytoken];
1506 : if (!yypact_value_is_default (yyn))
1507 : {
1508 : /* Start YYX at -YYN if negative to avoid negative indexes in
1509 : YYCHECK. In other words, skip the first -YYN actions for
1510 : this state because they are default actions. */
1511 : int yyxbegin = yyn < 0 ? -yyn : 0;
1512 : /* Stay within bounds of both yycheck and yytname. */
1513 : int yychecklim = YYLAST - yyn + 1;
1514 : int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1515 : int yyx;
1516 :
1517 : for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1518 : if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1519 : && !yytable_value_is_error (yytable[yyx + yyn]))
1520 : {
1521 : if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1522 : {
1523 : yycount = 1;
1524 : yysize = yysize0;
1525 : break;
1526 : }
1527 : yyarg[yycount++] = yytname[yyx];
1528 : yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1529 : if (! (yysize <= yysize1
1530 : && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1531 : return 2;
1532 : yysize = yysize1;
1533 : }
1534 : }
1535 : }
1536 :
1537 : switch (yycount)
1538 : {
1539 : # define YYCASE_(N, S) \
1540 : case N: \
1541 : yyformat = S; \
1542 : break
1543 : YYCASE_(0, YY_("syntax error"));
1544 : YYCASE_(1, YY_("syntax error, unexpected %s"));
1545 : YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1546 : YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1547 : YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1548 : YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1549 : # undef YYCASE_
1550 : }
1551 :
1552 : yysize1 = yysize + yystrlen (yyformat);
1553 : if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1554 : return 2;
1555 : yysize = yysize1;
1556 :
1557 : if (*yymsg_alloc < yysize)
1558 : {
1559 : *yymsg_alloc = 2 * yysize;
1560 : if (! (yysize <= *yymsg_alloc
1561 : && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1562 : *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1563 : return 1;
1564 : }
1565 :
1566 : /* Avoid sprintf, as that infringes on the user's name space.
1567 : Don't have undefined behavior even if the translation
1568 : produced a string with the wrong number of "%s"s. */
1569 : {
1570 : char *yyp = *yymsg;
1571 : int yyi = 0;
1572 : while ((*yyp = *yyformat) != '\0')
1573 : if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1574 : {
1575 : yyp += yytnamerr (yyp, yyarg[yyi++]);
1576 : yyformat += 2;
1577 : }
1578 : else
1579 : {
1580 : yyp++;
1581 : yyformat++;
1582 : }
1583 : }
1584 : return 0;
1585 : }
1586 : #endif /* YYERROR_VERBOSE */
1587 :
1588 : /*-----------------------------------------------.
1589 : | Release the memory associated to this symbol. |
1590 : `-----------------------------------------------*/
1591 :
1592 : /*ARGSUSED*/
1593 : #if (defined __STDC__ || defined __C99__FUNC__ \
1594 : || defined __cplusplus || defined _MSC_VER)
1595 : static void
1596 1384 : yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1597 : #else
1598 : static void
1599 : yydestruct (yymsg, yytype, yyvaluep)
1600 : const char *yymsg;
1601 : int yytype;
1602 : YYSTYPE *yyvaluep;
1603 : #endif
1604 : {
1605 : YYUSE (yyvaluep);
1606 :
1607 1384 : if (!yymsg)
1608 0 : yymsg = "Deleting";
1609 : YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1610 :
1611 : switch (yytype)
1612 : {
1613 :
1614 : default:
1615 1384 : break;
1616 : }
1617 1384 : }
1618 :
1619 :
1620 : /* Prevent warnings from -Wmissing-prototypes. */
1621 : #ifdef YYPARSE_PARAM
1622 : #if defined __STDC__ || defined __cplusplus
1623 : int yyparse (void *YYPARSE_PARAM);
1624 : #else
1625 : int yyparse ();
1626 : #endif
1627 : #else /* ! YYPARSE_PARAM */
1628 : #if defined __STDC__ || defined __cplusplus
1629 : int yyparse (void);
1630 : #else
1631 : int yyparse ();
1632 : #endif
1633 : #endif /* ! YYPARSE_PARAM */
1634 :
1635 :
1636 : /* The lookahead symbol. */
1637 : int yychar;
1638 :
1639 : /* The semantic value of the lookahead symbol. */
1640 : YYSTYPE yylval;
1641 :
1642 : /* Number of syntax errors so far. */
1643 : int yynerrs;
1644 :
1645 :
1646 : /*----------.
1647 : | yyparse. |
1648 : `----------*/
1649 :
1650 : #ifdef YYPARSE_PARAM
1651 : #if (defined __STDC__ || defined __C99__FUNC__ \
1652 : || defined __cplusplus || defined _MSC_VER)
1653 : int
1654 : yyparse (void *YYPARSE_PARAM)
1655 : #else
1656 : int
1657 : yyparse (YYPARSE_PARAM)
1658 : void *YYPARSE_PARAM;
1659 : #endif
1660 : #else /* ! YYPARSE_PARAM */
1661 : #if (defined __STDC__ || defined __C99__FUNC__ \
1662 : || defined __cplusplus || defined _MSC_VER)
1663 : int
1664 692 : yyparse (void)
1665 : #else
1666 : int
1667 : yyparse ()
1668 :
1669 : #endif
1670 : #endif
1671 : {
1672 : int yystate;
1673 : /* Number of tokens to shift before error messages enabled. */
1674 : int yyerrstatus;
1675 :
1676 : /* The stacks and their tools:
1677 : `yyss': related to states.
1678 : `yyvs': related to semantic values.
1679 :
1680 : Refer to the stacks thru separate pointers, to allow yyoverflow
1681 : to reallocate them elsewhere. */
1682 :
1683 : /* The state stack. */
1684 : yytype_int16 yyssa[YYINITDEPTH];
1685 : yytype_int16 *yyss;
1686 : yytype_int16 *yyssp;
1687 :
1688 : /* The semantic value stack. */
1689 : YYSTYPE yyvsa[YYINITDEPTH];
1690 : YYSTYPE *yyvs;
1691 : YYSTYPE *yyvsp;
1692 :
1693 : YYSIZE_T yystacksize;
1694 :
1695 : int yyn;
1696 : int yyresult;
1697 : /* Lookahead token as an internal (translated) token number. */
1698 : int yytoken;
1699 : /* The variables used to return semantic value and location from the
1700 : action routines. */
1701 : YYSTYPE yyval;
1702 :
1703 : #if YYERROR_VERBOSE
1704 : /* Buffer for error messages, and its allocated size. */
1705 : char yymsgbuf[128];
1706 : char *yymsg = yymsgbuf;
1707 : YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1708 : #endif
1709 :
1710 : #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1711 :
1712 : /* The number of symbols on the RHS of the reduced rule.
1713 : Keep to zero when no symbol should be popped. */
1714 692 : int yylen = 0;
1715 :
1716 692 : yytoken = 0;
1717 692 : yyss = yyssa;
1718 692 : yyvs = yyvsa;
1719 692 : yystacksize = YYINITDEPTH;
1720 :
1721 : YYDPRINTF ((stderr, "Starting parse\n"));
1722 :
1723 692 : yystate = 0;
1724 692 : yyerrstatus = 0;
1725 692 : yynerrs = 0;
1726 692 : yychar = YYEMPTY; /* Cause a token to be read. */
1727 :
1728 : /* Initialize stack pointers.
1729 : Waste one element of value and location stack
1730 : so that they stay on the same level as the state stack.
1731 : The wasted elements are never initialized. */
1732 692 : yyssp = yyss;
1733 692 : yyvsp = yyvs;
1734 :
1735 692 : goto yysetstate;
1736 :
1737 : /*------------------------------------------------------------.
1738 : | yynewstate -- Push a new state, which is found in yystate. |
1739 : `------------------------------------------------------------*/
1740 : yynewstate:
1741 : /* In all cases, when you get here, the value and location stacks
1742 : have just been pushed. So pushing a state here evens the stacks. */
1743 3140481 : yyssp++;
1744 :
1745 : yysetstate:
1746 3141173 : *yyssp = yystate;
1747 :
1748 3141173 : if (yyss + yystacksize - 1 <= yyssp)
1749 : {
1750 : /* Get the current used size of the three stacks, in elements. */
1751 0 : YYSIZE_T yysize = yyssp - yyss + 1;
1752 :
1753 : #ifdef yyoverflow
1754 : {
1755 : /* Give user a chance to reallocate the stack. Use copies of
1756 : these so that the &'s don't force the real ones into
1757 : memory. */
1758 : YYSTYPE *yyvs1 = yyvs;
1759 : yytype_int16 *yyss1 = yyss;
1760 :
1761 : /* Each stack pointer address is followed by the size of the
1762 : data in use in that stack, in bytes. This used to be a
1763 : conditional around just the two extra args, but that might
1764 : be undefined if yyoverflow is a macro. */
1765 : yyoverflow (YY_("memory exhausted"),
1766 : &yyss1, yysize * sizeof (*yyssp),
1767 : &yyvs1, yysize * sizeof (*yyvsp),
1768 : &yystacksize);
1769 :
1770 : yyss = yyss1;
1771 : yyvs = yyvs1;
1772 : }
1773 : #else /* no yyoverflow */
1774 : # ifndef YYSTACK_RELOCATE
1775 : goto yyexhaustedlab;
1776 : # else
1777 : /* Extend the stack our own way. */
1778 0 : if (YYMAXDEPTH <= yystacksize)
1779 0 : goto yyexhaustedlab;
1780 0 : yystacksize *= 2;
1781 0 : if (YYMAXDEPTH < yystacksize)
1782 0 : yystacksize = YYMAXDEPTH;
1783 :
1784 : {
1785 0 : yytype_int16 *yyss1 = yyss;
1786 : union yyalloc *yyptr =
1787 0 : (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1788 0 : if (! yyptr)
1789 0 : goto yyexhaustedlab;
1790 0 : YYSTACK_RELOCATE (yyss_alloc, yyss);
1791 0 : YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1792 : # undef YYSTACK_RELOCATE
1793 0 : if (yyss1 != yyssa)
1794 0 : YYSTACK_FREE (yyss1);
1795 : }
1796 : # endif
1797 : #endif /* no yyoverflow */
1798 :
1799 0 : yyssp = yyss + yysize - 1;
1800 0 : yyvsp = yyvs + yysize - 1;
1801 :
1802 : YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1803 : (unsigned long int) yystacksize));
1804 :
1805 0 : if (yyss + yystacksize - 1 <= yyssp)
1806 0 : YYABORT;
1807 : }
1808 :
1809 : YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1810 :
1811 3141173 : if (yystate == YYFINAL)
1812 692 : YYACCEPT;
1813 :
1814 3140481 : goto yybackup;
1815 :
1816 : /*-----------.
1817 : | yybackup. |
1818 : `-----------*/
1819 : yybackup:
1820 :
1821 : /* Do appropriate processing given the current state. Read a
1822 : lookahead token if we need one and don't already have one. */
1823 :
1824 : /* First try to decide what to do without reference to lookahead token. */
1825 3140481 : yyn = yypact[yystate];
1826 3140481 : if (yypact_value_is_default (yyn))
1827 1183977 : goto yydefault;
1828 :
1829 : /* Not known => get a lookahead token if don't already have one. */
1830 :
1831 : /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1832 1956504 : if (yychar == YYEMPTY)
1833 : {
1834 : YYDPRINTF ((stderr, "Reading a token: "));
1835 1482709 : yychar = YYLEX;
1836 : }
1837 :
1838 1956504 : if (yychar <= YYEOF)
1839 : {
1840 696 : yychar = yytoken = YYEOF;
1841 : YYDPRINTF ((stderr, "Now at end of input.\n"));
1842 : }
1843 : else
1844 : {
1845 1955808 : yytoken = YYTRANSLATE (yychar);
1846 : YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1847 : }
1848 :
1849 : /* If the proper action on seeing token YYTOKEN is to reduce or to
1850 : detect an error, take that action. */
1851 1956504 : yyn += yytoken;
1852 1956504 : if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1853 : goto yydefault;
1854 1482709 : yyn = yytable[yyn];
1855 1482709 : if (yyn <= 0)
1856 : {
1857 : if (yytable_value_is_error (yyn))
1858 : goto yyerrlab;
1859 0 : yyn = -yyn;
1860 0 : goto yyreduce;
1861 : }
1862 :
1863 : /* Count tokens shifted since error; after three, turn off error
1864 : status. */
1865 1482709 : if (yyerrstatus)
1866 0 : yyerrstatus--;
1867 :
1868 : /* Shift the lookahead token. */
1869 : YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1870 :
1871 : /* Discard the shifted token. */
1872 1482709 : yychar = YYEMPTY;
1873 :
1874 1482709 : yystate = yyn;
1875 1482709 : *++yyvsp = yylval;
1876 :
1877 1482709 : goto yynewstate;
1878 :
1879 :
1880 : /*-----------------------------------------------------------.
1881 : | yydefault -- do the default action for the current state. |
1882 : `-----------------------------------------------------------*/
1883 : yydefault:
1884 1657772 : yyn = yydefact[yystate];
1885 1657772 : if (yyn == 0)
1886 0 : goto yyerrlab;
1887 1657772 : goto yyreduce;
1888 :
1889 :
1890 : /*-----------------------------.
1891 : | yyreduce -- Do a reduction. |
1892 : `-----------------------------*/
1893 : yyreduce:
1894 : /* yyn is the number of a rule to reduce with. */
1895 1657772 : yylen = yyr2[yyn];
1896 :
1897 : /* If YYLEN is nonzero, implement the default value of the action:
1898 : `$$ = $1'.
1899 :
1900 : Otherwise, the following line sets YYVAL to garbage.
1901 : This behavior is undocumented and Bison
1902 : users should not rely upon it. Assigning to YYVAL
1903 : unconditionally makes the parser a bit smaller, and it avoids a
1904 : GCC warning that YYVAL may be used uninitialized. */
1905 1657772 : yyval = yyvsp[1-yylen];
1906 :
1907 :
1908 : YY_REDUCE_PRINT (yyn);
1909 1657772 : switch (yyn)
1910 : {
1911 : case 4:
1912 :
1913 : /* Line 1806 of yacc.c */
1914 : #line 364 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
1915 : {
1916 : RscExpType aExpType;
1917 : sal_Int32 lValue;
1918 :
1919 : aExpType.cType = RSCEXP_NOTHING;
1920 : pExp = new RscExpression( aExpType, '+', (yyvsp[(2) - (2)].macrostruct) );
1921 : if( !pExp->Evaluate( &lValue ) )
1922 : pTC->pEH->Error( ERR_ZERODIVISION, NULL, RscId() );
1923 : }
1924 : break;
1925 :
1926 : case 6:
1927 :
1928 : /* Line 1806 of yacc.c */
1929 : #line 378 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
1930 : {
1931 : sal_Bool bError = sal_False;
1932 :
1933 : if( (yyvsp[(4) - (4)].macrostruct).IsNumber() ){
1934 : if( !pTC->aFileTab.NewDef( pFI->GetFileIndex(),
1935 : rtl::OString( (yyvsp[(3) - (4)].string) ),
1936 : (yyvsp[(4) - (4)].macrostruct).GetLong(), ULONG_MAX ) )
1937 : bError = sal_True;
1938 : }
1939 : else if( (yyvsp[(4) - (4)].macrostruct).IsDefinition() ){
1940 : RscExpType aExpType;
1941 : RscExpression * pExpr;
1942 :
1943 : aExpType.cType = RSCEXP_NOTHING;
1944 : aExpType.SetLong( 0 );
1945 : aExpType.cType = RSCEXP_LONG;
1946 : pExpr = new RscExpression( aExpType, '+', (yyvsp[(4) - (4)].macrostruct) );
1947 :
1948 : if( !pTC->aFileTab.NewDef( pFI->GetFileIndex(),
1949 : rtl::OString( (yyvsp[(3) - (4)].string) ), pExpr, ULONG_MAX ) )
1950 : bError = sal_True;
1951 : }
1952 : else if( (yyvsp[(4) - (4)].macrostruct).IsExpression() ){
1953 : if( !pTC->aFileTab.NewDef( pFI->GetFileIndex(),
1954 : rtl::OString( (yyvsp[(3) - (4)].string) ), (yyvsp[(4) - (4)].macrostruct).aExp.pExp,
1955 : ULONG_MAX ) )
1956 : bError = sal_True;
1957 : }
1958 :
1959 : if( bError ){
1960 : pTC->pEH->Error( ERR_DECLAREDEFINE, NULL, RscId(), (yyvsp[(3) - (4)].string) );
1961 : }
1962 : }
1963 : break;
1964 :
1965 : case 7:
1966 :
1967 : /* Line 1806 of yacc.c */
1968 : #line 412 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
1969 : {
1970 : pTC->pEH->Error( ERR_DOUBLEDEFINE, NULL, RscId(), (yyvsp[(3) - (4)].defineele)->GetName().getStr() );
1971 : }
1972 : break;
1973 :
1974 : case 8:
1975 :
1976 : /* Line 1806 of yacc.c */
1977 : #line 416 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
1978 : {
1979 : }
1980 : break;
1981 :
1982 : case 9:
1983 :
1984 : /* Line 1806 of yacc.c */
1985 : #line 419 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
1986 : {
1987 : }
1988 : break;
1989 :
1990 : case 10:
1991 :
1992 : /* Line 1806 of yacc.c */
1993 : #line 422 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
1994 : {
1995 : #ifdef D40
1996 : void * pMem;
1997 : pMem = rtl_allocateMemory( 20000 );
1998 : rtl_freeMemory( pMem );
1999 : #endif
2000 : }
2001 : break;
2002 :
2003 : case 13:
2004 :
2005 : /* Line 1806 of yacc.c */
2006 : #line 435 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2007 : {
2008 : sal_Int32 lType;
2009 :
2010 : (yyvsp[(3) - (5)].macrostruct).Evaluate( &lType );
2011 :
2012 : // Klasse anlegen
2013 : Atom nId = pHS->getID( (yyvsp[(2) - (5)].string) );
2014 : pCurClass = new RscClass( nId, lType, (yyvsp[(5) - (5)].pClass) );
2015 : nCurMask = 1;
2016 : pTC->aNmTb.Put( nId, CLASSNAME, pCurClass );
2017 : pTC->GetRoot()->Insert( pCurClass );
2018 : }
2019 : break;
2020 :
2021 : case 14:
2022 :
2023 : /* Line 1806 of yacc.c */
2024 : #line 448 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2025 : {
2026 : pCurClass = (yyvsp[(2) - (5)].pClass);
2027 : nCurMask = 1;
2028 : }
2029 : break;
2030 :
2031 : case 17:
2032 :
2033 : /* Line 1806 of yacc.c */
2034 : #line 461 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2035 : {
2036 : // Variable anlegen
2037 : Atom nId = pTC->aNmTb.Put( (yyvsp[(3) - (3)].string), VARNAME );
2038 : pCurClass->SetVariable( nId, (yyvsp[(2) - (3)].pClass), NULL, (yyvsp[(1) - (3)].ushort), nCurMask );
2039 : nCurMask <<= 1;
2040 : }
2041 : break;
2042 :
2043 : case 18:
2044 :
2045 : /* Line 1806 of yacc.c */
2046 : #line 468 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2047 : {
2048 : pCurClass->SetVariable( (yyvsp[(3) - (3)].varid), (yyvsp[(2) - (3)].pClass), NULL, (yyvsp[(1) - (3)].ushort), nCurMask );
2049 : nCurMask <<= 1;
2050 : }
2051 : break;
2052 :
2053 : case 19:
2054 :
2055 : /* Line 1806 of yacc.c */
2056 : #line 476 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2057 : {
2058 : (yyval.ushort) = (yyvsp[(1) - (2)].ushort) | VAR_EXTENDABLE;
2059 : }
2060 : break;
2061 :
2062 : case 20:
2063 :
2064 : /* Line 1806 of yacc.c */
2065 : #line 480 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2066 : {
2067 : (yyval.ushort) = (yyvsp[(1) - (2)].ushort) | VAR_SVDYNAMIC;
2068 : }
2069 : break;
2070 :
2071 : case 21:
2072 :
2073 : /* Line 1806 of yacc.c */
2074 : #line 484 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2075 : {
2076 : (yyval.ushort) = 0;
2077 : }
2078 : break;
2079 :
2080 : case 22:
2081 :
2082 : /* Line 1806 of yacc.c */
2083 : #line 491 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2084 : {
2085 : (yyval.pClass) = (yyvsp[(1) - (1)].pClass);
2086 : }
2087 : break;
2088 :
2089 : case 23:
2090 :
2091 : /* Line 1806 of yacc.c */
2092 : #line 495 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2093 : {
2094 : if( (yyvsp[(1) - (3)].pClass) )
2095 : {
2096 : rtl::OString aTypeName = rtl::OStringBuffer(pHS->getString((yyvsp[(1) - (3)].pClass)->GetId())).
2097 : append("[]").makeStringAndClear();
2098 : (yyval.pClass) = pTC->SearchType( pHS->getID( aTypeName.getStr(), true ) );
2099 : if( !(yyval.pClass) )
2100 : {
2101 : RscCont * pCont;
2102 : pCont = new RscCont( pHS->getID( aTypeName.getStr() ), RSC_NOTYPE );
2103 : pCont->SetTypeClass( (yyvsp[(1) - (3)].pClass) );
2104 : pTC->InsertType( pCont );
2105 : (yyval.pClass) = pCont;
2106 : }
2107 : }
2108 : else
2109 : (yyval.pClass) = NULL;
2110 : }
2111 : break;
2112 :
2113 : case 24:
2114 :
2115 : /* Line 1806 of yacc.c */
2116 : #line 517 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2117 : {
2118 : (yyval.pClass) = (yyvsp[(1) - (1)].pClass);
2119 : }
2120 : break;
2121 :
2122 : case 25:
2123 :
2124 : /* Line 1806 of yacc.c */
2125 : #line 521 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2126 : {
2127 : RscTop * pType = pTC->SearchType( pHS->getID( (yyvsp[(1) - (1)].string), true ) );
2128 : if( !pType )
2129 : pTC->pEH->Error( ERR_NOTYPE, pCurClass, RscId() );
2130 : (yyval.pClass) = pType;
2131 : }
2132 : break;
2133 :
2134 : case 26:
2135 :
2136 : /* Line 1806 of yacc.c */
2137 : #line 531 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2138 : {
2139 : if( TYPE_REF == (yyvsp[(1) - (2)].header).nTyp )
2140 : pTC->pEH->Error( ERR_REFNOTALLOWED, S.Top().pClass,
2141 : RscId( (yyvsp[(1) - (2)].header).nName1 ) );
2142 : S.Pop();
2143 : }
2144 : break;
2145 :
2146 : case 27:
2147 :
2148 : /* Line 1806 of yacc.c */
2149 : #line 538 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2150 : {
2151 : ERRTYPE aError;
2152 : RscId aRscId( (yyvsp[(1) - (1)].header).nName1 );
2153 :
2154 : if( TYPE_NOTHING == (yyvsp[(1) - (1)].header).nTyp && aRscId.IsId() )
2155 : aError = S.Top().pClass->SetRef( S.Top(), aRscId );
2156 : else if( TYPE_COPY == (yyvsp[(1) - (1)].header).nTyp )
2157 : aError = ERR_COPYNOTALLOWED;
2158 : if( aError.IsError() || aError.IsWarning() )
2159 : pTC->pEH->Error( aError, S.Top().pClass, aRscId );
2160 : S.Pop();
2161 : }
2162 : break;
2163 :
2164 : case 28:
2165 :
2166 : /* Line 1806 of yacc.c */
2167 : #line 554 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2168 : {
2169 : if( !DoClassHeader( &(yyvsp[(1) - (1)].header), sal_False ) )
2170 : return( ERR_ERROR );
2171 : (yyval.header) = (yyvsp[(1) - (1)].header);
2172 : }
2173 : break;
2174 :
2175 : case 29:
2176 :
2177 : /* Line 1806 of yacc.c */
2178 : #line 563 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2179 : {
2180 : (yyval.copyref) = TYPE_COPY;
2181 : }
2182 : break;
2183 :
2184 : case 30:
2185 :
2186 : /* Line 1806 of yacc.c */
2187 : #line 567 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2188 : {
2189 : (yyval.copyref) = TYPE_REF;
2190 : }
2191 : break;
2192 :
2193 : case 31:
2194 :
2195 : /* Line 1806 of yacc.c */
2196 : #line 574 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2197 : {
2198 : (yyval.header).pClass = (yyvsp[(1) - (5)].pClass);
2199 : (yyval.header).nName1 = (yyvsp[(2) - (5)].macrostruct);
2200 : (yyval.header).nTyp = (yyvsp[(3) - (5)].copyref);
2201 : (yyval.header).pRefClass = (yyvsp[(4) - (5)].pClass);
2202 : (yyval.header).nName2 = (yyvsp[(5) - (5)].macrostruct);
2203 : }
2204 : break;
2205 :
2206 : case 32:
2207 :
2208 : /* Line 1806 of yacc.c */
2209 : #line 582 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2210 : {
2211 : (yyval.header).pClass = (yyvsp[(1) - (4)].pClass);
2212 : (yyval.header).nName1 = (yyvsp[(2) - (4)].macrostruct);
2213 : (yyval.header).nTyp = (yyvsp[(3) - (4)].copyref);
2214 : (yyval.header).pRefClass = NULL;
2215 : (yyval.header).nName2 = (yyvsp[(4) - (4)].macrostruct);
2216 : }
2217 : break;
2218 :
2219 : case 33:
2220 :
2221 : /* Line 1806 of yacc.c */
2222 : #line 590 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2223 : {
2224 : (yyval.header).pClass = (yyvsp[(1) - (2)].pClass);
2225 : (yyval.header).nName1 = (yyvsp[(2) - (2)].macrostruct);
2226 : (yyval.header).nTyp = TYPE_NOTHING;
2227 : (yyval.header).pRefClass = NULL;
2228 : (yyval.header).nName2.cType = RSCEXP_NOTHING;
2229 : }
2230 : break;
2231 :
2232 : case 34:
2233 :
2234 : /* Line 1806 of yacc.c */
2235 : #line 598 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2236 : {
2237 : (yyval.header).pClass = (yyvsp[(1) - (3)].pClass);
2238 : (yyval.header).nName1.cType = RSCEXP_NOTHING;
2239 : (yyval.header).nTyp = (yyvsp[(2) - (3)].copyref);
2240 : (yyval.header).pRefClass = NULL;
2241 : (yyval.header).nName2 = (yyvsp[(3) - (3)].macrostruct);
2242 : }
2243 : break;
2244 :
2245 : case 35:
2246 :
2247 : /* Line 1806 of yacc.c */
2248 : #line 606 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2249 : {
2250 : (yyval.header).pClass = (yyvsp[(1) - (4)].pClass);
2251 : (yyval.header).nName1.cType = RSCEXP_NOTHING;
2252 : (yyval.header).nTyp = (yyvsp[(2) - (4)].copyref);
2253 : (yyval.header).pRefClass = (yyvsp[(3) - (4)].pClass);
2254 : (yyval.header).nName2 = (yyvsp[(4) - (4)].macrostruct);
2255 : }
2256 : break;
2257 :
2258 : case 36:
2259 :
2260 : /* Line 1806 of yacc.c */
2261 : #line 614 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2262 : {
2263 : (yyval.header).pClass = (yyvsp[(1) - (1)].pClass);
2264 : (yyval.header).nName1.cType = RSCEXP_NOTHING;
2265 : (yyval.header).nTyp = TYPE_NOTHING;
2266 : (yyval.header).nName2.cType = RSCEXP_NOTHING;
2267 : }
2268 : break;
2269 :
2270 : case 39:
2271 :
2272 : /* Line 1806 of yacc.c */
2273 : #line 626 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2274 : {
2275 : SetString( S.Top(), "TEXT", (yyvsp[(1) - (1)].string) );
2276 : }
2277 : break;
2278 :
2279 : case 42:
2280 :
2281 : /* Line 1806 of yacc.c */
2282 : #line 638 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2283 : {
2284 : SetConst( S.Top(), "_XYMAPMODE", (yyvsp[(1) - (1)].constname).hashid, (yyvsp[(1) - (1)].constname).nValue );
2285 : }
2286 : break;
2287 :
2288 : case 44:
2289 :
2290 : /* Line 1806 of yacc.c */
2291 : #line 646 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2292 : {
2293 : SetConst( S.Top(), "_WHMAPMODE", (yyvsp[(1) - (1)].constname).hashid, (yyvsp[(1) - (1)].constname).nValue );
2294 : }
2295 : break;
2296 :
2297 : case 46:
2298 :
2299 : /* Line 1806 of yacc.c */
2300 : #line 654 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2301 : {
2302 : SetConst( S.Top(), "_XYMAPMODE", (yyvsp[(1) - (1)].constname).hashid, (yyvsp[(1) - (1)].constname).nValue );
2303 : SetConst( S.Top(), "_WHMAPMODE", (yyvsp[(1) - (1)].constname).hashid, (yyvsp[(1) - (1)].constname).nValue );
2304 : }
2305 : break;
2306 :
2307 : case 49:
2308 :
2309 : /* Line 1806 of yacc.c */
2310 : #line 664 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2311 : {
2312 : S.Pop();
2313 : }
2314 : break;
2315 :
2316 : case 51:
2317 :
2318 : /* Line 1806 of yacc.c */
2319 : #line 669 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2320 : {
2321 : if( TYPE_REF == (yyvsp[(1) - (3)].header).nTyp )
2322 : pTC->pEH->Error( ERR_REFNOTALLOWED, S.Top().pClass,
2323 : RscId( (yyvsp[(1) - (3)].header).nName1 ) );
2324 :
2325 : if( S.Top().pClass->GetCount( S.Top() ) )
2326 : pTC->pEH->Error( WRN_SUBINMEMBER, S.Top().pClass,
2327 : RscId( (yyvsp[(1) - (3)].header).nName1 ) );
2328 :
2329 : S.Pop();
2330 : }
2331 : break;
2332 :
2333 : case 52:
2334 :
2335 : /* Line 1806 of yacc.c */
2336 : #line 681 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2337 : {
2338 : ERRTYPE aError;
2339 : RscId aRscId( (yyvsp[(1) - (2)].header).nName1 );
2340 :
2341 : if( TYPE_NOTHING == (yyvsp[(1) - (2)].header).nTyp && aRscId.IsId() )
2342 : aError = S.Top().pClass->SetRef( S.Top(), aRscId );
2343 : else if( TYPE_COPY == (yyvsp[(1) - (2)].header).nTyp )
2344 : aError = ERR_COPYNOTALLOWED;
2345 : if( S.Top().pClass->GetCount( S.Top() ) )
2346 : aError = WRN_SUBINMEMBER;
2347 : if( aError.IsError() || aError.IsWarning() )
2348 : pTC->pEH->Error( aError, S.Top().pClass, aRscId );
2349 :
2350 : S.Pop();
2351 : }
2352 : break;
2353 :
2354 : case 53:
2355 :
2356 : /* Line 1806 of yacc.c */
2357 : #line 697 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2358 : {
2359 : SetNumber( S.Top(), "_XNUMERATOR", (yyvsp[(4) - (8)].value) );
2360 : SetNumber( S.Top(), "_XDENOMINATOR", (yyvsp[(6) - (8)].value) );
2361 : }
2362 : break;
2363 :
2364 : case 54:
2365 :
2366 : /* Line 1806 of yacc.c */
2367 : #line 702 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2368 : {
2369 : SetNumber( S.Top(), "_YNUMERATOR", (yyvsp[(4) - (8)].value) );
2370 : SetNumber( S.Top(), "_YDENOMINATOR", (yyvsp[(6) - (8)].value) );
2371 : }
2372 : break;
2373 :
2374 : case 55:
2375 :
2376 : /* Line 1806 of yacc.c */
2377 : #line 708 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2378 : {
2379 : SetNumber( S.Top(), "RED", (yyvsp[(4) - (10)].value) );
2380 : SetNumber( S.Top(), "GREEN", (yyvsp[(6) - (10)].value) );
2381 : SetNumber( S.Top(), "BLUE", (yyvsp[(8) - (10)].value) );
2382 : }
2383 : break;
2384 :
2385 : case 56:
2386 :
2387 : /* Line 1806 of yacc.c */
2388 : #line 715 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2389 : {
2390 : SetNumber( S.Top(), "_X", (yyvsp[(5) - (13)].value) );
2391 : SetNumber( S.Top(), "_Y", (yyvsp[(7) - (13)].value) );
2392 : SetNumber( S.Top(), "_WIDTH", (yyvsp[(9) - (13)].value) );
2393 : SetNumber( S.Top(), "_HEIGHT", (yyvsp[(11) - (13)].value) );
2394 : }
2395 : break;
2396 :
2397 : case 57:
2398 :
2399 : /* Line 1806 of yacc.c */
2400 : #line 723 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2401 : {
2402 : SetNumber( S.Top(), "_X", (yyvsp[(5) - (9)].value) );
2403 : SetNumber( S.Top(), "_Y", (yyvsp[(7) - (9)].value) );
2404 : }
2405 : break;
2406 :
2407 : case 58:
2408 :
2409 : /* Line 1806 of yacc.c */
2410 : #line 729 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2411 : {
2412 : SetNumber( S.Top(), "_WIDTH", (yyvsp[(5) - (9)].value) );
2413 : SetNumber( S.Top(), "_HEIGHT", (yyvsp[(7) - (9)].value) );
2414 : }
2415 : break;
2416 :
2417 : case 59:
2418 :
2419 : /* Line 1806 of yacc.c */
2420 : #line 735 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2421 : {
2422 : SetConst( S.Top(), "_ZOOMINMAPMODE", (yyvsp[(3) - (9)].constname).hashid, (yyvsp[(3) - (9)].constname).nValue );
2423 : SetNumber( S.Top(), "_ZOOMINWIDTH", (yyvsp[(5) - (9)].value) );
2424 : SetNumber( S.Top(), "_ZOOMINHEIGHT", (yyvsp[(7) - (9)].value) );
2425 : }
2426 : break;
2427 :
2428 : case 60:
2429 :
2430 : /* Line 1806 of yacc.c */
2431 : #line 741 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2432 : {
2433 : SetNumber( S.Top(), "_ZOOMINWIDTH", (yyvsp[(4) - (8)].value) );
2434 : SetNumber( S.Top(), "_ZOOMINHEIGHT", (yyvsp[(6) - (8)].value) );
2435 : }
2436 : break;
2437 :
2438 : case 61:
2439 :
2440 : /* Line 1806 of yacc.c */
2441 : #line 747 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2442 : {
2443 : SetConst( S.Top(), "_FLOATINGPOSMAPMODE", (yyvsp[(3) - (9)].constname).hashid, (yyvsp[(3) - (9)].constname).nValue );
2444 : SetNumber( S.Top(), "_FLOATINGPOSX", (yyvsp[(5) - (9)].value) );
2445 : SetNumber( S.Top(), "_FLOATINGPOSY", (yyvsp[(7) - (9)].value) );
2446 : }
2447 : break;
2448 :
2449 : case 62:
2450 :
2451 : /* Line 1806 of yacc.c */
2452 : #line 753 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2453 : {
2454 : SetNumber( S.Top(), "_FLOATINGPOSX", (yyvsp[(4) - (8)].value) );
2455 : SetNumber( S.Top(), "_FLOATINGPOSY", (yyvsp[(6) - (8)].value) );
2456 : }
2457 : break;
2458 :
2459 : case 63:
2460 :
2461 : /* Line 1806 of yacc.c */
2462 : #line 761 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2463 : {
2464 : RSCINST aInst;
2465 :
2466 : aInst = S.Top().pClass->GetVariable( S.Top(), (yyvsp[(1) - (3)].varid), RSCINST(), sal_False, (yyvsp[(3) - (3)].header).pClass );
2467 :
2468 : if( aInst.pData )
2469 : S.Push( aInst );
2470 : else
2471 : {
2472 : pTC->pEH->Error( ERR_NOVARIABLENAME, S.Top().pClass, RscId(),
2473 : pHS->getString( (yyvsp[(1) - (3)].varid) ).getStr() );
2474 : return( ERR_ERROR );
2475 : }
2476 :
2477 : if( !DoClassHeader( &(yyvsp[(3) - (3)].header), sal_True ) )
2478 : return( ERR_ERROR );
2479 : (yyval.header) = (yyvsp[(3) - (3)].header);
2480 : }
2481 : break;
2482 :
2483 : case 64:
2484 :
2485 : /* Line 1806 of yacc.c */
2486 : #line 780 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2487 : {
2488 : RSCINST aInst;
2489 :
2490 : aInst = S.Top().pClass->GetVariable( S.Top(), (yyvsp[(1) - (6)].varid), RSCINST() );
2491 :
2492 : if( aInst.pData )
2493 : {
2494 : ERRTYPE aError;
2495 : RSCINST aIdxInst;
2496 :
2497 : aError = aInst.pClass->GetArrayEle( aInst, (yyvsp[(3) - (6)].constname).hashid, NULL, &aIdxInst );
2498 : if( aError.IsError() || aError.IsWarning() )
2499 : pTC->pEH->Error( aError, S.Top().pClass, RscId() );
2500 : if( aError.IsError() )
2501 : return( ERR_ERROR );
2502 : S.Push( aIdxInst );
2503 : }
2504 : else
2505 : {
2506 : pTC->pEH->Error( ERR_NOVARIABLENAME, S.Top().pClass, RscId(),
2507 : pHS->getString( (yyvsp[(1) - (6)].varid) ).getStr() );
2508 : return( ERR_ERROR );
2509 : }
2510 : if( !DoClassHeader( &(yyvsp[(6) - (6)].header), sal_True ) )
2511 : return( ERR_ERROR );
2512 : (yyval.header) = (yyvsp[(6) - (6)].header);
2513 : }
2514 : break;
2515 :
2516 : case 65:
2517 :
2518 : /* Line 1806 of yacc.c */
2519 : #line 808 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2520 : {
2521 : RSCINST aInst;
2522 :
2523 : aInst = S.Top().pClass->GetVariable( S.Top(), (yyvsp[(1) - (6)].varid), RSCINST() );
2524 :
2525 : if( aInst.pData )
2526 : {
2527 : long nNewLang = pTC->AddLanguage( (yyvsp[(3) - (6)].string) );
2528 : ERRTYPE aError;
2529 : RSCINST aIdxInst;
2530 :
2531 : aError = aInst.pClass->GetArrayEle( aInst, nNewLang, NULL, &aIdxInst );
2532 : if( aError.IsError() || aError.IsWarning() )
2533 : pTC->pEH->Error( aError, S.Top().pClass, RscId() );
2534 : if( aError.IsError() )
2535 : return( ERR_ERROR );
2536 : S.Push( aIdxInst );
2537 : }
2538 : else
2539 : {
2540 : pTC->pEH->Error( ERR_NOVARIABLENAME, S.Top().pClass, RscId(),
2541 : pHS->getString( (yyvsp[(1) - (6)].varid) ).getStr() );
2542 : return( ERR_ERROR );
2543 : }
2544 : if( !DoClassHeader( &(yyvsp[(6) - (6)].header), sal_True ) )
2545 : return( ERR_ERROR );
2546 : (yyval.header) = (yyvsp[(6) - (6)].header);
2547 : }
2548 : break;
2549 :
2550 : case 66:
2551 :
2552 : /* Line 1806 of yacc.c */
2553 : #line 840 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2554 : {
2555 : RSCINST aInst;
2556 :
2557 : aInst = S.Top().pClass->GetVariable( S.Top(), (yyvsp[(1) - (2)].varid), RSCINST() );
2558 :
2559 : if( aInst.pData )
2560 : S.Push( aInst );
2561 : else{
2562 : pTC->pEH->Error( ERR_NOVARIABLENAME, S.Top().pClass, RscId(),
2563 : pHS->getString( (yyvsp[(1) - (2)].varid) ).getStr() );
2564 : return( ERR_ERROR );
2565 : }
2566 : }
2567 : break;
2568 :
2569 : case 67:
2570 :
2571 : /* Line 1806 of yacc.c */
2572 : #line 854 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2573 : {
2574 : RSCINST aInst;
2575 :
2576 : aInst = S.Top().pClass->GetVariable( S.Top(), (yyvsp[(1) - (5)].varid), RSCINST() );
2577 :
2578 : if( aInst.pData )
2579 : {
2580 : ERRTYPE aError;
2581 : RSCINST aIdxInst;
2582 :
2583 : aError = aInst.pClass->GetArrayEle( aInst, (yyvsp[(3) - (5)].constname).hashid, NULL, &aIdxInst );
2584 : if( aError.IsError() || aError.IsWarning() )
2585 : pTC->pEH->Error( aError, S.Top().pClass, RscId() );
2586 : if( aError.IsError() )
2587 : return( ERR_ERROR );
2588 : S.Push( aIdxInst );
2589 : }
2590 : else{
2591 : pTC->pEH->Error( ERR_NOVARIABLENAME, S.Top().pClass, RscId(),
2592 : pHS->getString( (yyvsp[(1) - (5)].varid) ).getStr() );
2593 : return( ERR_ERROR );
2594 : }
2595 : }
2596 : break;
2597 :
2598 : case 68:
2599 :
2600 : /* Line 1806 of yacc.c */
2601 : #line 878 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2602 : {
2603 : RSCINST aInst;
2604 :
2605 : aInst = S.Top().pClass->GetVariable( S.Top(), (yyvsp[(1) - (5)].varid), RSCINST() );
2606 :
2607 : if( aInst.pData )
2608 : {
2609 : long nNewLang = pTC->AddLanguage( (yyvsp[(3) - (5)].string) );
2610 : ERRTYPE aError;
2611 : RSCINST aIdxInst;
2612 :
2613 : aError = aInst.pClass->GetArrayEle( aInst, nNewLang, NULL, &aIdxInst );
2614 : if( aError.IsError() || aError.IsWarning() )
2615 : pTC->pEH->Error( aError, S.Top().pClass, RscId() );
2616 : if( aError.IsError() )
2617 : return( ERR_ERROR );
2618 : S.Push( aIdxInst );
2619 : }
2620 : else{
2621 : pTC->pEH->Error( ERR_NOVARIABLENAME, S.Top().pClass, RscId(),
2622 : pHS->getString( (yyvsp[(1) - (5)].varid) ).getStr() );
2623 : return( ERR_ERROR );
2624 : }
2625 : }
2626 : break;
2627 :
2628 : case 69:
2629 :
2630 : /* Line 1806 of yacc.c */
2631 : #line 905 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2632 : {
2633 : RSCINST aInst;
2634 :
2635 : aInst = S.Top().pClass->GetTupelVar( S.Top(), 0, RSCINST() );
2636 : if( aInst.pData )
2637 : S.Push( aInst );
2638 : else
2639 : {
2640 : pTC->pEH->Error( ERR_NOTUPELNAME, S.Top().pClass, RscId() );
2641 : return( ERR_ERROR );
2642 : }
2643 : }
2644 : break;
2645 :
2646 : case 70:
2647 :
2648 : /* Line 1806 of yacc.c */
2649 : #line 921 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2650 : {
2651 : RSCINST aInst;
2652 :
2653 : aInst = S.Top().pClass->GetTupelVar( S.Top(), 1, RSCINST() );
2654 : if( aInst.pData )
2655 : S.Push( aInst );
2656 : else
2657 : {
2658 : pTC->pEH->Error( ERR_NOTUPELNAME, S.Top().pClass, RscId() );
2659 : return( ERR_ERROR );
2660 : }
2661 : }
2662 : break;
2663 :
2664 : case 71:
2665 :
2666 : /* Line 1806 of yacc.c */
2667 : #line 937 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2668 : {
2669 : RSCINST aInst;
2670 :
2671 : aInst = S.Top().pClass->GetTupelVar( S.Top(), 2, RSCINST() );
2672 : if( aInst.pData )
2673 : S.Push( aInst );
2674 : else
2675 : {
2676 : pTC->pEH->Error( ERR_NOTUPELNAME, S.Top().pClass, RscId() );
2677 : return( ERR_ERROR );
2678 : }
2679 : }
2680 : break;
2681 :
2682 : case 72:
2683 :
2684 : /* Line 1806 of yacc.c */
2685 : #line 953 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2686 : {
2687 : RSCINST aInst;
2688 :
2689 : aInst = S.Top().pClass->GetTupelVar( S.Top(), 3, RSCINST() );
2690 : if( !aInst.pData )
2691 : {
2692 : pTC->pEH->Error( ERR_NOTUPELNAME, S.Top().pClass, RscId() );
2693 : return( ERR_ERROR );
2694 : }
2695 : S.Push( aInst );
2696 : }
2697 : break;
2698 :
2699 : case 73:
2700 :
2701 : /* Line 1806 of yacc.c */
2702 : #line 968 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2703 : {
2704 : S.Pop();
2705 : }
2706 : break;
2707 :
2708 : case 74:
2709 :
2710 : /* Line 1806 of yacc.c */
2711 : #line 975 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2712 : {
2713 : ERRTYPE aError;
2714 : RSCINST aInst;
2715 :
2716 : aError = S.Top().pClass->GetElement( S.Top(), RscId(),
2717 : NULL, RSCINST(), &aInst );
2718 : if( aError.IsError() || aError.IsWarning() )
2719 : pTC->pEH->Error( aError, S.Top().pClass, RscId() );
2720 : if( aError.IsError() )
2721 : { // unbedingt Instanz auf den Stack bringen
2722 : aInst = S.Top().pClass->Create( NULL, RSCINST() );
2723 : }
2724 : S.Push( aInst );
2725 : }
2726 : break;
2727 :
2728 : case 75:
2729 :
2730 : /* Line 1806 of yacc.c */
2731 : #line 993 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2732 : {
2733 : S.Pop();
2734 : }
2735 : break;
2736 :
2737 : case 76:
2738 :
2739 : /* Line 1806 of yacc.c */
2740 : #line 1000 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2741 : {
2742 : sal_uInt32 nCount = S.Top().pClass->GetCount( S.Top() );
2743 : sal_uInt32 i;
2744 :
2745 : for( i = nCount; i > 0; i-- )
2746 : S.Top().pClass->DeletePos( S.Top(), i -1 );
2747 : }
2748 : break;
2749 :
2750 : case 82:
2751 :
2752 : /* Line 1806 of yacc.c */
2753 : #line 1019 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2754 : {
2755 : sal_Int32 l;
2756 : ERRTYPE aError;
2757 :
2758 : if( !(yyvsp[(1) - (1)].macrostruct).Evaluate( &l ) )
2759 : pTC->pEH->Error( ERR_ZERODIVISION, NULL, RscId() );
2760 : else
2761 : {
2762 : aError = S.Top().pClass->SetRef( S.Top(), RscId( (yyvsp[(1) - (1)].macrostruct) ) );
2763 : if( aError.IsError() )
2764 : {
2765 : aError.Clear();
2766 : aError = S.Top().pClass->SetNumber( S.Top(), l );
2767 : }
2768 : if( aError.IsError() )
2769 : { // Aufwaertskompatible, Tupel probieren
2770 : RSCINST aInst = GetFirstTupelEle( S.Top() );
2771 : if( aInst.pData )
2772 : {
2773 : aError.Clear(); // Fehler zuruecksetzen
2774 : aError = aInst.pClass->SetRef( aInst, RscId( (yyvsp[(1) - (1)].macrostruct) ) );
2775 : if( aError.IsError() )
2776 : {
2777 : aError.Clear();
2778 : aError = aInst.pClass->SetNumber( aInst, l );
2779 : }
2780 : }
2781 : }
2782 : }
2783 :
2784 : if( (yyvsp[(1) - (1)].macrostruct).IsExpression() )
2785 : delete (yyvsp[(1) - (1)].macrostruct).aExp.pExp;
2786 :
2787 : if( aError.IsError() || aError.IsWarning() )
2788 : pTC->pEH->Error( aError, S.Top().pClass, RscId() );
2789 : }
2790 : break;
2791 :
2792 : case 83:
2793 :
2794 : /* Line 1806 of yacc.c */
2795 : #line 1056 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2796 : {
2797 : ERRTYPE aError;
2798 : aError = S.Top().pClass->SetConst( S.Top(), (yyvsp[(1) - (1)].constname).hashid, (yyvsp[(1) - (1)].constname).nValue );
2799 : if( aError.IsError() )
2800 : { // Aufwaertskompatible, Tupel probieren
2801 : RSCINST aInst = GetFirstTupelEle( S.Top() );
2802 : if( aInst.pData )
2803 : {
2804 : aError.Clear(); // Fehler zuruecksetzen
2805 : aError = aInst.pClass->SetConst( aInst, (yyvsp[(1) - (1)].constname).hashid, (yyvsp[(1) - (1)].constname).nValue );
2806 : }
2807 : }
2808 :
2809 : if( aError.IsError() || aError.IsWarning() )
2810 : pTC->pEH->Error( aError, S.Top().pClass, RscId() );
2811 : }
2812 : break;
2813 :
2814 : case 84:
2815 :
2816 : /* Line 1806 of yacc.c */
2817 : #line 1073 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2818 : {
2819 : ERRTYPE aError;
2820 : aError = S.Top().pClass->SetNotConst( S.Top(), (yyvsp[(2) - (2)].constname).hashid );
2821 : if( aError.IsError() )
2822 : { // Aufwaertskompatible, Tupel probieren
2823 : RSCINST aInst = GetFirstTupelEle( S.Top() );
2824 : if( aInst.pData )
2825 : {
2826 : aError.Clear(); // Fehler zuruecksetzen
2827 : aError = aInst.pClass->SetNotConst( aInst, (yyvsp[(2) - (2)].constname).hashid );
2828 : }
2829 : }
2830 :
2831 : if( aError.IsError() || aError.IsWarning() )
2832 : pTC->pEH->Error( aError, S.Top().pClass, RscId() );
2833 : }
2834 : break;
2835 :
2836 : case 85:
2837 :
2838 : /* Line 1806 of yacc.c */
2839 : #line 1090 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2840 : {
2841 : ERRTYPE aError;
2842 : aError = S.Top().pClass->SetBool( S.Top(), (yyvsp[(1) - (1)].svbool) );
2843 : if( aError.IsError() )
2844 : { // Aufwaertskompatible, Tupel probieren
2845 : RSCINST aInst = GetFirstTupelEle( S.Top() );
2846 : if( aInst.pData )
2847 : {
2848 : aError.Clear(); // Fehler zuruecksetzen
2849 : aError = aInst.pClass->SetBool( aInst, (yyvsp[(1) - (1)].svbool) );
2850 : }
2851 : }
2852 :
2853 : if( aError.IsError() || aError.IsWarning() )
2854 : pTC->pEH->Error( aError, S.Top().pClass, RscId() );
2855 : }
2856 : break;
2857 :
2858 : case 86:
2859 :
2860 : /* Line 1806 of yacc.c */
2861 : #line 1107 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2862 : {
2863 : ERRTYPE aError;
2864 : aError = S.Top().pClass->SetString( S.Top(), (yyvsp[(1) - (1)].string) );
2865 : if( aError.IsError() )
2866 : { // Aufwaertskompatible, Tupel probieren
2867 : RSCINST aInst = GetFirstTupelEle( S.Top() );
2868 : if( aInst.pData )
2869 : {
2870 : aError.Clear(); // Fehler zuruecksetzen
2871 : aError = aInst.pClass->SetString( aInst, (yyvsp[(1) - (1)].string) );
2872 : }
2873 : }
2874 :
2875 : if( aError.IsError() || aError.IsWarning() )
2876 : pTC->pEH->Error( aError, S.Top().pClass, RscId() );
2877 : }
2878 : break;
2879 :
2880 : case 95:
2881 :
2882 : /* Line 1806 of yacc.c */
2883 : #line 1144 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2884 : {
2885 : (yyval.string) = (yyvsp[(1) - (1)].string);
2886 : }
2887 : break;
2888 :
2889 : case 96:
2890 :
2891 : /* Line 1806 of yacc.c */
2892 : #line 1148 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2893 : {
2894 : rtl::OStringBuffer aBuf( 256 );
2895 : aBuf.append( (yyvsp[(1) - (2)].string) );
2896 : aBuf.append( (yyvsp[(2) - (2)].string) );
2897 : (yyval.string) = (char*)pStringContainer->putString( aBuf.getStr() );
2898 : }
2899 : break;
2900 :
2901 : case 97:
2902 :
2903 : /* Line 1806 of yacc.c */
2904 : #line 1158 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2905 : {
2906 : if( !(yyvsp[(1) - (1)].macrostruct).Evaluate( &(yyval.value) ) )
2907 : pTC->pEH->Error( ERR_ZERODIVISION, NULL, RscId() );
2908 : if( (yyvsp[(1) - (1)].macrostruct).IsExpression() )
2909 : delete (yyvsp[(1) - (1)].macrostruct).aExp.pExp;
2910 : }
2911 : break;
2912 :
2913 : case 98:
2914 :
2915 : /* Line 1806 of yacc.c */
2916 : #line 1168 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2917 : {
2918 : (yyval.macrostruct).cType = RSCEXP_DEF;
2919 : (yyval.macrostruct).aExp.pDef = (yyvsp[(1) - (1)].defineele);
2920 : }
2921 : break;
2922 :
2923 : case 99:
2924 :
2925 : /* Line 1806 of yacc.c */
2926 : #line 1173 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2927 : {
2928 : (yyval.macrostruct).cType = RSCEXP_LONG;
2929 : (yyval.macrostruct).SetLong( (yyvsp[(1) - (1)].value) );
2930 : }
2931 : break;
2932 :
2933 : case 100:
2934 :
2935 : /* Line 1806 of yacc.c */
2936 : #line 1178 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2937 : {
2938 : if( (yyvsp[(2) - (2)].macrostruct).IsNumber() ){
2939 : (yyval.macrostruct).cType = (yyvsp[(2) - (2)].macrostruct).cType;
2940 : (yyval.macrostruct).SetLong( - (yyvsp[(2) - (2)].macrostruct).GetLong() );
2941 : }
2942 : else{
2943 : RscExpType aLeftExp;
2944 :
2945 : aLeftExp.cType = RSCEXP_NOTHING;
2946 : (yyval.macrostruct).cType = RSCEXP_EXP;
2947 : (yyval.macrostruct).aExp.pExp = new RscExpression( aLeftExp, '-', (yyvsp[(2) - (2)].macrostruct) );
2948 : }
2949 : }
2950 : break;
2951 :
2952 : case 101:
2953 :
2954 : /* Line 1806 of yacc.c */
2955 : #line 1192 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2956 : {
2957 : (yyval.macrostruct) = (yyvsp[(2) - (2)].macrostruct);
2958 : }
2959 : break;
2960 :
2961 : case 102:
2962 :
2963 : /* Line 1806 of yacc.c */
2964 : #line 1196 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2965 : {
2966 : if( (yyvsp[(1) - (3)].macrostruct).IsNumber() && (yyvsp[(3) - (3)].macrostruct).IsNumber() ){
2967 : (yyval.macrostruct).cType = RSCEXP_LONG;
2968 : (yyval.macrostruct).SetLong( (yyvsp[(1) - (3)].macrostruct).GetLong() + (yyvsp[(3) - (3)].macrostruct).GetLong() );
2969 : }
2970 : else{
2971 : (yyval.macrostruct).cType = RSCEXP_EXP;
2972 : (yyval.macrostruct).aExp.pExp = new RscExpression( (yyvsp[(1) - (3)].macrostruct), '+', (yyvsp[(3) - (3)].macrostruct) );
2973 : }
2974 : }
2975 : break;
2976 :
2977 : case 103:
2978 :
2979 : /* Line 1806 of yacc.c */
2980 : #line 1207 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2981 : {
2982 : if( (yyvsp[(1) - (3)].macrostruct).IsNumber() && (yyvsp[(3) - (3)].macrostruct).IsNumber() ){
2983 : (yyval.macrostruct).cType = RSCEXP_LONG;
2984 : (yyval.macrostruct).SetLong( (yyvsp[(1) - (3)].macrostruct).GetLong() - (yyvsp[(3) - (3)].macrostruct).GetLong() );
2985 : }
2986 : else{
2987 : (yyval.macrostruct).cType = RSCEXP_EXP;
2988 : (yyval.macrostruct).aExp.pExp = new RscExpression( (yyvsp[(1) - (3)].macrostruct), '-', (yyvsp[(3) - (3)].macrostruct) );
2989 : }
2990 : }
2991 : break;
2992 :
2993 : case 104:
2994 :
2995 : /* Line 1806 of yacc.c */
2996 : #line 1218 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
2997 : {
2998 : if( (yyvsp[(1) - (3)].macrostruct).IsNumber() && (yyvsp[(3) - (3)].macrostruct).IsNumber() ){
2999 : (yyval.macrostruct).cType = RSCEXP_LONG;
3000 : (yyval.macrostruct).SetLong( (yyvsp[(1) - (3)].macrostruct).GetLong() * (yyvsp[(3) - (3)].macrostruct).GetLong() );
3001 : }
3002 : else{
3003 : (yyval.macrostruct).cType = RSCEXP_EXP;
3004 : (yyval.macrostruct).aExp.pExp = new RscExpression( (yyvsp[(1) - (3)].macrostruct), '*', (yyvsp[(3) - (3)].macrostruct) );
3005 : }
3006 : }
3007 : break;
3008 :
3009 : case 105:
3010 :
3011 : /* Line 1806 of yacc.c */
3012 : #line 1229 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
3013 : {
3014 : if( (yyvsp[(1) - (3)].macrostruct).IsNumber() && (yyvsp[(3) - (3)].macrostruct).IsNumber() ){
3015 : if( 0 == (yyvsp[(3) - (3)].macrostruct).GetLong() ){
3016 : (yyval.macrostruct).cType = RSCEXP_EXP;
3017 : (yyval.macrostruct).aExp.pExp = new RscExpression( (yyvsp[(1) - (3)].macrostruct), '/', (yyvsp[(3) - (3)].macrostruct) );
3018 : }
3019 : else{
3020 : (yyval.macrostruct).cType = RSCEXP_LONG;
3021 : (yyval.macrostruct).SetLong( (yyvsp[(1) - (3)].macrostruct).GetLong() / (yyvsp[(3) - (3)].macrostruct).GetLong() );
3022 : }
3023 : }
3024 : else{
3025 : (yyval.macrostruct).cType = RSCEXP_EXP;
3026 : (yyval.macrostruct).aExp.pExp = new RscExpression( (yyvsp[(1) - (3)].macrostruct), '/', (yyvsp[(3) - (3)].macrostruct) );
3027 : }
3028 : }
3029 : break;
3030 :
3031 : case 106:
3032 :
3033 : /* Line 1806 of yacc.c */
3034 : #line 1246 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
3035 : {
3036 : if( (yyvsp[(1) - (3)].macrostruct).IsNumber() && (yyvsp[(3) - (3)].macrostruct).IsNumber() ){
3037 : (yyval.macrostruct).cType = RSCEXP_LONG;
3038 : (yyval.macrostruct).SetLong( (yyvsp[(1) - (3)].macrostruct).GetLong() & (yyvsp[(3) - (3)].macrostruct).GetLong() );
3039 : }
3040 : else{
3041 : (yyval.macrostruct).cType = RSCEXP_EXP;
3042 : (yyval.macrostruct).aExp.pExp = new RscExpression( (yyvsp[(1) - (3)].macrostruct), '&', (yyvsp[(3) - (3)].macrostruct) );
3043 : }
3044 : }
3045 : break;
3046 :
3047 : case 107:
3048 :
3049 : /* Line 1806 of yacc.c */
3050 : #line 1257 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
3051 : {
3052 : if( (yyvsp[(1) - (3)].macrostruct).IsNumber() && (yyvsp[(3) - (3)].macrostruct).IsNumber() ){
3053 : (yyval.macrostruct).cType = RSCEXP_LONG;
3054 : (yyval.macrostruct).SetLong( (yyvsp[(1) - (3)].macrostruct).GetLong() | (yyvsp[(3) - (3)].macrostruct).GetLong() );
3055 : }
3056 : else{
3057 : (yyval.macrostruct).cType = RSCEXP_EXP;
3058 : (yyval.macrostruct).aExp.pExp = new RscExpression( (yyvsp[(1) - (3)].macrostruct), '|', (yyvsp[(3) - (3)].macrostruct) );
3059 : }
3060 : }
3061 : break;
3062 :
3063 : case 108:
3064 :
3065 : /* Line 1806 of yacc.c */
3066 : #line 1268 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
3067 : {
3068 : (yyval.macrostruct) = (yyvsp[(2) - (3)].macrostruct);
3069 : }
3070 : break;
3071 :
3072 : case 109:
3073 :
3074 : /* Line 1806 of yacc.c */
3075 : #line 1272 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
3076 : {
3077 : if( (yyvsp[(1) - (3)].macrostruct).IsNumber() && (yyvsp[(3) - (3)].macrostruct).IsNumber() ){
3078 : (yyval.macrostruct).cType = RSCEXP_LONG;
3079 : (yyval.macrostruct).SetLong( (yyvsp[(1) - (3)].macrostruct).GetLong() << (yyvsp[(3) - (3)].macrostruct).GetLong() );
3080 : }
3081 : else{
3082 : (yyval.macrostruct).cType = RSCEXP_EXP;
3083 : (yyval.macrostruct).aExp.pExp = new RscExpression( (yyvsp[(1) - (3)].macrostruct), 'l', (yyvsp[(3) - (3)].macrostruct) );
3084 : }
3085 : }
3086 : break;
3087 :
3088 : case 110:
3089 :
3090 : /* Line 1806 of yacc.c */
3091 : #line 1283 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
3092 : {
3093 : if( (yyvsp[(1) - (3)].macrostruct).IsNumber() && (yyvsp[(3) - (3)].macrostruct).IsNumber() ){
3094 : (yyval.macrostruct).cType = RSCEXP_LONG;
3095 : (yyval.macrostruct).SetLong( (yyvsp[(1) - (3)].macrostruct).GetLong() >> (yyvsp[(3) - (3)].macrostruct).GetLong() );
3096 : }
3097 : else{
3098 : (yyval.macrostruct).cType = RSCEXP_EXP;
3099 : (yyval.macrostruct).aExp.pExp = new RscExpression( (yyvsp[(1) - (3)].macrostruct), 'r', (yyvsp[(3) - (3)].macrostruct) );
3100 : }
3101 : }
3102 : break;
3103 :
3104 : case 112:
3105 :
3106 : /* Line 1806 of yacc.c */
3107 : #line 1298 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
3108 : { // pExpession auswerten und loeschen
3109 : if( RSCEXP_EXP == (yyvsp[(1) - (1)].macrostruct).cType ){
3110 : sal_Int32 lValue;
3111 :
3112 : if( !(yyvsp[(1) - (1)].macrostruct).Evaluate( &lValue ) )
3113 : pTC->pEH->Error( ERR_ZERODIVISION, NULL, RscId() );
3114 : delete (yyvsp[(1) - (1)].macrostruct).aExp.pExp;
3115 : (yyval.macrostruct).cType = RSCEXP_LONG;
3116 : (yyval.macrostruct).SetLong( lValue );
3117 : }
3118 : else
3119 : (yyval.macrostruct) = (yyvsp[(1) - (1)].macrostruct);
3120 : }
3121 : break;
3122 :
3123 : case 113:
3124 :
3125 : /* Line 1806 of yacc.c */
3126 : #line 1315 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
3127 : {
3128 : }
3129 : break;
3130 :
3131 : case 114:
3132 :
3133 : /* Line 1806 of yacc.c */
3134 : #line 1318 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
3135 : {
3136 : }
3137 : break;
3138 :
3139 : case 115:
3140 :
3141 : /* Line 1806 of yacc.c */
3142 : #line 1324 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
3143 : {
3144 : RscFile * pFName;
3145 :
3146 : pFI->SetLineNo( (yyvsp[(3) - (4)].value) );
3147 : pFI->SetFileIndex( pTC->aFileTab.NewCodeFile( rtl::OString( (yyvsp[(4) - (4)].string) ) ) );
3148 : pFName = pTC->aFileTab.Get( pFI->GetFileIndex() );
3149 : pFName->bLoaded = sal_True;
3150 : pFName->bScanned = sal_True;
3151 : }
3152 : break;
3153 :
3154 : case 116:
3155 :
3156 : /* Line 1806 of yacc.c */
3157 : #line 1334 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
3158 : {
3159 : RscFile * pFName;
3160 :
3161 : pFI->SetLineNo( (yyvsp[(2) - (4)].value) );
3162 : pFI->SetFileIndex( pTC->aFileTab.NewCodeFile( rtl::OString( (yyvsp[(3) - (4)].string) ) ) );
3163 : pFName = pTC->aFileTab.Get( pFI->GetFileIndex() );
3164 : pFName->bLoaded = sal_True;
3165 : pFName->bScanned = sal_True;
3166 : }
3167 : break;
3168 :
3169 : case 117:
3170 :
3171 : /* Line 1806 of yacc.c */
3172 : #line 1344 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
3173 : {
3174 : pFI->SetLineNo( (yyvsp[(2) - (2)].value) );
3175 : }
3176 : break;
3177 :
3178 :
3179 :
3180 : /* Line 1806 of yacc.c */
3181 : #line 3182 "/usr/local/src/libreoffice/workdir/unxlngi6.pro/YaccTarget/rsc/source/parser/rscyacc.cxx"
3182 474241 : default: break;
3183 : }
3184 : /* User semantic actions sometimes alter yychar, and that requires
3185 : that yytoken be updated with the new translation. We take the
3186 : approach of translating immediately before every use of yytoken.
3187 : One alternative is translating here after every semantic action,
3188 : but that translation would be missed if the semantic action invokes
3189 : YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3190 : if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3191 : incorrect destructor might then be invoked immediately. In the
3192 : case of YYERROR or YYBACKUP, subsequent parser actions might lead
3193 : to an incorrect destructor call or verbose syntax error message
3194 : before the lookahead is translated. */
3195 : YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3196 :
3197 1657772 : YYPOPSTACK (yylen);
3198 1657772 : yylen = 0;
3199 : YY_STACK_PRINT (yyss, yyssp);
3200 :
3201 1657772 : *++yyvsp = yyval;
3202 :
3203 : /* Now `shift' the result of the reduction. Determine what state
3204 : that goes to, based on the state we popped back to and the rule
3205 : number reduced by. */
3206 :
3207 1657772 : yyn = yyr1[yyn];
3208 :
3209 1657772 : yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3210 1657772 : if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3211 589740 : yystate = yytable[yystate];
3212 : else
3213 1068032 : yystate = yydefgoto[yyn - YYNTOKENS];
3214 :
3215 1657772 : goto yynewstate;
3216 :
3217 :
3218 : /*------------------------------------.
3219 : | yyerrlab -- here on detecting error |
3220 : `------------------------------------*/
3221 : yyerrlab:
3222 : /* Make sure we have latest lookahead translation. See comments at
3223 : user semantic actions for why this is necessary. */
3224 0 : yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3225 :
3226 : /* If not already recovering from an error, report this error. */
3227 0 : if (!yyerrstatus)
3228 : {
3229 0 : ++yynerrs;
3230 : #if ! YYERROR_VERBOSE
3231 0 : yyerror (YY_("syntax error"));
3232 : #else
3233 : # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3234 : yyssp, yytoken)
3235 : {
3236 : char const *yymsgp = YY_("syntax error");
3237 : int yysyntax_error_status;
3238 : yysyntax_error_status = YYSYNTAX_ERROR;
3239 : if (yysyntax_error_status == 0)
3240 : yymsgp = yymsg;
3241 : else if (yysyntax_error_status == 1)
3242 : {
3243 : if (yymsg != yymsgbuf)
3244 : YYSTACK_FREE (yymsg);
3245 : yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3246 : if (!yymsg)
3247 : {
3248 : yymsg = yymsgbuf;
3249 : yymsg_alloc = sizeof yymsgbuf;
3250 : yysyntax_error_status = 2;
3251 : }
3252 : else
3253 : {
3254 : yysyntax_error_status = YYSYNTAX_ERROR;
3255 : yymsgp = yymsg;
3256 : }
3257 : }
3258 : yyerror (yymsgp);
3259 : if (yysyntax_error_status == 2)
3260 : goto yyexhaustedlab;
3261 : }
3262 : # undef YYSYNTAX_ERROR
3263 : #endif
3264 : }
3265 :
3266 :
3267 :
3268 0 : if (yyerrstatus == 3)
3269 : {
3270 : /* If just tried and failed to reuse lookahead token after an
3271 : error, discard it. */
3272 :
3273 0 : if (yychar <= YYEOF)
3274 : {
3275 : /* Return failure if at end of input. */
3276 0 : if (yychar == YYEOF)
3277 0 : YYABORT;
3278 : }
3279 : else
3280 : {
3281 : yydestruct ("Error: discarding",
3282 0 : yytoken, &yylval);
3283 0 : yychar = YYEMPTY;
3284 : }
3285 : }
3286 :
3287 : /* Else will try to reuse lookahead token after shifting the error
3288 : token. */
3289 0 : goto yyerrlab1;
3290 :
3291 :
3292 : /*---------------------------------------------------.
3293 : | yyerrorlab -- error raised explicitly by YYERROR. |
3294 : `---------------------------------------------------*/
3295 : yyerrorlab:
3296 :
3297 : /* Pacify compilers like GCC when the user code never invokes
3298 : YYERROR and the label yyerrorlab therefore never appears in user
3299 : code. */
3300 : if (/*CONSTCOND*/ 0)
3301 : goto yyerrorlab;
3302 :
3303 : /* Do not reclaim the symbols of the rule which action triggered
3304 : this YYERROR. */
3305 : YYPOPSTACK (yylen);
3306 : yylen = 0;
3307 : YY_STACK_PRINT (yyss, yyssp);
3308 : yystate = *yyssp;
3309 : goto yyerrlab1;
3310 :
3311 :
3312 : /*-------------------------------------------------------------.
3313 : | yyerrlab1 -- common code for both syntax error and YYERROR. |
3314 : `-------------------------------------------------------------*/
3315 : yyerrlab1:
3316 0 : yyerrstatus = 3; /* Each real token shifted decrements this. */
3317 :
3318 0 : for (;;)
3319 : {
3320 0 : yyn = yypact[yystate];
3321 0 : if (!yypact_value_is_default (yyn))
3322 : {
3323 0 : yyn += YYTERROR;
3324 0 : if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3325 : {
3326 0 : yyn = yytable[yyn];
3327 0 : if (0 < yyn)
3328 0 : break;
3329 : }
3330 : }
3331 :
3332 : /* Pop the current state because it cannot handle the error token. */
3333 0 : if (yyssp == yyss)
3334 0 : YYABORT;
3335 :
3336 :
3337 : yydestruct ("Error: popping",
3338 0 : yystos[yystate], yyvsp);
3339 0 : YYPOPSTACK (1);
3340 0 : yystate = *yyssp;
3341 : YY_STACK_PRINT (yyss, yyssp);
3342 : }
3343 :
3344 0 : *++yyvsp = yylval;
3345 :
3346 :
3347 : /* Shift the error token. */
3348 : YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3349 :
3350 0 : yystate = yyn;
3351 0 : goto yynewstate;
3352 :
3353 :
3354 : /*-------------------------------------.
3355 : | yyacceptlab -- YYACCEPT comes here. |
3356 : `-------------------------------------*/
3357 : yyacceptlab:
3358 692 : yyresult = 0;
3359 692 : goto yyreturn;
3360 :
3361 : /*-----------------------------------.
3362 : | yyabortlab -- YYABORT comes here. |
3363 : `-----------------------------------*/
3364 : yyabortlab:
3365 0 : yyresult = 1;
3366 0 : goto yyreturn;
3367 :
3368 : #if !defined(yyoverflow) || YYERROR_VERBOSE
3369 : /*-------------------------------------------------.
3370 : | yyexhaustedlab -- memory exhaustion comes here. |
3371 : `-------------------------------------------------*/
3372 : yyexhaustedlab:
3373 0 : yyerror (YY_("memory exhausted"));
3374 0 : yyresult = 2;
3375 : /* Fall through. */
3376 : #endif
3377 :
3378 : yyreturn:
3379 692 : if (yychar != YYEMPTY)
3380 : {
3381 : /* Make sure we have latest lookahead translation. See comments at
3382 : user semantic actions for why this is necessary. */
3383 0 : yytoken = YYTRANSLATE (yychar);
3384 : yydestruct ("Cleanup: discarding lookahead",
3385 0 : yytoken, &yylval);
3386 : }
3387 : /* Do not reclaim the symbols of the rule which action triggered
3388 : this YYABORT or YYACCEPT. */
3389 692 : YYPOPSTACK (yylen);
3390 : YY_STACK_PRINT (yyss, yyssp);
3391 2768 : while (yyssp != yyss)
3392 : {
3393 : yydestruct ("Cleanup: popping",
3394 1384 : yystos[*yyssp], yyvsp);
3395 1384 : YYPOPSTACK (1);
3396 : }
3397 : #ifndef yyoverflow
3398 692 : if (yyss != yyssa)
3399 0 : YYSTACK_FREE (yyss);
3400 : #endif
3401 : #if YYERROR_VERBOSE
3402 : if (yymsg != yymsgbuf)
3403 : YYSTACK_FREE (yymsg);
3404 : #endif
3405 : /* Make sure YYID is used. */
3406 692 : return YYID (yyresult);
3407 2073 : }
3408 :
3409 :
3410 :
3411 : /* Line 2067 of yacc.c */
3412 : #line 1349 "/usr/local/src/libreoffice/rsc/source/parser/rscyacc.y"
3413 :
3414 : #if defined _MSC_VER
3415 : #pragma warning(pop)
3416 : #endif
3417 :
3418 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
3419 :
3420 :
3421 :
|