~ubuntu-branches/ubuntu/saucy/postgresql-8.4/saucy

« back to all changes in this revision

Viewing changes to contrib/seg/segparse.c

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2011-12-02 14:46:33 UTC
  • mfrom: (13.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20111202144633-azdcoyqh7sduwr15
Tags: 8.4.10-1
* New upstream bug fix release:
  - Fix bugs in information_schema.referential_constraints view.
    This view was being insufficiently careful about matching the
    foreign-key constraint to the depended-on primary or unique key
    constraint. That could result in failure to show a foreign key
    constraint at all, or showing it multiple times, or claiming that
    it depends on a different constraint than the one it really does.
    Since the view definition is installed by initdb, merely upgrading
    will not fix the problem. If you need to fix this in an existing
    installation, you can (as a superuser) drop the information_schema
    schema then re-create it by sourcing
    "SHAREDIR/information_schema.sql". (Run pg_config --sharedir if
    you're uncertain where "SHAREDIR" is.) This must be repeated in
    each database to be fixed.
  - Fix incorrect replay of WAL records for GIN index updates.
    This could result in transiently failing to find index entries
    after a crash, or on a hot-standby server. The problem would be
    repaired by the next "VACUUM" of the index, however.
  - Fix TOAST-related data corruption during CREATE TABLE dest AS
    SELECT - FROM src or INSERT INTO dest SELECT * FROM src.
    If a table has been modified by "ALTER TABLE ADD COLUMN", attempts
    to copy its data verbatim to another table could produce corrupt
    results in certain corner cases. The problem can only manifest in
    this precise form in 8.4 and later, but we patched earlier versions
    as well in case there are other code paths that could trigger the
    same bug.
  - Fix race condition during toast table access from stale syscache
    entries.
  - Track dependencies of functions on items used in parameter default
    expressions. Previously, a referenced object could be dropped without
    having dropped or modified the function, leading to misbehavior when the
    function was used. Note that merely installing this update will not fix
    the missing dependency entries; to do that, you'd need to "CREATE OR
    REPLACE" each such function afterwards. If you have functions whose
    defaults depend on non-built-in objects, doing so is recommended.
  - Allow inlining of set-returning SQL functions with multiple OUT
    parameters.
  - Make DatumGetInetP() unpack inet datums that have a 1-byte header,
    and add a new macro, DatumGetInetPP(), that does not.
  - Improve locale support in money type's input and output.
    Aside from not supporting all standard lc_monetary formatting
    options, the input and output functions were inconsistent, meaning
    there were locales in which dumped money values could not be
    re-read.
  - Don't let transform_null_equals affect CASE foo WHEN NULL ...
    constructs. transform_null_equals is only supposed to affect foo = NULL
    expressions written directly by the user, not equality checks
    generated internally by this form of CASE.
  - Change foreign-key trigger creation order to better support
    self-referential foreign keys. For a cascading foreign key that
    references its own table, a row update will fire both the ON UPDATE
    trigger and the CHECK trigger as one event. The ON UPDATE trigger must
    execute first, else the CHECK will check a non-final state of the row
    and possibly throw an inappropriate error. However, the firing order of
    these triggers is determined by their names, which generally sort in
    creation order since the triggers have auto-generated names following
    the convention "RI_ConstraintTrigger_NNNN". A proper fix would require
    modifying that convention, which we will do in 9.2, but it seems risky
    to change it in existing releases. So this patch just changes the
    creation order of the triggers. Users encountering this type of error
    should drop and re-create the foreign key constraint to get its triggers
    into the right order.
  - Avoid floating-point underflow while tracking buffer allocation
    rate.
  - Preserve blank lines within commands in psql's command history.
    The former behavior could cause problems if an empty line was
    removed from within a string literal, for example.
  - Fix pg_dump to dump user-defined casts between auto-generated
    types, such as table rowtypes.
  - Use the preferred version of xsubpp to build PL/Perl, not
    necessarily the operating system's main copy.
  - Fix incorrect coding in "contrib/dict_int" and "contrib/dict_xsyn".
  - Honor query cancel interrupts promptly in pgstatindex().
  - Ensure VPATH builds properly install all server header files.
  - Shorten file names reported in verbose error messages.
    Regular builds have always reported just the name of the C file
    containing the error message call, but VPATH builds formerly
    reported an absolute path name.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* A Bison parser, made by GNU Bison 1.875.  */
2
 
 
3
 
/* Skeleton parser for Yacc-like parsing with Bison,
4
 
   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
5
 
 
6
 
   This program is free software; you can redistribute it and/or modify
 
1
 
 
2
/* A Bison parser, made by GNU Bison 2.4.1.  */
 
3
 
 
4
/* Skeleton implementation for Bison's Yacc-like parsers in C
 
5
   
 
6
      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
 
7
   Free Software Foundation, Inc.
 
8
   
 
9
   This program is free software: you can redistribute it and/or modify
7
10
   it under the terms of the GNU General Public License as published by
8
 
   the Free Software Foundation; either version 2, or (at your option)
9
 
   any later version.
10
 
 
 
11
   the Free Software Foundation, either version 3 of the License, or
 
12
   (at your option) any later version.
 
13
   
11
14
   This program is distributed in the hope that it will be useful,
12
15
   but WITHOUT ANY WARRANTY; without even the implied warranty of
13
16
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
17
   GNU General Public License for more details.
15
 
 
 
18
   
16
19
   You should have received a copy of the GNU General Public License
17
 
   along with this program; if not, write to the Free Software
18
 
   Foundation, Inc., 59 Temple Place - Suite 330,
19
 
   Boston, MA 02111-1307, USA.  */
20
 
 
21
 
/* As a special exception, when this file is copied by Bison into a
22
 
   Bison output file, you may use that output file without restriction.
23
 
   This special exception was added by the Free Software Foundation
24
 
   in version 1.24 of Bison.  */
25
 
 
26
 
/* Written by Richard Stallman by simplifying the original so called
27
 
   ``semantic'' parser.  */
 
20
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
21
 
 
22
/* As a special exception, you may create a larger work that contains
 
23
   part or all of the Bison parser skeleton and distribute that work
 
24
   under terms of your choice, so long as that work isn't itself a
 
25
   parser generator using the skeleton or a modified version thereof
 
26
   as a parser skeleton.  Alternatively, if you modify or redistribute
 
27
   the parser skeleton itself, you may (at your option) remove this
 
28
   special exception, which will cause the skeleton and the resulting
 
29
   Bison output files to be licensed under the GNU General Public
 
30
   License without this special exception.
 
31
   
 
32
   This special exception was added by the Free Software Foundation in
 
33
   version 2.2 of Bison.  */
 
34
 
 
35
/* C LALR(1) parser skeleton written by Richard Stallman, by
 
36
   simplifying the original so-called "semantic" parser.  */
28
37
 
29
38
/* All symbols defined below should begin with yy or YY, to avoid
30
39
   infringing on user name space.  This should be done even for local
36
45
/* Identify Bison output.  */
37
46
#define YYBISON 1
38
47
 
 
48
/* Bison version.  */
 
49
#define YYBISON_VERSION "2.4.1"
 
50
 
39
51
/* Skeleton name.  */
40
52
#define YYSKELETON_NAME "yacc.c"
41
53
 
42
54
/* Pure parsers.  */
43
55
#define YYPURE 0
44
56
 
 
57
/* Push parsers.  */
 
58
#define YYPUSH 0
 
59
 
 
60
/* Pull parsers.  */
 
61
#define YYPULL 1
 
62
 
45
63
/* Using locations.  */
46
64
#define YYLSP_NEEDED 0
47
65
 
48
 
/* If NAME_PREFIX is specified substitute the variables and functions
49
 
   names.  */
50
 
#define yyparse seg_yyparse
51
 
#define yylex   seg_yylex
52
 
#define yyerror seg_yyerror
53
 
#define yylval  seg_yylval
54
 
#define yychar  seg_yychar
55
 
#define yydebug seg_yydebug
56
 
#define yynerrs seg_yynerrs
57
 
 
58
 
 
59
 
/* Tokens.  */
60
 
#ifndef YYTOKENTYPE
61
 
# define YYTOKENTYPE
62
 
   /* Put the tokens into the symbol table, so that GDB and other debuggers
63
 
      know about them.  */
64
 
   enum yytokentype {
65
 
     SEGFLOAT = 258,
66
 
     RANGE = 259,
67
 
     PLUMIN = 260,
68
 
     EXTENSION = 261
69
 
   };
70
 
#endif
71
 
#define SEGFLOAT 258
72
 
#define RANGE 259
73
 
#define PLUMIN 260
74
 
#define EXTENSION 261
75
 
 
76
 
 
 
66
/* Substitute the variable and function names.  */
 
67
#define yyparse         seg_yyparse
 
68
#define yylex           seg_yylex
 
69
#define yyerror         seg_yyerror
 
70
#define yylval          seg_yylval
 
71
#define yychar          seg_yychar
 
72
#define yydebug         seg_yydebug
 
73
#define yynerrs         seg_yynerrs
77
74
 
78
75
 
79
76
/* Copy the first part of user declarations.  */
 
77
 
 
78
/* Line 189 of yacc.c  */
80
79
#line 1 "segparse.y"
81
80
 
82
81
#define YYPARSE_PARAM result  /* need this to pass a pointer (void *) to yyparse */
119
118
 
120
119
 
121
120
 
 
121
/* Line 189 of yacc.c  */
 
122
#line 123 "segparse.c"
 
123
 
122
124
/* Enabling traces.  */
123
125
#ifndef YYDEBUG
124
126
# define YYDEBUG 0
132
134
# define YYERROR_VERBOSE 0
133
135
#endif
134
136
 
135
 
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
 
137
/* Enabling the token table.  */
 
138
#ifndef YYTOKEN_TABLE
 
139
# define YYTOKEN_TABLE 0
 
140
#endif
 
141
 
 
142
 
 
143
/* Tokens.  */
 
144
#ifndef YYTOKENTYPE
 
145
# define YYTOKENTYPE
 
146
   /* Put the tokens into the symbol table, so that GDB and other debuggers
 
147
      know about them.  */
 
148
   enum yytokentype {
 
149
     SEGFLOAT = 258,
 
150
     RANGE = 259,
 
151
     PLUMIN = 260,
 
152
     EXTENSION = 261
 
153
   };
 
154
#endif
 
155
 
 
156
 
 
157
 
 
158
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 
159
typedef union YYSTYPE
 
160
{
 
161
 
 
162
/* Line 214 of yacc.c  */
136
163
#line 46 "segparse.y"
137
 
typedef union YYSTYPE {
 
164
 
138
165
  struct BND {
139
166
    float val;
140
167
    char  ext;
141
168
    char  sigd;
142
169
  } bnd;
143
170
  char * text;
 
171
 
 
172
 
 
173
 
 
174
/* Line 214 of yacc.c  */
 
175
#line 176 "segparse.c"
144
176
} YYSTYPE;
145
 
/* Line 186 of yacc.c.  */
146
 
#line 146 "segparse.c"
 
177
# define YYSTYPE_IS_TRIVIAL 1
147
178
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
148
179
# define YYSTYPE_IS_DECLARED 1
149
 
# define YYSTYPE_IS_TRIVIAL 1
150
180
#endif
151
181
 
152
182
 
153
 
 
154
183
/* Copy the second part of user declarations.  */
155
184
 
156
185
 
157
 
/* Line 214 of yacc.c.  */
158
 
#line 158 "segparse.c"
159
 
 
160
 
#if ! defined (yyoverflow) || YYERROR_VERBOSE
 
186
/* Line 264 of yacc.c  */
 
187
#line 188 "segparse.c"
 
188
 
 
189
#ifdef short
 
190
# undef short
 
191
#endif
 
192
 
 
193
#ifdef YYTYPE_UINT8
 
194
typedef YYTYPE_UINT8 yytype_uint8;
 
195
#else
 
196
typedef unsigned char yytype_uint8;
 
197
#endif
 
198
 
 
199
#ifdef YYTYPE_INT8
 
200
typedef YYTYPE_INT8 yytype_int8;
 
201
#elif (defined __STDC__ || defined __C99__FUNC__ \
 
202
     || defined __cplusplus || defined _MSC_VER)
 
203
typedef signed char yytype_int8;
 
204
#else
 
205
typedef short int yytype_int8;
 
206
#endif
 
207
 
 
208
#ifdef YYTYPE_UINT16
 
209
typedef YYTYPE_UINT16 yytype_uint16;
 
210
#else
 
211
typedef unsigned short int yytype_uint16;
 
212
#endif
 
213
 
 
214
#ifdef YYTYPE_INT16
 
215
typedef YYTYPE_INT16 yytype_int16;
 
216
#else
 
217
typedef short int yytype_int16;
 
218
#endif
 
219
 
 
220
#ifndef YYSIZE_T
 
221
# ifdef __SIZE_TYPE__
 
222
#  define YYSIZE_T __SIZE_TYPE__
 
223
# elif defined size_t
 
224
#  define YYSIZE_T size_t
 
225
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
 
226
     || defined __cplusplus || defined _MSC_VER)
 
227
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
 
228
#  define YYSIZE_T size_t
 
229
# else
 
230
#  define YYSIZE_T unsigned int
 
231
# endif
 
232
#endif
 
233
 
 
234
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
235
 
 
236
#ifndef YY_
 
237
# if YYENABLE_NLS
 
238
#  if ENABLE_NLS
 
239
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 
240
#   define YY_(msgid) dgettext ("bison-runtime", msgid)
 
241
#  endif
 
242
# endif
 
243
# ifndef YY_
 
244
#  define YY_(msgid) msgid
 
245
# endif
 
246
#endif
 
247
 
 
248
/* Suppress unused-variable warnings by "using" E.  */
 
249
#if ! defined lint || defined __GNUC__
 
250
# define YYUSE(e) ((void) (e))
 
251
#else
 
252
# define YYUSE(e) /* empty */
 
253
#endif
 
254
 
 
255
/* Identity function, used to suppress warnings about constant conditions.  */
 
256
#ifndef lint
 
257
# define YYID(n) (n)
 
258
#else
 
259
#if (defined __STDC__ || defined __C99__FUNC__ \
 
260
     || defined __cplusplus || defined _MSC_VER)
 
