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