261
static int
 
262
YYID (int yyi)
 
263
#else
 
264
static int
 
265
YYID (yyi)
 
266
    int yyi;
 
267
#endif
 
268
{
 
269
  return yyi;
 
270
}
 
271
#endif
 
272
 
 
273
#if ! defined yyoverflow || YYERROR_VERBOSE
161
274
 
162
275
/* The parser invokes alloca or malloc; define the necessary symbols.  */
163
276
 
164
 
# if YYSTACK_USE_ALLOCA
165
 
#  define YYSTACK_ALLOC alloca
166
 
# else
167
 
#  ifndef YYSTACK_USE_ALLOCA
168
 
#   if defined (alloca) || defined (_ALLOCA_H)
 
277
# ifdef YYSTACK_USE_ALLOCA
 
278
#  if YYSTACK_USE_ALLOCA
 
279
#   ifdef __GNUC__
 
280
#    define YYSTACK_ALLOC __builtin_alloca
 
281
#   elif defined __BUILTIN_VA_ARG_INCR
 
282
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
 
283
#   elif defined _AIX
 
284
#    define YYSTACK_ALLOC __alloca
 
285
#   elif defined _MSC_VER
 
286
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
 
287
#    define alloca _alloca
 
288
#   else
169
289
#    define YYSTACK_ALLOC alloca
170
 
#   else
171
 
#    ifdef __GNUC__
172
 
#     define YYSTACK_ALLOC __builtin_alloca
 
290
#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
 
291
     || defined __cplusplus || defined _MSC_VER)
 
292
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
 
293
#     ifndef _STDLIB_H
 
294
#      define _STDLIB_H 1
 
295
#     endif
173
296
#    endif
174
297
#   endif
175
298
#  endif
176
299
# endif
177
300
 
178
301
# ifdef YYSTACK_ALLOC
179
 
   /* Pacify GCC's `empty if-body' warning. */
180
 
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
 
302
   /* Pacify GCC's `empty if-body' warning.  */
 
303
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
 
304
#  ifndef YYSTACK_ALLOC_MAXIMUM
 
305
    /* The OS might guarantee only one guard page at the bottom of the stack,
 
306
       and a page size can be as small as 4096 bytes.  So we cannot safely
 
307
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
 
308
       to allow for a few compiler-allocated temporary stack slots.  */
 
309
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
 
310
#  endif
181
311
# else
182
 
#  if defined (__STDC__) || defined (__cplusplus)
 
312
#  define YYSTACK_ALLOC YYMALLOC
 
313
#  define YYSTACK_FREE YYFREE
 
314
#  ifndef YYSTACK_ALLOC_MAXIMUM
 
315
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
 
316
#  endif
 
317
#  if (defined __cplusplus && ! defined _STDLIB_H \
 
318
       && ! ((defined YYMALLOC || defined malloc) \
 
319
             && (defined YYFREE || defined free)))
183
320
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
184
 
#   define YYSIZE_T size_t
185
 
#  endif
186
 
#  define YYSTACK_ALLOC malloc
187
 
#  define YYSTACK_FREE free
 
321
#   ifndef _STDLIB_H
 
322
#    define _STDLIB_H 1
 
323
#   endif
 
324
#  endif
 
325
#  ifndef YYMALLOC
 
326
#   define YYMALLOC malloc
 
327
#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
 
328
     || defined __cplusplus || defined _MSC_VER)
 
329
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 
330
#   endif
 
331
#  endif
 
332
#  ifndef YYFREE
 
333
#   define YYFREE free
 
334
#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
 
335
     || defined __cplusplus || defined _MSC_VER)
 
336
void free (void *); /* INFRINGES ON USER NAME SPACE */
 
337
#   endif
 
338
#  endif
188
339
# endif
189
 
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
190
 
 
191
 
 
192
 
#if (! defined (yyoverflow) \
193
 
     && (! defined (__cplusplus) \
194
 
         || (YYSTYPE_IS_TRIVIAL)))
 
340
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
 
341
 
 
342
 
 
343
#if (! defined yyoverflow \
 
344
     && (! defined __cplusplus \
 
345
         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
195
346
 
196
347
/* A type that is properly aligned for any stack member.  */
197
348
union yyalloc
198
349
{
199
 
  short yyss;
200
 
  YYSTYPE yyvs;
201
 
  };
 
350
  yytype_int16 yyss_alloc;
 
351
  YYSTYPE yyvs_alloc;
 
352
};
202
353
 
203
354
/* The size of the maximum gap between one aligned stack and the next.  */
204
355
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
206
357
/* The size of an array large to enough to hold all stacks, each with
207
358
   N elements.  */
208
359
# define YYSTACK_BYTES(N) \
209
 
     ((N) * (sizeof (short) + sizeof (YYSTYPE))                         \
 
360
     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
210
361
      + YYSTACK_GAP_MAXIMUM)
211
362
 
212
363
/* Copy COUNT objects from FROM to TO.  The source and destination do
213
364
   not overlap.  */
214
365
# ifndef YYCOPY
215
 
#  if 1 < __GNUC__
 
366
#  if defined __GNUC__ && 1 < __GNUC__
216
367
#   define YYCOPY(To, From, Count) \
217
368
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
218
369
#  else
219
370
#   define YYCOPY(To, From, Count)              \
220
371
      do                                        \
221
372
        {                                       \
222
 
          register YYSIZE_T yyi;                \
 
373
          YYSIZE_T yyi;                         \
223
374
          for (yyi = 0; yyi < (Count); yyi++)   \
224
375
            (To)[yyi] = (From)[yyi];            \
225
376
        }                                       \
226
 
      while (0)
 
377
      while (YYID (0))
227
378
#  endif
228
379
# endif
229
380
 
232
383
   elements in the stack, and YYPTR gives the new location of the
233
384
   stack.  Advance YYPTR to a properly aligned location for the next
234
385
   stack.  */
235
 
# define YYSTACK_RELOCATE(Stack)                                        \
 
386
# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
236
387
    do                                                                  \
237
388
      {                                                                 \
238
389
        YYSIZE_T yynewbytes;                                            \
239
 
        YYCOPY (&yyptr->Stack, Stack, yysize);                          \
240
 
        Stack = &yyptr->Stack;                                          \
 
390
        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
 
391
        Stack = &yyptr->Stack_alloc;                                    \
241
392
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
242
393
        yyptr += yynewbytes / sizeof (*yyptr);                          \
243
394
      }                                                                 \
244
 
    while (0)
245
 
 
246
 
#endif
247
 
 
248
 
#if defined (__STDC__) || defined (__cplusplus)
249
 
   typedef signed char yysigned_char;
250
 
#else
251
 
   typedef short yysigned_char;
252
 
#endif
253
 
 
254
 
/* YYFINAL -- State number of the termination state. */
 
395
    while (YYID (0))
 
396
 
 
397
#endif
 
398
 
 
399
/* YYFINAL -- State number of the termination state.  */
255
400
#define YYFINAL  8
256
401
/* YYLAST -- Last index in YYTABLE.  */
257
402
#define YYLAST   12
258
403
 
259
 
/* YYNTOKENS -- Number of terminals. */
 
404
/* YYNTOKENS -- Number of terminals.  */
260
405
#define YYNTOKENS  7
261
 
/* YYNNTS -- Number of nonterminals. */
 
406
/* YYNNTS -- Number of nonterminals.  */
262
407
#define YYNNTS  4
263
 
/* YYNRULES -- Number of rules. */
 
408
/* YYNRULES -- Number of rules.  */
264
409
#define YYNRULES  9
265
 
/* YYNRULES -- Number of states. */
 
410
/* YYNRULES -- Number of states.  */
266
411
#define YYNSTATES  14
267
412
 
268
413
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
269
414
#define YYUNDEFTOK  2
270
415
#define YYMAXUTOK   261
271
416
 
272
 
#define YYTRANSLATE(YYX)                                                \
 
417
#define YYTRANSLATE(YYX)                                                \
273
418
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
274
419
 
275
420
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
276
 
static const unsigned char yytranslate[] =
 
421
static const yytype_uint8 yytranslate[] =
277
422
{
278
423
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
279
424
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
307
452
#if YYDEBUG
308
453
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
309
454
   YYRHS.  */
310
 
static const unsigned char yyprhs[] =
 
455
static const yytype_uint8 yyprhs[] =
311
456
{
312
457
       0,     0,     3,     7,    11,    14,    17,    19,    21,    24
313
458
};
314
459
 
315
 
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
316
 
static const yysigned_char yyrhs[] =
 
460
/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 
461
static const yytype_int8 yyrhs[] =
317
462
{
318
463
       8,     0,    -1,     9,     5,    10,    -1,     9,     4,     9,
319
464
      -1,     9,     4,    -1,     4,     9,    -1,     9,    -1,     3,
321
466
};
322
467
 
323
468
/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
324
 
static const unsigned char yyrline[] =
 
469
static const yytype_uint8 yyrline[] =
325
470
{
326
471
       0,    67,    67,    78,    95,   104,   113,   121,   130,   141
327
472
};
328
473
#endif
329
474
 
330
 
#if YYDEBUG || YYERROR_VERBOSE
331
 
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
332
 
   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
 
475
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
 
476
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
 
477
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
333
478
static const char *const yytname[] =
334
479
{
335
 
  "$end", "error", "$undefined", "SEGFLOAT", "RANGE", "PLUMIN", "EXTENSION", 
336
 
  "$accept", "range", "boundary", "deviation", 0
 
480
  "$end", "error", "$undefined", "SEGFLOAT", "RANGE", "PLUMIN",
 
481
  "EXTENSION", "$accept", "range", "boundary", "deviation", 0
337
482
};
338
483
#endif
339
484
 
340
485
# ifdef YYPRINT
341
486
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
342
487
   token YYLEX-NUM.  */
343
 
static const unsigned short yytoknum[] =
 
488
static const yytype_uint16 yytoknum[] =
344
489
{
345
490
       0,   256,   257,   258,   259,   260,   261
346
491
};
347
492
# endif
348
493
 
349
494
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
350
 
static const unsigned char yyr1[] =
 
495
static const yytype_uint8 yyr1[] =
351
496
{
352
497
       0,     7,     8,     8,     8,     8,     8,     9,     9,    10
353
498
};
354
499
 
355
500
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
356
 
static const unsigned char yyr2[] =
 
501
static const yytype_uint8 yyr2[] =
357
502
{
358
503
       0,     2,     3,     3,     2,     2,     1,     1,     2,     1
359
504
};
361
506
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
362
507
   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
363
508
   means the default is an error.  */
364
 
static const unsigned char yydefact[] =
 
509
static const yytype_uint8 yydefact[] =
365
510
{
366
511
       0,     7,     0,     0,     0,     6,     5,     8,     1,     4,
367
512
       0,     3,     9,     2
368
513
};
369
514
 
370
 
/* YYDEFGOTO[NTERM-NUM]. */
371
 
static const yysigned_char yydefgoto[] =
 
515
/* YYDEFGOTO[NTERM-NUM].  */
 
516
static const yytype_int8 yydefgoto[] =
372
517
{
373
518
      -1,     4,     5,    13
374
519
};
376
521
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
377
522
   STATE-NUM.  */
378
523
#define YYPACT_NINF -3
379
 
static const yysigned_char yypact[] =
 
524
static const yytype_int8 yypact[] =
380
525
{
381
526
      -1,    -3,     3,     1,     8,     6,    -3,    -3,    -3,     3,
382
527
       9,    -3,    -3,    -3
383
528
};
384
529
 
385
530
/* YYPGOTO[NTERM-NUM].  */
386
 
static const yysigned_char yypgoto[] =
 
531
static const yytype_int8 yypgoto[] =
387
532
{
388
533
      -3,    -3,    -2,    -3
389
534
};
393
538
   number is the opposite.  If zero, do what YYDEFACT says.
394
539
   If YYTABLE_NINF, syntax error.  */
395
540
#define YYTABLE_NINF -1
396
 
static const unsigned char yytable[] =
 
541
static const yytype_uint8 yytable[] =
397
542
{
398
543
       6,     0,     1,     2,     7,     3,     1,    11,     8,     3,
399
544
       9,    10,    12
400
545
};
401
546
 
402
 
static const yysigned_char yycheck[] =
 
547
static const yytype_int8 yycheck[] =
403
548
{
404
549
       2,    -1,     3,     4,     3,     6,     3,     9,     0,     6,
405
550
       4,     5,     3
407
552
 
408
553
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
409
554
   symbol of state STATE-NUM.  */
410
 
static const unsigned char yystos[] =
 
555
static const yytype_uint8 yystos[] =
411
556
{
412
557
       0,     3,     4,     6,     8,     9,     9,     3,     0,     4,
413
558
       5,     9,     3,    10
414
559
};
415
560
 
416
 
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
417
 
# define YYSIZE_T __SIZE_TYPE__
418
 
#endif
419
 
#if ! defined (YYSIZE_T) && defined (size_t)
420
 
# define YYSIZE_T size_t
421
 
#endif
422
 
#if ! defined (YYSIZE_T)
423
 
# if defined (__STDC__) || defined (__cplusplus)
424
 
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
425
 
#  define YYSIZE_T size_t
426
 
# endif
427
 
#endif
428
 
#if ! defined (YYSIZE_T)
429
 
# define YYSIZE_T unsigned int
430
 
#endif
431
 
 
432
561
#define yyerrok         (yyerrstatus = 0)
433
562
#define yyclearin       (yychar = YYEMPTY)
434
563
#define YYEMPTY         (-2)
436
565
 
437
566
#define YYACCEPT        goto yyacceptlab
438
567
#define YYABORT         goto yyabortlab
439
 
#define YYERROR         goto yyerrlab1
 
568
#define YYERROR         goto yyerrorlab
 
569
 
440
570
 
441
571
/* Like YYERROR except do call yyerror.  This remains here temporarily
442
572
   to ease the transition to the new meaning of YYERROR, for GCC.
453
583
      yychar = (Token);                                         \
454
584
      yylval = (Value);                                         \
455
585
      yytoken = YYTRANSLATE (yychar);                           \
456
 
      YYPOPSTACK;                                               \
 
586
      YYPOPSTACK (1);                                           \
457
587
      goto yybackup;                                            \
458
588
    }                                                           \
459
589
  else                                                          \
460
 
    {                                                           \
461
 
      yyerror ("syntax error: cannot back up");\
 
590
    {                                                           \
 
591
      yyerror (YY_("syntax error: cannot back up")); \
462
592
      YYERROR;                                                  \
463
593
    }                                                           \
464
 
while (0)
 
594
while (YYID (0))
 
595
 
465
596
 
466
597
#define YYTERROR        1
467
598
#define YYERRCODE       256
468
599
 
469
 
/* YYLLOC_DEFAULT -- Compute the default location (before the actions
470
 
   are run).  */
471
 
 
 
600
 
 
601
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
 
602
   If N is 0, then set CURRENT to the empty location which ends
 
603
   the previous symbol: RHS[0] (always defined).  */
 
604
 
 
605
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
472
606
#ifndef YYLLOC_DEFAULT
473
 
# define YYLLOC_DEFAULT(Current, Rhs, N)         \
474
 
  Current.first_line   = Rhs[1].first_line;      \
475
 
  Current.first_column = Rhs[1].first_column;    \
476
 
  Current.last_line    = Rhs[N].last_line;       \
477
 
  Current.last_column  = Rhs[N].last_column;
478
 
#endif
 
607
# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
 
608
    do                                                                  \
 
609
      if (YYID (N))                                                    \
 
610
        {                                                               \
 
611
          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
 
612
          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
 
613
          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
 
614
          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
 
615
        }                                                               \
 
616
      else                                                              \
 
617
        {                                                               \
 
618
          (Current).first_line   = (Current).last_line   =              \
 
619
            YYRHSLOC (Rhs, 0).last_line;                                \
 
620
          (Current).first_column = (Current).last_column =              \
 
621
            YYRHSLOC (Rhs, 0).last_column;                              \
 
622
        }                                                               \
 
623
    while (YYID (0))
 
624
#endif
 
625
 
 
626
 
 
627
/* YY_LOCATION_PRINT -- Print the location on the stream.
 
628
   This macro was not mandated originally: define only if we know
 
629
   we won't break user code: when these are the locations we know.  */
 
630
 
 
631
#ifndef YY_LOCATION_PRINT
 
632
# if YYLTYPE_IS_TRIVIAL
 
633
#  define YY_LOCATION_PRINT(File, Loc)                  \
 
634
     fprintf (File, "%d.%d-%d.%d",                      \
 
635
              (Loc).first_line, (Loc).first_column,     \
 
636
              (Loc).last_line,  (Loc).last_column)
 
637
# else
 
638
#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
 
639
# endif
 
640
#endif
 
641
 
479
642
 
480
643
/* YYLEX -- calling `yylex' with the right arguments.  */
481
644
 
497
660
do {                                            \
498
661
  if (yydebug)                                  \
499
662
    YYFPRINTF Args;                             \
500
 
} while (0)
501
 
 
502
 
# define YYDSYMPRINT(Args)                      \
503
 
do {                                            \
504
 
  if (yydebug)                                  \
505
 
    yysymprint Args;                            \
506
 
} while (0)
507
 
 
508
 
# define YYDSYMPRINTF(Title, Token, Value, Location)            \
509
 
do {                                                            \
510
 
  if (yydebug)                                                  \
511
 
    {                                                           \
512
 
      YYFPRINTF (stderr, "%s ", Title);                         \
513
 
      yysymprint (stderr,                                       \
514
 
                  Token, Value);        \
515
 
      YYFPRINTF (stderr, "\n");                                 \
516
 
    }                                                           \
517
 
} while (0)
 
663
} while (YYID (0))
 
664
 
 
665
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
 
666
do {                                                                      \
 
667
  if (yydebug)                                                            \
 
668
    {                                                                     \
 
669
      YYFPRINTF (stderr, "%s ", Title);                                   \
 
670
      yy_symbol_print (stderr,                                            \
 
671
                  Type, Value); \
 
672
      YYFPRINTF (stderr, "\n");                                           \
 
673
    }                                                                     \
 
674
} while (YYID (0))
 
675
 
 
676
 
 
677
/*--------------------------------.
 
678
| Print this symbol on YYOUTPUT.  |
 
679
`--------------------------------*/
 
680
 
 
681
/*ARGSUSED*/
 
682
#if (defined __STDC__ || defined __C99__FUNC__ \
 
683
     || defined __cplusplus || defined _MSC_VER)
 
684
static void
 
685
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
 
686
#else
 
687
static void
 
688
yy_symbol_value_print (yyoutput, yytype, yyvaluep)
 
689
    FILE *yyoutput;
 
690
    int yytype;
 
691
    YYSTYPE const * const yyvaluep;
 
692
#endif
 
693
{
 
694
  if (!yyvaluep)
 
695
    return;
 
696
# ifdef YYPRINT
 
697
  if (yytype < YYNTOKENS)
 
698
    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
 
699
# else
 
700
  YYUSE (yyoutput);
 
701
# endif
 
702
  switch (yytype)
 
703
    {
 
704
      default:
 
705
        break;
 
706
    }
 
707
}
 
708
 
 
709
 
 
710
/*--------------------------------.
 
711
| Print this symbol on YYOUTPUT.  |
 
712
`--------------------------------*/
 
713
 
 
714
#if (defined __STDC__ || defined __C99__FUNC__ \
 
715
     || defined __cplusplus || defined _MSC_VER)
 
716
static void
 
717
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
 
718
#else
 
719
static void
 
720
yy_symbol_print (yyoutput, yytype, yyvaluep)
 
721
    FILE *yyoutput;
 
722
    int yytype;
 
723
    YYSTYPE const * const yyvaluep;
 
724
#endif
 
725
{
 
726
  if (yytype < YYNTOKENS)
 
727
    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
 
728
  else
 
729
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
 
730
 
 
731
  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
 
732
  YYFPRINTF (yyoutput, ")");
 
733
}
518
734
 
519
735
/*------------------------------------------------------------------.
520
736
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
521
 
| TOP (cinluded).                                                   |
 
737
| TOP (included).                                                   |
522
738
`------------------------------------------------------------------*/
523
739
 
524
 
#if defined (__STDC__) || defined (__cplusplus)
 
740
#if (defined __STDC__ || defined __C99__FUNC__ \
 
741
     || defined __cplusplus || defined _MSC_VER)
525
742
static void
526
 
yy_stack_print (short *bottom, short *top)
 
743
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
527
744
#else
528
745
static void
529
 
yy_stack_print (bottom, top)
530
 
    short *bottom;
531
 
    short *top;
 
746
yy_stack_print (yybottom, yytop)
 
747
    yytype_int16 *yybottom;
 
748
    yytype_int16 *yytop;
532
749
#endif
533
750
{
534
751
  YYFPRINTF (stderr, "Stack now");
535
 
  for (/* Nothing. */; bottom <= top; ++bottom)
536
 
    YYFPRINTF (stderr, " %d", *bottom);
 
752
  for (; yybottom <= yytop; yybottom++)
 
753
    {
 
754
      int yybot = *yybottom;
 
755
      YYFPRINTF (stderr, " %d", yybot);
 
756
    }
537
757
  YYFPRINTF (stderr, "\n");
538
758
}
539
759
 
541
761
do {                                                            \
542
762
  if (yydebug)                                                  \
543
763
    yy_stack_print ((Bottom), (Top));                           \
544
 
} while (0)
 
764
} while (YYID (0))
545
765
 
546
766
 
547
767
/*------------------------------------------------.
548
768
| Report that the YYRULE is going to be reduced.  |
549
769
`------------------------------------------------*/
550
770
 
551
 
#if defined (__STDC__) || defined (__cplusplus)
 
771
#if (defined __STDC__ || defined __C99__FUNC__ \
 
772
     || defined __cplusplus || defined _MSC_VER)
552
773
static void
553
 
yy_reduce_print (int yyrule)
 
774
yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
554
775
#else
555
776
static void
556
 
yy_reduce_print (yyrule)
 
777
yy_reduce_print (yyvsp, yyrule)
 
778
    YYSTYPE *yyvsp;
557
779
    int yyrule;
558
780
#endif
559
781
{
 
782
  int yynrhs = yyr2[yyrule];
560
783
  int yyi;
561
 
  unsigned int yylineno = yyrline[yyrule];
562
 
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
563
 
             yyrule - 1, yylineno);
564
 
  /* Print the symbols being reduced, and their result.  */
565
 
  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
566
 
    YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
567
 
  YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
 
784
  unsigned long int yylno = yyrline[yyrule];
 
785
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
 
786
             yyrule - 1, yylno);
 
787
  /* The symbols being reduced.  */
 
788
  for (yyi = 0; yyi < yynrhs; yyi++)
 
789
    {
 
790
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
 
791
      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
 
792
                       &(yyvsp[(yyi + 1) - (yynrhs)])
 
793
                                       );
 
794
      YYFPRINTF (stderr, "\n");
 
795
    }
568
796
}
569
797
 
570
798
# define YY_REDUCE_PRINT(Rule)          \
571
799
do {                                    \
572
800
  if (yydebug)                          \
573
 
    yy_reduce_print (Rule);             \
574
 
} while (0)
 
801
    yy_reduce_print (yyvsp, Rule); \
 
802
} while (YYID (0))
575
803
 
576
804
/* Nonzero means print parse trace.  It is left uninitialized so that
577
805
   multiple parsers can coexist.  */
578
806
int yydebug;
579
807
#else /* !YYDEBUG */
580
808
# define YYDPRINTF(Args)
581
 
# define YYDSYMPRINT(Args)
582
 
# define YYDSYMPRINTF(Title, Token, Value, Location)
 
809
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
583
810
# define YY_STACK_PRINT(Bottom, Top)
584
811
# define YY_REDUCE_PRINT(Rule)
585
812
#endif /* !YYDEBUG */
594
821
   if the built-in stack extension method is used).
595
822
 
596
823
   Do not make this value too large; the results are undefined if
597
 
   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
 
824
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
598
825
   evaluated with infinite-precision integer arithmetic.  */
599
826
 
600
 
#if YYMAXDEPTH == 0
601
 
# undef YYMAXDEPTH
602
 
#endif
603
 
 
604
827
#ifndef YYMAXDEPTH
605
828
# define YYMAXDEPTH 10000
606
829
#endif
610
833
#if YYERROR_VERBOSE
611
834
 
612
835
# ifndef yystrlen
613
 
#  if defined (__GLIBC__) && defined (_STRING_H)
 
836
#  if defined __GLIBC__ && defined _STRING_H
614
837
#   define yystrlen strlen
615
838
#  else
616
839
/* Return the length of YYSTR.  */
 
840
#if (defined __STDC__ || defined __C99__FUNC__ \
 
841
     || defined __cplusplus || defined _MSC_VER)
617
842
static YYSIZE_T
618
 
#   if defined (__STDC__) || defined (__cplusplus)
619
843
yystrlen (const char *yystr)
620
 
#   else
 
844
#else
 
845
static YYSIZE_T
621
846
yystrlen (yystr)
622
 
     const char *yystr;
623
 
#   endif
 
847
    const char *yystr;
 
848
#endif
624
849
{
625
 
  register const char *yys = yystr;
626
 
 
627
 
  while (*yys++ != '\0')
 
850
  YYSIZE_T yylen;
 
851
  for (yylen = 0; yystr[yylen]; yylen++)
628
852
    continue;
629
 
 
630
 
  return yys - yystr - 1;
 
853
  return yylen;
631
854
}
632
855
#  endif
633
856
# endif
634
857
 
635
858
# ifndef yystpcpy
636
 
#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
 
859
#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
637
860
#   define yystpcpy stpcpy
638
861
#  else
639
862
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
640
863
   YYDEST.  */
 
864
#if (defined __STDC__ || defined __C99__FUNC__ \
 
865
     || defined __cplusplus || defined _MSC_VER)
641
866
static char *
642
 
#   if defined (__STDC__) || defined (__cplusplus)
643
867
yystpcpy (char *yydest, const char *yysrc)
644
 
#   else
 
868
#else
 
869
static char *
645
870
yystpcpy (yydest, yysrc)
646
 
     char *yydest;
647
 
     const char *yysrc;
648
 
#   endif
 
871
    char *yydest;
 
872
    const char *yysrc;
 
873
#endif
649
874
{
650
 
  register char *yyd = yydest;
651
 
  register const char *yys = yysrc;
 
875
  char *yyd = yydest;
 
876
  const char *yys = yysrc;
652
877
 
653
878
  while ((*yyd++ = *yys++) != '\0')
654
879
    continue;
658
883
#  endif
659
884
# endif
660
885
 
661
 
#endif /* !YYERROR_VERBOSE */
662
 
 
 
886
# ifndef yytnamerr
 
887
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
 
888
   quotes and backslashes, so that it's suitable for yyerror.  The
 
889
   heuristic is that double-quoting is unnecessary unless the string
 
890
   contains an apostrophe, a comma, or backslash (other than
 
891
   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
 
892
   null, do not copy; instead, return the length of what the result
 
893
   would have been.  */
 
894
static YYSIZE_T
 
895
yytnamerr (char *yyres, const char *yystr)
 
896
{
 
897
  if (*yystr == '"')
 
898
    {
 
899
      YYSIZE_T yyn = 0;
 
900
      char const *yyp = yystr;
 
901
 
 
902
      for (;;)
 
903
        switch (*++yyp)
 
904
          {
 
905
          case '\'':
 
906
          case ',':
 
907
            goto do_not_strip_quotes;
 
908
 
 
909
          case '\\':
 
910
            if (*++yyp != '\\')
 
911
              goto do_not_strip_quotes;
 
912
            /* Fall through.  */
 
913
          default:
 
914
            if (yyres)
 
915
              yyres[yyn] = *yyp;
 
916
            yyn++;
 
917
            break;
 
918
 
 
919
          case '"':
 
920
            if (yyres)
 
921
              yyres[yyn] = '\0';
 
922
            return yyn;
 
923
          }
 
924
    do_not_strip_quotes: ;
 
925
    }
 
926
 
 
927
  if (! yyres)
 
928
    return yystrlen (yystr);
 
929
 
 
930
  return yystpcpy (yyres, yystr) - yyres;
 
931
}
 
932
# endif
 
933
 
 
934
/* Copy into YYRESULT an error message about the unexpected token
 
935
   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
 
936
   including the terminating null byte.  If YYRESULT is null, do not
 
937
   copy anything; just return the number of bytes that would be
 
938
   copied.  As a special case, return 0 if an ordinary "syntax error"
 
939
   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
 
940
   size calculation.  */
 
941
static YYSIZE_T
 
942
yysyntax_error (char *yyresult, int yystate, int yychar)
 
943
{
 
944
  int yyn = yypact[yystate];
 
945
 
 
946
  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
 
947
    return 0;
 
948
  else
 
949
    {
 
950
      int yytype = YYTRANSLATE (yychar);
 
951
      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
 
952
      YYSIZE_T yysize = yysize0;
 
953
      YYSIZE_T yysize1;
 
954
      int yysize_overflow = 0;
 
955
      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
 
956
      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
 
957
      int yyx;
 
958
 
 
959
# if 0
 
960
      /* This is so xgettext sees the translatable formats that are
 
961
         constructed on the fly.  */
 
962
      YY_("syntax error, unexpected %s");
 
963
      YY_("syntax error, unexpected %s, expecting %s");
 
964
      YY_("syntax error, unexpected %s, expecting %s or %s");
 
965
      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
 
966
      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
 
967
# endif
 
968
      char *yyfmt;
 
969
      char const *yyf;
 
970
      static char const yyunexpected[] = "syntax error, unexpected %s";
 
971
      static char const yyexpecting[] = ", expecting %s";
 
972
      static char const yyor[] = " or %s";
 
973
      char yyformat[sizeof yyunexpected
 
974
                    + sizeof yyexpecting - 1
 
975
                    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
 
976
                       * (sizeof yyor - 1))];
 
977
      char const *yyprefix = yyexpecting;
 
978
 
 
979
      /* Start YYX at -YYN if negative to avoid negative indexes in
 
980
         YYCHECK.  */
 
981
      int yyxbegin = yyn < 0 ? -yyn : 0;
 
982
 
 
983
      /* Stay within bounds of both yycheck and yytname.  */
 
984
      int yychecklim = YYLAST - yyn + 1;
 
985
      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
 
986
      int yycount = 1;
 
987
 
 
988
      yyarg[0] = yytname[yytype];
 
989
      yyfmt = yystpcpy (yyformat, yyunexpected);
 
990
 
 
991
      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
 
992
        if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
 
993
          {
 
994
            if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
 
995
              {
 
996
                yycount = 1;
 
997
                yysize = yysize0;
 
998
                yyformat[sizeof yyunexpected - 1] = '\0';
 
999
                break;
 
1000
              }
 
1001
            yyarg[yycount++] = yytname[yyx];
 
1002
            yysize1 = yysize + yytnamerr (0, yytname[yyx]);
 
1003
            yysize_overflow |= (yysize1 < yysize);
 
1004
            yysize = yysize1;
 
1005
            yyfmt = yystpcpy (yyfmt, yyprefix);
 
1006
            yyprefix = yyor;
 
1007
          }
 
1008
 
 
1009
      yyf = YY_(yyformat);
 
1010
      yysize1 = yysize + yystrlen (yyf);
 
1011
      yysize_overflow |= (yysize1 < yysize);
 
1012
      yysize = yysize1;
 
1013
 
 
1014
      if (yysize_overflow)
 
1015
        return YYSIZE_MAXIMUM;
 
1016
 
 
1017
      if (yyresult)
 
1018
        {
 
1019
          /* Avoid sprintf, as that infringes on the user's name space.
 
1020
             Don't have undefined behavior even if the translation
 
1021
             produced a string with the wrong number of "%s"s.  */
 
1022
          char *yyp = yyresult;
 
1023
          int yyi = 0;
 
1024
          while ((*yyp = *yyf) != '\0')
 
1025
            {
 
1026
              if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
 
1027
                {
 
1028
                  yyp += yytnamerr (yyp, yyarg[yyi++]);
 
1029
                  yyf += 2;
 
1030
                }
 
1031
              else
 
1032
                {
 
1033
                  yyp++;
 
1034
                  yyf++;
 
1035
                }
 
1036
            }
 
1037
        }
 
1038
      return yysize;
 
1039
    }
 
1040
}
 
1041
#endif /* YYERROR_VERBOSE */
663
1042
 
664
1043
 
665
 
#if YYDEBUG
666
 
/*--------------------------------.
667
 
| Print this symbol on YYOUTPUT.  |
668
 
`--------------------------------*/
669
 
 
670
 
#if defined (__STDC__) || defined (__cplusplus)
671
 
static void
672
 
yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
673
 
#else
674
 
static void
675
 
yysymprint (yyoutput, yytype, yyvaluep)
676
 
    FILE *yyoutput;
677
 
    int yytype;
678
 
    YYSTYPE *yyvaluep;
679
 
#endif
680
 
{
681
 
  /* Pacify ``unused variable'' warnings.  */
682
 
  (void) yyvaluep;
683
 
 
684
 
  if (yytype < YYNTOKENS)
685
 
    {
686
 
      YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
687
 
# ifdef YYPRINT
688
 
      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
689
 
# endif
690
 
    }
691
 
  else
692
 
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
693
 
 
694
 
  switch (yytype)
695
 
    {
696
 
      default:
697
 
        break;
698
 
    }
699
 
  YYFPRINTF (yyoutput, ")");
700
 
}
701
 
 
702
 
#endif /* ! YYDEBUG */
703
1044
/*-----------------------------------------------.
704
1045
| Release the memory associated to this symbol.  |
705
1046
`-----------------------------------------------*/
706
1047
 
707
 
#if defined (__STDC__) || defined (__cplusplus)
 
1048
/*ARGSUSED*/
 
1049
#if (defined __STDC__ || defined __C99__FUNC__ \
 
1050
     || defined __cplusplus || defined _MSC_VER)
708
1051
static void
709
 
yydestruct (int yytype, YYSTYPE *yyvaluep)
 
1052
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
710
1053
#else
711
1054
static void
712
 
yydestruct (yytype, yyvaluep)
 
1055
yydestruct (yymsg, yytype, yyvaluep)
 
1056
    const char *yymsg;
713
1057
    int yytype;
714
1058
    YYSTYPE *yyvaluep;
715
1059
#endif
716
1060
{
717
 
  /* Pacify ``unused variable'' warnings.  */
718
 
  (void) yyvaluep;
 
1061
  YYUSE (yyvaluep);
 
1062
 
 
1063
  if (!yymsg)
 
1064
    yymsg = "Deleting";
 
1065
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
719
1066
 
720
1067
  switch (yytype)
721
1068
    {
722
1069
 
723
1070
      default:
724
 
        break;
 
1071
        break;
725
1072
    }
726
1073
}
727
 
 
728
1074
 
729
1075
/* Prevent warnings from -Wmissing-prototypes.  */
730
 
 
731
1076
#ifdef YYPARSE_PARAM
732
 
# if defined (__STDC__) || defined (__cplusplus)
 
1077
#if defined __STDC__ || defined __cplusplus
733
1078
int yyparse (void *YYPARSE_PARAM);
734
 
# else
 
1079
#else
735
1080
int yyparse ();
736
 
# endif
 
1081
#endif
737
1082
#else /* ! YYPARSE_PARAM */
738
 
#if defined (__STDC__) || defined (__cplusplus)
 
1083
#if defined __STDC__ || defined __cplusplus
739
1084
int yyparse (void);
740
1085
#else
741
1086
int yyparse ();
743
1088
#endif /* ! YYPARSE_PARAM */
744
1089
 
745
1090
 
746
 
 
747
1091
/* The lookahead symbol.  */
748
1092
int yychar;
749
1093
 
755
1099
 
756
1100
 
757
1101
 
758
 
/*----------.
759
 
| yyparse.  |
760
 
`----------*/
 
1102
/*-------------------------.
 
1103
| yyparse or yypush_parse.  |
 
1104
`-------------------------*/
761
1105
 
762
1106
#ifdef YYPARSE_PARAM
763
 
# if defined (__STDC__) || defined (__cplusplus)
764
 
int yyparse (void *YYPARSE_PARAM)
765
 
# else
766
 
int yyparse (YYPARSE_PARAM)
767
 
  void *YYPARSE_PARAM;
768
 
# endif
 
1107
#if (defined __STDC__ || defined __C99__FUNC__ \
 
1108
     || defined __cplusplus || defined _MSC_VER)
 
1109
int
 
1110
yyparse (void *YYPARSE_PARAM)
 
1111
#else
 
1112
int
 
1113
yyparse (YYPARSE_PARAM)
 
1114
    void *YYPARSE_PARAM;
 
1115
#endif
769
1116
#else /* ! YYPARSE_PARAM */
770
 
#if defined (__STDC__) || defined (__cplusplus)
 
1117
#if (defined __STDC__ || defined __C99__FUNC__ \
 
1118
     || defined __cplusplus || defined _MSC_VER)
771
1119
int
772
1120
yyparse (void)
773
1121
#else
777
1125
#endif
778
1126
#endif
779
1127
{
780
 
  
781
 
  register int yystate;
782
 
  register int yyn;
 
1128
 
 
1129
 
 
1130
    int yystate;
 
1131
    /* Number of tokens to shift before error messages enabled.  */
 
1132
    int yyerrstatus;
 
1133
 
 
1134
    /* The stacks and their tools:
 
1135
       `yyss': related to states.
 
1136
       `yyvs': related to semantic values.
 
1137
 
 
1138
       Refer to the stacks thru separate pointers, to allow yyoverflow
 
1139
       to reallocate them elsewhere.  */
 
1140
 
 
1141
    /* The state stack.  */
 
1142
    yytype_int16 yyssa[YYINITDEPTH];
 
1143
    yytype_int16 *yyss;
 
1144
    yytype_int16 *yyssp;
 
1145
 
 
1146
    /* The semantic value stack.  */
 
1147
    YYSTYPE yyvsa[YYINITDEPTH];
 
1148
    YYSTYPE *yyvs;
 
1149
    YYSTYPE *yyvsp;
 
1150
 
 
1151
    YYSIZE_T yystacksize;
 
1152
 
 
1153
  int yyn;
783
1154
  int yyresult;
784
 
  /* Number of tokens to shift before error messages enabled.  */
785
 
  int yyerrstatus;
786
1155
  /* Lookahead token as an internal (translated) token number.  */
787
 
  int yytoken = 0;
788
 
 
789
 
  /* Three stacks and their tools:
790
 
     `yyss': related to states,
791
 
     `yyvs': related to semantic values,
792
 
     `yyls': related to locations.
793
 
 
794
 
     Refer to the stacks thru separate pointers, to allow yyoverflow
795
 
     to reallocate them elsewhere.  */
796
 
 
797
 
  /* The state stack.  */
798
 
  short yyssa[YYINITDEPTH];
799
 
  short *yyss = yyssa;
800
 
  register short *yyssp;
801
 
 
802
 
  /* The semantic value stack.  */
803
 
  YYSTYPE yyvsa[YYINITDEPTH];
804
 
  YYSTYPE *yyvs = yyvsa;
805
 
  register YYSTYPE *yyvsp;
806
 
 
807
 
 
808
 
 
809
 
#define YYPOPSTACK   (yyvsp--, yyssp--)
810
 
 
811
 
  YYSIZE_T yystacksize = YYINITDEPTH;
812
 
 
 
1156
  int yytoken;
813
1157
  /* The variables used to return semantic value and location from the
814
1158
     action routines.  */
815
1159
  YYSTYPE yyval;
816
1160
 
817
 
 
818
 
  /* When reducing, the number of symbols on the RHS of the reduced
819
 
     rule.  */
820
 
  int yylen;
 
1161
#if YYERROR_VERBOSE
 
1162
  /* Buffer for error messages, and its allocated size.  */
 
1163
  char yymsgbuf[128];
 
1164
  char *yymsg = yymsgbuf;
 
1165
  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
 
1166
#endif
 
1167
 
 
1168
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 
1169
 
 
1170
  /* The number of symbols on the RHS of the reduced rule.
 
1171
     Keep to zero when no symbol should be popped.  */
 
1172
  int yylen = 0;
 
1173
 
 
1174
  yytoken = 0;
 
1175
  yyss = yyssa;
 
1176
  yyvs = yyvsa;
 
1177
  yystacksize = YYINITDEPTH;
821
1178
 
822
1179
  YYDPRINTF ((stderr, "Starting parse\n"));
823
1180
 
824
1181
  yystate = 0;
825
1182
  yyerrstatus = 0;
826
1183
  yynerrs = 0;
827
 
  yychar = YYEMPTY;             /* Cause a token to be read.  */
 
1184
  yychar = YYEMPTY; /* Cause a token to be read.  */
828
1185
 
829
1186
  /* Initialize stack pointers.
830
1187
     Waste one element of value and location stack
831
1188
     so that they stay on the same level as the state stack.
832
1189
     The wasted elements are never initialized.  */
833
 
 
834
1190
  yyssp = yyss;
835
1191
  yyvsp = yyvs;
836
1192
 
841
1197
`------------------------------------------------------------*/
842
1198
 yynewstate:
843
1199
  /* In all cases, when you get here, the value and location stacks
844
 
     have just been pushed. so pushing a state here evens the stacks.
845
 
     */
 
1200
     have just been pushed.  So pushing a state here evens the stacks.  */
846
1201
  yyssp++;
847
1202
 
848
1203
 yysetstate:
855
1210
 
856
1211
#ifdef yyoverflow
857
1212
      {
858
 
        /* Give user a chance to reallocate the stack. Use copies of
 
1213
        /* Give user a chance to reallocate the stack.  Use copies of
859
1214
           these so that the &'s don't force the real ones into
860
1215
           memory.  */
861
1216
        YYSTYPE *yyvs1 = yyvs;
862
 
        short *yyss1 = yyss;
863
 
 
 
1217
        yytype_int16 *yyss1 = yyss;
864
1218
 
865
1219
        /* Each stack pointer address is followed by the size of the
866
1220
           data in use in that stack, in bytes.  This used to be a
867
1221
           conditional around just the two extra args, but that might
868
1222
           be undefined if yyoverflow is a macro.  */
869
 
        yyoverflow ("parser stack overflow",
 
1223
        yyoverflow (YY_("memory exhausted"),
870
1224
                    &yyss1, yysize * sizeof (*yyssp),
871
1225
                    &yyvs1, yysize * sizeof (*yyvsp),
872
 
 
873
1226
                    &yystacksize);
874
1227
 
875
1228
        yyss = yyss1;
877
1230
      }
878
1231
#else /* no yyoverflow */
879
1232
# ifndef YYSTACK_RELOCATE
880
 
      goto yyoverflowlab;
 
1233
      goto yyexhaustedlab;
881
1234
# else
882
1235
      /* Extend the stack our own way.  */
883
1236
      if (YYMAXDEPTH <= yystacksize)
884
 
        goto yyoverflowlab;
 
1237
        goto yyexhaustedlab;
885
1238
      yystacksize *= 2;
886
1239
      if (YYMAXDEPTH < yystacksize)
887
1240
        yystacksize = YYMAXDEPTH;
888
1241
 
889
1242
      {
890
 
        short *yyss1 = yyss;
 
1243
        yytype_int16 *yyss1 = yyss;
891
1244
        union yyalloc *yyptr =
892
1245
          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
893
1246
        if (! yyptr)
894
 
          goto yyoverflowlab;
895
 
        YYSTACK_RELOCATE (yyss);
896
 
        YYSTACK_RELOCATE (yyvs);
897
 
 
 
1247
          goto yyexhaustedlab;
 
1248
        YYSTACK_RELOCATE (yyss_alloc, yyss);
 
1249
        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
898
1250
#  undef YYSTACK_RELOCATE
899
1251
        if (yyss1 != yyssa)
900
1252
          YYSTACK_FREE (yyss1);
905
1257
      yyssp = yyss + yysize - 1;
906
1258
      yyvsp = yyvs + yysize - 1;
907
1259
 
908
 
 
909
1260
      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
910
1261
                  (unsigned long int) yystacksize));
911
1262
 
915
1266
 
916
1267
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
917
1268
 
 
1269
  if (yystate == YYFINAL)
 
1270
    YYACCEPT;
 
1271
 
918
1272
  goto yybackup;
919
1273
 
920
1274
/*-----------.
922
1276
`-----------*/
923
1277
yybackup:
924
1278
 
925
 
/* Do appropriate processing given the current state.  */
926
 
/* Read a lookahead token if we need one and don't already have one.  */
927
 
/* yyresume: */
 
1279
  /* Do appropriate processing given the current state.  Read a
 
1280
     lookahead token if we need one and don't already have one.  */
928
1281
 
929
1282
  /* First try to decide what to do without reference to lookahead token.  */
930
 
 
931
1283
  yyn = yypact[yystate];
932
1284
  if (yyn == YYPACT_NINF)
933
1285
    goto yydefault;
949
1301
  else
950
1302
    {
951
1303
      yytoken = YYTRANSLATE (yychar);
952
 
      YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
 
1304
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
953
1305
    }
954
1306
 
955
1307
  /* If the proper action on seeing token YYTOKEN is to reduce or to
966
1318
      goto yyreduce;
967
1319
    }
968
1320
 
969
 
  if (yyn == YYFINAL)
970
 
    YYACCEPT;
971
 
 
972
 
  /* Shift the lookahead token.  */
973
 
  YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
974
 
 
975
 
  /* Discard the token being shifted unless it is eof.  */
976
 
  if (yychar != YYEOF)
977
 
    yychar = YYEMPTY;
978
 
 
979
 
  *++yyvsp = yylval;
980
 
 
981
 
 
982
1321
  /* Count tokens shifted since error; after three, turn off error
983
1322
     status.  */
984
1323
  if (yyerrstatus)
985
1324
    yyerrstatus--;
986
1325
 
 
1326
  /* Shift the lookahead token.  */
 
1327
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
 
1328
 
 
1329
  /* Discard the shifted token.  */
 
1330
  yychar = YYEMPTY;
 
1331
 
987
1332
  yystate = yyn;
 
1333
  *++yyvsp = yylval;
 
1334
 
988
1335
  goto yynewstate;
989
1336
 
990
1337
 
1020
1367
  switch (yyn)
1021
1368
    {
1022
1369
        case 2:
 
1370
 
 
1371
/* Line 1455 of yacc.c  */
1023
1372
#line 67 "segparse.y"
1024
1373
    {
1025
 
            ((SEG *)result)->lower = yyvsp[-2].bnd.val - yyvsp[0].bnd.val;
1026
 
            ((SEG *)result)->upper = yyvsp[-2].bnd.val + yyvsp[0].bnd.val;
 
1374
            ((SEG *)result)->lower = (yyvsp[(1) - (3)].bnd).val - (yyvsp[(3) - (3)].bnd).val;
 
1375
            ((SEG *)result)->upper = (yyvsp[(1) - (3)].bnd).val + (yyvsp[(3) - (3)].bnd).val;
1027
1376
            sprintf(strbuf, "%g", ((SEG *)result)->lower);
1028
 
            ((SEG *)result)->l_sigd = Max(Min(6, significant_digits(strbuf)), Max(yyvsp[-2].bnd.sigd, yyvsp[0].bnd.sigd));
 
1377
            ((SEG *)result)->l_sigd = Max(Min(6, significant_digits(strbuf)), Max((yyvsp[(1) - (3)].bnd).sigd, (yyvsp[(3) - (3)].bnd).sigd));
1029
1378
            sprintf(strbuf, "%g", ((SEG *)result)->upper);
1030
 
            ((SEG *)result)->u_sigd = Max(Min(6, significant_digits(strbuf)), Max(yyvsp[-2].bnd.sigd, yyvsp[0].bnd.sigd));
 
1379
            ((SEG *)result)->u_sigd = Max(Min(6, significant_digits(strbuf)), Max((yyvsp[(1) - (3)].bnd).sigd, (yyvsp[(3) - (3)].bnd).sigd));
1031
1380
            ((SEG *)result)->l_ext = '\0';
1032
1381
            ((SEG *)result)->u_ext = '\0';
1033
1382
          ;}
1034
1383
    break;
1035
1384
 
1036
1385
  case 3:
 
1386
 
 
1387
/* Line 1455 of yacc.c  */
1037
1388
#line 78 "segparse.y"
1038
1389
    {
1039
 
            ((SEG *)result)->lower = yyvsp[-2].bnd.val;
1040
 
            ((SEG *)result)->upper = yyvsp[0].bnd.val;
 
1390
            ((SEG *)result)->lower = (yyvsp[(1) - (3)].bnd).val;
 
1391
            ((SEG *)result)->upper = (yyvsp[(3) - (3)].bnd).val;
1041
1392
            if ( ((SEG *)result)->lower > ((SEG *)result)->upper ) {
1042
1393
              ereport(ERROR,
1043
1394
                                  (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1046
1397
 
1047
1398
              YYERROR;
1048
1399
            }
1049
 
            ((SEG *)result)->l_sigd = yyvsp[-2].bnd.sigd;
1050
 
            ((SEG *)result)->u_sigd = yyvsp[0].bnd.sigd;
1051
 
            ((SEG *)result)->l_ext = ( yyvsp[-2].bnd.ext ? yyvsp[-2].bnd.ext : '\0' );
1052
 
            ((SEG *)result)->u_ext = ( yyvsp[0].bnd.ext ? yyvsp[0].bnd.ext : '\0' );
 
1400
            ((SEG *)result)->l_sigd = (yyvsp[(1) - (3)].bnd).sigd;
 
1401
            ((SEG *)result)->u_sigd = (yyvsp[(3) - (3)].bnd).sigd;
 
1402
            ((SEG *)result)->l_ext = ( (yyvsp[(1) - (3)].bnd).ext ? (yyvsp[(1) - (3)].bnd).ext : '\0' );
 
1403
            ((SEG *)result)->u_ext = ( (yyvsp[(3) - (3)].bnd).ext ? (yyvsp[(3) - (3)].bnd).ext : '\0' );
1053
1404
          ;}
1054
1405
    break;
1055
1406
 
1056
1407
  case 4:
 
1408
 
 
1409
/* Line 1455 of yacc.c  */
1057
1410
#line 95 "segparse.y"
1058
1411
    {
1059
 
            ((SEG *)result)->lower = yyvsp[-1].bnd.val;
 
1412
            ((SEG *)result)->lower = (yyvsp[(1) - (2)].bnd).val;
1060
1413
            ((SEG *)result)->upper = HUGE_VAL;
1061
 
            ((SEG *)result)->l_sigd = yyvsp[-1].bnd.sigd;
 
1414
            ((SEG *)result)->l_sigd = (yyvsp[(1) - (2)].bnd).sigd;
1062
1415
            ((SEG *)result)->u_sigd = 0;
1063
 
            ((SEG *)result)->l_ext = ( yyvsp[-1].bnd.ext ? yyvsp[-1].bnd.ext : '\0' );
 
1416
            ((SEG *)result)->l_ext = ( (yyvsp[(1) - (2)].bnd).ext ? (yyvsp[(1) - (2)].bnd).ext : '\0' );
1064
1417
            ((SEG *)result)->u_ext = '-';
1065
1418
          ;}
1066
1419
    break;
1067
1420
 
1068
1421
  case 5:
 
1422
 
 
1423
/* Line 1455 of yacc.c  */
1069
1424
#line 104 "segparse.y"
1070
1425
    {
1071
1426
            ((SEG *)result)->lower = -HUGE_VAL;
1072
 
            ((SEG *)result)->upper = yyvsp[0].bnd.val;
 
1427
            ((SEG *)result)->upper = (yyvsp[(2) - (2)].bnd).val;
1073
1428
            ((SEG *)result)->l_sigd = 0;
1074
 
            ((SEG *)result)->u_sigd = yyvsp[0].bnd.sigd;
 
1429
            ((SEG *)result)->u_sigd = (yyvsp[(2) - (2)].bnd).sigd;
1075
1430
            ((SEG *)result)->l_ext = '-';
1076
 
            ((SEG *)result)->u_ext = ( yyvsp[0].bnd.ext ? yyvsp[0].bnd.ext : '\0' );
 
1431
            ((SEG *)result)->u_ext = ( (yyvsp[(2) - (2)].bnd).ext ? (yyvsp[(2) - (2)].bnd).ext : '\0' );
1077
1432
          ;}
1078
1433
    break;
1079
1434
 
1080
1435
  case 6:
 
1436
 
 
1437
/* Line 1455 of yacc.c  */
1081
1438
#line 113 "segparse.y"
1082
1439
    {
1083
 
            ((SEG *)result)->lower = ((SEG *)result)->upper = yyvsp[0].bnd.val;
1084
 
            ((SEG *)result)->l_sigd = ((SEG *)result)->u_sigd = yyvsp[0].bnd.sigd;
1085
 
            ((SEG *)result)->l_ext = ((SEG *)result)->u_ext = ( yyvsp[0].bnd.ext ? yyvsp[0].bnd.ext : '\0' );
 
1440
            ((SEG *)result)->lower = ((SEG *)result)->upper = (yyvsp[(1) - (1)].bnd).val;
 
1441
            ((SEG *)result)->l_sigd = ((SEG *)result)->u_sigd = (yyvsp[(1) - (1)].bnd).sigd;
 
1442
            ((SEG *)result)->l_ext = ((SEG *)result)->u_ext = ( (yyvsp[(1) - (1)].bnd).ext ? (yyvsp[(1) - (1)].bnd).ext : '\0' );
1086
1443
          ;}
1087
1444
    break;
1088
1445
 
1089
1446
  case 7:
 
1447
 
 
1448
/* Line 1455 of yacc.c  */
1090
1449
#line 121 "segparse.y"
1091
1450
    {
1092
1451
                        /* temp variable avoids a gcc 3.3.x bug on Sparc64 */
1093
 
                        float val = seg_atof(yyvsp[0].text);
 
1452
                        float val = seg_atof((yyvsp[(1) - (1)].text));
1094
1453
 
1095
 
                        yyval.bnd.ext = '\0';
1096
 
                        yyval.bnd.sigd = significant_digits(yyvsp[0].text);
1097
 
                        yyval.bnd.val = val;
 
1454
                        (yyval.bnd).ext = '\0';
 
1455
                        (yyval.bnd).sigd = significant_digits((yyvsp[(1) - (1)].text));
 
1456
                        (yyval.bnd).val = val;
1098
1457
          ;}
1099
1458
    break;
1100
1459
 
1101
1460
  case 8:
 
1461
 
 
1462
/* Line 1455 of yacc.c  */
1102
1463
#line 130 "segparse.y"
1103
1464
    {
1104
1465
                        /* temp variable avoids a gcc 3.3.x bug on Sparc64 */
1105
 
                        float val = seg_atof(yyvsp[0].text);
 
1466
                        float val = seg_atof((yyvsp[(2) - (2)].text));
1106
1467
 
1107
 
                        yyval.bnd.ext = yyvsp[-1].text[0];
1108
 
                        yyval.bnd.sigd = significant_digits(yyvsp[0].text);
1109
 
                        yyval.bnd.val = val;
 
1468
                        (yyval.bnd).ext = (yyvsp[(1) - (2)].text)[0];
 
1469
                        (yyval.bnd).sigd = significant_digits((yyvsp[(2) - (2)].text));
 
1470
                        (yyval.bnd).val = val;
1110
1471
          ;}
1111
1472
    break;
1112
1473
 
1113
1474
  case 9:
 
1475
 
 
1476
/* Line 1455 of yacc.c  */
1114
1477
#line 141 "segparse.y"
1115
1478
    {
1116
1479
                        /* temp variable avoids a gcc 3.3.x bug on Sparc64 */
1117
 
                        float val = seg_atof(yyvsp[0].text);
 
1480
                        float val = seg_atof((yyvsp[(1) - (1)].text));
1118
1481
 
1119
 
                        yyval.bnd.ext = '\0';
1120
 
                        yyval.bnd.sigd = significant_digits(yyvsp[0].text);
1121
 
                        yyval.bnd.val = val;
 
1482
                        (yyval.bnd).ext = '\0';
 
1483
                        (yyval.bnd).sigd = significant_digits((yyvsp[(1) - (1)].text));
 
1484
                        (yyval.bnd).val = val;
1122
1485
          ;}
1123
1486
    break;
1124
1487
 
1125
1488
 
 
1489
 
 
1490
/* Line 1455 of yacc.c  */
 
1491
#line 1492 "segparse.c"
 
1492
      default: break;
1126
1493
    }
1127
 
 
1128
 
/* Line 991 of yacc.c.  */
1129
 
#line 1129 "segparse.c"
1130
 
 
1131
 
  yyvsp -= yylen;
1132
 
  yyssp -= yylen;
1133
 
 
1134
 
 
 
1494
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
 
1495
 
 
1496
  YYPOPSTACK (yylen);
 
1497
  yylen = 0;
1135
1498
  YY_STACK_PRINT (yyss, yyssp);
1136
1499
 
1137
1500
  *++yyvsp = yyval;
1138
1501
 
1139
 
 
1140
1502
  /* Now `shift' the result of the reduction.  Determine what state
1141
1503
     that goes to, based on the state we popped back to and the rule
1142
1504
     number reduced by.  */
1160
1522
  if (!yyerrstatus)
1161
1523
    {
1162
1524
      ++yynerrs;
1163
 
#if YYERROR_VERBOSE
1164
 
      yyn = yypact[yystate];
1165
 
 
1166
 
      if (YYPACT_NINF < yyn && yyn < YYLAST)
1167
 
        {
1168
 
          YYSIZE_T yysize = 0;
1169
 
          int yytype = YYTRANSLATE (yychar);
1170
 
          char *yymsg;
1171
 
          int yyx, yycount;
1172
 
 
1173
 
          yycount = 0;
1174
 
          /* Start YYX at -YYN if negative to avoid negative indexes in
1175
 
             YYCHECK.  */
1176
 
          for (yyx = yyn < 0 ? -yyn : 0;
1177
 
               yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1178
 
            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1179
 
              yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1180
 
          yysize += yystrlen ("syntax error, unexpected ") + 1;
1181
 
          yysize += yystrlen (yytname[yytype]);
1182
 
          yymsg = (char *) YYSTACK_ALLOC (yysize);
1183
 
          if (yymsg != 0)
1184
 
            {
1185
 
              char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
1186
 
              yyp = yystpcpy (yyp, yytname[yytype]);
1187
 
 
1188
 
              if (yycount < 5)
1189
 
                {
1190
 
                  yycount = 0;
1191
 
                  for (yyx = yyn < 0 ? -yyn : 0;
1192
 
                       yyx < (int) (sizeof (yytname) / sizeof (char *));
1193
 
                       yyx++)
1194
 
                    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1195
 
                      {
1196
 
                        const char *yyq = ! yycount ? ", expecting " : " or ";
1197
 
                        yyp = yystpcpy (yyp, yyq);
1198
 
                        yyp = yystpcpy (yyp, yytname[yyx]);
1199
 
                        yycount++;
1200
 
                      }
1201
 
                }
1202
 
              yyerror (yymsg);
 
1525
#if ! YYERROR_VERBOSE
 
1526
      yyerror (YY_("syntax error"));
 
1527
#else
 
1528
      {
 
1529
        YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
 
1530
        if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
 
1531
          {
 
1532
            YYSIZE_T yyalloc = 2 * yysize;
 
1533
            if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
 
1534
              yyalloc = YYSTACK_ALLOC_MAXIMUM;
 
1535
            if (yymsg != yymsgbuf)
1203
1536
              YYSTACK_FREE (yymsg);
1204
 
            }
1205
 
          else
1206
 
            yyerror ("syntax error; also virtual memory exhausted");
1207
 
        }
1208
 
      else
1209
 
#endif /* YYERROR_VERBOSE */
1210
 
        yyerror ("syntax error");
 
1537
            yymsg = (char *) YYSTACK_ALLOC (yyalloc);
 
1538
            if (yymsg)
 
1539
              yymsg_alloc = yyalloc;
 
1540
            else
 
1541
              {
 
1542
                yymsg = yymsgbuf;
 
1543
                yymsg_alloc = sizeof yymsgbuf;
 
1544
              }
 
1545
          }
 
1546
 
 
1547
        if (0 < yysize && yysize <= yymsg_alloc)
 
1548
          {
 
1549
            (void) yysyntax_error (yymsg, yystate, yychar);
 
1550
            yyerror (yymsg);
 
1551
          }
 
1552
        else
 
1553
          {
 
1554
            yyerror (YY_("syntax error"));
 
1555
            if (yysize != 0)
 
1556
              goto yyexhaustedlab;
 
1557
          }
 
1558
      }
 
1559
#endif
1211
1560
    }
1212
1561
 
1213
1562
 
1217
1566
      /* If just tried and failed to reuse lookahead token after an
1218
1567
         error, discard it.  */
1219
1568
 
1220
 
      /* Return failure if at end of input.  */
1221
 
      if (yychar == YYEOF)
1222
 
        {
1223
 
          /* Pop the error token.  */
1224
 
          YYPOPSTACK;
1225
 
          /* Pop the rest of the stack.  */
1226
 
          while (yyss < yyssp)
1227
 
            {
1228
 
              YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1229
 
              yydestruct (yystos[*yyssp], yyvsp);
1230
 
              YYPOPSTACK;
1231
 
            }
1232
 
          YYABORT;
1233
 
        }
1234
 
 
1235
 
      YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
1236
 
      yydestruct (yytoken, &yylval);
1237
 
      yychar = YYEMPTY;
1238
 
 
 
1569
      if (yychar <= YYEOF)
 
1570
        {
 
1571
          /* Return failure if at end of input.  */
 
1572
          if (yychar == YYEOF)
 
1573
            YYABORT;
 
1574
        }
 
1575
      else
 
1576
        {
 
1577
          yydestruct ("Error: discarding",
 
1578
                      yytoken, &yylval);
 
1579
          yychar = YYEMPTY;
 
1580
        }
1239
1581
    }
1240
1582
 
1241
1583
  /* Else will try to reuse lookahead token after shifting the error
1242
1584
     token.  */
1243
 
  goto yyerrlab2;
1244
 
 
1245
 
 
1246
 
/*----------------------------------------------------.
1247
 
| yyerrlab1 -- error raised explicitly by an action.  |
1248
 
`----------------------------------------------------*/
 
1585
  goto yyerrlab1;
 
1586
 
 
1587
 
 
1588
/*---------------------------------------------------.
 
1589
| yyerrorlab -- error raised explicitly by YYERROR.  |
 
1590
`---------------------------------------------------*/
 
1591
yyerrorlab:
 
1592
 
 
1593
  /* Pacify compilers like GCC when the user code never invokes
 
1594
     YYERROR and the label yyerrorlab therefore never appears in user
 
1595
     code.  */
 
1596
  if (/*CONSTCOND*/ 0)
 
1597
     goto yyerrorlab;
 
1598
 
 
1599
  /* Do not reclaim the symbols of the rule which action triggered
 
1600
     this YYERROR.  */
 
1601
  YYPOPSTACK (yylen);
 
1602
  yylen = 0;
 
1603
  YY_STACK_PRINT (yyss, yyssp);
 
1604
  yystate = *yyssp;
 
1605
  goto yyerrlab1;
 
1606
 
 
1607
 
 
1608
/*-------------------------------------------------------------.
 
1609
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
 
1610
`-------------------------------------------------------------*/
1249
1611
yyerrlab1:
1250
 
 
1251
 
  /* Suppress GCC warning that yyerrlab1 is unused when no action
1252
 
     invokes YYERROR.  */
1253
 
#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__)
1254
 
  __attribute__ ((__unused__))
1255
 
#endif
1256
 
 
1257
 
 
1258
 
  goto yyerrlab2;
1259
 
 
1260
 
 
1261
 
/*---------------------------------------------------------------.
1262
 
| yyerrlab2 -- pop states until the error token can be shifted.  |
1263
 
`---------------------------------------------------------------*/
1264
 
yyerrlab2:
1265
1612
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1266
1613
 
1267
1614
  for (;;)
1282
1629
      if (yyssp == yyss)
1283
1630
        YYABORT;
1284
1631
 
1285
 
      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1286
 
      yydestruct (yystos[yystate], yyvsp);
1287
 
      yyvsp--;
1288
 
      yystate = *--yyssp;
1289
1632
 
 
1633
      yydestruct ("Error: popping",
 
1634
                  yystos[yystate], yyvsp);
 
1635
      YYPOPSTACK (1);
 
1636
      yystate = *yyssp;
1290
1637
      YY_STACK_PRINT (yyss, yyssp);
1291
1638
    }
1292
1639
 
1293
 
  if (yyn == YYFINAL)
1294
 
    YYACCEPT;
1295
 
 
1296
 
  YYDPRINTF ((stderr, "Shifting error token, "));
1297
 
 
1298
1640
  *++yyvsp = yylval;
1299
1641
 
1300
1642
 
 
1643
  /* Shift the error token.  */
 
1644
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
 
1645
 
1301
1646
  yystate = yyn;
1302
1647
  goto yynewstate;
1303
1648
 
1316
1661
  yyresult = 1;
1317
1662
  goto yyreturn;
1318
1663
 
1319
 
#ifndef yyoverflow
1320
 
/*----------------------------------------------.
1321
 
| yyoverflowlab -- parser overflow comes here.  |
1322
 
`----------------------------------------------*/
1323
 
yyoverflowlab:
1324
 
  yyerror ("parser stack overflow");
 
1664
#if !defined(yyoverflow) || YYERROR_VERBOSE
 
1665
/*-------------------------------------------------.
 
1666
| yyexhaustedlab -- memory exhaustion comes here.  |
 
1667
`-------------------------------------------------*/
 
1668
yyexhaustedlab:
 
1669
  yyerror (YY_("memory exhausted"));
1325
1670
  yyresult = 2;
1326
1671
  /* Fall through.  */
1327
1672
#endif
1328
1673
 
1329
1674
yyreturn:
 
1675
  if (yychar != YYEMPTY)
 
1676
     yydestruct ("Cleanup: discarding lookahead",
 
1677
                 yytoken, &yylval);
 
1678
  /* Do not reclaim the symbols of the rule which action triggered
 
1679
     this YYABORT or YYACCEPT.  */
 
1680
  YYPOPSTACK (yylen);
 
1681
  YY_STACK_PRINT (yyss, yyssp);
 
1682
  while (yyssp != yyss)
 
1683
    {
 
1684
      yydestruct ("Cleanup: popping",
 
1685
                  yystos[*yyssp], yyvsp);
 
1686
      YYPOPSTACK (1);
 
1687
    }
1330
1688
#ifndef yyoverflow
1331
1689
  if (yyss != yyssa)
1332
1690
    YYSTACK_FREE (yyss);
1333
1691
#endif
1334
 
  return yyresult;
 
1692
#if YYERROR_VERBOSE
 
1693
  if (yymsg != yymsgbuf)
 
1694
    YYSTACK_FREE (yymsg);
 
1695
#endif
 
1696
  /* Make sure YYID is used.  */
 
1697
  return YYID (yyresult);
1335
1698
}
1336
1699
 
1337
1700
 
 
1701
 
 
1702
/* Line 1675 of yacc.c  */
1338
1703
#line 151 "segparse.y"
1339
1704
 
1340
1705
 
1351
1716
 
1352
1717
#include "segscan.c"
1353
1718
 
1354