summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2009-01-09 10:50:03 -0800
committerMark Spruiell <mes@zeroc.com>2009-01-09 10:50:03 -0800
commit9489933d2e20de2c60682831a9a1fe384f61974a (patch)
tree15a01227ac95465fd5b5dc3a21f9d1bad80e06f0 /cpp/src
parentC++Builder compile fixes (diff)
downloadice-9489933d2e20de2c60682831a9a1fe384f61974a.tar.bz2
ice-9489933d2e20de2c60682831a9a1fe384f61974a.tar.xz
ice-9489933d2e20de2c60682831a9a1fe384f61974a.zip
bug 3523 - commit flex/bison files
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/FreezeScript/.gitignore6
-rw-r--r--cpp/src/FreezeScript/Grammar.cpp1674
-rw-r--r--cpp/src/FreezeScript/Grammar.h102
-rw-r--r--cpp/src/FreezeScript/Makefile5
-rw-r--r--cpp/src/FreezeScript/Makefile.mak2
-rw-r--r--cpp/src/FreezeScript/Scanner.cpp2000
-rw-r--r--cpp/src/IceGrid/.gitignore3
-rw-r--r--cpp/src/IceGrid/Grammar.cpp3224
-rw-r--r--cpp/src/IceGrid/Grammar.h126
-rw-r--r--cpp/src/IceGrid/Makefile4
-rw-r--r--cpp/src/IceGrid/Makefile.mak2
-rw-r--r--cpp/src/IceGrid/Scanner.cpp1790
-rw-r--r--cpp/src/IceStorm/.gitignore3
-rw-r--r--cpp/src/IceStorm/Grammar.cpp1484
-rw-r--r--cpp/src/IceStorm/Grammar.h70
-rw-r--r--cpp/src/IceStorm/Makefile2
-rw-r--r--cpp/src/IceStorm/Makefile.mak4
-rw-r--r--cpp/src/IceStorm/Scanner.cpp1762
-rw-r--r--cpp/src/Slice/.gitignore6
-rw-r--r--cpp/src/Slice/Grammar.cpp3655
-rw-r--r--cpp/src/Slice/Grammar.h130
-rw-r--r--cpp/src/Slice/Makefile4
-rw-r--r--cpp/src/Slice/Makefile.mak2
-rw-r--r--cpp/src/Slice/Scanner.cpp2133
24 files changed, 18150 insertions, 43 deletions
diff --git a/cpp/src/FreezeScript/.gitignore b/cpp/src/FreezeScript/.gitignore
deleted file mode 100644
index da581c67fd4..00000000000
--- a/cpp/src/FreezeScript/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-// Generated by makegitignore.py
-
-// IMPORTANT: Do not edit this file -- any edits made here will be lost!
-Grammar.cpp
-Grammar.h
-Scanner.cpp
diff --git a/cpp/src/FreezeScript/Grammar.cpp b/cpp/src/FreezeScript/Grammar.cpp
new file mode 100644
index 00000000000..44df79bb717
--- /dev/null
+++ b/cpp/src/FreezeScript/Grammar.cpp
@@ -0,0 +1,1674 @@
+/* A Bison parser, made by GNU Bison 1.875c. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Written by Richard Stallman by simplifying the original so called
+ ``semantic'' parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 1
+
+/* Using locations. */
+#define YYLSP_NEEDED 0
+
+/* If NAME_PREFIX is specified substitute the variables and functions
+ names. */
+#define yyparse freeze_script_parse
+#define yylex freeze_script_lex
+#define yyerror freeze_script_error
+#define yylval freeze_script_lval
+#define yychar freeze_script_char
+#define yydebug freeze_script_debug
+#define yynerrs freeze_script_nerrs
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ TOK_AND = 258,
+ TOK_OR = 259,
+ TOK_NOT = 260,
+ TOK_ADD = 261,
+ TOK_SUB = 262,
+ TOK_MUL = 263,
+ TOK_DIV = 264,
+ TOK_MOD = 265,
+ TOK_LPAREN = 266,
+ TOK_RPAREN = 267,
+ TOK_LBRACKET = 268,
+ TOK_RBRACKET = 269,
+ TOK_LESS_THAN = 270,
+ TOK_GREATER_THAN = 271,
+ TOK_LESS_EQUAL = 272,
+ TOK_GREATER_EQUAL = 273,
+ TOK_EQUAL = 274,
+ TOK_NEQ = 275,
+ TOK_TRUE = 276,
+ TOK_FALSE = 277,
+ TOK_NIL = 278,
+ TOK_SCOPE_DELIMITER = 279,
+ TOK_IDENTIFIER = 280,
+ TOK_STRING_LITERAL = 281,
+ TOK_INTEGER_LITERAL = 282,
+ TOK_FLOATING_POINT_LITERAL = 283,
+ UNARY_OP = 284
+ };
+#endif
+#define TOK_AND 258
+#define TOK_OR 259
+#define TOK_NOT 260
+#define TOK_ADD 261
+#define TOK_SUB 262
+#define TOK_MUL 263
+#define TOK_DIV 264
+#define TOK_MOD 265
+#define TOK_LPAREN 266
+#define TOK_RPAREN 267
+#define TOK_LBRACKET 268
+#define TOK_RBRACKET 269
+#define TOK_LESS_THAN 270
+#define TOK_GREATER_THAN 271
+#define TOK_LESS_EQUAL 272
+#define TOK_GREATER_EQUAL 273
+#define TOK_EQUAL 274
+#define TOK_NEQ 275
+#define TOK_TRUE 276
+#define TOK_FALSE 277
+#define TOK_NIL 278
+#define TOK_SCOPE_DELIMITER 279
+#define TOK_IDENTIFIER 280
+#define TOK_STRING_LITERAL 281
+#define TOK_INTEGER_LITERAL 282
+#define TOK_FLOATING_POINT_LITERAL 283
+#define UNARY_OP 284
+
+
+
+
+/* Copy the first part of user declarations. */
+#line 1 "../FreezeScript/Grammar.y"
+
+
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <FreezeScript/GrammarUtil.h>
+
+#ifdef _MSC_VER
+// I get these warnings from some bison versions:
+// warning C4102: 'yyoverflowlab' : unreferenced label
+# pragma warning( disable : 4102 )
+// warning C4065: switch statement contains 'default' but no 'case' labels
+# pragma warning( disable : 4065 )
+#endif
+
+using namespace std;
+using namespace FreezeScript;
+
+void
+freeze_script_error(const char* s)
+{
+ // yacc and recent versions of Bison use "syntax error" instead
+ // of "parse error".
+
+ if(strcmp(s, "parse error") == 0)
+ {
+ parseErrorReporter->expressionSyntaxError("syntax error");
+ }
+ else
+ {
+ parseErrorReporter->expressionSyntaxError(s);
+ }
+}
+
+
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 1
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+typedef int YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+/* Copy the second part of user declarations. */
+
+
+/* Line 214 of yacc.c. */
+#line 196 "Grammar.tab.c"
+
+#if ! defined (yyoverflow) || YYERROR_VERBOSE
+
+# ifndef YYFREE
+# define YYFREE free
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# endif
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# define YYSTACK_ALLOC alloca
+# endif
+# else
+# if defined (alloca) || defined (_ALLOCA_H)
+# define YYSTACK_ALLOC alloca
+# else
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# else
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# endif
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# endif
+#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
+
+
+#if (! defined (yyoverflow) \
+ && (! defined (__cplusplus) \
+ || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ short yyss;
+ YYSTYPE yyvs;
+ };
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined (__GNUC__) && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ register YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined (__STDC__) || defined (__cplusplus)
+ typedef signed char yysigned_char;
+#else
+ typedef short yysigned_char;
+#endif
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 24
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 111
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 32
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 9
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 39
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 65
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 284
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const unsigned char yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 31, 2, 30, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const unsigned char yyprhs[] =
+{
+ 0, 0, 3, 5, 7, 11, 15, 19, 23, 27,
+ 31, 35, 39, 43, 47, 51, 55, 59, 61, 65,
+ 68, 71, 73, 75, 77, 79, 81, 83, 85, 89,
+ 91, 93, 98, 102, 104, 109, 113, 115, 116, 120
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yysigned_char yyrhs[] =
+{
+ 33, 0, -1, 34, -1, 35, -1, 35, 15, 35,
+ -1, 35, 16, 35, -1, 35, 17, 35, -1, 35,
+ 18, 35, -1, 35, 19, 35, -1, 35, 20, 35,
+ -1, 35, 4, 35, -1, 35, 3, 35, -1, 35,
+ 8, 35, -1, 35, 9, 35, -1, 35, 10, 35,
+ -1, 35, 6, 35, -1, 35, 7, 35, -1, 36,
+ -1, 11, 34, 12, -1, 7, 36, -1, 5, 36,
+ -1, 27, -1, 28, -1, 26, -1, 21, -1, 22,
+ -1, 23, -1, 37, -1, 37, 30, 38, -1, 38,
+ -1, 40, -1, 37, 13, 34, 14, -1, 37, 30,
+ 25, -1, 25, -1, 25, 11, 39, 12, -1, 39,
+ 31, 34, -1, 34, -1, -1, 40, 24, 25, -1,
+ 24, 25, -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const unsigned short yyrline[] =
+{
+ 0, 84, 84, 93, 102, 106, 110, 114, 118, 122,
+ 126, 130, 134, 138, 142, 146, 150, 154, 163, 167,
+ 171, 175, 181, 187, 193, 197, 201, 205, 209, 218,
+ 222, 233, 240, 249, 260, 273, 280, 287, 295, 304
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE
+/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "TOK_AND", "TOK_OR", "TOK_NOT",
+ "TOK_ADD", "TOK_SUB", "TOK_MUL", "TOK_DIV", "TOK_MOD", "TOK_LPAREN",
+ "TOK_RPAREN", "TOK_LBRACKET", "TOK_RBRACKET", "TOK_LESS_THAN",
+ "TOK_GREATER_THAN", "TOK_LESS_EQUAL", "TOK_GREATER_EQUAL", "TOK_EQUAL",
+ "TOK_NEQ", "TOK_TRUE", "TOK_FALSE", "TOK_NIL", "TOK_SCOPE_DELIMITER",
+ "TOK_IDENTIFIER", "TOK_STRING_LITERAL", "TOK_INTEGER_LITERAL",
+ "TOK_FLOATING_POINT_LITERAL", "UNARY_OP", "'.'", "','", "$accept",
+ "start", "expr", "binary", "unary", "entity", "function", "arg_list",
+ "constant", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const unsigned short yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 46, 44
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const unsigned char yyr1[] =
+{
+ 0, 32, 33, 34, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
+ 36, 37, 37, 37, 38, 39, 39, 39, 40, 40
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const unsigned char yyr2[] =
+{
+ 0, 2, 1, 1, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 1, 3, 2,
+ 2, 1, 1, 1, 1, 1, 1, 1, 3, 1,
+ 1, 4, 3, 1, 4, 3, 1, 0, 3, 2
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const unsigned char yydefact[] =
+{
+ 0, 0, 0, 0, 24, 25, 26, 0, 33, 23,
+ 21, 22, 0, 2, 3, 17, 27, 29, 30, 20,
+ 19, 0, 39, 37, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 18, 36, 0, 11, 10, 15, 16, 12, 13,
+ 14, 4, 5, 6, 7, 8, 9, 0, 32, 28,
+ 38, 34, 0, 31, 35
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yysigned_char yydefgoto[] =
+{
+ -1, 12, 13, 14, 15, 16, 17, 43, 18
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -20
+static const yysigned_char yypact[] =
+{
+ 0, 0, 0, 0, -20, -20, -20, -19, 1, -20,
+ -20, -20, 13, -20, 30, -20, -12, -20, -10, -20,
+ -20, 3, -20, 0, -20, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, -9,
+ -8, -20, -20, -2, 63, 48, -6, -6, -20, -20,
+ -20, 78, 78, 78, 78, 78, 78, 5, 1, -20,
+ -20, -20, 0, -20, -20
+};
+
+/* YYPGOTO[NTERM-NUM]. */
+static const yysigned_char yypgoto[] =
+{
+ -20, -20, -3, 74, 7, -20, -7, -20, -20
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -1
+static const yysigned_char yytable[] =
+{
+ 21, 38, 29, 30, 31, 1, 22, 2, 19, 20,
+ 61, 3, 23, 24, 40, 41, 58, 60, 39, 63,
+ 42, 4, 5, 6, 7, 8, 9, 10, 11, 62,
+ 0, 0, 59, 25, 26, 57, 27, 28, 29, 30,
+ 31, 0, 0, 0, 0, 32, 33, 34, 35, 36,
+ 37, 25, 0, 0, 27, 28, 29, 30, 31, 64,
+ 0, 0, 0, 32, 33, 34, 35, 36, 37, 27,
+ 28, 29, 30, 31, 0, 0, 0, 0, 32, 33,
+ 34, 35, 36, 37, 27, 28, 29, 30, 31, 0,
+ 0, 0, 0, -1, -1, -1, -1, -1, -1, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56
+};
+
+static const yysigned_char yycheck[] =
+{
+ 3, 13, 8, 9, 10, 5, 25, 7, 1, 2,
+ 12, 11, 11, 0, 24, 12, 25, 25, 30, 14,
+ 23, 21, 22, 23, 24, 25, 26, 27, 28, 31,
+ -1, -1, 39, 3, 4, 38, 6, 7, 8, 9,
+ 10, -1, -1, -1, -1, 15, 16, 17, 18, 19,
+ 20, 3, -1, -1, 6, 7, 8, 9, 10, 62,
+ -1, -1, -1, 15, 16, 17, 18, 19, 20, 6,
+ 7, 8, 9, 10, -1, -1, -1, -1, 15, 16,
+ 17, 18, 19, 20, 6, 7, 8, 9, 10, -1,
+ -1, -1, -1, 15, 16, 17, 18, 19, 20, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const unsigned char yystos[] =
+{
+ 0, 5, 7, 11, 21, 22, 23, 24, 25, 26,
+ 27, 28, 33, 34, 35, 36, 37, 38, 40, 36,
+ 36, 34, 25, 11, 0, 3, 4, 6, 7, 8,
+ 9, 10, 15, 16, 17, 18, 19, 20, 13, 30,
+ 24, 12, 34, 39, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 34, 25, 38,
+ 25, 12, 31, 14, 34
+};
+
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# endif
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+
+#define YYFAIL goto yyerrlab
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
+ YYPOPSTACK; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror ("syntax error: cannot back up");\
+ YYERROR; \
+ } \
+while (0)
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+/* YYLLOC_DEFAULT -- Compute the default location (before the actions
+ are run). */
+
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ ((Current).first_line = (Rhs)[1].first_line, \
+ (Current).first_column = (Rhs)[1].first_column, \
+ (Current).last_line = (Rhs)[N].last_line, \
+ (Current).last_column = (Rhs)[N].last_column)
+#endif
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (&yylval, YYLEX_PARAM)
+#else
+# define YYLEX yylex (&yylval)
+#endif
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+# define YYDSYMPRINT(Args) \
+do { \
+ if (yydebug) \
+ yysymprint Args; \
+} while (0)
+
+# define YYDSYMPRINTF(Title, Token, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yysymprint (stderr, \
+ Token, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_stack_print (short *bottom, short *top)
+#else
+static void
+yy_stack_print (bottom, top)
+ short *bottom;
+ short *top;
+#endif
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (/* Nothing. */; bottom <= top; ++bottom)
+ YYFPRINTF (stderr, " %d", *bottom);
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_reduce_print (int yyrule)
+#else
+static void
+yy_reduce_print (yyrule)
+ int yyrule;
+#endif
+{
+ int yyi;
+ unsigned int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
+ yyrule - 1, yylno);
+ /* Print the symbols being reduced, and their result. */
+ for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
+ YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
+ YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (Rule); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YYDSYMPRINT(Args)
+# define YYDSYMPRINTF(Title, Token, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
+# undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined (__GLIBC__) && defined (_STRING_H)
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+# if defined (__STDC__) || defined (__cplusplus)
+yystrlen (const char *yystr)
+# else
+yystrlen (yystr)
+ const char *yystr;
+# endif
+{
+ register const char *yys = yystr;
+
+ while (*yys++ != '\0')
+ continue;
+
+ return yys - yystr - 1;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+# if defined (__STDC__) || defined (__cplusplus)
+yystpcpy (char *yydest, const char *yysrc)
+# else
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+# endif
+{
+ register char *yyd = yydest;
+ register const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+#endif /* !YYERROR_VERBOSE */
+
+
+
+#if YYDEBUG
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yysymprint (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ if (yytype < YYNTOKENS)
+ {
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+# ifdef YYPRINT
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+ }
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+ YYFPRINTF (yyoutput, ")");
+}
+
+#endif /* ! YYDEBUG */
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yydestruct (int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yytype, yyvaluep)
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
+}
+
+
+/* Prevent warnings from -Wmissing-prototypes. */
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM);
+# else
+int yyparse ();
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM)
+# else
+int yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+
+#endif
+#endif
+{
+ /* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far. */
+int yynerrs;
+
+ register int yystate;
+ register int yyn;
+ int yyresult;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken = 0;
+
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ short yyssa[YYINITDEPTH];
+ short *yyss = yyssa;
+ register short *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ register YYSTYPE *yyvsp;
+
+
+
+#define YYPOPSTACK (yyvsp--, yyssp--)
+
+ YYSIZE_T yystacksize = YYINITDEPTH;
+
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+
+ /* When reducing, the number of symbols on the RHS of the reduced
+ rule. */
+ int yylen;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+
+ yyssp = yyss;
+ yyvsp = yyvs;
+
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. so pushing a state here evens the stacks.
+ */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ short *yyss1 = yyss;
+
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow ("parser stack overflow",
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyoverflowlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyoverflowlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ short *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyoverflowlab;
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+/* Do appropriate processing given the current state. */
+/* Read a lookahead token if we need one and don't already have one. */
+/* yyresume: */
+
+ /* First try to decide what to do without reference to lookahead token. */
+
+ yyn = yypact[yystate];
+ if (yyn == YYPACT_NINF)
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = YYLEX;
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yyn == 0 || yyn == YYTABLE_NINF)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ /* Shift the lookahead token. */
+ YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
+
+ /* Discard the token being shifted unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
+ *++yyvsp = yylval;
+
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ `$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 2:
+#line 85 "../FreezeScript/Grammar.y"
+ {
+ parseResult = yyvsp[0];
+;}
+ break;
+
+ case 3:
+#line 94 "../FreezeScript/Grammar.y"
+ {
+ yyval = yyvsp[0];
+;}
+ break;
+
+ case 4:
+#line 103 "../FreezeScript/Grammar.y"
+ {
+ yyval = new BinaryNode(BinOpLess, parseDataFactory, yyvsp[-2], yyvsp[0]);
+;}
+ break;
+
+ case 5:
+#line 107 "../FreezeScript/Grammar.y"
+ {
+ yyval = new BinaryNode(BinOpGreater, parseDataFactory, yyvsp[-2], yyvsp[0]);
+;}
+ break;
+
+ case 6:
+#line 111 "../FreezeScript/Grammar.y"
+ {
+ yyval = new BinaryNode(BinOpLessEq, parseDataFactory, yyvsp[-2], yyvsp[0]);
+;}
+ break;
+
+ case 7:
+#line 115 "../FreezeScript/Grammar.y"
+ {
+ yyval = new BinaryNode(BinOpGrEq, parseDataFactory, yyvsp[-2], yyvsp[0]);
+;}
+ break;
+
+ case 8:
+#line 119 "../FreezeScript/Grammar.y"
+ {
+ yyval = new BinaryNode(BinOpEq, parseDataFactory, yyvsp[-2], yyvsp[0]);
+;}
+ break;
+
+ case 9:
+#line 123 "../FreezeScript/Grammar.y"
+ {
+ yyval = new BinaryNode(BinOpNotEq, parseDataFactory, yyvsp[-2], yyvsp[0]);
+;}
+ break;
+
+ case 10:
+#line 127 "../FreezeScript/Grammar.y"
+ {
+ yyval = new BinaryNode(BinOpOr, parseDataFactory, yyvsp[-2], yyvsp[0]);
+;}
+ break;
+
+ case 11:
+#line 131 "../FreezeScript/Grammar.y"
+ {
+ yyval = new BinaryNode(BinOpAnd, parseDataFactory, yyvsp[-2], yyvsp[0]);
+;}
+ break;
+
+ case 12:
+#line 135 "../FreezeScript/Grammar.y"
+ {
+ yyval = new BinaryNode(BinOpMul, parseDataFactory, yyvsp[-2], yyvsp[0]);
+;}
+ break;
+
+ case 13:
+#line 139 "../FreezeScript/Grammar.y"
+ {
+ yyval = new BinaryNode(BinOpDiv, parseDataFactory, yyvsp[-2], yyvsp[0]);
+;}
+ break;
+
+ case 14:
+#line 143 "../FreezeScript/Grammar.y"
+ {
+ yyval = new BinaryNode(BinOpMod, parseDataFactory, yyvsp[-2], yyvsp[0]);
+;}
+ break;
+
+ case 15:
+#line 147 "../FreezeScript/Grammar.y"
+ {
+ yyval = new BinaryNode(BinOpAdd, parseDataFactory, yyvsp[-2], yyvsp[0]);
+;}
+ break;
+
+ case 16:
+#line 151 "../FreezeScript/Grammar.y"
+ {
+ yyval = new BinaryNode(BinOpSub, parseDataFactory, yyvsp[-2], yyvsp[0]);
+;}
+ break;
+
+ case 17:
+#line 155 "../FreezeScript/Grammar.y"
+ {
+ yyval = yyvsp[0];
+;}
+ break;
+
+ case 18:
+#line 164 "../FreezeScript/Grammar.y"
+ {
+ yyval = yyvsp[-1];
+;}
+ break;
+
+ case 19:
+#line 168 "../FreezeScript/Grammar.y"
+ {
+ yyval = new UnaryNode(UnaryOpNeg, parseDataFactory, yyvsp[0]);
+;}
+ break;
+
+ case 20:
+#line 172 "../FreezeScript/Grammar.y"
+ {
+ yyval = new UnaryNode(UnaryOpNot, parseDataFactory, yyvsp[0]);
+;}
+ break;
+
+ case 21:
+#line 176 "../FreezeScript/Grammar.y"
+ {
+ IntegerTokPtr intVal = IntegerTokPtr::dynamicCast(yyvsp[0]);
+ assert(intVal);
+ yyval = new DataNode(parseDataFactory->createInteger(intVal->v, true));
+;}
+ break;
+
+ case 22:
+#line 182 "../FreezeScript/Grammar.y"
+ {
+ FloatingTokPtr floatVal = FloatingTokPtr::dynamicCast(yyvsp[0]);
+ assert(floatVal);
+ yyval = new DataNode(parseDataFactory->createDouble(floatVal->v, true));
+;}
+ break;
+
+ case 23:
+#line 188 "../FreezeScript/Grammar.y"
+ {
+ StringTokPtr stringVal = StringTokPtr::dynamicCast(yyvsp[0]);
+ assert(stringVal);
+ yyval = new DataNode(parseDataFactory->createString(stringVal->v, true));
+;}
+ break;
+
+ case 24:
+#line 194 "../FreezeScript/Grammar.y"
+ {
+ yyval = new DataNode(parseDataFactory->createBoolean(true, true));
+;}
+ break;
+
+ case 25:
+#line 198 "../FreezeScript/Grammar.y"
+ {
+ yyval = new DataNode(parseDataFactory->createBoolean(false, true));
+;}
+ break;
+
+ case 26:
+#line 202 "../FreezeScript/Grammar.y"
+ {
+ yyval = new DataNode(parseDataFactory->createNil(true));
+;}
+ break;
+
+ case 27:
+#line 206 "../FreezeScript/Grammar.y"
+ {
+ yyval = yyvsp[0];
+;}
+ break;
+
+ case 28:
+#line 210 "../FreezeScript/Grammar.y"
+ {
+ EntityNodePtr entity = EntityNodePtr::dynamicCast(yyvsp[-2]);
+ assert(entity);
+ FunctionNodePtr func = FunctionNodePtr::dynamicCast(yyvsp[0]);
+ assert(func);
+ func->setTarget(entity);
+ yyval = yyvsp[0];
+;}
+ break;
+
+ case 29:
+#line 219 "../FreezeScript/Grammar.y"
+ {
+ yyval = yyvsp[0];
+;}
+ break;
+
+ case 30:
+#line 223 "../FreezeScript/Grammar.y"
+ {
+ StringTokPtr stringVal = StringTokPtr::dynamicCast(yyvsp[0]);
+ assert(stringVal);
+ yyval = new ConstantNode(stringVal->v);
+;}
+ break;
+
+ case 31:
+#line 234 "../FreezeScript/Grammar.y"
+ {
+ EntityNodePtr entity = EntityNodePtr::dynamicCast(yyvsp[-3]);
+ assert(entity);
+ entity->append(new ElementNode(yyvsp[-1]));
+ yyval = yyvsp[-3];
+;}
+ break;
+
+ case 32:
+#line 241 "../FreezeScript/Grammar.y"
+ {
+ StringTokPtr stringVal = StringTokPtr::dynamicCast(yyvsp[0]);
+ assert(stringVal);
+ EntityNodePtr entity = EntityNodePtr::dynamicCast(yyvsp[-2]);
+ assert(entity);
+ entity->append(new IdentNode(stringVal->v));
+ yyval = yyvsp[-2];
+;}
+ break;
+
+ case 33:
+#line 250 "../FreezeScript/Grammar.y"
+ {
+ StringTokPtr stringVal = StringTokPtr::dynamicCast(yyvsp[0]);
+ assert(stringVal);
+ yyval = new IdentNode(stringVal->v);
+;}
+ break;
+
+ case 34:
+#line 261 "../FreezeScript/Grammar.y"
+ {
+ StringTokPtr func = StringTokPtr::dynamicCast(yyvsp[-3]);
+ assert(func);
+ NodeListTokPtr args = NodeListTokPtr::dynamicCast(yyvsp[-1]);
+ assert(args);
+ yyval = new FunctionNode(func->v, args->v);
+;}
+ break;
+
+ case 35:
+#line 274 "../FreezeScript/Grammar.y"
+ {
+ NodeListTokPtr l = NodeListTokPtr::dynamicCast(yyvsp[-2]);
+ assert(l);
+ l->v.push_back(yyvsp[0]);
+ yyval = yyvsp[-2];
+;}
+ break;
+
+ case 36:
+#line 281 "../FreezeScript/Grammar.y"
+ {
+ NodeListTokPtr result = new NodeListTok;
+ result->v.push_back(yyvsp[0]);
+ yyval = result;
+;}
+ break;
+
+ case 37:
+#line 287 "../FreezeScript/Grammar.y"
+ {
+ yyval = new NodeListTok;
+;}
+ break;
+
+ case 38:
+#line 296 "../FreezeScript/Grammar.y"
+ {
+ StringTokPtr stringVal = StringTokPtr::dynamicCast(yyvsp[-2]);
+ assert(stringVal);
+ StringTokPtr idVal = StringTokPtr::dynamicCast(yyvsp[0]);
+ assert(idVal);
+ stringVal->v.append("::" + idVal->v);
+ yyval = yyvsp[-2];
+;}
+ break;
+
+ case 39:
+#line 305 "../FreezeScript/Grammar.y"
+ {
+ StringTokPtr idVal = StringTokPtr::dynamicCast(yyvsp[0]);
+ assert(idVal);
+ StringTokPtr stringVal = new StringTok;
+ stringVal->v.append("::" + idVal->v);
+ yyval = stringVal;
+;}
+ break;
+
+
+ }
+
+/* Line 1000 of yacc.c. */
+#line 1448 "Grammar.tab.c"
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+
+
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+
+ /* Now `shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if YYERROR_VERBOSE
+ yyn = yypact[yystate];
+
+ if (YYPACT_NINF < yyn && yyn < YYLAST)
+ {
+ YYSIZE_T yysize = 0;
+ int yytype = YYTRANSLATE (yychar);
+ const char* yyprefix;
+ char *yymsg;
+ int yyx;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 0;
+
+ yyprefix = ", expecting ";
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
+ yycount += 1;
+ if (yycount == 5)
+ {
+ yysize = 0;
+ break;
+ }
+ }
+ yysize += (sizeof ("syntax error, unexpected ")
+ + yystrlen (yytname[yytype]));
+ yymsg = (char *) YYSTACK_ALLOC (yysize);
+ if (yymsg != 0)
+ {
+ char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
+ yyp = yystpcpy (yyp, yytname[yytype]);
+
+ if (yycount < 5)
+ {
+ yyprefix = ", expecting ";
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ yyp = yystpcpy (yyp, yyprefix);
+ yyp = yystpcpy (yyp, yytname[yyx]);
+ yyprefix = " or ";
+ }
+ }
+ yyerror (yymsg);
+ YYSTACK_FREE (yymsg);
+ }
+ else
+ yyerror ("syntax error; also virtual memory exhausted");
+ }
+ else
+#endif /* YYERROR_VERBOSE */
+ yyerror ("syntax error");
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* If at end of input, pop the error token,
+ then the rest of the stack, then return failure. */
+ if (yychar == YYEOF)
+ for (;;)
+ {
+ YYPOPSTACK;
+ if (yyssp == yyss)
+ YYABORT;
+ YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
+ yydestruct (yystos[*yyssp], yyvsp);
+ }
+ }
+ else
+ {
+ YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
+ yydestruct (yytoken, &yylval);
+ yychar = YYEMPTY;
+
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+#ifdef __GNUC__
+ /* Pacify GCC when the user code never invokes YYERROR and the label
+ yyerrorlab therefore never appears in user code. */
+ if (0)
+ goto yyerrorlab;
+#endif
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+ YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
+ yydestruct (yystos[yystate], yyvsp);
+ YYPOPSTACK;
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ YYDPRINTF ((stderr, "Shifting error token, "));
+
+ *++yyvsp = yylval;
+
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#ifndef yyoverflow
+/*----------------------------------------------.
+| yyoverflowlab -- parser overflow comes here. |
+`----------------------------------------------*/
+yyoverflowlab:
+ yyerror ("parser stack overflow");
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+ return yyresult;
+}
+
+
+#line 314 "../FreezeScript/Grammar.y"
+
+
diff --git a/cpp/src/FreezeScript/Grammar.h b/cpp/src/FreezeScript/Grammar.h
new file mode 100644
index 00000000000..be9f0c7bc5e
--- /dev/null
+++ b/cpp/src/FreezeScript/Grammar.h
@@ -0,0 +1,102 @@
+/* A Bison parser, made by GNU Bison 1.875c. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ TOK_AND = 258,
+ TOK_OR = 259,
+ TOK_NOT = 260,
+ TOK_ADD = 261,
+ TOK_SUB = 262,
+ TOK_MUL = 263,
+ TOK_DIV = 264,
+ TOK_MOD = 265,
+ TOK_LPAREN = 266,
+ TOK_RPAREN = 267,
+ TOK_LBRACKET = 268,
+ TOK_RBRACKET = 269,
+ TOK_LESS_THAN = 270,
+ TOK_GREATER_THAN = 271,
+ TOK_LESS_EQUAL = 272,
+ TOK_GREATER_EQUAL = 273,
+ TOK_EQUAL = 274,
+ TOK_NEQ = 275,
+ TOK_TRUE = 276,
+ TOK_FALSE = 277,
+ TOK_NIL = 278,
+ TOK_SCOPE_DELIMITER = 279,
+ TOK_IDENTIFIER = 280,
+ TOK_STRING_LITERAL = 281,
+ TOK_INTEGER_LITERAL = 282,
+ TOK_FLOATING_POINT_LITERAL = 283,
+ UNARY_OP = 284
+ };
+#endif
+#define TOK_AND 258
+#define TOK_OR 259
+#define TOK_NOT 260
+#define TOK_ADD 261
+#define TOK_SUB 262
+#define TOK_MUL 263
+#define TOK_DIV 264
+#define TOK_MOD 265
+#define TOK_LPAREN 266
+#define TOK_RPAREN 267
+#define TOK_LBRACKET 268
+#define TOK_RBRACKET 269
+#define TOK_LESS_THAN 270
+#define TOK_GREATER_THAN 271
+#define TOK_LESS_EQUAL 272
+#define TOK_GREATER_EQUAL 273
+#define TOK_EQUAL 274
+#define TOK_NEQ 275
+#define TOK_TRUE 276
+#define TOK_FALSE 277
+#define TOK_NIL 278
+#define TOK_SCOPE_DELIMITER 279
+#define TOK_IDENTIFIER 280
+#define TOK_STRING_LITERAL 281
+#define TOK_INTEGER_LITERAL 282
+#define TOK_FLOATING_POINT_LITERAL 283
+#define UNARY_OP 284
+
+
+
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+typedef int YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+
+
diff --git a/cpp/src/FreezeScript/Makefile b/cpp/src/FreezeScript/Makefile
index 8022a7e35d5..3949d79e94b 100644
--- a/cpp/src/FreezeScript/Makefile
+++ b/cpp/src/FreezeScript/Makefile
@@ -50,11 +50,6 @@ $(DUMPDB): $(DUMP_OBJS) $(COMMON_OBJS)
rm -f $@
$(CXX) $(LDFLAGS) -o $@ $(DUMP_OBJS) $(COMMON_OBJS) -lSlice $(EXPAT_RPATH_LINK) -lIceXML $(DB_RPATH_LINK) -lFreeze $(LIBS) $(DB_LIBS)
-
-clean::
- -rm -f Grammar.cpp Grammar.h
- -rm -f Scanner.cpp
-
install:: all
$(call installprogram,$(TRANSFORMDB),$(install_bindir))
$(call installprogram,$(DUMPDB),$(install_bindir))
diff --git a/cpp/src/FreezeScript/Makefile.mak b/cpp/src/FreezeScript/Makefile.mak
index 63715213fee..8f72c15194b 100644
--- a/cpp/src/FreezeScript/Makefile.mak
+++ b/cpp/src/FreezeScript/Makefile.mak
@@ -84,8 +84,6 @@ Grammar.cpp Grammar.h: Grammar.y
clean::
-del /q $(TRANSFORMDB:.exe=.*)
-del /q $(DUMPDB:.exe=.*)
- -del /q Grammar.cpp Grammar.h
- -del /q Scanner.cpp
-del /q TransformDB.res DumpDB.res
install:: all
diff --git a/cpp/src/FreezeScript/Scanner.cpp b/cpp/src/FreezeScript/Scanner.cpp
new file mode 100644
index 00000000000..5c503d2fb5b
--- /dev/null
+++ b/cpp/src/FreezeScript/Scanner.cpp
@@ -0,0 +1,2000 @@
+#include <IceUtil/Config.h>
+#define yy_create_buffer freeze_script__create_buffer
+#define yy_delete_buffer freeze_script__delete_buffer
+#define yy_scan_buffer freeze_script__scan_buffer
+#define yy_scan_string freeze_script__scan_string
+#define yy_scan_bytes freeze_script__scan_bytes
+#define yy_flex_debug freeze_script__flex_debug
+#define yy_init_buffer freeze_script__init_buffer
+#define yy_flush_buffer freeze_script__flush_buffer
+#define yy_load_buffer_state freeze_script__load_buffer_state
+#define yy_switch_to_buffer freeze_script__switch_to_buffer
+#define yyin freeze_script_in
+#define yyleng freeze_script_leng
+#define yylex freeze_script_lex
+#define yyout freeze_script_out
+#define yyrestart freeze_script_restart
+#define yytext freeze_script_text
+
+#line 19 "lex.yy.c"
+/* A lexical scanner generated by flex */
+
+/* Scanner skeleton version:
+ * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
+ */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+
+#include <stdio.h>
+#include <unistd.h>
+
+
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
+#endif
+#endif
+
+
+#ifdef __cplusplus
+
+#include <stdlib.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_PROTOS
+#define YY_USE_CONST
+
+#endif /* __STDC__ */
+#endif /* ! __cplusplus */
+
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index. If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#define YY_BUF_SIZE 16384
+
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+extern int yyleng;
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator). This
+ * avoids problems with code like:
+ *
+ * if ( condition_holds )
+ * yyless( 5 );
+ * else
+ * do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ *yy_cp = yy_hold_char; \
+ YY_RESTORE_YY_MORE_OFFSET \
+ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
+
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ yy_size_t yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+ };
+
+static YY_BUFFER_STATE yy_current_buffer = 0;
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ */
+#define YY_CURRENT_BUFFER yy_current_buffer
+
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+
+
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 1; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart YY_PROTO(( FILE *input_file ));
+
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_is_interactive = is_interactive; \
+ }
+
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_at_bol = at_bol; \
+ }
+
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+
+#define yywrap() 1
+#define YY_SKIP_YYWRAP
+typedef unsigned char YY_CHAR;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+typedef int yy_state_type;
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ yytext_ptr = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ yy_hold_char = *yy_cp; \
+ *yy_cp = '\0'; \
+ yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 26
+#define YY_END_OF_BUFFER 27
+static yyconst short int yy_accept[51] =
+ { 0,
+ 0, 0, 27, 25, 8, 8, 25, 4, 19, 5,
+ 20, 21, 17, 15, 16, 25, 18, 6, 6, 25,
+ 9, 25, 10, 3, 22, 23, 14, 0, 6, 6,
+ 7, 2, 1, 7, 6, 0, 0, 24, 11, 13,
+ 12, 3, 0, 7, 0, 7, 6, 0, 7, 0
+ } ;
+
+static yyconst int yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 4, 5, 1, 1, 6, 1, 7, 8,
+ 9, 10, 11, 1, 12, 13, 14, 15, 16, 16,
+ 16, 16, 16, 16, 16, 17, 17, 18, 1, 19,
+ 20, 21, 1, 1, 22, 22, 22, 22, 23, 24,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 26, 1, 27, 1, 25, 1, 22, 22, 22, 22,
+
+ 28, 24, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 29,
+ 25, 25, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1
+ } ;
+
+static yyconst int yy_meta[30] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 1, 1, 3, 3, 3, 1, 1, 1,
+ 1, 4, 4, 4, 5, 1, 1, 4, 5
+ } ;
+
+static yyconst short int yy_base[55] =
+ { 0,
+ 0, 0, 72, 104, 104, 104, 51, 104, 104, 104,
+ 104, 104, 104, 17, 22, 25, 33, 35, 30, 44,
+ 29, 24, 16, 0, 104, 104, 104, 38, 0, 0,
+ 50, 104, 104, 0, 2, 45, 0, 104, 104, 104,
+ 104, 0, 49, 104, 53, 60, 0, 64, 70, 104,
+ 92, 96, 97, 100
+ } ;
+
+static yyconst short int yy_def[55] =
+ { 0,
+ 50, 1, 50, 50, 50, 50, 50, 50, 50, 50,
+ 50, 50, 50, 50, 50, 50, 50, 50, 18, 50,
+ 50, 50, 50, 51, 50, 50, 50, 50, 18, 19,
+ 50, 50, 50, 31, 18, 52, 53, 50, 50, 50,
+ 50, 51, 54, 50, 50, 50, 53, 50, 50, 0,
+ 50, 50, 50, 50
+ } ;
+
+static yyconst short int yy_nxt[134] =
+ { 0,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 19, 20, 21, 22,
+ 23, 24, 24, 24, 24, 25, 26, 24, 24, 28,
+ 50, 29, 30, 30, 28, 41, 29, 30, 30, 31,
+ 31, 31, 32, 40, 30, 30, 33, 34, 39, 35,
+ 35, 30, 31, 31, 31, 45, 45, 36, 50, 48,
+ 48, 38, 36, 37, 31, 31, 31, 46, 46, 46,
+ 27, 50, 43, 44, 46, 46, 46, 43, 49, 49,
+ 49, 50, 50, 44, 49, 49, 49, 50, 50, 50,
+ 50, 50, 50, 44, 42, 42, 42, 46, 46, 47,
+
+ 47, 49, 49, 3, 50, 50, 50, 50, 50, 50,
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
+ 50, 50, 50
+ } ;
+
+static yyconst short int yy_chk[134] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 14,
+ 35, 14, 14, 14, 15, 23, 15, 15, 15, 16,
+ 16, 16, 17, 22, 19, 19, 17, 18, 21, 18,
+ 18, 18, 28, 28, 28, 36, 36, 18, 19, 43,
+ 43, 20, 18, 18, 31, 31, 31, 45, 45, 45,
+ 7, 3, 31, 31, 46, 46, 46, 31, 48, 48,
+ 48, 0, 0, 46, 49, 49, 49, 0, 0, 0,
+ 0, 0, 0, 49, 51, 51, 51, 52, 52, 53,
+
+ 53, 54, 54, 50, 50, 50, 50, 50, 50, 50,
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
+ 50, 50, 50
+ } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "Scanner.l"
+#define INITIAL 0
+#line 2 "Scanner.l"
+
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <FreezeScript/GrammarUtil.h> // Before Grammar.h, so that YYSTYPE is defined
+#include <FreezeScript/Grammar.h>
+#include <IceUtil/InputUtil.h>
+
+#include <stdlib.h>
+#include <math.h>
+
+#include <map>
+
+#if defined(_MSC_VER) && defined(ICE_64)
+//
+// 'initializing' : conversion from '__int64' to 'int', possible loss of data
+// Puts a pointer-difference into an int
+//
+# pragma warning( 4 : 4244 )
+#endif
+
+using namespace std;
+using namespace FreezeScript;
+
+namespace FreezeScript
+{
+
+typedef map<string, int> KeywordMap;
+static KeywordMap keywordMap;
+
+void initScanner();
+int checkKeyword(const string&);
+StringTokPtr parseString(char);
+
+}
+
+#define YY_USER_INIT initScanner();
+
+#define YY_INPUT(buf, result, max_size) { result = getInput(buf, max_size); }
+#define YY_NEVER_INTERACTIVE 1
+#line 475 "lex.yy.c"
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap YY_PROTO(( void ));
+#else
+extern int yywrap YY_PROTO(( void ));
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput YY_PROTO(( void ));
+#else
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines. This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( yy_current_buffer->yy_is_interactive ) \
+ { \
+ int c = '*', n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+ && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" );
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+ YY_USER_ACTION
+
+YY_DECL
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp = NULL, *yy_bp = NULL;
+ register int yy_act;
+
+#line 60 "Scanner.l"
+
+
+#line 629 "lex.yy.c"
+
+ if ( yy_init )
+ {
+ yy_init = 0;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! yy_start )
+ yy_start = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = stdin;
+
+ if ( ! yyout )
+ yyout = stdout;
+
+ if ( ! yy_current_buffer )
+ yy_current_buffer =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_load_buffer_state();
+ }
+
+ while ( 1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = yy_c_buf_p;
+
+ /* Support of yytext. */
+ *yy_cp = yy_hold_char;
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = yy_start;
+yy_match:
+ do
+ {
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ if ( yy_accept[yy_current_state] )
+ {
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 51 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ ++yy_cp;
+ }
+ while ( yy_base[yy_current_state] != 104 );
+
+yy_find_action:
+ yy_act = yy_accept[yy_current_state];
+ if ( yy_act == 0 )
+ { /* have to back up */
+ yy_cp = yy_last_accepting_cpos;
+ yy_current_state = yy_last_accepting_state;
+ yy_act = yy_accept[yy_current_state];
+ }
+
+ YY_DO_BEFORE_ACTION;
+
+
+do_action: /* This label is used only to access EOF actions. */
+
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+ case 0: /* must back up */
+ /* undo the effects of YY_DO_BEFORE_ACTION */
+ *yy_cp = yy_hold_char;
+ yy_cp = yy_last_accepting_cpos;
+ yy_current_state = yy_last_accepting_state;
+ goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+#line 62 "Scanner.l"
+{
+ // C++-style comment
+ int c;
+ do
+ {
+ c = yyinput();
+ if(c == '\n')
+ {
+ parseLine++;
+ }
+ }
+ while(c != '\n' && c != EOF);
+}
+ YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 76 "Scanner.l"
+{
+ // C-style comment
+ while(true)
+ {
+ int c = yyinput();
+ if(c == '\n')
+ {
+ parseLine++;
+ }
+ else if(c == '*')
+ {
+ int next = yyinput();
+ if(next == '/')
+ {
+ break;
+ }
+ else
+ {
+ unput(next);
+ }
+ }
+ else if(c == EOF)
+ {
+ parseErrorReporter->expressionSyntaxError("EOF in comment");
+ break;
+ }
+ }
+}
+ YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 105 "Scanner.l"
+{
+ StringTokPtr ident = new StringTok;
+ ident->v = yytext;
+ *yylvalp = ident;
+ return checkKeyword(ident->v);
+}
+ YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 112 "Scanner.l"
+{
+ StringTokPtr str = parseString('"');
+ *yylvalp = str;
+ return TOK_STRING_LITERAL;
+}
+ YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 118 "Scanner.l"
+{
+ StringTokPtr str = parseString('\'');
+ *yylvalp = str;
+ return TOK_STRING_LITERAL;
+}
+ YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 124 "Scanner.l"
+{
+ IntegerTokPtr itp = new IntegerTok;
+ *yylvalp = itp;
+ if(!IceUtilInternal::stringToInt64(string(yytext), itp->v))
+ {
+ assert(itp->v != 0);
+ string msg = "integer constant `";
+ msg += yytext;
+ msg += "' out of range";
+ parseErrorReporter->expressionSyntaxError(msg);
+ }
+ return TOK_INTEGER_LITERAL;
+}
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 138 "Scanner.l"
+{
+ errno = 0;
+ FloatingTokPtr ftp = new FloatingTok;
+ *yylvalp = ftp;
+ string literal(yytext);
+ char lastChar = literal[literal.size() - 1];
+ if(lastChar == 'f' || lastChar == 'F')
+ {
+ literal = literal.substr(0, literal.size() - 1); // Clobber trailing 'f' or 'F' suffix
+ }
+ ftp->v = strtod(literal.c_str(), 0);
+ if((ftp->v == HUGE_VAL || ftp->v == -HUGE_VAL) && errno == ERANGE)
+ {
+ string msg = "floating-point constant `";
+ msg += yytext;
+ msg += "' too large (overflow)";
+ parseErrorReporter->expressionSyntaxError(msg);
+ }
+ else if(ftp->v == 0 && errno == ERANGE)
+ {
+ string msg = "floating-point constant `";
+ msg += yytext;
+ msg += "' too small (underflow)";
+ parseErrorReporter->expressionSyntaxError(msg);
+ }
+ return TOK_FLOATING_POINT_LITERAL;
+}
+ YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 166 "Scanner.l"
+{
+ // Igore white-space
+
+ if(yytext[0] == '\n')
+ {
+ parseLine++;
+ }
+}
+ YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 175 "Scanner.l"
+return TOK_LESS_THAN;
+ YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 176 "Scanner.l"
+return TOK_GREATER_THAN;
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 177 "Scanner.l"
+return TOK_LESS_EQUAL;
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 178 "Scanner.l"
+return TOK_GREATER_EQUAL;
+ YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 179 "Scanner.l"
+return TOK_EQUAL;
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 180 "Scanner.l"
+return TOK_NEQ;
+ YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 181 "Scanner.l"
+return TOK_ADD;
+ YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 182 "Scanner.l"
+return TOK_SUB;
+ YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 183 "Scanner.l"
+return TOK_MUL;
+ YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 184 "Scanner.l"
+return TOK_DIV;
+ YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 185 "Scanner.l"
+return TOK_MOD;
+ YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 186 "Scanner.l"
+return TOK_LPAREN;
+ YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 187 "Scanner.l"
+return TOK_RPAREN;
+ YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 188 "Scanner.l"
+return TOK_LBRACKET;
+ YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 189 "Scanner.l"
+return TOK_RBRACKET;
+ YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 190 "Scanner.l"
+return TOK_SCOPE_DELIMITER;
+ YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 192 "Scanner.l"
+{
+ return yytext[0];
+}
+ YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 196 "Scanner.l"
+ECHO;
+ YY_BREAK
+#line 941 "lex.yy.c"
+case YY_STATE_EOF(INITIAL):
+ yyterminate();
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = yy_hold_char;
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
+ * consistency between yy_current_buffer and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yy_current_buffer->yy_input_file = yyin;
+ yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++yy_c_buf_p;
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = yy_c_buf_p;
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer() )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ yy_did_buffer_switch_on_eof = 0;
+
+ if ( yywrap() )
+ {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p =
+ yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ yy_c_buf_p =
+ &yy_current_buffer->yy_ch_buf[yy_n_chars];
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of yylex */
+
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+
+static int yy_get_next_buffer()
+ {
+ register char *dest = yy_current_buffer->yy_ch_buf;
+ register char *source = yytext_ptr;
+ register int number_to_move, i;
+ int ret_val;
+
+ if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( yy_current_buffer->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+
+ else
+ {
+ int num_to_read =
+ yy_current_buffer->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+ YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = yy_current_buffer;
+
+ int yy_c_buf_p_offset =
+ (int) (yy_c_buf_p - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yy_flex_realloc( (void *) b->yy_ch_buf,
+ b->yy_buf_size + 2 );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = 0;
+
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+
+ yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = yy_current_buffer->yy_buf_size -
+ number_to_move - 1;
+#endif
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+ yy_n_chars, num_to_read );
+
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ if ( yy_n_chars == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ yyrestart( yyin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ yy_current_buffer->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ yy_n_chars += number_to_move;
+ yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+ yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+ yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+
+ return ret_val;
+ }
+
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+static yy_state_type yy_get_previous_state()
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
+
+ yy_current_state = yy_start;
+
+ for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+ {
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ if ( yy_accept[yy_current_state] )
+ {
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 51 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ }
+
+ return yy_current_state;
+ }
+
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+ {
+ register int yy_is_jam;
+ register char *yy_cp = yy_c_buf_p;
+
+ register YY_CHAR yy_c = 1;
+ if ( yy_accept[yy_current_state] )
+ {
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 51 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_is_jam = (yy_current_state == 50);
+
+ return yy_is_jam ? 0 : yy_current_state;
+ }
+
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+ {
+ register char *yy_cp = yy_c_buf_p;
+
+ /* undo effects of setting up yytext */
+ *yy_cp = yy_hold_char;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ { /* need to shift things up to make room */
+ /* +2 for EOB chars. */
+ register int number_to_move = yy_n_chars + 2;
+ register char *dest = &yy_current_buffer->yy_ch_buf[
+ yy_current_buffer->yy_buf_size + 2];
+ register char *source =
+ &yy_current_buffer->yy_ch_buf[number_to_move];
+
+ while ( source > yy_current_buffer->yy_ch_buf )
+ *--dest = *--source;
+
+ yy_cp += (int) (dest - source);
+ yy_bp += (int) (dest - source);
+ yy_current_buffer->yy_n_chars =
+ yy_n_chars = yy_current_buffer->yy_buf_size;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
+ }
+
+ *--yy_cp = (char) c;
+
+
+ yytext_ptr = yy_bp;
+ yy_hold_char = *yy_cp;
+ yy_c_buf_p = yy_cp;
+ }
+#endif /* ifndef YY_NO_UNPUT */
+
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput()
+#else
+static int input()
+#endif
+ {
+ int c;
+
+ *yy_c_buf_p = yy_hold_char;
+
+ if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ /* This was really a NUL. */
+ *yy_c_buf_p = '\0';
+
+ else
+ { /* need more input */
+ int offset = yy_c_buf_p - yytext_ptr;
+ ++yy_c_buf_p;
+
+ switch ( yy_get_next_buffer() )
+ {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ yyrestart( yyin );
+
+ /* fall through */
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( yywrap() )
+ return EOF;
+
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p = yytext_ptr + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
+ *yy_c_buf_p = '\0'; /* preserve yytext */
+ yy_hold_char = *++yy_c_buf_p;
+
+
+ return c;
+ }
+#endif /* YY_NO_INPUT */
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+ {
+ if ( ! yy_current_buffer )
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_init_buffer( yy_current_buffer, input_file );
+ yy_load_buffer_state();
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+ {
+ if ( yy_current_buffer == new_buffer )
+ return;
+
+ if ( yy_current_buffer )
+ {
+ /* Flush out information for old buffer. */
+ *yy_c_buf_p = yy_hold_char;
+ yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ yy_current_buffer = new_buffer;
+ yy_load_buffer_state();
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ yy_did_buffer_switch_on_eof = 1;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+ {
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+ yyin = yy_current_buffer->yy_input_file;
+ yy_hold_char = *yy_c_buf_p;
+ }
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+ {
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ yy_init_buffer( b, file );
+
+ return b;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+ {
+ if ( ! b )
+ return;
+
+ if ( b == yy_current_buffer )
+ yy_current_buffer = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ yy_flex_free( (void *) b->yy_ch_buf );
+
+ yy_flex_free( (void *) b );
+ }
+
+
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+ {
+ yy_flush_buffer( b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+#if YY_ALWAYS_INTERACTIVE
+ b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+ b->yy_is_interactive = 0;
+#else
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+ {
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == yy_current_buffer )
+ yy_load_buffer_state();
+ }
+
+
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+ {
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return 0;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = 0;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ yy_switch_to_buffer( b );
+
+ return b;
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+ {
+ int len;
+ for ( len = 0; yy_str[len]; ++len )
+ ;
+
+ return yy_scan_bytes( yy_str, len );
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+ {
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = len + 2;
+ buf = (char *) yy_flex_alloc( n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+ for ( i = 0; i < len; ++i )
+ buf[i] = bytes[i];
+
+ buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = yy_scan_buffer( buf, n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+ }
+#endif
+
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
+#endif
+ {
+ if ( yy_start_stack_ptr >= yy_start_stack_depth )
+ {
+ yy_size_t new_size;
+
+ yy_start_stack_depth += YY_START_STACK_INCR;
+ new_size = yy_start_stack_depth * sizeof( int );
+
+ if ( ! yy_start_stack )
+ yy_start_stack = (int *) yy_flex_alloc( new_size );
+
+ else
+ yy_start_stack = (int *) yy_flex_realloc(
+ (void *) yy_start_stack, new_size );
+
+ if ( ! yy_start_stack )
+ YY_FATAL_ERROR(
+ "out of memory expanding start-condition stack" );
+ }
+
+ yy_start_stack[yy_start_stack_ptr++] = YY_START;
+
+ BEGIN(new_state);
+ }
+#endif
+
+
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+ {
+ if ( --yy_start_stack_ptr < 0 )
+ YY_FATAL_ERROR( "start-condition stack underflow" );
+
+ BEGIN(yy_start_stack[yy_start_stack_ptr]);
+ }
+#endif
+
+
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+ {
+ return yy_start_stack[yy_start_stack_ptr - 1];
+ }
+#endif
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+ {
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+ }
+
+
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ yytext[yyleng] = yy_hold_char; \
+ yy_c_buf_p = yytext + n; \
+ yy_hold_char = *yy_c_buf_p; \
+ *yy_c_buf_p = '\0'; \
+ yyleng = n; \
+ } \
+ while ( 0 )
+
+
+/* Internal utility routines. */
+
+#ifndef yytext_ptr
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+ {
+ register int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+ }
+#endif
+
+#ifdef YY_NEED_STRLEN
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+ {
+ register int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+ }
+#endif
+
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+ {
+ return (void *) malloc( size );
+ }
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+ {
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return (void *) realloc( (char *) ptr, size );
+ }
+
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+ {
+ free( ptr );
+ }
+
+#if YY_MAIN
+int main()
+ {
+ yylex();
+ return 0;
+ }
+#endif
+#line 196 "Scanner.l"
+
+
+namespace FreezeScript
+{
+
+void
+initScanner()
+{
+ keywordMap["true"] = TOK_TRUE;
+ keywordMap["false"] = TOK_FALSE;
+ keywordMap["and"] = TOK_AND;
+ keywordMap["or"] = TOK_OR;
+ keywordMap["not"] = TOK_NOT;
+ keywordMap["nil"] = TOK_NIL;
+}
+
+int
+checkKeyword(const string& id)
+{
+ KeywordMap::const_iterator pos = keywordMap.find(id);
+ if(pos != keywordMap.end())
+ {
+ return pos->second;
+ }
+ return TOK_IDENTIFIER;
+}
+
+StringTokPtr
+parseString(char start)
+{
+ StringTokPtr str = new StringTok;
+ while(true)
+ {
+ char c = static_cast<char>(yyinput());
+ if(c == start)
+ {
+ break;
+ }
+ else if(c == EOF)
+ {
+ parseErrorReporter->expressionSyntaxError("EOF in string");
+ break;
+ }
+ else if(c == '\n')
+ {
+ parseErrorReporter->expressionSyntaxError("newline in string");
+ }
+ else if(c == '\\')
+ {
+ char next = static_cast<char>(yyinput());
+ switch(next)
+ {
+ case '\\':
+ case '"':
+ case '\'':
+ {
+ str->v += next;
+ break;
+ }
+
+ case 'n':
+ {
+ str->v += '\n';
+ break;
+ }
+
+ case 'r':
+ {
+ str->v += '\r';
+ break;
+ }
+
+ case 't':
+ {
+ str->v += '\t';
+ break;
+ }
+
+ case 'v':
+ {
+ str->v += '\v';
+ break;
+ }
+
+ case 'f':
+ {
+ str->v += '\f';
+ break;
+ }
+
+ case 'a':
+ {
+ str->v += '\a';
+ break;
+ }
+
+ case 'b':
+ {
+ str->v += '\b';
+ break;
+ }
+
+ case '?':
+ {
+ str->v += '\?';
+ break;
+ }
+
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ {
+ static string octalDigits = "01234567";
+ unsigned short us = next - '0';
+ if(octalDigits.find_first_of(next = static_cast<char>(yyinput())) != string::npos)
+ {
+ us = us * 8 + next - '0';
+ if(octalDigits.find_first_of(next = static_cast<char>(yyinput())) != string::npos)
+ {
+ us = us * 8 + next - '0';
+ }
+ else
+ {
+ unput(next);
+ }
+ }
+ else
+ {
+ unput(next);
+ }
+ str->v += static_cast<char>(us);
+ break;
+ }
+ case 'x':
+ {
+ IceUtil::Int64 ull = 0;
+ while(isxdigit(static_cast<unsigned char>(next = static_cast<char>(yyinput()))))
+ {
+ ull *= 16;
+ if(isdigit(static_cast<unsigned char>(next)))
+ {
+ ull += next - '0';
+ }
+ else if(islower(static_cast<unsigned char>(next)))
+ {
+ ull += next - 'a' + 10;
+ }
+ else
+ {
+ ull += next - 'A' + 10;
+ }
+ }
+ unput(next);
+ str->v += static_cast<char>(ull);
+ break;
+ }
+
+ // TODO: add universal character names
+
+ default:
+ {
+ str->v += c;
+ unput(next);
+ }
+ }
+ }
+ else
+ {
+ str->v += c;
+ }
+ }
+
+ return str;
+}
+
+} // End of namespace FreezeScript
diff --git a/cpp/src/IceGrid/.gitignore b/cpp/src/IceGrid/.gitignore
index 9c92c4e432e..21d09e4ace5 100644
--- a/cpp/src/IceGrid/.gitignore
+++ b/cpp/src/IceGrid/.gitignore
@@ -9,6 +9,3 @@ IdentityObjectInfoDict.h
IdentityObjectInfoDict.cpp
StringAdapterInfoDict.h
StringAdapterInfoDict.cpp
-Grammar.cpp
-Grammar.h
-Scanner.cpp
diff --git a/cpp/src/IceGrid/Grammar.cpp b/cpp/src/IceGrid/Grammar.cpp
new file mode 100644
index 00000000000..16c562d9eb4
--- /dev/null
+++ b/cpp/src/IceGrid/Grammar.cpp
@@ -0,0 +1,3224 @@
+/* A Bison parser, made by GNU Bison 1.875c. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Written by Richard Stallman by simplifying the original so called
+ ``semantic'' parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 1
+
+/* Using locations. */
+#define YYLSP_NEEDED 0
+
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ ICE_GRID_HELP = 258,
+ ICE_GRID_EXIT = 259,
+ ICE_GRID_APPLICATION = 260,
+ ICE_GRID_NODE = 261,
+ ICE_GRID_REGISTRY = 262,
+ ICE_GRID_SERVER = 263,
+ ICE_GRID_ADAPTER = 264,
+ ICE_GRID_PING = 265,
+ ICE_GRID_LOAD = 266,
+ ICE_GRID_ADD = 267,
+ ICE_GRID_REMOVE = 268,
+ ICE_GRID_LIST = 269,
+ ICE_GRID_SHUTDOWN = 270,
+ ICE_GRID_STRING = 271,
+ ICE_GRID_START = 272,
+ ICE_GRID_STOP = 273,
+ ICE_GRID_PATCH = 274,
+ ICE_GRID_SIGNAL = 275,
+ ICE_GRID_STDOUT = 276,
+ ICE_GRID_STDERR = 277,
+ ICE_GRID_DESCRIBE = 278,
+ ICE_GRID_PROPERTIES = 279,
+ ICE_GRID_PROPERTY = 280,
+ ICE_GRID_STATE = 281,
+ ICE_GRID_PID = 282,
+ ICE_GRID_ENDPOINTS = 283,
+ ICE_GRID_ACTIVATION = 284,
+ ICE_GRID_OBJECT = 285,
+ ICE_GRID_FIND = 286,
+ ICE_GRID_SHOW = 287,
+ ICE_GRID_COPYING = 288,
+ ICE_GRID_WARRANTY = 289,
+ ICE_GRID_DIFF = 290,
+ ICE_GRID_UPDATE = 291,
+ ICE_GRID_INSTANTIATE = 292,
+ ICE_GRID_TEMPLATE = 293,
+ ICE_GRID_SERVICE = 294,
+ ICE_GRID_ENABLE = 295,
+ ICE_GRID_DISABLE = 296
+ };
+#endif
+#define ICE_GRID_HELP 258
+#define ICE_GRID_EXIT 259
+#define ICE_GRID_APPLICATION 260
+#define ICE_GRID_NODE 261
+#define ICE_GRID_REGISTRY 262
+#define ICE_GRID_SERVER 263
+#define ICE_GRID_ADAPTER 264
+#define ICE_GRID_PING 265
+#define ICE_GRID_LOAD 266
+#define ICE_GRID_ADD 267
+#define ICE_GRID_REMOVE 268
+#define ICE_GRID_LIST 269
+#define ICE_GRID_SHUTDOWN 270
+#define ICE_GRID_STRING 271
+#define ICE_GRID_START 272
+#define ICE_GRID_STOP 273
+#define ICE_GRID_PATCH 274
+#define ICE_GRID_SIGNAL 275
+#define ICE_GRID_STDOUT 276
+#define ICE_GRID_STDERR 277
+#define ICE_GRID_DESCRIBE 278
+#define ICE_GRID_PROPERTIES 279
+#define ICE_GRID_PROPERTY 280
+#define ICE_GRID_STATE 281
+#define ICE_GRID_PID 282
+#define ICE_GRID_ENDPOINTS 283
+#define ICE_GRID_ACTIVATION 284
+#define ICE_GRID_OBJECT 285
+#define ICE_GRID_FIND 286
+#define ICE_GRID_SHOW 287
+#define ICE_GRID_COPYING 288
+#define ICE_GRID_WARRANTY 289
+#define ICE_GRID_DIFF 290
+#define ICE_GRID_UPDATE 291
+#define ICE_GRID_INSTANTIATE 292
+#define ICE_GRID_TEMPLATE 293
+#define ICE_GRID_SERVICE 294
+#define ICE_GRID_ENABLE 295
+#define ICE_GRID_DISABLE 296
+
+
+
+
+/* Copy the first part of user declarations. */
+#line 1 "Grammar.y"
+
+
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <IceGrid/Parser.h>
+
+#ifdef _MSC_VER
+// I get these warnings from some bison versions:
+// warning C4102: 'yyoverflowlab' : unreferenced label
+# pragma warning( disable : 4102 )
+// warning C4065: switch statement contains 'default' but no 'case' labels
+# pragma warning( disable : 4065 )
+#endif
+
+using namespace std;
+using namespace Ice;
+using namespace IceGrid;
+
+void
+yyerror(const char* s)
+{
+ parser->invalidCommand(s);
+}
+
+
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 1
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+typedef int YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+/* Copy the second part of user declarations. */
+
+
+/* Line 214 of yacc.c. */
+#line 203 "Grammar.tab.c"
+
+#if ! defined (yyoverflow) || YYERROR_VERBOSE
+
+# ifndef YYFREE
+# define YYFREE free
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# endif
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# define YYSTACK_ALLOC alloca
+# endif
+# else
+# if defined (alloca) || defined (_ALLOCA_H)
+# define YYSTACK_ALLOC alloca
+# else
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# else
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# endif
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# endif
+#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
+
+
+#if (! defined (yyoverflow) \
+ && (! defined (__cplusplus) \
+ || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ short yyss;
+ YYSTYPE yyvs;
+ };
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined (__GNUC__) && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ register YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined (__STDC__) || defined (__cplusplus)
+ typedef signed char yysigned_char;
+#else
+ typedef short yysigned_char;
+#endif
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 4
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 2510
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 43
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 7
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 169
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 361
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 296
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const unsigned char yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 42,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const unsigned short yyprhs[] =
+{
+ 0, 0, 3, 5, 6, 10, 13, 14, 17, 20,
+ 25, 30, 35, 40, 45, 50, 55, 60, 65, 70,
+ 75, 80, 85, 90, 96, 102, 108, 114, 119, 125,
+ 131, 136, 141, 146, 151, 156, 161, 166, 171, 176,
+ 181, 186, 191, 196, 201, 206, 211, 216, 221, 226,
+ 231, 236, 241, 246, 251, 256, 261, 266, 271, 276,
+ 281, 286, 291, 296, 301, 306, 311, 316, 321, 326,
+ 331, 336, 341, 346, 351, 356, 361, 366, 371, 376,
+ 381, 386, 391, 396, 401, 406, 411, 416, 421, 426,
+ 431, 436, 441, 446, 451, 456, 461, 466, 471, 476,
+ 481, 486, 491, 496, 501, 506, 511, 516, 521, 526,
+ 531, 536, 541, 546, 550, 554, 558, 563, 569, 575,
+ 582, 587, 591, 595, 600, 604, 608, 611, 613, 616,
+ 619, 623, 627, 628, 630, 632, 634, 636, 638, 640,
+ 642, 644, 646, 648, 650, 652, 654, 656, 658, 660,
+ 662, 664, 666, 668, 670, 672, 674, 676, 678, 680,
+ 682, 684, 686, 688, 690, 692, 694, 696, 698, 700
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yysigned_char yyrhs[] =
+{
+ 44, 0, -1, 45, -1, -1, 45, 46, 47, -1,
+ 46, 47, -1, -1, 3, 42, -1, 4, 42, -1,
+ 5, 12, 48, 42, -1, 5, 12, 3, 42, -1,
+ 5, 13, 48, 42, -1, 5, 13, 3, 42, -1,
+ 5, 35, 48, 42, -1, 5, 35, 3, 42, -1,
+ 5, 36, 48, 42, -1, 5, 36, 3, 42, -1,
+ 5, 23, 48, 42, -1, 5, 23, 3, 42, -1,
+ 5, 19, 48, 42, -1, 5, 19, 3, 42, -1,
+ 5, 14, 48, 42, -1, 5, 14, 3, 42, -1,
+ 8, 38, 23, 48, 42, -1, 8, 38, 23, 3,
+ 42, -1, 8, 38, 37, 48, 42, -1, 8, 38,
+ 37, 3, 42, -1, 8, 38, 3, 42, -1, 39,
+ 38, 23, 48, 42, -1, 39, 38, 23, 3, 42,
+ -1, 39, 38, 3, 42, -1, 6, 23, 48, 42,
+ -1, 6, 23, 3, 42, -1, 6, 10, 48, 42,
+ -1, 6, 10, 3, 42, -1, 6, 11, 48, 42,
+ -1, 6, 11, 3, 42, -1, 6, 15, 48, 42,
+ -1, 6, 15, 3, 42, -1, 6, 14, 48, 42,
+ -1, 6, 14, 3, 42, -1, 6, 32, 48, 42,
+ -1, 6, 32, 3, 42, -1, 7, 23, 48, 42,
+ -1, 7, 23, 3, 42, -1, 7, 10, 48, 42,
+ -1, 7, 10, 3, 42, -1, 7, 15, 48, 42,
+ -1, 7, 15, 3, 42, -1, 7, 14, 48, 42,
+ -1, 7, 14, 3, 42, -1, 7, 32, 48, 42,
+ -1, 7, 32, 3, 42, -1, 8, 13, 48, 42,
+ -1, 8, 13, 3, 42, -1, 8, 23, 48, 42,
+ -1, 8, 23, 3, 42, -1, 8, 17, 48, 42,
+ -1, 8, 17, 3, 42, -1, 8, 18, 48, 42,
+ -1, 8, 18, 3, 42, -1, 8, 19, 48, 42,
+ -1, 8, 19, 3, 42, -1, 8, 20, 48, 42,
+ -1, 8, 20, 3, 42, -1, 8, 21, 48, 42,
+ -1, 8, 21, 3, 42, -1, 8, 22, 48, 42,
+ -1, 8, 22, 3, 42, -1, 8, 26, 48, 42,
+ -1, 8, 26, 3, 42, -1, 8, 27, 48, 42,
+ -1, 8, 27, 3, 42, -1, 8, 24, 48, 42,
+ -1, 8, 24, 3, 42, -1, 8, 25, 48, 42,
+ -1, 8, 25, 3, 42, -1, 8, 40, 48, 42,
+ -1, 8, 40, 3, 42, -1, 8, 41, 48, 42,
+ -1, 8, 41, 3, 42, -1, 8, 14, 48, 42,
+ -1, 8, 14, 3, 42, -1, 8, 32, 48, 42,
+ -1, 8, 32, 3, 42, -1, 39, 17, 48, 42,
+ -1, 39, 17, 3, 42, -1, 39, 18, 48, 42,
+ -1, 39, 18, 3, 42, -1, 39, 23, 48, 42,
+ -1, 39, 23, 3, 42, -1, 39, 24, 48, 42,
+ -1, 39, 24, 3, 42, -1, 39, 25, 48, 42,
+ -1, 39, 25, 3, 42, -1, 39, 14, 48, 42,
+ -1, 39, 14, 3, 42, -1, 9, 28, 48, 42,
+ -1, 9, 28, 3, 42, -1, 9, 13, 48, 42,
+ -1, 9, 13, 3, 42, -1, 9, 14, 48, 42,
+ -1, 9, 14, 3, 42, -1, 30, 12, 48, 42,
+ -1, 30, 12, 3, 42, -1, 30, 13, 48, 42,
+ -1, 30, 13, 3, 42, -1, 30, 31, 48, 42,
+ -1, 30, 31, 3, 42, -1, 30, 14, 48, 42,
+ -1, 30, 14, 3, 42, -1, 30, 23, 48, 42,
+ -1, 30, 23, 3, 42, -1, 32, 33, 42, -1,
+ 32, 34, 42, -1, 3, 49, 42, -1, 3, 49,
+ 49, 42, -1, 3, 49, 16, 48, 42, -1, 3,
+ 49, 49, 49, 42, -1, 3, 49, 49, 16, 48,
+ 42, -1, 3, 16, 48, 42, -1, 3, 1, 42,
+ -1, 49, 3, 42, -1, 49, 16, 1, 42, -1,
+ 49, 1, 42, -1, 16, 1, 42, -1, 1, 42,
+ -1, 42, -1, 16, 48, -1, 49, 48, -1, 16,
+ 3, 48, -1, 49, 3, 48, -1, -1, 4, -1,
+ 5, -1, 6, -1, 7, -1, 8, -1, 9, -1,
+ 10, -1, 11, -1, 12, -1, 13, -1, 14, -1,
+ 15, -1, 17, -1, 18, -1, 19, -1, 20, -1,
+ 23, -1, 26, -1, 27, -1, 24, -1, 25, -1,
+ 28, -1, 29, -1, 30, -1, 31, -1, 32, -1,
+ 33, -1, 34, -1, 35, -1, 36, -1, 37, -1,
+ 38, -1, 39, -1, 40, -1, 41, -1, 22, -1,
+ 21, -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const unsigned short yyrline[] =
+{
+ 0, 87, 87, 91, 98, 101, 108, 116, 120, 124,
+ 128, 132, 136, 140, 144, 148, 152, 156, 160, 164,
+ 168, 172, 176, 180, 184, 188, 192, 196, 200, 204,
+ 208, 212, 216, 220, 224, 228, 232, 236, 240, 244,
+ 248, 252, 256, 260, 264, 268, 272, 276, 280, 284,
+ 288, 292, 296, 300, 304, 308, 312, 316, 320, 324,
+ 328, 332, 336, 340, 344, 348, 352, 356, 360, 364,
+ 368, 372, 376, 380, 384, 388, 392, 396, 400, 404,
+ 408, 412, 416, 420, 424, 428, 432, 436, 440, 444,
+ 448, 452, 456, 460, 464, 468, 472, 476, 480, 484,
+ 488, 492, 496, 500, 504, 508, 512, 516, 520, 524,
+ 528, 532, 536, 540, 544, 548, 552, 563, 567, 578,
+ 589, 593, 597, 601, 607, 612, 617, 621, 630, 635,
+ 640, 646, 653, 661, 664, 667, 670, 673, 676, 679,
+ 682, 685, 688, 691, 694, 697, 700, 703, 706, 709,
+ 712, 715, 718, 721, 724, 727, 730, 733, 736, 739,
+ 742, 745, 748, 751, 754, 757, 760, 763, 766, 769
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE
+/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "ICE_GRID_HELP", "ICE_GRID_EXIT",
+ "ICE_GRID_APPLICATION", "ICE_GRID_NODE", "ICE_GRID_REGISTRY",
+ "ICE_GRID_SERVER", "ICE_GRID_ADAPTER", "ICE_GRID_PING", "ICE_GRID_LOAD",
+ "ICE_GRID_ADD", "ICE_GRID_REMOVE", "ICE_GRID_LIST", "ICE_GRID_SHUTDOWN",
+ "ICE_GRID_STRING", "ICE_GRID_START", "ICE_GRID_STOP", "ICE_GRID_PATCH",
+ "ICE_GRID_SIGNAL", "ICE_GRID_STDOUT", "ICE_GRID_STDERR",
+ "ICE_GRID_DESCRIBE", "ICE_GRID_PROPERTIES", "ICE_GRID_PROPERTY",
+ "ICE_GRID_STATE", "ICE_GRID_PID", "ICE_GRID_ENDPOINTS",
+ "ICE_GRID_ACTIVATION", "ICE_GRID_OBJECT", "ICE_GRID_FIND",
+ "ICE_GRID_SHOW", "ICE_GRID_COPYING", "ICE_GRID_WARRANTY",
+ "ICE_GRID_DIFF", "ICE_GRID_UPDATE", "ICE_GRID_INSTANTIATE",
+ "ICE_GRID_TEMPLATE", "ICE_GRID_SERVICE", "ICE_GRID_ENABLE",
+ "ICE_GRID_DISABLE", "';'", "$accept", "start", "commands",
+ "checkInterrupted", "command", "strings", "keyword", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const unsigned short yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 59
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const unsigned char yyr1[] =
+{
+ 0, 43, 44, 44, 45, 45, 46, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 48, 48,
+ 48, 48, 48, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const unsigned char yyr2[] =
+{
+ 0, 2, 1, 0, 3, 2, 0, 2, 2, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 5, 5, 5, 5, 4, 5, 5,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 3, 3, 3, 4, 5, 5, 6,
+ 4, 3, 3, 4, 3, 3, 2, 1, 2, 2,
+ 3, 3, 0, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const unsigned char yydefact[] =
+{
+ 6, 0, 6, 0, 1, 0, 0, 0, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 0, 145, 146, 147, 148, 169, 168, 149, 152, 153,
+ 150, 151, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 165, 166, 167, 127, 5, 0, 4,
+ 126, 0, 133, 134, 135, 136, 137, 138, 132, 156,
+ 158, 165, 7, 0, 8, 132, 132, 132, 132, 132,
+ 132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
+ 132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
+ 132, 132, 132, 132, 132, 132, 132, 0, 132, 132,
+ 132, 132, 132, 0, 132, 132, 132, 132, 132, 0,
+ 0, 132, 132, 132, 132, 132, 132, 0, 0, 0,
+ 0, 121, 132, 0, 132, 132, 115, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 132, 132, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 125, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 113, 114, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 132, 124, 122, 0, 132, 128, 120, 132, 129,
+ 0, 132, 116, 0, 10, 9, 12, 11, 22, 21,
+ 20, 19, 18, 17, 14, 13, 16, 15, 34, 33,
+ 36, 35, 40, 39, 38, 37, 32, 31, 42, 41,
+ 46, 45, 50, 49, 48, 47, 44, 43, 52, 51,
+ 54, 53, 82, 81, 58, 57, 60, 59, 62, 61,
+ 64, 63, 66, 65, 68, 67, 56, 55, 74, 73,
+ 76, 75, 70, 69, 72, 71, 84, 83, 27, 0,
+ 0, 0, 0, 78, 77, 80, 79, 100, 99, 102,
+ 101, 98, 97, 104, 103, 106, 105, 110, 109, 112,
+ 111, 108, 107, 96, 95, 86, 85, 88, 87, 90,
+ 89, 92, 91, 94, 93, 30, 0, 0, 123, 130,
+ 131, 117, 0, 118, 24, 23, 26, 25, 29, 28,
+ 119
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yysigned_char yydefgoto[] =
+{
+ -1, 1, 2, 3, 47, 123, 124
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -66
+static const short yypact[] =
+{
+ 38, 53, 55, 60, -66, 60, 20, 176, 62, 96,
+ 140, 142, 121, 98, -66, -66, -66, -66, -66, -66,
+ 112, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, 93, -66, 11, -66, -66, -66,
+ -66, -66, -66, 2388, -66, -66, -66, -66, 117, -66,
+ -66, 75, -66, -66, -66, -66, -66, -66, 2360, -66,
+ -66, -66, -66, 215, -66, 255, 294, 333, 372, 411,
+ 450, 489, 528, 567, 606, 645, 684, 723, 762, 801,
+ 840, 879, 918, 957, 996, 1035, 1074, 1113, 1152, 1191,
+ 1230, 1269, 1308, 1347, 1386, 1425, 1464, 100, 1503, 1542,
+ 1581, 1620, 1659, 79, 1698, 1737, 1776, 1815, 1854, 80,
+ 83, 1893, 1932, 1971, 2010, 2049, 2088, 29, 85, 88,
+ 135, -66, 2127, 107, 2166, 2360, -66, 2204, 116, 118,
+ 122, 125, 126, 127, 129, 133, 137, 2361, 2362, 2365,
+ 2366, 2367, 2368, 2372, 2373, 2374, 2375, 2376, 2377, 2378,
+ 2379, 2380, 2381, 2382, 2383, 2385, 2386, 2387, 2389, 2390,
+ 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 2400,
+ 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 2410,
+ 2411, 2412, 2413, 2414, 2415, 2416, 2417, 2418, 2419, 2420,
+ 2421, 2422, 2423, 2244, 2283, 2424, 2425, 2426, 2427, 2428,
+ 2429, 2430, 2431, 2432, 2433, -66, 2434, 2435, 2436, 2437,
+ 2438, 2439, 2440, 2441, 2442, 2443, -66, -66, 2444, 2445,
+ 2446, 2447, 2448, 2449, 2450, 2451, 2452, 2453, 2454, 2455,
+ 2456, 2322, -66, -66, 2457, 2360, -66, -66, 2360, -66,
+ 2458, 2360, -66, 2459, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, 2460,
+ 2461, 2462, 2463, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, 2464, 2465, -66, -66,
+ -66, -66, 2466, -66, -66, -66, -66, -66, -66, -66,
+ -66
+};
+
+/* YYPGOTO[NTERM-NUM]. */
+static const short yypgoto[] =
+{
+ -66, -66, -66, 2507, 2505, -65, 51
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -4
+static const short yytable[] =
+{
+ 129, 131, 133, 135, 137, 139, 141, 143, 145, 147,
+ 149, 151, 153, 155, 157, 159, 161, 163, 165, 167,
+ 169, 171, 173, 175, 177, 179, 181, 183, 185, 187,
+ 189, 191, 230, 196, 198, 200, 202, 204, -3, 207,
+ 209, 211, 213, 215, 109, 110, 219, 221, 223, 225,
+ 227, 229, 231, 4, 48, -2, 48, 236, 63, 239,
+ 240, 6, 50, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 192, 64, 104, 105, 106, 65, 66,
+ 67, 100, 101, 103, 127, 68, 107, 121, 118, 69,
+ 119, 205, 216, 193, 108, 217, 102, 232, 310, 312,
+ 233, 70, 71, 120, 83, 84, 234, 194, 85, 86,
+ 87, 88, 89, 90, 91, 92, 93, 94, 95, 237,
+ 72, 73, 78, 96, 74, 75, 79, 80, 244, 97,
+ 245, 98, 99, 76, 246, 81, 347, 247, 248, 249,
+ 349, 250, 77, 350, 82, 251, 352, 51, 243, 252,
+ 52, 53, 54, 55, 56, 57, 14, 15, 16, 17,
+ 18, 19, 58, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 59, 35, 60, 37,
+ 38, 39, 40, 41, 42, 61, 44, 45, 62, 52,
+ 53, 54, 55, 56, 57, 14, 15, 16, 17, 18,
+ 19, 125, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 59, 35, 60, 37, 38,
+ 39, 40, 41, 42, 61, 44, 45, 126, 128, 52,
+ 53, 54, 55, 56, 57, 14, 15, 16, 17, 18,
+ 19, 122, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 59, 35, 60, 37, 38,
+ 39, 40, 41, 42, 61, 44, 45, 130, 52, 53,
+ 54, 55, 56, 57, 14, 15, 16, 17, 18, 19,
+ 122, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 59, 35, 60, 37, 38, 39,
+ 40, 41, 42, 61, 44, 45, 132, 52, 53, 54,
+ 55, 56, 57, 14, 15, 16, 17, 18, 19, 122,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 59, 35, 60, 37, 38, 39, 40,
+ 41, 42, 61, 44, 45, 134, 52, 53, 54, 55,
+ 56, 57, 14, 15, 16, 17, 18, 19, 122, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 59, 35, 60, 37, 38, 39, 40, 41,
+ 42, 61, 44, 45, 136, 52, 53, 54, 55, 56,
+ 57, 14, 15, 16, 17, 18, 19, 122, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 59, 35, 60, 37, 38, 39, 40, 41, 42,
+ 61, 44, 45, 138, 52, 53, 54, 55, 56, 57,
+ 14, 15, 16, 17, 18, 19, 122, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 59, 35, 60, 37, 38, 39, 40, 41, 42, 61,
+ 44, 45, 140, 52, 53, 54, 55, 56, 57, 14,
+ 15, 16, 17, 18, 19, 122, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 59,
+ 35, 60, 37, 38, 39, 40, 41, 42, 61, 44,
+ 45, 142, 52, 53, 54, 55, 56, 57, 14, 15,
+ 16, 17, 18, 19, 122, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 59, 35,
+ 60, 37, 38, 39, 40, 41, 42, 61, 44, 45,
+ 144, 52, 53, 54, 55, 56, 57, 14, 15, 16,
+ 17, 18, 19, 122, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 59, 35, 60,
+ 37, 38, 39, 40, 41, 42, 61, 44, 45, 146,
+ 52, 53, 54, 55, 56, 57, 14, 15, 16, 17,
+ 18, 19, 122, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 59, 35, 60, 37,
+ 38, 39, 40, 41, 42, 61, 44, 45, 148, 52,
+ 53, 54, 55, 56, 57, 14, 15, 16, 17, 18,
+ 19, 122, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 59, 35, 60, 37, 38,
+ 39, 40, 41, 42, 61, 44, 45, 150, 52, 53,
+ 54, 55, 56, 57, 14, 15, 16, 17, 18, 19,
+ 122, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 59, 35, 60, 37, 38, 39,
+ 40, 41, 42, 61, 44, 45, 152, 52, 53, 54,
+ 55, 56, 57, 14, 15, 16, 17, 18, 19, 122,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 59, 35, 60, 37, 38, 39, 40,
+ 41, 42, 61, 44, 45, 154, 52, 53, 54, 55,
+ 56, 57, 14, 15, 16, 17, 18, 19, 122, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 59, 35, 60, 37, 38, 39, 40, 41,
+ 42, 61, 44, 45, 156, 52, 53, 54, 55, 56,
+ 57, 14, 15, 16, 17, 18, 19, 122, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 59, 35, 60, 37, 38, 39, 40, 41, 42,
+ 61, 44, 45, 158, 52, 53, 54, 55, 56, 57,
+ 14, 15, 16, 17, 18, 19, 122, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 59, 35, 60, 37, 38, 39, 40, 41, 42, 61,
+ 44, 45, 160, 52, 53, 54, 55, 56, 57, 14,
+ 15, 16, 17, 18, 19, 122, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 59,
+ 35, 60, 37, 38, 39, 40, 41, 42, 61, 44,
+ 45, 162, 52, 53, 54, 55, 56, 57, 14, 15,
+ 16, 17, 18, 19, 122, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 59, 35,
+ 60, 37, 38, 39, 40, 41, 42, 61, 44, 45,
+ 164, 52, 53, 54, 55, 56, 57, 14, 15, 16,
+ 17, 18, 19, 122, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 59, 35, 60,
+ 37, 38, 39, 40, 41, 42, 61, 44, 45, 166,
+ 52, 53, 54, 55, 56, 57, 14, 15, 16, 17,
+ 18, 19, 122, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 59, 35, 60, 37,
+ 38, 39, 40, 41, 42, 61, 44, 45, 168, 52,
+ 53, 54, 55, 56, 57, 14, 15, 16, 17, 18,
+ 19, 122, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 59, 35, 60, 37, 38,
+ 39, 40, 41, 42, 61, 44, 45, 170, 52, 53,
+ 54, 55, 56, 57, 14, 15, 16, 17, 18, 19,
+ 122, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 59, 35, 60, 37, 38, 39,
+ 40, 41, 42, 61, 44, 45, 172, 52, 53, 54,
+ 55, 56, 57, 14, 15, 16, 17, 18, 19, 122,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 59, 35, 60, 37, 38, 39, 40,
+ 41, 42, 61, 44, 45, 174, 52, 53, 54, 55,
+ 56, 57, 14, 15, 16, 17, 18, 19, 122, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 59, 35, 60, 37, 38, 39, 40, 41,
+ 42, 61, 44, 45, 176, 52, 53, 54, 55, 56,
+ 57, 14, 15, 16, 17, 18, 19, 122, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 59, 35, 60, 37, 38, 39, 40, 41, 42,
+ 61, 44, 45, 178, 52, 53, 54, 55, 56, 57,
+ 14, 15, 16, 17, 18, 19, 122, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 59, 35, 60, 37, 38, 39, 40, 41, 42, 61,
+ 44, 45, 180, 52, 53, 54, 55, 56, 57, 14,
+ 15, 16, 17, 18, 19, 122, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 59,
+ 35, 60, 37, 38, 39, 40, 41, 42, 61, 44,
+ 45, 182, 52, 53, 54, 55, 56, 57, 14, 15,
+ 16, 17, 18, 19, 122, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 59, 35,
+ 60, 37, 38, 39, 40, 41, 42, 61, 44, 45,
+ 184, 52, 53, 54, 55, 56, 57, 14, 15, 16,
+ 17, 18, 19, 122, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 59, 35, 60,
+ 37, 38, 39, 40, 41, 42, 61, 44, 45, 186,
+ 52, 53, 54, 55, 56, 57, 14, 15, 16, 17,
+ 18, 19, 122, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 59, 35, 60, 37,
+ 38, 39, 40, 41, 42, 61, 44, 45, 188, 52,
+ 53, 54, 55, 56, 57, 14, 15, 16, 17, 18,
+ 19, 122, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 59, 35, 60, 37, 38,
+ 39, 40, 41, 42, 61, 44, 45, 190, 52, 53,
+ 54, 55, 56, 57, 14, 15, 16, 17, 18, 19,
+ 122, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 59, 35, 60, 37, 38, 39,
+ 40, 41, 42, 61, 44, 45, 195, 52, 53, 54,
+ 55, 56, 57, 14, 15, 16, 17, 18, 19, 122,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 59, 35, 60, 37, 38, 39, 40,
+ 41, 42, 61, 44, 45, 197, 52, 53, 54, 55,
+ 56, 57, 14, 15, 16, 17, 18, 19, 122, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 59, 35, 60, 37, 38, 39, 40, 41,
+ 42, 61, 44, 45, 199, 52, 53, 54, 55, 56,
+ 57, 14, 15, 16, 17, 18, 19, 122, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 59, 35, 60, 37, 38, 39, 40, 41, 42,
+ 61, 44, 45, 201, 52, 53, 54, 55, 56, 57,
+ 14, 15, 16, 17, 18, 19, 122, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 59, 35, 60, 37, 38, 39, 40, 41, 42, 61,
+ 44, 45, 203, 52, 53, 54, 55, 56, 57, 14,
+ 15, 16, 17, 18, 19, 122, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 59,
+ 35, 60, 37, 38, 39, 40, 41, 42, 61, 44,
+ 45, 206, 52, 53, 54, 55, 56, 57, 14, 15,
+ 16, 17, 18, 19, 122, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 59, 35,
+ 60, 37, 38, 39, 40, 41, 42, 61, 44, 45,
+ 208, 52, 53, 54, 55, 56, 57, 14, 15, 16,
+ 17, 18, 19, 122, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 59, 35, 60,
+ 37, 38, 39, 40, 41, 42, 61, 44, 45, 210,
+ 52, 53, 54, 55, 56, 57, 14, 15, 16, 17,
+ 18, 19, 122, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 59, 35, 60, 37,
+ 38, 39, 40, 41, 42, 61, 44, 45, 212, 52,
+ 53, 54, 55, 56, 57, 14, 15, 16, 17, 18,
+ 19, 122, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 59, 35, 60, 37, 38,
+ 39, 40, 41, 42, 61, 44, 45, 214, 52, 53,
+ 54, 55, 56, 57, 14, 15, 16, 17, 18, 19,
+ 122, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 59, 35, 60, 37, 38, 39,
+ 40, 41, 42, 61, 44, 45, 218, 52, 53, 54,
+ 55, 56, 57, 14, 15, 16, 17, 18, 19, 122,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 59, 35, 60, 37, 38, 39, 40,
+ 41, 42, 61, 44, 45, 220, 52, 53, 54, 55,
+ 56, 57, 14, 15, 16, 17, 18, 19, 122, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 59, 35, 60, 37, 38, 39, 40, 41,
+ 42, 61, 44, 45, 222, 52, 53, 54, 55, 56,
+ 57, 14, 15, 16, 17, 18, 19, 122, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 59, 35, 60, 37, 38, 39, 40, 41, 42,
+ 61, 44, 45, 224, 52, 53, 54, 55, 56, 57,
+ 14, 15, 16, 17, 18, 19, 122, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 59, 35, 60, 37, 38, 39, 40, 41, 42, 61,
+ 44, 45, 226, 52, 53, 54, 55, 56, 57, 14,
+ 15, 16, 17, 18, 19, 122, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 59,
+ 35, 60, 37, 38, 39, 40, 41, 42, 61, 44,
+ 45, 228, 52, 53, 54, 55, 56, 57, 14, 15,
+ 16, 17, 18, 19, 122, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 59, 35,
+ 60, 37, 38, 39, 40, 41, 42, 61, 44, 45,
+ 235, 52, 53, 54, 55, 56, 57, 14, 15, 16,
+ 17, 18, 19, 122, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 59, 35, 60,
+ 37, 38, 39, 40, 41, 42, 61, 44, 45, 238,
+ 52, 53, 54, 55, 56, 57, 14, 15, 16, 17,
+ 18, 19, 122, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 59, 35, 60, 37,
+ 38, 39, 40, 41, 42, 61, 44, 45, 52, 53,
+ 54, 55, 56, 57, 14, 15, 16, 17, 18, 19,
+ 241, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 59, 35, 60, 37, 38, 39,
+ 40, 41, 42, 61, 44, 45, 242, 309, 52, 53,
+ 54, 55, 56, 57, 14, 15, 16, 17, 18, 19,
+ 122, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 59, 35, 60, 37, 38, 39,
+ 40, 41, 42, 61, 44, 45, 311, 52, 53, 54,
+ 55, 56, 57, 14, 15, 16, 17, 18, 19, 122,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 59, 35, 60, 37, 38, 39, 40,
+ 41, 42, 61, 44, 45, 346, 52, 53, 54, 55,
+ 56, 57, 14, 15, 16, 17, 18, 19, 122, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 59, 35, 60, 37, 38, 39, 40, 41,
+ 42, 61, 44, 45, 52, 53, 54, 55, 56, 57,
+ 14, 15, 16, 17, 18, 19, 122, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 59, 35, 60, 37, 38, 39, 40, 41, 42, 61,
+ 44, 45, 111, 253, 254, 112, 113, 255, 256, 257,
+ 258, 114, 115, 116, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 117, 271, 272, 273,
+ 0, 274, 275, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
+ 303, 304, 305, 306, 307, 308, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 348,
+ 351, 353, 354, 355, 356, 357, 358, 359, 360, 5,
+ 49
+};
+
+static const short yycheck[] =
+{
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96, 3, 98, 99, 100, 101, 102, 0, 104,
+ 105, 106, 107, 108, 33, 34, 111, 112, 113, 114,
+ 115, 116, 23, 0, 3, 0, 5, 122, 7, 124,
+ 125, 1, 42, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 3, 42, 12, 13, 14, 12, 13,
+ 14, 13, 14, 1, 63, 19, 23, 42, 1, 23,
+ 3, 42, 42, 23, 31, 42, 28, 42, 193, 194,
+ 42, 35, 36, 16, 13, 14, 1, 37, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 42,
+ 10, 11, 10, 32, 14, 15, 14, 15, 42, 38,
+ 42, 40, 41, 23, 42, 23, 231, 42, 42, 42,
+ 235, 42, 32, 238, 32, 42, 241, 1, 127, 42,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 42, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 14, 42, 42, 17, 18, 42, 42, 42,
+ 42, 23, 24, 25, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 38, 42, 42, 42,
+ -1, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 2,
+ 5
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const unsigned char yystos[] =
+{
+ 0, 44, 45, 46, 0, 46, 1, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, 47, 49, 47,
+ 42, 1, 4, 5, 6, 7, 8, 9, 16, 30,
+ 32, 39, 42, 49, 42, 12, 13, 14, 19, 23,
+ 35, 36, 10, 11, 14, 15, 23, 32, 10, 14,
+ 15, 23, 32, 13, 14, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 32, 38, 40, 41,
+ 13, 14, 28, 1, 12, 13, 14, 23, 31, 33,
+ 34, 14, 17, 18, 23, 24, 25, 38, 1, 3,
+ 16, 42, 16, 48, 49, 16, 42, 49, 3, 48,
+ 3, 48, 3, 48, 3, 48, 3, 48, 3, 48,
+ 3, 48, 3, 48, 3, 48, 3, 48, 3, 48,
+ 3, 48, 3, 48, 3, 48, 3, 48, 3, 48,
+ 3, 48, 3, 48, 3, 48, 3, 48, 3, 48,
+ 3, 48, 3, 48, 3, 48, 3, 48, 3, 48,
+ 3, 48, 3, 48, 3, 48, 3, 48, 3, 48,
+ 3, 48, 3, 23, 37, 3, 48, 3, 48, 3,
+ 48, 3, 48, 3, 48, 42, 3, 48, 3, 48,
+ 3, 48, 3, 48, 3, 48, 42, 42, 3, 48,
+ 3, 48, 3, 48, 3, 48, 3, 48, 3, 48,
+ 3, 23, 42, 42, 1, 3, 48, 42, 3, 48,
+ 48, 16, 42, 49, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 3,
+ 48, 3, 48, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 3, 48, 42, 48,
+ 48, 42, 48, 42, 42, 42, 42, 42, 42, 42,
+ 42
+};
+
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# endif
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+
+#define YYFAIL goto yyerrlab
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
+ YYPOPSTACK; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror ("syntax error: cannot back up");\
+ YYERROR; \
+ } \
+while (0)
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+/* YYLLOC_DEFAULT -- Compute the default location (before the actions
+ are run). */
+
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ ((Current).first_line = (Rhs)[1].first_line, \
+ (Current).first_column = (Rhs)[1].first_column, \
+ (Current).last_line = (Rhs)[N].last_line, \
+ (Current).last_column = (Rhs)[N].last_column)
+#endif
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (&yylval, YYLEX_PARAM)
+#else
+# define YYLEX yylex (&yylval)
+#endif
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+# define YYDSYMPRINT(Args) \
+do { \
+ if (yydebug) \
+ yysymprint Args; \
+} while (0)
+
+# define YYDSYMPRINTF(Title, Token, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yysymprint (stderr, \
+ Token, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_stack_print (short *bottom, short *top)
+#else
+static void
+yy_stack_print (bottom, top)
+ short *bottom;
+ short *top;
+#endif
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (/* Nothing. */; bottom <= top; ++bottom)
+ YYFPRINTF (stderr, " %d", *bottom);
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_reduce_print (int yyrule)
+#else
+static void
+yy_reduce_print (yyrule)
+ int yyrule;
+#endif
+{
+ int yyi;
+ unsigned int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
+ yyrule - 1, yylno);
+ /* Print the symbols being reduced, and their result. */
+ for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
+ YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
+ YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (Rule); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YYDSYMPRINT(Args)
+# define YYDSYMPRINTF(Title, Token, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
+# undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined (__GLIBC__) && defined (_STRING_H)
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+# if defined (__STDC__) || defined (__cplusplus)
+yystrlen (const char *yystr)
+# else
+yystrlen (yystr)
+ const char *yystr;
+# endif
+{
+ register const char *yys = yystr;
+
+ while (*yys++ != '\0')
+ continue;
+
+ return yys - yystr - 1;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+# if defined (__STDC__) || defined (__cplusplus)
+yystpcpy (char *yydest, const char *yysrc)
+# else
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+# endif
+{
+ register char *yyd = yydest;
+ register const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+#endif /* !YYERROR_VERBOSE */
+
+
+
+#if YYDEBUG
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yysymprint (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ if (yytype < YYNTOKENS)
+ {
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+# ifdef YYPRINT
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+ }
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+ YYFPRINTF (yyoutput, ")");
+}
+
+#endif /* ! YYDEBUG */
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yydestruct (int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yytype, yyvaluep)
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
+}
+
+
+/* Prevent warnings from -Wmissing-prototypes. */
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM);
+# else
+int yyparse ();
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM)
+# else
+int yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+
+#endif
+#endif
+{
+ /* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far. */
+int yynerrs;
+
+ register int yystate;
+ register int yyn;
+ int yyresult;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken = 0;
+
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ short yyssa[YYINITDEPTH];
+ short *yyss = yyssa;
+ register short *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ register YYSTYPE *yyvsp;
+
+
+
+#define YYPOPSTACK (yyvsp--, yyssp--)
+
+ YYSIZE_T yystacksize = YYINITDEPTH;
+
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+
+ /* When reducing, the number of symbols on the RHS of the reduced
+ rule. */
+ int yylen;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+
+ yyssp = yyss;
+ yyvsp = yyvs;
+
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. so pushing a state here evens the stacks.
+ */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ short *yyss1 = yyss;
+
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow ("parser stack overflow",
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyoverflowlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyoverflowlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ short *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyoverflowlab;
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+/* Do appropriate processing given the current state. */
+/* Read a lookahead token if we need one and don't already have one. */
+/* yyresume: */
+
+ /* First try to decide what to do without reference to lookahead token. */
+
+ yyn = yypact[yystate];
+ if (yyn == YYPACT_NINF)
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = YYLEX;
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yyn == 0 || yyn == YYTABLE_NINF)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ /* Shift the lookahead token. */
+ YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
+
+ /* Discard the token being shifted unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
+ *++yyvsp = yylval;
+
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ `$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 2:
+#line 88 "Grammar.y"
+ {
+;}
+ break;
+
+ case 3:
+#line 91 "Grammar.y"
+ {
+;}
+ break;
+
+ case 4:
+#line 99 "Grammar.y"
+ {
+;}
+ break;
+
+ case 5:
+#line 102 "Grammar.y"
+ {
+;}
+ break;
+
+ case 6:
+#line 108 "Grammar.y"
+ {
+ parser->checkInterrupted();
+;}
+ break;
+
+ case 7:
+#line 117 "Grammar.y"
+ {
+ parser->usage();
+;}
+ break;
+
+ case 8:
+#line 121 "Grammar.y"
+ {
+ return 0;
+;}
+ break;
+
+ case 9:
+#line 125 "Grammar.y"
+ {
+ parser->addApplication(yyvsp[-1]);
+;}
+ break;
+
+ case 10:
+#line 129 "Grammar.y"
+ {
+ parser->usage("application", "add");
+;}
+ break;
+
+ case 11:
+#line 133 "Grammar.y"
+ {
+ parser->removeApplication(yyvsp[-1]);
+;}
+ break;
+
+ case 12:
+#line 137 "Grammar.y"
+ {
+ parser->usage("application", "remove");
+;}
+ break;
+
+ case 13:
+#line 141 "Grammar.y"
+ {
+ parser->diffApplication(yyvsp[-1]);
+;}
+ break;
+
+ case 14:
+#line 145 "Grammar.y"
+ {
+ parser->usage("application", "diff");
+;}
+ break;
+
+ case 15:
+#line 149 "Grammar.y"
+ {
+ parser->updateApplication(yyvsp[-1]);
+;}
+ break;
+
+ case 16:
+#line 153 "Grammar.y"
+ {
+ parser->usage("application", "update");
+;}
+ break;
+
+ case 17:
+#line 157 "Grammar.y"
+ {
+ parser->describeApplication(yyvsp[-1]);
+;}
+ break;
+
+ case 18:
+#line 161 "Grammar.y"
+ {
+ parser->usage("application", "describe");
+;}
+ break;
+
+ case 19:
+#line 165 "Grammar.y"
+ {
+ parser->patchApplication(yyvsp[-1]);
+;}
+ break;
+
+ case 20:
+#line 169 "Grammar.y"
+ {
+ parser->usage("application", "patch");
+;}
+ break;
+
+ case 21:
+#line 173 "Grammar.y"
+ {
+ parser->listAllApplications(yyvsp[-1]);
+;}
+ break;
+
+ case 22:
+#line 177 "Grammar.y"
+ {
+ parser->usage("application", "list");
+;}
+ break;
+
+ case 23:
+#line 181 "Grammar.y"
+ {
+ parser->describeServerTemplate(yyvsp[-1]);
+;}
+ break;
+
+ case 24:
+#line 185 "Grammar.y"
+ {
+ parser->usage("server template", "describe");
+;}
+ break;
+
+ case 25:
+#line 189 "Grammar.y"
+ {
+ parser->instantiateServerTemplate(yyvsp[-1]);
+;}
+ break;
+
+ case 26:
+#line 193 "Grammar.y"
+ {
+ parser->usage("server template", "instantiate");
+;}
+ break;
+
+ case 27:
+#line 197 "Grammar.y"
+ {
+ parser->usage("server template");
+;}
+ break;
+
+ case 28:
+#line 201 "Grammar.y"
+ {
+ parser->describeServiceTemplate(yyvsp[-1]);
+;}
+ break;
+
+ case 29:
+#line 205 "Grammar.y"
+ {
+ parser->usage("service template", "describe");
+;}
+ break;
+
+ case 30:
+#line 209 "Grammar.y"
+ {
+ parser->usage("service template");
+;}
+ break;
+
+ case 31:
+#line 213 "Grammar.y"
+ {
+ parser->describeNode(yyvsp[-1]);
+;}
+ break;
+
+ case 32:
+#line 217 "Grammar.y"
+ {
+ parser->usage("node", "describe");
+;}
+ break;
+
+ case 33:
+#line 221 "Grammar.y"
+ {
+ parser->pingNode(yyvsp[-1]);
+;}
+ break;
+
+ case 34:
+#line 225 "Grammar.y"
+ {
+ parser->usage("node", "ping");
+;}
+ break;
+
+ case 35:
+#line 229 "Grammar.y"
+ {
+ parser->printLoadNode(yyvsp[-1]);
+;}
+ break;
+
+ case 36:
+#line 233 "Grammar.y"
+ {
+ parser->usage("node", "lost");
+;}
+ break;
+
+ case 37:
+#line 237 "Grammar.y"
+ {
+ parser->shutdownNode(yyvsp[-1]);
+;}
+ break;
+
+ case 38:
+#line 241 "Grammar.y"
+ {
+ parser->usage("node", "shutdown");
+;}
+ break;
+
+ case 39:
+#line 245 "Grammar.y"
+ {
+ parser->listAllNodes(yyvsp[-1]);
+;}
+ break;
+
+ case 40:
+#line 249 "Grammar.y"
+ {
+ parser->usage("node", "list");
+;}
+ break;
+
+ case 41:
+#line 253 "Grammar.y"
+ {
+ parser->showFile("node", yyvsp[-1]);
+;}
+ break;
+
+ case 42:
+#line 257 "Grammar.y"
+ {
+ parser->usage("node", "show");
+;}
+ break;
+
+ case 43:
+#line 261 "Grammar.y"
+ {
+ parser->describeRegistry(yyvsp[-1]);
+;}
+ break;
+
+ case 44:
+#line 265 "Grammar.y"
+ {
+ parser->usage("registry", "describe");
+;}
+ break;
+
+ case 45:
+#line 269 "Grammar.y"
+ {
+ parser->pingRegistry(yyvsp[-1]);
+;}
+ break;
+
+ case 46:
+#line 273 "Grammar.y"
+ {
+ parser->usage("registry", "ping");
+;}
+ break;
+
+ case 47:
+#line 277 "Grammar.y"
+ {
+ parser->shutdownRegistry(yyvsp[-1]);
+;}
+ break;
+
+ case 48:
+#line 281 "Grammar.y"
+ {
+ parser->usage("registry", "shutdown");
+;}
+ break;
+
+ case 49:
+#line 285 "Grammar.y"
+ {
+ parser->listAllRegistries(yyvsp[-1]);
+;}
+ break;
+
+ case 50:
+#line 289 "Grammar.y"
+ {
+ parser->usage("registry", "list");
+;}
+ break;
+
+ case 51:
+#line 293 "Grammar.y"
+ {
+ parser->showFile("registry", yyvsp[-1]);
+;}
+ break;
+
+ case 52:
+#line 297 "Grammar.y"
+ {
+ parser->usage("registry", "show");
+;}
+ break;
+
+ case 53:
+#line 301 "Grammar.y"
+ {
+ parser->removeServer(yyvsp[-1]);
+;}
+ break;
+
+ case 54:
+#line 305 "Grammar.y"
+ {
+ parser->usage("server", "remove");
+;}
+ break;
+
+ case 55:
+#line 309 "Grammar.y"
+ {
+ parser->describeServer(yyvsp[-1]);
+;}
+ break;
+
+ case 56:
+#line 313 "Grammar.y"
+ {
+ parser->usage("server", "describe");
+;}
+ break;
+
+ case 57:
+#line 317 "Grammar.y"
+ {
+ parser->startServer(yyvsp[-1]);
+;}
+ break;
+
+ case 58:
+#line 321 "Grammar.y"
+ {
+ parser->usage("server", "start");
+;}
+ break;
+
+ case 59:
+#line 325 "Grammar.y"
+ {
+ parser->stopServer(yyvsp[-1]);
+;}
+ break;
+
+ case 60:
+#line 329 "Grammar.y"
+ {
+ parser->usage("server", "stop");
+;}
+ break;
+
+ case 61:
+#line 333 "Grammar.y"
+ {
+ parser->patchServer(yyvsp[-1]);
+;}
+ break;
+
+ case 62:
+#line 337 "Grammar.y"
+ {
+ parser->usage("server", "patch");
+;}
+ break;
+
+ case 63:
+#line 341 "Grammar.y"
+ {
+ parser->signalServer(yyvsp[-1]);
+;}
+ break;
+
+ case 64:
+#line 345 "Grammar.y"
+ {
+ parser->usage("server", "signal");
+;}
+ break;
+
+ case 65:
+#line 349 "Grammar.y"
+ {
+ parser->writeMessage(yyvsp[-1], 1);
+;}
+ break;
+
+ case 66:
+#line 353 "Grammar.y"
+ {
+ parser->usage("server", "stdout");
+;}
+ break;
+
+ case 67:
+#line 357 "Grammar.y"
+ {
+ parser->writeMessage(yyvsp[-1], 2);
+;}
+ break;
+
+ case 68:
+#line 361 "Grammar.y"
+ {
+ parser->usage("server", "stderr");
+;}
+ break;
+
+ case 69:
+#line 365 "Grammar.y"
+ {
+ parser->stateServer(yyvsp[-1]);
+;}
+ break;
+
+ case 70:
+#line 369 "Grammar.y"
+ {
+ parser->usage("server", "start");
+;}
+ break;
+
+ case 71:
+#line 373 "Grammar.y"
+ {
+ parser->pidServer(yyvsp[-1]);
+;}
+ break;
+
+ case 72:
+#line 377 "Grammar.y"
+ {
+ parser->usage("server", "pid");
+;}
+ break;
+
+ case 73:
+#line 381 "Grammar.y"
+ {
+ parser->propertiesServer(yyvsp[-1], false);
+;}
+ break;
+
+ case 74:
+#line 385 "Grammar.y"
+ {
+ parser->usage("server", "properties");
+;}
+ break;
+
+ case 75:
+#line 389 "Grammar.y"
+ {
+ parser->propertiesServer(yyvsp[-1], true);
+;}
+ break;
+
+ case 76:
+#line 393 "Grammar.y"
+ {
+ parser->usage("server", "property");
+;}
+ break;
+
+ case 77:
+#line 397 "Grammar.y"
+ {
+ parser->enableServer(yyvsp[-1], true);
+;}
+ break;
+
+ case 78:
+#line 401 "Grammar.y"
+ {
+ parser->usage("server", "enable");
+;}
+ break;
+
+ case 79:
+#line 405 "Grammar.y"
+ {
+ parser->enableServer(yyvsp[-1], false);
+;}
+ break;
+
+ case 80:
+#line 409 "Grammar.y"
+ {
+ parser->usage("server", "disable");
+;}
+ break;
+
+ case 81:
+#line 413 "Grammar.y"
+ {
+ parser->listAllServers(yyvsp[-1]);
+;}
+ break;
+
+ case 82:
+#line 417 "Grammar.y"
+ {
+ parser->usage("server", "list");
+;}
+ break;
+
+ case 83:
+#line 421 "Grammar.y"
+ {
+ parser->showFile("server", yyvsp[-1]);
+;}
+ break;
+
+ case 84:
+#line 425 "Grammar.y"
+ {
+ parser->usage("server", "show");
+;}
+ break;
+
+ case 85:
+#line 429 "Grammar.y"
+ {
+ parser->startService(yyvsp[-1]);
+;}
+ break;
+
+ case 86:
+#line 433 "Grammar.y"
+ {
+ parser->usage("service", "start");
+;}
+ break;
+
+ case 87:
+#line 437 "Grammar.y"
+ {
+ parser->stopService(yyvsp[-1]);
+;}
+ break;
+
+ case 88:
+#line 441 "Grammar.y"
+ {
+ parser->usage("service", "stop");
+;}
+ break;
+
+ case 89:
+#line 445 "Grammar.y"
+ {
+ parser->describeService(yyvsp[-1]);
+;}
+ break;
+
+ case 90:
+#line 449 "Grammar.y"
+ {
+ parser->usage("service", "describe");
+;}
+ break;
+
+ case 91:
+#line 453 "Grammar.y"
+ {
+ parser->propertiesService(yyvsp[-1], false);
+;}
+ break;
+
+ case 92:
+#line 457 "Grammar.y"
+ {
+ parser->usage("service", "properties");
+;}
+ break;
+
+ case 93:
+#line 461 "Grammar.y"
+ {
+ parser->propertiesService(yyvsp[-1], true);
+;}
+ break;
+
+ case 94:
+#line 465 "Grammar.y"
+ {
+ parser->usage("service", "property");
+;}
+ break;
+
+ case 95:
+#line 469 "Grammar.y"
+ {
+ parser->listServices(yyvsp[-1]);
+;}
+ break;
+
+ case 96:
+#line 473 "Grammar.y"
+ {
+ parser->usage("service", "list");
+;}
+ break;
+
+ case 97:
+#line 477 "Grammar.y"
+ {
+ parser->endpointsAdapter(yyvsp[-1]);
+;}
+ break;
+
+ case 98:
+#line 481 "Grammar.y"
+ {
+ parser->usage("adapter", "endpoints");
+;}
+ break;
+
+ case 99:
+#line 485 "Grammar.y"
+ {
+ parser->removeAdapter(yyvsp[-1]);
+;}
+ break;
+
+ case 100:
+#line 489 "Grammar.y"
+ {
+ parser->usage("adapter", "remove");
+;}
+ break;
+
+ case 101:
+#line 493 "Grammar.y"
+ {
+ parser->listAllAdapters(yyvsp[-1]);
+;}
+ break;
+
+ case 102:
+#line 497 "Grammar.y"
+ {
+ parser->usage("adapter", "list");
+;}
+ break;
+
+ case 103:
+#line 501 "Grammar.y"
+ {
+ parser->addObject(yyvsp[-1]);
+;}
+ break;
+
+ case 104:
+#line 505 "Grammar.y"
+ {
+ parser->usage("object", "add");
+;}
+ break;
+
+ case 105:
+#line 509 "Grammar.y"
+ {
+ parser->removeObject(yyvsp[-1]);
+;}
+ break;
+
+ case 106:
+#line 513 "Grammar.y"
+ {
+ parser->usage("object", "remove");
+;}
+ break;
+
+ case 107:
+#line 517 "Grammar.y"
+ {
+ parser->findObject(yyvsp[-1]);
+;}
+ break;
+
+ case 108:
+#line 521 "Grammar.y"
+ {
+ parser->usage("object", "find");
+;}
+ break;
+
+ case 109:
+#line 525 "Grammar.y"
+ {
+ parser->listObject(yyvsp[-1]);
+;}
+ break;
+
+ case 110:
+#line 529 "Grammar.y"
+ {
+ parser->usage("object", "list");
+;}
+ break;
+
+ case 111:
+#line 533 "Grammar.y"
+ {
+ parser->describeObject(yyvsp[-1]);
+;}
+ break;
+
+ case 112:
+#line 537 "Grammar.y"
+ {
+ parser->usage("object", "describe");
+;}
+ break;
+
+ case 113:
+#line 541 "Grammar.y"
+ {
+ parser->showCopying();
+;}
+ break;
+
+ case 114:
+#line 545 "Grammar.y"
+ {
+ parser->showWarranty();
+;}
+ break;
+
+ case 115:
+#line 549 "Grammar.y"
+ {
+ parser->usage(yyvsp[-1].front());
+;}
+ break;
+
+ case 116:
+#line 553 "Grammar.y"
+ {
+ if((yyvsp[-2].front() == "server" || yyvsp[-2].front() == "service") && yyvsp[-1].front() == "template")
+ {
+ parser->usage(yyvsp[-2].front() + " " + yyvsp[-1].front());
+ }
+ else
+ {
+ parser->usage(yyvsp[-2].front(), yyvsp[-1].front());
+ }
+;}
+ break;
+
+ case 117:
+#line 564 "Grammar.y"
+ {
+ parser->usage(yyvsp[-3].front(), yyvsp[-2].front());
+;}
+ break;
+
+ case 118:
+#line 568 "Grammar.y"
+ {
+ if((yyvsp[-3].front() == "server" || yyvsp[-3].front() == "service") && yyvsp[-2].front() == "template")
+ {
+ parser->usage(yyvsp[-3].front() + " " + yyvsp[-2].front(), yyvsp[-1].front());
+ }
+ else
+ {
+ parser->usage(yyvsp[-3].front(), yyvsp[-2].front());
+ }
+;}
+ break;
+
+ case 119:
+#line 579 "Grammar.y"
+ {
+ if((yyvsp[-4].front() == "server" || yyvsp[-4].front() == "service") && yyvsp[-3].front() == "template")
+ {
+ parser->usage(yyvsp[-4].front() + " " + yyvsp[-3].front(), yyvsp[-2].front());
+ }
+ else
+ {
+ parser->usage(yyvsp[-4].front(), yyvsp[-3].front());
+ }
+;}
+ break;
+
+ case 120:
+#line 590 "Grammar.y"
+ {
+ parser->usage(yyvsp[-2].front());
+;}
+ break;
+
+ case 121:
+#line 594 "Grammar.y"
+ {
+ parser->usage();
+;}
+ break;
+
+ case 122:
+#line 598 "Grammar.y"
+ {
+ parser->usage(yyvsp[-2].front());
+;}
+ break;
+
+ case 123:
+#line 602 "Grammar.y"
+ {
+ yyvsp[-3].push_back(yyvsp[-2].front());
+ parser->invalidCommand(yyvsp[-3]);
+ yyerrok;
+;}
+ break;
+
+ case 124:
+#line 608 "Grammar.y"
+ {
+ parser->invalidCommand(yyvsp[-2]);
+ yyerrok;
+;}
+ break;
+
+ case 125:
+#line 613 "Grammar.y"
+ {
+ parser->invalidCommand(yyvsp[-2]);
+ yyerrok;
+;}
+ break;
+
+ case 126:
+#line 618 "Grammar.y"
+ {
+ yyerrok;
+;}
+ break;
+
+ case 127:
+#line 622 "Grammar.y"
+ {
+;}
+ break;
+
+ case 128:
+#line 631 "Grammar.y"
+ {
+ yyval = yyvsp[0];
+ yyval.push_front(yyvsp[-1].front());
+;}
+ break;
+
+ case 129:
+#line 636 "Grammar.y"
+ {
+ yyval = yyvsp[0];
+ yyval.push_front(yyvsp[-1].front());
+;}
+ break;
+
+ case 130:
+#line 641 "Grammar.y"
+ {
+ yyval = yyvsp[-1];
+ yyval.push_front("help");
+ yyval.push_front(yyvsp[-2].front());
+;}
+ break;
+
+ case 131:
+#line 647 "Grammar.y"
+ {
+ yyval = yyvsp[-1];
+ yyval.push_front("help");
+ yyval.push_front(yyvsp[-2].front());
+;}
+ break;
+
+ case 132:
+#line 653 "Grammar.y"
+ {
+ yyval = YYSTYPE();
+;}
+ break;
+
+ case 133:
+#line 662 "Grammar.y"
+ {
+;}
+ break;
+
+ case 134:
+#line 665 "Grammar.y"
+ {
+;}
+ break;
+
+ case 135:
+#line 668 "Grammar.y"
+ {
+;}
+ break;
+
+ case 136:
+#line 671 "Grammar.y"
+ {
+;}
+ break;
+
+ case 137:
+#line 674 "Grammar.y"
+ {
+;}
+ break;
+
+ case 138:
+#line 677 "Grammar.y"
+ {
+;}
+ break;
+
+ case 139:
+#line 680 "Grammar.y"
+ {
+;}
+ break;
+
+ case 140:
+#line 683 "Grammar.y"
+ {
+;}
+ break;
+
+ case 141:
+#line 686 "Grammar.y"
+ {
+;}
+ break;
+
+ case 142:
+#line 689 "Grammar.y"
+ {
+;}
+ break;
+
+ case 143:
+#line 692 "Grammar.y"
+ {
+;}
+ break;
+
+ case 144:
+#line 695 "Grammar.y"
+ {
+;}
+ break;
+
+ case 145:
+#line 698 "Grammar.y"
+ {
+;}
+ break;
+
+ case 146:
+#line 701 "Grammar.y"
+ {
+;}
+ break;
+
+ case 147:
+#line 704 "Grammar.y"
+ {
+;}
+ break;
+
+ case 148:
+#line 707 "Grammar.y"
+ {
+;}
+ break;
+
+ case 149:
+#line 710 "Grammar.y"
+ {
+;}
+ break;
+
+ case 150:
+#line 713 "Grammar.y"
+ {
+;}
+ break;
+
+ case 151:
+#line 716 "Grammar.y"
+ {
+;}
+ break;
+
+ case 152:
+#line 719 "Grammar.y"
+ {
+;}
+ break;
+
+ case 153:
+#line 722 "Grammar.y"
+ {
+;}
+ break;
+
+ case 154:
+#line 725 "Grammar.y"
+ {
+;}
+ break;
+
+ case 155:
+#line 728 "Grammar.y"
+ {
+;}
+ break;
+
+ case 156:
+#line 731 "Grammar.y"
+ {
+;}
+ break;
+
+ case 157:
+#line 734 "Grammar.y"
+ {
+;}
+ break;
+
+ case 158:
+#line 737 "Grammar.y"
+ {
+;}
+ break;
+
+ case 159:
+#line 740 "Grammar.y"
+ {
+;}
+ break;
+
+ case 160:
+#line 743 "Grammar.y"
+ {
+;}
+ break;
+
+ case 161:
+#line 746 "Grammar.y"
+ {
+;}
+ break;
+
+ case 162:
+#line 749 "Grammar.y"
+ {
+;}
+ break;
+
+ case 163:
+#line 752 "Grammar.y"
+ {
+;}
+ break;
+
+ case 164:
+#line 755 "Grammar.y"
+ {
+;}
+ break;
+
+ case 165:
+#line 758 "Grammar.y"
+ {
+;}
+ break;
+
+ case 166:
+#line 761 "Grammar.y"
+ {
+;}
+ break;
+
+ case 167:
+#line 764 "Grammar.y"
+ {
+;}
+ break;
+
+ case 168:
+#line 767 "Grammar.y"
+ {
+;}
+ break;
+
+ case 169:
+#line 770 "Grammar.y"
+ {
+;}
+ break;
+
+
+ }
+
+/* Line 1000 of yacc.c. */
+#line 3000 "Grammar.tab.c"
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+
+
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+
+ /* Now `shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if YYERROR_VERBOSE
+ yyn = yypact[yystate];
+
+ if (YYPACT_NINF < yyn && yyn < YYLAST)
+ {
+ YYSIZE_T yysize = 0;
+ int yytype = YYTRANSLATE (yychar);
+ const char* yyprefix;
+ char *yymsg;
+ int yyx;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 0;
+
+ yyprefix = ", expecting ";
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
+ yycount += 1;
+ if (yycount == 5)
+ {
+ yysize = 0;
+ break;
+ }
+ }
+ yysize += (sizeof ("syntax error, unexpected ")
+ + yystrlen (yytname[yytype]));
+ yymsg = (char *) YYSTACK_ALLOC (yysize);
+ if (yymsg != 0)
+ {
+ char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
+ yyp = yystpcpy (yyp, yytname[yytype]);
+
+ if (yycount < 5)
+ {
+ yyprefix = ", expecting ";
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ yyp = yystpcpy (yyp, yyprefix);
+ yyp = yystpcpy (yyp, yytname[yyx]);
+ yyprefix = " or ";
+ }
+ }
+ yyerror (yymsg);
+ YYSTACK_FREE (yymsg);
+ }
+ else
+ yyerror ("syntax error; also virtual memory exhausted");
+ }
+ else
+#endif /* YYERROR_VERBOSE */
+ yyerror ("syntax error");
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* If at end of input, pop the error token,
+ then the rest of the stack, then return failure. */
+ if (yychar == YYEOF)
+ for (;;)
+ {
+ YYPOPSTACK;
+ if (yyssp == yyss)
+ YYABORT;
+ YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
+ yydestruct (yystos[*yyssp], yyvsp);
+ }
+ }
+ else
+ {
+ YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
+ yydestruct (yytoken, &yylval);
+ yychar = YYEMPTY;
+
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+#ifdef __GNUC__
+ /* Pacify GCC when the user code never invokes YYERROR and the label
+ yyerrorlab therefore never appears in user code. */
+ if (0)
+ goto yyerrorlab;
+#endif
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+ YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
+ yydestruct (yystos[yystate], yyvsp);
+ YYPOPSTACK;
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ YYDPRINTF ((stderr, "Shifting error token, "));
+
+ *++yyvsp = yylval;
+
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#ifndef yyoverflow
+/*----------------------------------------------.
+| yyoverflowlab -- parser overflow comes here. |
+`----------------------------------------------*/
+yyoverflowlab:
+ yyerror ("parser stack overflow");
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+ return yyresult;
+}
+
+
+
diff --git a/cpp/src/IceGrid/Grammar.h b/cpp/src/IceGrid/Grammar.h
new file mode 100644
index 00000000000..2c459182ea0
--- /dev/null
+++ b/cpp/src/IceGrid/Grammar.h
@@ -0,0 +1,126 @@
+/* A Bison parser, made by GNU Bison 1.875c. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ ICE_GRID_HELP = 258,
+ ICE_GRID_EXIT = 259,
+ ICE_GRID_APPLICATION = 260,
+ ICE_GRID_NODE = 261,
+ ICE_GRID_REGISTRY = 262,
+ ICE_GRID_SERVER = 263,
+ ICE_GRID_ADAPTER = 264,
+ ICE_GRID_PING = 265,
+ ICE_GRID_LOAD = 266,
+ ICE_GRID_ADD = 267,
+ ICE_GRID_REMOVE = 268,
+ ICE_GRID_LIST = 269,
+ ICE_GRID_SHUTDOWN = 270,
+ ICE_GRID_STRING = 271,
+ ICE_GRID_START = 272,
+ ICE_GRID_STOP = 273,
+ ICE_GRID_PATCH = 274,
+ ICE_GRID_SIGNAL = 275,
+ ICE_GRID_STDOUT = 276,
+ ICE_GRID_STDERR = 277,
+ ICE_GRID_DESCRIBE = 278,
+ ICE_GRID_PROPERTIES = 279,
+ ICE_GRID_PROPERTY = 280,
+ ICE_GRID_STATE = 281,
+ ICE_GRID_PID = 282,
+ ICE_GRID_ENDPOINTS = 283,
+ ICE_GRID_ACTIVATION = 284,
+ ICE_GRID_OBJECT = 285,
+ ICE_GRID_FIND = 286,
+ ICE_GRID_SHOW = 287,
+ ICE_GRID_COPYING = 288,
+ ICE_GRID_WARRANTY = 289,
+ ICE_GRID_DIFF = 290,
+ ICE_GRID_UPDATE = 291,
+ ICE_GRID_INSTANTIATE = 292,
+ ICE_GRID_TEMPLATE = 293,
+ ICE_GRID_SERVICE = 294,
+ ICE_GRID_ENABLE = 295,
+ ICE_GRID_DISABLE = 296
+ };
+#endif
+#define ICE_GRID_HELP 258
+#define ICE_GRID_EXIT 259
+#define ICE_GRID_APPLICATION 260
+#define ICE_GRID_NODE 261
+#define ICE_GRID_REGISTRY 262
+#define ICE_GRID_SERVER 263
+#define ICE_GRID_ADAPTER 264
+#define ICE_GRID_PING 265
+#define ICE_GRID_LOAD 266
+#define ICE_GRID_ADD 267
+#define ICE_GRID_REMOVE 268
+#define ICE_GRID_LIST 269
+#define ICE_GRID_SHUTDOWN 270
+#define ICE_GRID_STRING 271
+#define ICE_GRID_START 272
+#define ICE_GRID_STOP 273
+#define ICE_GRID_PATCH 274
+#define ICE_GRID_SIGNAL 275
+#define ICE_GRID_STDOUT 276
+#define ICE_GRID_STDERR 277
+#define ICE_GRID_DESCRIBE 278
+#define ICE_GRID_PROPERTIES 279
+#define ICE_GRID_PROPERTY 280
+#define ICE_GRID_STATE 281
+#define ICE_GRID_PID 282
+#define ICE_GRID_ENDPOINTS 283
+#define ICE_GRID_ACTIVATION 284
+#define ICE_GRID_OBJECT 285
+#define ICE_GRID_FIND 286
+#define ICE_GRID_SHOW 287
+#define ICE_GRID_COPYING 288
+#define ICE_GRID_WARRANTY 289
+#define ICE_GRID_DIFF 290
+#define ICE_GRID_UPDATE 291
+#define ICE_GRID_INSTANTIATE 292
+#define ICE_GRID_TEMPLATE 293
+#define ICE_GRID_SERVICE 294
+#define ICE_GRID_ENABLE 295
+#define ICE_GRID_DISABLE 296
+
+
+
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+typedef int YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+
+
diff --git a/cpp/src/IceGrid/Makefile b/cpp/src/IceGrid/Makefile
index e3a135d0926..7fe143ef00d 100644
--- a/cpp/src/IceGrid/Makefile
+++ b/cpp/src/IceGrid/Makefile
@@ -148,10 +148,6 @@ clean::
# Needed for make -jn to work.
#../IceGrid/Grammar.y: Grammar.h
-clean::
- rm -f Grammar.cpp Grammar.h
- rm -f Scanner.cpp
-
install:: all
$(call installprogram,$(ADMIN),$(install_bindir))
$(call installprogram,$(NODE_SERVER),$(install_bindir))
diff --git a/cpp/src/IceGrid/Makefile.mak b/cpp/src/IceGrid/Makefile.mak
index 6bee5960653..a8db26b4472 100644
--- a/cpp/src/IceGrid/Makefile.mak
+++ b/cpp/src/IceGrid/Makefile.mak
@@ -184,8 +184,6 @@ clean::
-del /q $(NODE_SERVER:.exe=.*)
-del /q $(REGISTRY_SERVER:.exe=.*)
-del /q IceGridAdmin.res IceGridNode.res IceGridRegistry.res
- -del /q Grammar.cpp Grammar.h
- -del /q Scanner.cpp
install:: all
copy $(ADMIN) $(install_bindir)
diff --git a/cpp/src/IceGrid/Scanner.cpp b/cpp/src/IceGrid/Scanner.cpp
new file mode 100644
index 00000000000..f5379d68444
--- /dev/null
+++ b/cpp/src/IceGrid/Scanner.cpp
@@ -0,0 +1,1790 @@
+#include <IceUtil/Config.h>
+/* A lexical scanner generated by flex */
+
+/* Scanner skeleton version:
+ * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
+ */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+
+#include <stdio.h>
+#include <unistd.h>
+
+
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
+#endif
+#endif
+
+
+#ifdef __cplusplus
+
+#include <stdlib.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_PROTOS
+#define YY_USE_CONST
+
+#endif /* __STDC__ */
+#endif /* ! __cplusplus */
+
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index. If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#define YY_BUF_SIZE 16384
+
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+extern int yyleng;
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator). This
+ * avoids problems with code like:
+ *
+ * if ( condition_holds )
+ * yyless( 5 );
+ * else
+ * do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ *yy_cp = yy_hold_char; \
+ YY_RESTORE_YY_MORE_OFFSET \
+ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
+
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ yy_size_t yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+ };
+
+static YY_BUFFER_STATE yy_current_buffer = 0;
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ */
+#define YY_CURRENT_BUFFER yy_current_buffer
+
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+
+
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 1; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart YY_PROTO(( FILE *input_file ));
+
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_is_interactive = is_interactive; \
+ }
+
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_at_bol = at_bol; \
+ }
+
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+
+#define yywrap() 1
+#define YY_SKIP_YYWRAP
+typedef unsigned char YY_CHAR;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+typedef int yy_state_type;
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ yytext_ptr = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ yy_hold_char = *yy_cp; \
+ *yy_cp = '\0'; \
+ yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 8
+#define YY_END_OF_BUFFER 9
+static yyconst short int yy_accept[19] =
+ { 0,
+ 3, 3, 9, 7, 3, 4, 5, 6, 7, 4,
+ 7, 3, 0, 2, 1, 0, 3, 0
+ } ;
+
+static yyconst int yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 1, 4, 1, 1, 1, 1, 5, 1,
+ 1, 6, 1, 1, 1, 1, 7, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 8, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 9, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1
+ } ;
+
+static yyconst int yy_meta[10] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1
+ } ;
+
+static yyconst short int yy_base[19] =
+ { 0,
+ 0, 0, 11, 22, 8, 22, 22, 22, 12, 22,
+ 18, 0, 0, 22, 22, 0, 22, 22
+ } ;
+
+static yyconst short int yy_def[19] =
+ { 0,
+ 18, 1, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 5, 11, 18, 18, 11, 18, 0
+ } ;
+
+static yyconst short int yy_nxt[32] =
+ { 0,
+ 4, 5, 6, 7, 8, 4, 9, 10, 11, 12,
+ 18, 18, 18, 18, 18, 18, 13, 14, 15, 16,
+ 17, 3, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18
+ } ;
+
+static yyconst short int yy_chk[32] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 5,
+ 3, 0, 0, 0, 0, 0, 5, 9, 9, 11,
+ 11, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18
+ } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "Scanner.l"
+#define INITIAL 0
+#line 2 "Scanner.l"
+
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <IceGrid/Parser.h>
+#include <IceGrid/Grammar.h>
+
+#if defined(_MSC_VER) && defined(ICE_64)
+//
+// 'initializing' : conversion from '__int64' to 'int', possible loss of data
+// Puts a pointer-difference into an int
+//
+# pragma warning( 4 : 4244 )
+#endif
+
+using namespace std;
+using namespace Ice;
+using namespace IceGrid;
+
+#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
+
+namespace IceGrid
+{
+
+typedef std::map<std::string, int> StringTokenMap;
+static StringTokenMap keywordMap;
+
+void initScanner();
+
+}
+#define YY_USER_INIT initScanner();
+
+#define YY_ALWAYS_INTERACTIVE 1
+#line 416 "lex.yy.c"
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap YY_PROTO(( void ));
+#else
+extern int yywrap YY_PROTO(( void ));
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput YY_PROTO(( void ));
+#else
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines. This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( yy_current_buffer->yy_is_interactive ) \
+ { \
+ int c = '*', n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+ && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" );
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+ YY_USER_ACTION
+
+YY_DECL
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp = NULL, *yy_bp = NULL;
+ register int yy_act;
+
+#line 50 "Scanner.l"
+
+
+#line 570 "lex.yy.c"
+
+ if ( yy_init )
+ {
+ yy_init = 0;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! yy_start )
+ yy_start = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = stdin;
+
+ if ( ! yyout )
+ yyout = stdout;
+
+ if ( ! yy_current_buffer )
+ yy_current_buffer =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_load_buffer_state();
+ }
+
+ while ( 1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = yy_c_buf_p;
+
+ /* Support of yytext. */
+ *yy_cp = yy_hold_char;
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = yy_start;
+yy_match:
+ do
+ {
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ if ( yy_accept[yy_current_state] )
+ {
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 19 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ ++yy_cp;
+ }
+ while ( yy_base[yy_current_state] != 22 );
+
+yy_find_action:
+ yy_act = yy_accept[yy_current_state];
+ if ( yy_act == 0 )
+ { /* have to back up */
+ yy_cp = yy_last_accepting_cpos;
+ yy_current_state = yy_last_accepting_state;
+ yy_act = yy_accept[yy_current_state];
+ }
+
+ YY_DO_BEFORE_ACTION;
+
+
+do_action: /* This label is used only to access EOF actions. */
+
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+ case 0: /* must back up */
+ /* undo the effects of YY_DO_BEFORE_ACTION */
+ *yy_cp = yy_hold_char;
+ yy_cp = yy_last_accepting_cpos;
+ yy_current_state = yy_last_accepting_state;
+ goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+#line 52 "Scanner.l"
+{
+ // C++-style comment
+ int c;
+ do
+ {
+ c = yyinput();
+ }
+ while(c != '\n' && c != EOF);
+}
+ YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 62 "Scanner.l"
+{
+ // C-style comment
+ while(true)
+ {
+ int c = yyinput();
+ if(c == '*')
+ {
+ int next = yyinput();
+ if(next == '/')
+ {
+ break;
+ }
+ else
+ {
+ unput(next);
+ }
+ }
+ else if(c == EOF)
+ {
+ parser->warning("EOF in comment");
+ break;
+ }
+ }
+}
+ YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 87 "Scanner.l"
+{
+ size_t len = strlen(yytext);
+ for(size_t i = 0; i < len; ++i)
+ {
+ if(yytext[i] == '\\')
+ {
+ parser->continueLine();
+ }
+ }
+}
+ YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 98 "Scanner.l"
+{
+ return ';';
+}
+ YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 102 "Scanner.l"
+{
+ // "..."-type strings
+ string s;
+ while(true)
+ {
+ char c = static_cast<char>(yyinput());
+ if(c == '"')
+ {
+ break;
+ }
+ else if(c == EOF)
+ {
+ parser->warning("EOF in string");
+ break;
+ }
+ else if(c == '\\')
+ {
+ char next = static_cast<char>(yyinput());
+ switch(next)
+ {
+ case '\\':
+ case '"':
+ {
+ s += next;
+ break;
+ }
+
+ case 'n':
+ {
+ s += '\n';
+ break;
+ }
+
+ case 'r':
+ {
+ s += '\r';
+ break;
+ }
+
+ case 't':
+ {
+ s += '\t';
+ break;
+ }
+
+ case 'v':
+ {
+ s += '\v';
+ break;
+ }
+
+ case 'f':
+ {
+ s += '\f';
+ break;
+ }
+
+ default:
+ {
+ s += c;
+ unput(next);
+ }
+ }
+ }
+ else
+ {
+ s += c;
+ }
+ }
+ yylvalp->clear();
+ yylvalp->push_back(s);
+ return ICE_GRID_STRING;
+}
+ YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 176 "Scanner.l"
+{
+ // '...'-type strings
+ string s;
+ while(true)
+ {
+ char c = static_cast<char>(yyinput());
+ if(c == '\'')
+ {
+ break;
+ }
+ else if(c == EOF)
+ {
+ parser->warning("EOF in string");
+ break;
+ }
+ else
+ {
+ s += c;
+ }
+ }
+ yylvalp->clear();
+ yylvalp->push_back(s);
+ return ICE_GRID_STRING;
+}
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 201 "Scanner.l"
+{
+ // Simple strings
+ string s;
+ s += yytext[0];
+ while(true)
+ {
+ char c = static_cast<char>(yyinput());
+ if(c == EOF)
+ {
+ break;
+ }
+ else if(isspace(static_cast<unsigned char>(c)) || c == ';')
+ {
+ unput(c);
+ break;
+ }
+
+ s += c;
+ }
+
+ yylvalp->clear();
+ yylvalp->push_back(s);
+
+ StringTokenMap::const_iterator pos = keywordMap.find(s);
+ return pos != keywordMap.end() ? pos->second : ICE_GRID_STRING;
+}
+ YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 228 "Scanner.l"
+ECHO;
+ YY_BREAK
+#line 855 "lex.yy.c"
+case YY_STATE_EOF(INITIAL):
+ yyterminate();
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = yy_hold_char;
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
+ * consistency between yy_current_buffer and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yy_current_buffer->yy_input_file = yyin;
+ yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++yy_c_buf_p;
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = yy_c_buf_p;
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer() )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ yy_did_buffer_switch_on_eof = 0;
+
+ if ( yywrap() )
+ {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p =
+ yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ yy_c_buf_p =
+ &yy_current_buffer->yy_ch_buf[yy_n_chars];
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of yylex */
+
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+
+static int yy_get_next_buffer()
+ {
+ register char *dest = yy_current_buffer->yy_ch_buf;
+ register char *source = yytext_ptr;
+ register int number_to_move, i;
+ int ret_val;
+
+ if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( yy_current_buffer->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+
+ else
+ {
+ int num_to_read =
+ yy_current_buffer->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+ YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = yy_current_buffer;
+
+ int yy_c_buf_p_offset =
+ (int) (yy_c_buf_p - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yy_flex_realloc( (void *) b->yy_ch_buf,
+ b->yy_buf_size + 2 );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = 0;
+
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+
+ yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = yy_current_buffer->yy_buf_size -
+ number_to_move - 1;
+#endif
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+ yy_n_chars, num_to_read );
+
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ if ( yy_n_chars == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ yyrestart( yyin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ yy_current_buffer->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ yy_n_chars += number_to_move;
+ yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+ yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+ yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+
+ return ret_val;
+ }
+
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+static yy_state_type yy_get_previous_state()
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
+
+ yy_current_state = yy_start;
+
+ for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+ {
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ if ( yy_accept[yy_current_state] )
+ {
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 19 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ }
+
+ return yy_current_state;
+ }
+
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+ {
+ register int yy_is_jam;
+ register char *yy_cp = yy_c_buf_p;
+
+ register YY_CHAR yy_c = 1;
+ if ( yy_accept[yy_current_state] )
+ {
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 19 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_is_jam = (yy_current_state == 18);
+
+ return yy_is_jam ? 0 : yy_current_state;
+ }
+
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+ {
+ register char *yy_cp = yy_c_buf_p;
+
+ /* undo effects of setting up yytext */
+ *yy_cp = yy_hold_char;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ { /* need to shift things up to make room */
+ /* +2 for EOB chars. */
+ register int number_to_move = yy_n_chars + 2;
+ register char *dest = &yy_current_buffer->yy_ch_buf[
+ yy_current_buffer->yy_buf_size + 2];
+ register char *source =
+ &yy_current_buffer->yy_ch_buf[number_to_move];
+
+ while ( source > yy_current_buffer->yy_ch_buf )
+ *--dest = *--source;
+
+ yy_cp += (int) (dest - source);
+ yy_bp += (int) (dest - source);
+ yy_current_buffer->yy_n_chars =
+ yy_n_chars = yy_current_buffer->yy_buf_size;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
+ }
+
+ *--yy_cp = (char) c;
+
+
+ yytext_ptr = yy_bp;
+ yy_hold_char = *yy_cp;
+ yy_c_buf_p = yy_cp;
+ }
+#endif /* ifndef YY_NO_UNPUT */
+
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput()
+#else
+static int input()
+#endif
+ {
+ int c;
+
+ *yy_c_buf_p = yy_hold_char;
+
+ if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ /* This was really a NUL. */
+ *yy_c_buf_p = '\0';
+
+ else
+ { /* need more input */
+ int offset = yy_c_buf_p - yytext_ptr;
+ ++yy_c_buf_p;
+
+ switch ( yy_get_next_buffer() )
+ {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ yyrestart( yyin );
+
+ /* fall through */
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( yywrap() )
+ return EOF;
+
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p = yytext_ptr + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
+ *yy_c_buf_p = '\0'; /* preserve yytext */
+ yy_hold_char = *++yy_c_buf_p;
+
+
+ return c;
+ }
+#endif /* YY_NO_INPUT */
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+ {
+ if ( ! yy_current_buffer )
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_init_buffer( yy_current_buffer, input_file );
+ yy_load_buffer_state();
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+ {
+ if ( yy_current_buffer == new_buffer )
+ return;
+
+ if ( yy_current_buffer )
+ {
+ /* Flush out information for old buffer. */
+ *yy_c_buf_p = yy_hold_char;
+ yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ yy_current_buffer = new_buffer;
+ yy_load_buffer_state();
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ yy_did_buffer_switch_on_eof = 1;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+ {
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+ yyin = yy_current_buffer->yy_input_file;
+ yy_hold_char = *yy_c_buf_p;
+ }
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+ {
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ yy_init_buffer( b, file );
+
+ return b;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+ {
+ if ( ! b )
+ return;
+
+ if ( b == yy_current_buffer )
+ yy_current_buffer = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ yy_flex_free( (void *) b->yy_ch_buf );
+
+ yy_flex_free( (void *) b );
+ }
+
+
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+ {
+ yy_flush_buffer( b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+#if YY_ALWAYS_INTERACTIVE
+ b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+ b->yy_is_interactive = 0;
+#else
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+ {
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == yy_current_buffer )
+ yy_load_buffer_state();
+ }
+
+
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+ {
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return 0;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = 0;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ yy_switch_to_buffer( b );
+
+ return b;
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+ {
+ int len;
+ for ( len = 0; yy_str[len]; ++len )
+ ;
+
+ return yy_scan_bytes( yy_str, len );
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+ {
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = len + 2;
+ buf = (char *) yy_flex_alloc( n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+ for ( i = 0; i < len; ++i )
+ buf[i] = bytes[i];
+
+ buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = yy_scan_buffer( buf, n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+ }
+#endif
+
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
+#endif
+ {
+ if ( yy_start_stack_ptr >= yy_start_stack_depth )
+ {
+ yy_size_t new_size;
+
+ yy_start_stack_depth += YY_START_STACK_INCR;
+ new_size = yy_start_stack_depth * sizeof( int );
+
+ if ( ! yy_start_stack )
+ yy_start_stack = (int *) yy_flex_alloc( new_size );
+
+ else
+ yy_start_stack = (int *) yy_flex_realloc(
+ (void *) yy_start_stack, new_size );
+
+ if ( ! yy_start_stack )
+ YY_FATAL_ERROR(
+ "out of memory expanding start-condition stack" );
+ }
+
+ yy_start_stack[yy_start_stack_ptr++] = YY_START;
+
+ BEGIN(new_state);
+ }
+#endif
+
+
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+ {
+ if ( --yy_start_stack_ptr < 0 )
+ YY_FATAL_ERROR( "start-condition stack underflow" );
+
+ BEGIN(yy_start_stack[yy_start_stack_ptr]);
+ }
+#endif
+
+
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+ {
+ return yy_start_stack[yy_start_stack_ptr - 1];
+ }
+#endif
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+ {
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+ }
+
+
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ yytext[yyleng] = yy_hold_char; \
+ yy_c_buf_p = yytext + n; \
+ yy_hold_char = *yy_c_buf_p; \
+ *yy_c_buf_p = '\0'; \
+ yyleng = n; \
+ } \
+ while ( 0 )
+
+
+/* Internal utility routines. */
+
+#ifndef yytext_ptr
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+ {
+ register int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+ }
+#endif
+
+#ifdef YY_NEED_STRLEN
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+ {
+ register int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+ }
+#endif
+
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+ {
+ return (void *) malloc( size );
+ }
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+ {
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return (void *) realloc( (char *) ptr, size );
+ }
+
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+ {
+ free( ptr );
+ }
+
+#if YY_MAIN
+int main()
+ {
+ yylex();
+ return 0;
+ }
+#endif
+#line 228 "Scanner.l"
+
+
+namespace IceGrid {
+
+//
+// initScanner() fills the keyword map with all keyword-token pairs.
+//
+
+void
+initScanner()
+{
+ keywordMap["help"] = ICE_GRID_HELP;
+ keywordMap["quit"] = ICE_GRID_EXIT;
+ keywordMap["exit"] = ICE_GRID_EXIT;
+ keywordMap["application"] = ICE_GRID_APPLICATION;
+ keywordMap["server"] = ICE_GRID_SERVER;
+ keywordMap["adapter"] = ICE_GRID_ADAPTER;
+ keywordMap["add"] = ICE_GRID_ADD;
+ keywordMap["remove"] = ICE_GRID_REMOVE;
+ keywordMap["list"] = ICE_GRID_LIST;
+ keywordMap["shutdown"] = ICE_GRID_SHUTDOWN;
+ keywordMap["describe"] = ICE_GRID_DESCRIBE;
+ keywordMap["properties"] = ICE_GRID_PROPERTIES;
+ keywordMap["property"] = ICE_GRID_PROPERTY;
+ keywordMap["state"] = ICE_GRID_STATE;
+ keywordMap["pid"] = ICE_GRID_PID;
+ keywordMap["endpoints"] = ICE_GRID_ENDPOINTS;
+ keywordMap["start"] = ICE_GRID_START;
+ keywordMap["patch"] = ICE_GRID_PATCH;
+ keywordMap["stop"] = ICE_GRID_STOP;
+ keywordMap["signal"] = ICE_GRID_SIGNAL;
+ keywordMap["stdout"] = ICE_GRID_STDOUT;
+ keywordMap["stderr"] = ICE_GRID_STDERR;
+ keywordMap["node"] = ICE_GRID_NODE;
+ keywordMap["registry"] = ICE_GRID_REGISTRY;
+ keywordMap["ping"] = ICE_GRID_PING;
+ keywordMap["load"] = ICE_GRID_LOAD;
+ keywordMap["activation"] = ICE_GRID_ACTIVATION;
+ keywordMap["object"] = ICE_GRID_OBJECT;
+ keywordMap["find"] = ICE_GRID_FIND;
+ keywordMap["show"] = ICE_GRID_SHOW;
+ keywordMap["copying"] = ICE_GRID_COPYING;
+ keywordMap["warranty"] = ICE_GRID_WARRANTY;
+ keywordMap["diff"] = ICE_GRID_DIFF;
+ keywordMap["update"] = ICE_GRID_UPDATE;
+ keywordMap["instantiate"] = ICE_GRID_INSTANTIATE;
+ keywordMap["template"] = ICE_GRID_TEMPLATE;
+ keywordMap["service"] = ICE_GRID_SERVICE;
+ keywordMap["enable"] = ICE_GRID_ENABLE;
+ keywordMap["disable"] = ICE_GRID_DISABLE;
+}
+
+}
diff --git a/cpp/src/IceStorm/.gitignore b/cpp/src/IceStorm/.gitignore
index 4b4d093745b..b64cca51538 100644
--- a/cpp/src/IceStorm/.gitignore
+++ b/cpp/src/IceStorm/.gitignore
@@ -25,6 +25,3 @@ V31FormatDB.h
V31FormatDB.cpp
LLUMap.h
LLUMap.cpp
-Grammar.cpp
-Grammar.h
-Scanner.cpp
diff --git a/cpp/src/IceStorm/Grammar.cpp b/cpp/src/IceStorm/Grammar.cpp
new file mode 100644
index 00000000000..05a4dcdb6fa
--- /dev/null
+++ b/cpp/src/IceStorm/Grammar.cpp
@@ -0,0 +1,1484 @@
+/* A Bison parser, made by GNU Bison 1.875c. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Written by Richard Stallman by simplifying the original so called
+ ``semantic'' parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 1
+
+/* Using locations. */
+#define YYLSP_NEEDED 0
+
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ ICE_STORM_HELP = 258,
+ ICE_STORM_EXIT = 259,
+ ICE_STORM_CURRENT = 260,
+ ICE_STORM_CREATE = 261,
+ ICE_STORM_DESTROY = 262,
+ ICE_STORM_LINK = 263,
+ ICE_STORM_UNLINK = 264,
+ ICE_STORM_LINKS = 265,
+ ICE_STORM_TOPICS = 266,
+ ICE_STORM_REPLICA = 267,
+ ICE_STORM_STRING = 268
+ };
+#endif
+#define ICE_STORM_HELP 258
+#define ICE_STORM_EXIT 259
+#define ICE_STORM_CURRENT 260
+#define ICE_STORM_CREATE 261
+#define ICE_STORM_DESTROY 262
+#define ICE_STORM_LINK 263
+#define ICE_STORM_UNLINK 264
+#define ICE_STORM_LINKS 265
+#define ICE_STORM_TOPICS 266
+#define ICE_STORM_REPLICA 267
+#define ICE_STORM_STRING 268
+
+
+
+
+/* Copy the first part of user declarations. */
+#line 1 "Grammar.y"
+
+
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <IceStorm/Parser.h>
+
+#ifdef _MSC_VER
+// I get these warnings from some bison versions:
+// warning C4102: 'yyoverflowlab' : unreferenced label
+# pragma warning( disable : 4102 )
+// warning C4065: switch statement contains 'default' but no 'case' labels
+# pragma warning( disable : 4065 )
+#endif
+
+using namespace std;
+using namespace Ice;
+using namespace IceStorm;
+
+void
+yyerror(const char* s)
+{
+ parser->error(s);
+}
+
+
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 1
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+typedef int YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+/* Copy the second part of user declarations. */
+
+
+/* Line 214 of yacc.c. */
+#line 147 "Grammar.tab.c"
+
+#if ! defined (yyoverflow) || YYERROR_VERBOSE
+
+# ifndef YYFREE
+# define YYFREE free
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# endif
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# define YYSTACK_ALLOC alloca
+# endif
+# else
+# if defined (alloca) || defined (_ALLOCA_H)
+# define YYSTACK_ALLOC alloca
+# else
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# else
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# endif
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# endif
+#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
+
+
+#if (! defined (yyoverflow) \
+ && (! defined (__cplusplus) \
+ || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ short yyss;
+ YYSTYPE yyvs;
+ };
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined (__GNUC__) && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ register YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined (__STDC__) || defined (__cplusplus)
+ typedef signed char yysigned_char;
+#else
+ typedef short yysigned_char;
+#endif
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 40
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 62
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 15
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 6
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 30
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 53
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 268
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const unsigned char yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 14,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const unsigned char yyprhs[] =
+{
+ 0, 0, 3, 5, 6, 9, 11, 14, 17, 21,
+ 25, 29, 33, 37, 41, 45, 49, 53, 56, 58,
+ 61, 64, 65, 67, 69, 71, 73, 75, 77, 79,
+ 81
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yysigned_char yyrhs[] =
+{
+ 16, 0, -1, 17, -1, -1, 17, 18, -1, 18,
+ -1, 3, 14, -1, 4, 14, -1, 6, 19, 14,
+ -1, 5, 19, 14, -1, 7, 19, 14, -1, 8,
+ 19, 14, -1, 9, 19, 14, -1, 10, 19, 14,
+ -1, 11, 19, 14, -1, 12, 19, 14, -1, 13,
+ 1, 14, -1, 1, 14, -1, 14, -1, 13, 19,
+ -1, 20, 19, -1, -1, 3, -1, 4, -1, 5,
+ -1, 6, -1, 7, -1, 8, -1, 9, -1, 10,
+ -1, 11, -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const unsigned char yyrline[] =
+{
+ 0, 59, 59, 63, 70, 73, 81, 85, 89, 93,
+ 97, 101, 105, 109, 113, 117, 121, 125, 129, 137,
+ 142, 148, 156, 159, 162, 165, 168, 171, 174, 177,
+ 180
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE
+/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "ICE_STORM_HELP", "ICE_STORM_EXIT",
+ "ICE_STORM_CURRENT", "ICE_STORM_CREATE", "ICE_STORM_DESTROY",
+ "ICE_STORM_LINK", "ICE_STORM_UNLINK", "ICE_STORM_LINKS",
+ "ICE_STORM_TOPICS", "ICE_STORM_REPLICA", "ICE_STORM_STRING", "';'",
+ "$accept", "start", "commands", "command", "strings", "keyword", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const unsigned short yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 59
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const unsigned char yyr1[] =
+{
+ 0, 15, 16, 16, 17, 17, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 19,
+ 19, 19, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const unsigned char yyr2[] =
+{
+ 0, 2, 1, 0, 2, 1, 2, 2, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 2, 1, 2,
+ 2, 0, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const unsigned char yydefact[] =
+{
+ 0, 0, 0, 0, 21, 21, 21, 21, 21, 21,
+ 21, 21, 0, 18, 0, 0, 5, 17, 6, 7,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 21,
+ 0, 21, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 4, 19, 9, 20, 8, 10, 11, 12, 13,
+ 14, 15, 16
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yysigned_char yydefgoto[] =
+{
+ -1, 14, 15, 16, 30, 31
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -7
+static const yysigned_char yypact[] =
+{
+ 7, 8, 9, 11, 39, 39, 39, 39, 39, 39,
+ 39, 39, 28, -7, 51, 27, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, 39,
+ 40, 39, 41, 42, 43, 44, 45, 46, 47, 48,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7
+};
+
+/* YYPGOTO[NTERM-NUM]. */
+static const yysigned_char yypgoto[] =
+{
+ -7, -7, -7, -6, -5, -7
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -4
+static const yysigned_char yytable[] =
+{
+ 32, 33, 34, 35, 36, 37, 38, -3, 1, 41,
+ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 17, 18, 42, 19, 44, -2, 1, 39,
+ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 40, 29, 0, 43, 45, 46, 47, 48, 49,
+ 50, 51, 52
+};
+
+static const yysigned_char yycheck[] =
+{
+ 5, 6, 7, 8, 9, 10, 11, 0, 1, 15,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 14, 14, 29, 14, 31, 0, 1, 1,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 0, 13, -1, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const unsigned char yystos[] =
+{
+ 0, 1, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 16, 17, 18, 14, 14, 14,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13,
+ 19, 20, 19, 19, 19, 19, 19, 19, 19, 1,
+ 0, 18, 19, 14, 19, 14, 14, 14, 14, 14,
+ 14, 14, 14
+};
+
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# endif
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+
+#define YYFAIL goto yyerrlab
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
+ YYPOPSTACK; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror ("syntax error: cannot back up");\
+ YYERROR; \
+ } \
+while (0)
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+/* YYLLOC_DEFAULT -- Compute the default location (before the actions
+ are run). */
+
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ ((Current).first_line = (Rhs)[1].first_line, \
+ (Current).first_column = (Rhs)[1].first_column, \
+ (Current).last_line = (Rhs)[N].last_line, \
+ (Current).last_column = (Rhs)[N].last_column)
+#endif
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (&yylval, YYLEX_PARAM)
+#else
+# define YYLEX yylex (&yylval)
+#endif
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+# define YYDSYMPRINT(Args) \
+do { \
+ if (yydebug) \
+ yysymprint Args; \
+} while (0)
+
+# define YYDSYMPRINTF(Title, Token, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yysymprint (stderr, \
+ Token, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_stack_print (short *bottom, short *top)
+#else
+static void
+yy_stack_print (bottom, top)
+ short *bottom;
+ short *top;
+#endif
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (/* Nothing. */; bottom <= top; ++bottom)
+ YYFPRINTF (stderr, " %d", *bottom);
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_reduce_print (int yyrule)
+#else
+static void
+yy_reduce_print (yyrule)
+ int yyrule;
+#endif
+{
+ int yyi;
+ unsigned int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
+ yyrule - 1, yylno);
+ /* Print the symbols being reduced, and their result. */
+ for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
+ YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
+ YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (Rule); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YYDSYMPRINT(Args)
+# define YYDSYMPRINTF(Title, Token, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
+# undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined (__GLIBC__) && defined (_STRING_H)
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+# if defined (__STDC__) || defined (__cplusplus)
+yystrlen (const char *yystr)
+# else
+yystrlen (yystr)
+ const char *yystr;
+# endif
+{
+ register const char *yys = yystr;
+
+ while (*yys++ != '\0')
+ continue;
+
+ return yys - yystr - 1;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+# if defined (__STDC__) || defined (__cplusplus)
+yystpcpy (char *yydest, const char *yysrc)
+# else
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+# endif
+{
+ register char *yyd = yydest;
+ register const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+#endif /* !YYERROR_VERBOSE */
+
+
+
+#if YYDEBUG
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yysymprint (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ if (yytype < YYNTOKENS)
+ {
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+# ifdef YYPRINT
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+ }
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+ YYFPRINTF (yyoutput, ")");
+}
+
+#endif /* ! YYDEBUG */
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yydestruct (int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yytype, yyvaluep)
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
+}
+
+
+/* Prevent warnings from -Wmissing-prototypes. */
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM);
+# else
+int yyparse ();
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM)
+# else
+int yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+
+#endif
+#endif
+{
+ /* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far. */
+int yynerrs;
+
+ register int yystate;
+ register int yyn;
+ int yyresult;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken = 0;
+
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ short yyssa[YYINITDEPTH];
+ short *yyss = yyssa;
+ register short *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ register YYSTYPE *yyvsp;
+
+
+
+#define YYPOPSTACK (yyvsp--, yyssp--)
+
+ YYSIZE_T yystacksize = YYINITDEPTH;
+
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+
+ /* When reducing, the number of symbols on the RHS of the reduced
+ rule. */
+ int yylen;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+
+ yyssp = yyss;
+ yyvsp = yyvs;
+
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. so pushing a state here evens the stacks.
+ */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ short *yyss1 = yyss;
+
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow ("parser stack overflow",
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyoverflowlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyoverflowlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ short *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyoverflowlab;
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+/* Do appropriate processing given the current state. */
+/* Read a lookahead token if we need one and don't already have one. */
+/* yyresume: */
+
+ /* First try to decide what to do without reference to lookahead token. */
+
+ yyn = yypact[yystate];
+ if (yyn == YYPACT_NINF)
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = YYLEX;
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yyn == 0 || yyn == YYTABLE_NINF)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ /* Shift the lookahead token. */
+ YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
+
+ /* Discard the token being shifted unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
+ *++yyvsp = yylval;
+
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ `$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 2:
+#line 60 "Grammar.y"
+ {
+;}
+ break;
+
+ case 3:
+#line 63 "Grammar.y"
+ {
+;}
+ break;
+
+ case 4:
+#line 71 "Grammar.y"
+ {
+;}
+ break;
+
+ case 5:
+#line 74 "Grammar.y"
+ {
+;}
+ break;
+
+ case 6:
+#line 82 "Grammar.y"
+ {
+ parser->usage();
+;}
+ break;
+
+ case 7:
+#line 86 "Grammar.y"
+ {
+ return 0;
+;}
+ break;
+
+ case 8:
+#line 90 "Grammar.y"
+ {
+ parser->create(yyvsp[-1]);
+;}
+ break;
+
+ case 9:
+#line 94 "Grammar.y"
+ {
+ parser->current(yyvsp[-1]);
+;}
+ break;
+
+ case 10:
+#line 98 "Grammar.y"
+ {
+ parser->destroy(yyvsp[-1]);
+;}
+ break;
+
+ case 11:
+#line 102 "Grammar.y"
+ {
+ parser->link(yyvsp[-1]);
+;}
+ break;
+
+ case 12:
+#line 106 "Grammar.y"
+ {
+ parser->unlink(yyvsp[-1]);
+;}
+ break;
+
+ case 13:
+#line 110 "Grammar.y"
+ {
+ parser->links(yyvsp[-1]);
+;}
+ break;
+
+ case 14:
+#line 114 "Grammar.y"
+ {
+ parser->topics(yyvsp[-1]);
+;}
+ break;
+
+ case 15:
+#line 118 "Grammar.y"
+ {
+ parser->replica(yyvsp[-1]);
+;}
+ break;
+
+ case 16:
+#line 122 "Grammar.y"
+ {
+ parser->invalidCommand("unknown command `" + yyvsp[-2].front() + "' (type `help' for more info)");
+;}
+ break;
+
+ case 17:
+#line 126 "Grammar.y"
+ {
+ yyerrok;
+;}
+ break;
+
+ case 18:
+#line 130 "Grammar.y"
+ {
+;}
+ break;
+
+ case 19:
+#line 138 "Grammar.y"
+ {
+ yyval = yyvsp[0];
+ yyval.push_front(yyvsp[-1].front());
+;}
+ break;
+
+ case 20:
+#line 143 "Grammar.y"
+ {
+ yyval = yyvsp[0];
+ yyval.push_front(yyvsp[-1].front());
+;}
+ break;
+
+ case 21:
+#line 148 "Grammar.y"
+ {
+ yyval = YYSTYPE();
+;}
+ break;
+
+ case 22:
+#line 157 "Grammar.y"
+ {
+;}
+ break;
+
+ case 23:
+#line 160 "Grammar.y"
+ {
+;}
+ break;
+
+ case 24:
+#line 163 "Grammar.y"
+ {
+;}
+ break;
+
+ case 25:
+#line 166 "Grammar.y"
+ {
+;}
+ break;
+
+ case 26:
+#line 169 "Grammar.y"
+ {
+;}
+ break;
+
+ case 27:
+#line 172 "Grammar.y"
+ {
+;}
+ break;
+
+ case 28:
+#line 175 "Grammar.y"
+ {
+;}
+ break;
+
+ case 29:
+#line 178 "Grammar.y"
+ {
+;}
+ break;
+
+ case 30:
+#line 181 "Grammar.y"
+ {
+;}
+ break;
+
+
+ }
+
+/* Line 1000 of yacc.c. */
+#line 1258 "Grammar.tab.c"
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+
+
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+
+ /* Now `shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if YYERROR_VERBOSE
+ yyn = yypact[yystate];
+
+ if (YYPACT_NINF < yyn && yyn < YYLAST)
+ {
+ YYSIZE_T yysize = 0;
+ int yytype = YYTRANSLATE (yychar);
+ const char* yyprefix;
+ char *yymsg;
+ int yyx;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 0;
+
+ yyprefix = ", expecting ";
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
+ yycount += 1;
+ if (yycount == 5)
+ {
+ yysize = 0;
+ break;
+ }
+ }
+ yysize += (sizeof ("syntax error, unexpected ")
+ + yystrlen (yytname[yytype]));
+ yymsg = (char *) YYSTACK_ALLOC (yysize);
+ if (yymsg != 0)
+ {
+ char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
+ yyp = yystpcpy (yyp, yytname[yytype]);
+
+ if (yycount < 5)
+ {
+ yyprefix = ", expecting ";
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ yyp = yystpcpy (yyp, yyprefix);
+ yyp = yystpcpy (yyp, yytname[yyx]);
+ yyprefix = " or ";
+ }
+ }
+ yyerror (yymsg);
+ YYSTACK_FREE (yymsg);
+ }
+ else
+ yyerror ("syntax error; also virtual memory exhausted");
+ }
+ else
+#endif /* YYERROR_VERBOSE */
+ yyerror ("syntax error");
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* If at end of input, pop the error token,
+ then the rest of the stack, then return failure. */
+ if (yychar == YYEOF)
+ for (;;)
+ {
+ YYPOPSTACK;
+ if (yyssp == yyss)
+ YYABORT;
+ YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
+ yydestruct (yystos[*yyssp], yyvsp);
+ }
+ }
+ else
+ {
+ YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
+ yydestruct (yytoken, &yylval);
+ yychar = YYEMPTY;
+
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+#ifdef __GNUC__
+ /* Pacify GCC when the user code never invokes YYERROR and the label
+ yyerrorlab therefore never appears in user code. */
+ if (0)
+ goto yyerrorlab;
+#endif
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+ YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
+ yydestruct (yystos[yystate], yyvsp);
+ YYPOPSTACK;
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ YYDPRINTF ((stderr, "Shifting error token, "));
+
+ *++yyvsp = yylval;
+
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#ifndef yyoverflow
+/*----------------------------------------------.
+| yyoverflowlab -- parser overflow comes here. |
+`----------------------------------------------*/
+yyoverflowlab:
+ yyerror ("parser stack overflow");
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+ return yyresult;
+}
+
+
+#line 184 "Grammar.y"
+
+
diff --git a/cpp/src/IceStorm/Grammar.h b/cpp/src/IceStorm/Grammar.h
new file mode 100644
index 00000000000..e685dcc41c1
--- /dev/null
+++ b/cpp/src/IceStorm/Grammar.h
@@ -0,0 +1,70 @@
+/* A Bison parser, made by GNU Bison 1.875c. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ ICE_STORM_HELP = 258,
+ ICE_STORM_EXIT = 259,
+ ICE_STORM_CURRENT = 260,
+ ICE_STORM_CREATE = 261,
+ ICE_STORM_DESTROY = 262,
+ ICE_STORM_LINK = 263,
+ ICE_STORM_UNLINK = 264,
+ ICE_STORM_LINKS = 265,
+ ICE_STORM_TOPICS = 266,
+ ICE_STORM_REPLICA = 267,
+ ICE_STORM_STRING = 268
+ };
+#endif
+#define ICE_STORM_HELP 258
+#define ICE_STORM_EXIT 259
+#define ICE_STORM_CURRENT 260
+#define ICE_STORM_CREATE 261
+#define ICE_STORM_DESTROY 262
+#define ICE_STORM_LINK 263
+#define ICE_STORM_UNLINK 264
+#define ICE_STORM_LINKS 265
+#define ICE_STORM_TOPICS 266
+#define ICE_STORM_REPLICA 267
+#define ICE_STORM_STRING 268
+
+
+
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+typedef int YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+
+
diff --git a/cpp/src/IceStorm/Makefile b/cpp/src/IceStorm/Makefile
index cf3c0ed2053..4d8f0a16e28 100644
--- a/cpp/src/IceStorm/Makefile
+++ b/cpp/src/IceStorm/Makefile
@@ -157,8 +157,6 @@ clean::
-rm -f V32FormatDB.h V32FormatDB.cpp
-rm -f V31FormatDB.h V31FormatDB.cpp
-rm -f LLUMap.h LLUMap.cpp
- -rm -f Grammar.cpp Grammar.h
- -rm -f Scanner.cpp
install:: all
$(call installlib,$(install_libdir),$(libdir),$(LIBFILENAME),$(SONAME),$(LIBNAME))
diff --git a/cpp/src/IceStorm/Makefile.mak b/cpp/src/IceStorm/Makefile.mak
index 091b7488aa5..abd7abe4ef8 100644
--- a/cpp/src/IceStorm/Makefile.mak
+++ b/cpp/src/IceStorm/Makefile.mak
@@ -194,10 +194,6 @@ clean::
-del /q $(MIGRATE:.exe=.*)
-del /q IceStormAdmin.res IceStormMigrate.res IceStorm.res IceStormService.res
-clean::
- del /q Grammar.cpp Grammar.h
- del /q Scanner.cpp
-
install:: all
copy $(LIBNAME) $(install_libdir)
copy $(DLLNAME) $(install_bindir)
diff --git a/cpp/src/IceStorm/Scanner.cpp b/cpp/src/IceStorm/Scanner.cpp
new file mode 100644
index 00000000000..e4938c279da
--- /dev/null
+++ b/cpp/src/IceStorm/Scanner.cpp
@@ -0,0 +1,1762 @@
+#include <IceUtil/Config.h>
+/* A lexical scanner generated by flex */
+
+/* Scanner skeleton version:
+ * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
+ */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+
+#include <stdio.h>
+#include <unistd.h>
+
+
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
+#endif
+#endif
+
+
+#ifdef __cplusplus
+
+#include <stdlib.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_PROTOS
+#define YY_USE_CONST
+
+#endif /* __STDC__ */
+#endif /* ! __cplusplus */
+
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index. If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#define YY_BUF_SIZE 16384
+
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+extern int yyleng;
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator). This
+ * avoids problems with code like:
+ *
+ * if ( condition_holds )
+ * yyless( 5 );
+ * else
+ * do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ *yy_cp = yy_hold_char; \
+ YY_RESTORE_YY_MORE_OFFSET \
+ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
+
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ yy_size_t yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+ };
+
+static YY_BUFFER_STATE yy_current_buffer = 0;
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ */
+#define YY_CURRENT_BUFFER yy_current_buffer
+
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+
+
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 1; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart YY_PROTO(( FILE *input_file ));
+
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_is_interactive = is_interactive; \
+ }
+
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_at_bol = at_bol; \
+ }
+
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+
+#define yywrap() 1
+#define YY_SKIP_YYWRAP
+typedef unsigned char YY_CHAR;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+typedef int yy_state_type;
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ yytext_ptr = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ yy_hold_char = *yy_cp; \
+ *yy_cp = '\0'; \
+ yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 8
+#define YY_END_OF_BUFFER 9
+static yyconst short int yy_accept[19] =
+ { 0,
+ 3, 3, 9, 7, 3, 4, 5, 6, 7, 4,
+ 7, 3, 0, 2, 1, 0, 3, 0
+ } ;
+
+static yyconst int yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 1, 4, 1, 1, 1, 1, 5, 1,
+ 1, 6, 1, 1, 1, 1, 7, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 8, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 9, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1
+ } ;
+
+static yyconst int yy_meta[10] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1
+ } ;
+
+static yyconst short int yy_base[19] =
+ { 0,
+ 0, 0, 11, 22, 8, 22, 22, 22, 12, 22,
+ 18, 0, 0, 22, 22, 0, 22, 22
+ } ;
+
+static yyconst short int yy_def[19] =
+ { 0,
+ 18, 1, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 5, 11, 18, 18, 11, 18, 0
+ } ;
+
+static yyconst short int yy_nxt[32] =
+ { 0,
+ 4, 5, 6, 7, 8, 4, 9, 10, 11, 12,
+ 18, 18, 18, 18, 18, 18, 13, 14, 15, 16,
+ 17, 3, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18
+ } ;
+
+static yyconst short int yy_chk[32] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 5,
+ 3, 0, 0, 0, 0, 0, 5, 9, 9, 11,
+ 11, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18
+ } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "Scanner.l"
+#define INITIAL 0
+#line 2 "Scanner.l"
+
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <IceStorm/Parser.h>
+#include <IceStorm/Grammar.h>
+
+#if defined(_MSC_VER) && defined(ICE_64)
+//
+// 'initializing' : conversion from '__int64' to 'int', possible loss of data
+// Puts a pointer-difference into an int
+//
+# pragma warning( 4 : 4244 )
+#endif
+
+using namespace std;
+using namespace Ice;
+using namespace IceStorm;
+
+#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
+
+namespace IceStorm
+{
+
+typedef std::map<std::string, int> StringTokenMap;
+static StringTokenMap keywordMap;
+
+void initScanner();
+
+}
+#define YY_USER_INIT initScanner();
+
+#define YY_ALWAYS_INTERACTIVE 1
+#line 416 "lex.yy.c"
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap YY_PROTO(( void ));
+#else
+extern int yywrap YY_PROTO(( void ));
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput YY_PROTO(( void ));
+#else
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines. This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( yy_current_buffer->yy_is_interactive ) \
+ { \
+ int c = '*', n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+ && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" );
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+ YY_USER_ACTION
+
+YY_DECL
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp = NULL, *yy_bp = NULL;
+ register int yy_act;
+
+#line 50 "Scanner.l"
+
+
+#line 570 "lex.yy.c"
+
+ if ( yy_init )
+ {
+ yy_init = 0;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! yy_start )
+ yy_start = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = stdin;
+
+ if ( ! yyout )
+ yyout = stdout;
+
+ if ( ! yy_current_buffer )
+ yy_current_buffer =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_load_buffer_state();
+ }
+
+ while ( 1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = yy_c_buf_p;
+
+ /* Support of yytext. */
+ *yy_cp = yy_hold_char;
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = yy_start;
+yy_match:
+ do
+ {
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ if ( yy_accept[yy_current_state] )
+ {
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 19 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ ++yy_cp;
+ }
+ while ( yy_base[yy_current_state] != 22 );
+
+yy_find_action:
+ yy_act = yy_accept[yy_current_state];
+ if ( yy_act == 0 )
+ { /* have to back up */
+ yy_cp = yy_last_accepting_cpos;
+ yy_current_state = yy_last_accepting_state;
+ yy_act = yy_accept[yy_current_state];
+ }
+
+ YY_DO_BEFORE_ACTION;
+
+
+do_action: /* This label is used only to access EOF actions. */
+
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+ case 0: /* must back up */
+ /* undo the effects of YY_DO_BEFORE_ACTION */
+ *yy_cp = yy_hold_char;
+ yy_cp = yy_last_accepting_cpos;
+ yy_current_state = yy_last_accepting_state;
+ goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+#line 52 "Scanner.l"
+{
+ // C++-style comment
+ int c;
+ do
+ {
+ c = yyinput();
+ }
+ while(c != '\n' && c != EOF);
+}
+ YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 62 "Scanner.l"
+{
+ // C-style comment
+ while(true)
+ {
+ int c = yyinput();
+ if(c == '*')
+ {
+ int next = yyinput();
+ if(next == '/')
+ {
+ break;
+ }
+ else
+ {
+ unput(next);
+ }
+ }
+ else if(c == EOF)
+ {
+ parser->warning("EOF in comment");
+ break;
+ }
+ }
+}
+ YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 87 "Scanner.l"
+{
+ size_t len = strlen(yytext);
+ for(size_t i = 0; i < len; ++i)
+ {
+ if(yytext[i] == '\\')
+ {
+ parser->continueLine();
+ }
+ }
+}
+ YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 98 "Scanner.l"
+{
+ return ';';
+}
+ YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 102 "Scanner.l"
+{
+ // "..."-type strings
+ string s;
+ while(true)
+ {
+ char c = static_cast<char>(yyinput());
+ if(c == '"')
+ {
+ break;
+ }
+ else if(c == EOF)
+ {
+ parser->warning("EOF in string");
+ break;
+ }
+ else if(c == '\\')
+ {
+ char next = static_cast<char>(yyinput());
+ switch(next)
+ {
+ case '\\':
+ case '"':
+ {
+ s += next;
+ break;
+ }
+
+ case 'n':
+ {
+ s += '\n';
+ break;
+ }
+
+ case 'r':
+ {
+ s += '\r';
+ break;
+ }
+
+ case 't':
+ {
+ s += '\t';
+ break;
+ }
+
+ case 'v':
+ {
+ s += '\v';
+ break;
+ }
+
+ case 'f':
+ {
+ s += '\f';
+ break;
+ }
+
+ default:
+ {
+ s += c;
+ unput(next);
+ }
+ }
+ }
+ else
+ {
+ s += c;
+ }
+ }
+ yylvalp->clear();
+ yylvalp->push_back(s);
+ return ICE_STORM_STRING;
+}
+ YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 176 "Scanner.l"
+{
+ // '...'-type strings
+ string s;
+ while(true)
+ {
+ char c = static_cast<char>(yyinput());
+ if(c == '\'')
+ {
+ break;
+ }
+ else if(c == EOF)
+ {
+ parser->warning("EOF in string");
+ break;
+ }
+ else
+ {
+ s += c;
+ }
+ }
+ yylvalp->clear();
+ yylvalp->push_back(s);
+ return ICE_STORM_STRING;
+}
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 201 "Scanner.l"
+{
+ // Simple strings
+ string s;
+ s += yytext[0];
+ while(true)
+ {
+ char c = static_cast<char>(yyinput());
+ if(c == EOF)
+ {
+ break;
+ }
+ else if(isspace(static_cast<unsigned char>(c)) || c == ';')
+ {
+ unput(c);
+ break;
+ }
+
+ s += c;
+ }
+
+ yylvalp->clear();
+ yylvalp->push_back(s);
+
+ StringTokenMap::const_iterator pos = keywordMap.find(s);
+ return pos != keywordMap.end() ? pos->second : ICE_STORM_STRING;
+}
+ YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 228 "Scanner.l"
+ECHO;
+ YY_BREAK
+#line 855 "lex.yy.c"
+case YY_STATE_EOF(INITIAL):
+ yyterminate();
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = yy_hold_char;
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
+ * consistency between yy_current_buffer and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yy_current_buffer->yy_input_file = yyin;
+ yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++yy_c_buf_p;
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = yy_c_buf_p;
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer() )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ yy_did_buffer_switch_on_eof = 0;
+
+ if ( yywrap() )
+ {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p =
+ yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ yy_c_buf_p =
+ &yy_current_buffer->yy_ch_buf[yy_n_chars];
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of yylex */
+
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+
+static int yy_get_next_buffer()
+ {
+ register char *dest = yy_current_buffer->yy_ch_buf;
+ register char *source = yytext_ptr;
+ register int number_to_move, i;
+ int ret_val;
+
+ if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( yy_current_buffer->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+
+ else
+ {
+ int num_to_read =
+ yy_current_buffer->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+ YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = yy_current_buffer;
+
+ int yy_c_buf_p_offset =
+ (int) (yy_c_buf_p - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yy_flex_realloc( (void *) b->yy_ch_buf,
+ b->yy_buf_size + 2 );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = 0;
+
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+
+ yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = yy_current_buffer->yy_buf_size -
+ number_to_move - 1;
+#endif
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+ yy_n_chars, num_to_read );
+
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ if ( yy_n_chars == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ yyrestart( yyin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ yy_current_buffer->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ yy_n_chars += number_to_move;
+ yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+ yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+ yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+
+ return ret_val;
+ }
+
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+static yy_state_type yy_get_previous_state()
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
+
+ yy_current_state = yy_start;
+
+ for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+ {
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ if ( yy_accept[yy_current_state] )
+ {
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 19 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ }
+
+ return yy_current_state;
+ }
+
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+ {
+ register int yy_is_jam;
+ register char *yy_cp = yy_c_buf_p;
+
+ register YY_CHAR yy_c = 1;
+ if ( yy_accept[yy_current_state] )
+ {
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 19 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_is_jam = (yy_current_state == 18);
+
+ return yy_is_jam ? 0 : yy_current_state;
+ }
+
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+ {
+ register char *yy_cp = yy_c_buf_p;
+
+ /* undo effects of setting up yytext */
+ *yy_cp = yy_hold_char;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ { /* need to shift things up to make room */
+ /* +2 for EOB chars. */
+ register int number_to_move = yy_n_chars + 2;
+ register char *dest = &yy_current_buffer->yy_ch_buf[
+ yy_current_buffer->yy_buf_size + 2];
+ register char *source =
+ &yy_current_buffer->yy_ch_buf[number_to_move];
+
+ while ( source > yy_current_buffer->yy_ch_buf )
+ *--dest = *--source;
+
+ yy_cp += (int) (dest - source);
+ yy_bp += (int) (dest - source);
+ yy_current_buffer->yy_n_chars =
+ yy_n_chars = yy_current_buffer->yy_buf_size;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
+ }
+
+ *--yy_cp = (char) c;
+
+
+ yytext_ptr = yy_bp;
+ yy_hold_char = *yy_cp;
+ yy_c_buf_p = yy_cp;
+ }
+#endif /* ifndef YY_NO_UNPUT */
+
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput()
+#else
+static int input()
+#endif
+ {
+ int c;
+
+ *yy_c_buf_p = yy_hold_char;
+
+ if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ /* This was really a NUL. */
+ *yy_c_buf_p = '\0';
+
+ else
+ { /* need more input */
+ int offset = yy_c_buf_p - yytext_ptr;
+ ++yy_c_buf_p;
+
+ switch ( yy_get_next_buffer() )
+ {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ yyrestart( yyin );
+
+ /* fall through */
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( yywrap() )
+ return EOF;
+
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p = yytext_ptr + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
+ *yy_c_buf_p = '\0'; /* preserve yytext */
+ yy_hold_char = *++yy_c_buf_p;
+
+
+ return c;
+ }
+#endif /* YY_NO_INPUT */
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+ {
+ if ( ! yy_current_buffer )
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_init_buffer( yy_current_buffer, input_file );
+ yy_load_buffer_state();
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+ {
+ if ( yy_current_buffer == new_buffer )
+ return;
+
+ if ( yy_current_buffer )
+ {
+ /* Flush out information for old buffer. */
+ *yy_c_buf_p = yy_hold_char;
+ yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ yy_current_buffer = new_buffer;
+ yy_load_buffer_state();
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ yy_did_buffer_switch_on_eof = 1;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+ {
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+ yyin = yy_current_buffer->yy_input_file;
+ yy_hold_char = *yy_c_buf_p;
+ }
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+ {
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ yy_init_buffer( b, file );
+
+ return b;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+ {
+ if ( ! b )
+ return;
+
+ if ( b == yy_current_buffer )
+ yy_current_buffer = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ yy_flex_free( (void *) b->yy_ch_buf );
+
+ yy_flex_free( (void *) b );
+ }
+
+
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+ {
+ yy_flush_buffer( b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+#if YY_ALWAYS_INTERACTIVE
+ b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+ b->yy_is_interactive = 0;
+#else
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+ {
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == yy_current_buffer )
+ yy_load_buffer_state();
+ }
+
+
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+ {
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return 0;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = 0;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ yy_switch_to_buffer( b );
+
+ return b;
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+ {
+ int len;
+ for ( len = 0; yy_str[len]; ++len )
+ ;
+
+ return yy_scan_bytes( yy_str, len );
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+ {
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = len + 2;
+ buf = (char *) yy_flex_alloc( n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+ for ( i = 0; i < len; ++i )
+ buf[i] = bytes[i];
+
+ buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = yy_scan_buffer( buf, n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+ }
+#endif
+
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
+#endif
+ {
+ if ( yy_start_stack_ptr >= yy_start_stack_depth )
+ {
+ yy_size_t new_size;
+
+ yy_start_stack_depth += YY_START_STACK_INCR;
+ new_size = yy_start_stack_depth * sizeof( int );
+
+ if ( ! yy_start_stack )
+ yy_start_stack = (int *) yy_flex_alloc( new_size );
+
+ else
+ yy_start_stack = (int *) yy_flex_realloc(
+ (void *) yy_start_stack, new_size );
+
+ if ( ! yy_start_stack )
+ YY_FATAL_ERROR(
+ "out of memory expanding start-condition stack" );
+ }
+
+ yy_start_stack[yy_start_stack_ptr++] = YY_START;
+
+ BEGIN(new_state);
+ }
+#endif
+
+
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+ {
+ if ( --yy_start_stack_ptr < 0 )
+ YY_FATAL_ERROR( "start-condition stack underflow" );
+
+ BEGIN(yy_start_stack[yy_start_stack_ptr]);
+ }
+#endif
+
+
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+ {
+ return yy_start_stack[yy_start_stack_ptr - 1];
+ }
+#endif
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+ {
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+ }
+
+
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ yytext[yyleng] = yy_hold_char; \
+ yy_c_buf_p = yytext + n; \
+ yy_hold_char = *yy_c_buf_p; \
+ *yy_c_buf_p = '\0'; \
+ yyleng = n; \
+ } \
+ while ( 0 )
+
+
+/* Internal utility routines. */
+
+#ifndef yytext_ptr
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+ {
+ register int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+ }
+#endif
+
+#ifdef YY_NEED_STRLEN
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+ {
+ register int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+ }
+#endif
+
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+ {
+ return (void *) malloc( size );
+ }
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+ {
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return (void *) realloc( (char *) ptr, size );
+ }
+
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+ {
+ free( ptr );
+ }
+
+#if YY_MAIN
+int main()
+ {
+ yylex();
+ return 0;
+ }
+#endif
+#line 228 "Scanner.l"
+
+
+namespace IceStorm {
+
+//
+// initScanner() fills the keyword map with all keyword-token pairs.
+//
+
+void
+initScanner()
+{
+ keywordMap["help"] = ICE_STORM_HELP;
+ keywordMap["quit"] = ICE_STORM_EXIT;
+ keywordMap["exit"] = ICE_STORM_EXIT;
+ keywordMap["current"] = ICE_STORM_CURRENT;
+ keywordMap["create"] = ICE_STORM_CREATE;
+ keywordMap["destroy"] = ICE_STORM_DESTROY;
+ keywordMap["link"] = ICE_STORM_LINK;
+ keywordMap["unlink"] = ICE_STORM_UNLINK;
+ keywordMap["links"] = ICE_STORM_LINKS;
+ keywordMap["topics"] = ICE_STORM_TOPICS;
+ keywordMap["replica"] = ICE_STORM_REPLICA;
+}
+
+}
diff --git a/cpp/src/Slice/.gitignore b/cpp/src/Slice/.gitignore
deleted file mode 100644
index da581c67fd4..00000000000
--- a/cpp/src/Slice/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-// Generated by makegitignore.py
-
-// IMPORTANT: Do not edit this file -- any edits made here will be lost!
-Grammar.cpp
-Grammar.h
-Scanner.cpp
diff --git a/cpp/src/Slice/Grammar.cpp b/cpp/src/Slice/Grammar.cpp
new file mode 100644
index 00000000000..9d94b2eae25
--- /dev/null
+++ b/cpp/src/Slice/Grammar.cpp
@@ -0,0 +1,3655 @@
+/* A Bison parser, made by GNU Bison 1.875c. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Written by Richard Stallman by simplifying the original so called
+ ``semantic'' parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 1
+
+/* Using locations. */
+#define YYLSP_NEEDED 0
+
+/* If NAME_PREFIX is specified substitute the variables and functions
+ names. */
+#define yyparse slice_parse
+#define yylex slice_lex
+#define yyerror slice_error
+#define yylval slice_lval
+#define yychar slice_char
+#define yydebug slice_debug
+#define yynerrs slice_nerrs
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ ICE_MODULE = 258,
+ ICE_CLASS = 259,
+ ICE_INTERFACE = 260,
+ ICE_EXCEPTION = 261,
+ ICE_STRUCT = 262,
+ ICE_SEQUENCE = 263,
+ ICE_DICTIONARY = 264,
+ ICE_ENUM = 265,
+ ICE_OUT = 266,
+ ICE_EXTENDS = 267,
+ ICE_IMPLEMENTS = 268,
+ ICE_THROWS = 269,
+ ICE_VOID = 270,
+ ICE_BYTE = 271,
+ ICE_BOOL = 272,
+ ICE_SHORT = 273,
+ ICE_INT = 274,
+ ICE_LONG = 275,
+ ICE_FLOAT = 276,
+ ICE_DOUBLE = 277,
+ ICE_STRING = 278,
+ ICE_OBJECT = 279,
+ ICE_LOCAL_OBJECT = 280,
+ ICE_LOCAL = 281,
+ ICE_CONST = 282,
+ ICE_FALSE = 283,
+ ICE_TRUE = 284,
+ ICE_NONMUTATING = 285,
+ ICE_IDEMPOTENT = 286,
+ ICE_SCOPE_DELIMITER = 287,
+ ICE_IDENTIFIER = 288,
+ ICE_STRING_LITERAL = 289,
+ ICE_INTEGER_LITERAL = 290,
+ ICE_FLOATING_POINT_LITERAL = 291,
+ ICE_IDENT_OP = 292,
+ ICE_KEYWORD_OP = 293,
+ ICE_METADATA_OPEN = 294,
+ ICE_METADATA_CLOSE = 295,
+ ICE_GLOBAL_METADATA_OPEN = 296,
+ ICE_GLOBAL_METADATA_CLOSE = 297,
+ BAD_CHAR = 298
+ };
+#endif
+#define ICE_MODULE 258
+#define ICE_CLASS 259
+#define ICE_INTERFACE 260
+#define ICE_EXCEPTION 261
+#define ICE_STRUCT 262
+#define ICE_SEQUENCE 263
+#define ICE_DICTIONARY 264
+#define ICE_ENUM 265
+#define ICE_OUT 266
+#define ICE_EXTENDS 267
+#define ICE_IMPLEMENTS 268
+#define ICE_THROWS 269
+#define ICE_VOID 270
+#define ICE_BYTE 271
+#define ICE_BOOL 272
+#define ICE_SHORT 273
+#define ICE_INT 274
+#define ICE_LONG 275
+#define ICE_FLOAT 276
+#define ICE_DOUBLE 277
+#define ICE_STRING 278
+#define ICE_OBJECT 279
+#define ICE_LOCAL_OBJECT 280
+#define ICE_LOCAL 281
+#define ICE_CONST 282
+#define ICE_FALSE 283
+#define ICE_TRUE 284
+#define ICE_NONMUTATING 285
+#define ICE_IDEMPOTENT 286
+#define ICE_SCOPE_DELIMITER 287
+#define ICE_IDENTIFIER 288
+#define ICE_STRING_LITERAL 289
+#define ICE_INTEGER_LITERAL 290
+#define ICE_FLOATING_POINT_LITERAL 291
+#define ICE_IDENT_OP 292
+#define ICE_KEYWORD_OP 293
+#define ICE_METADATA_OPEN 294
+#define ICE_METADATA_CLOSE 295
+#define ICE_GLOBAL_METADATA_OPEN 296
+#define ICE_GLOBAL_METADATA_CLOSE 297
+#define BAD_CHAR 298
+
+
+
+
+/* Copy the first part of user declarations. */
+#line 1 "../Slice/Grammar.y"
+
+
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Slice/GrammarUtil.h>
+#include <IceUtil/UUID.h>
+#include <cstring>
+
+#ifdef _MSC_VER
+// I get these warnings from some bison versions:
+// warning C4102: 'yyoverflowlab' : unreferenced label
+# pragma warning( disable : 4102 )
+// warning C4065: switch statement contains 'default' but no 'case' labels
+# pragma warning( disable : 4065 )
+#endif
+
+using namespace std;
+using namespace Slice;
+
+void
+slice_error(const char* s)
+{
+ // yacc and recent versions of Bison use "syntax error" instead
+ // of "parse error".
+
+ if (strcmp(s, "parse error") == 0)
+ {
+ unit->error("syntax error");
+ }
+ else
+ {
+ unit->error(s);
+ }
+}
+
+
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 1
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+typedef int YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+/* Copy the second part of user declarations. */
+
+
+/* Line 214 of yacc.c. */
+#line 226 "Grammar.tab.c"
+
+#if ! defined (yyoverflow) || YYERROR_VERBOSE
+
+# ifndef YYFREE
+# define YYFREE free
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# endif
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# define YYSTACK_ALLOC alloca
+# endif
+# else
+# if defined (alloca) || defined (_ALLOCA_H)
+# define YYSTACK_ALLOC alloca
+# else
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# else
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# endif
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# endif
+#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
+
+
+#if (! defined (yyoverflow) \
+ && (! defined (__cplusplus) \
+ || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ short yyss;
+ YYSTYPE yyvs;
+ };
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined (__GNUC__) && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ register YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined (__STDC__) || defined (__cplusplus)
+ typedef signed char yysigned_char;
+#else
+ typedef short yysigned_char;
+#endif
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 13
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 775
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 53
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 67
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 184
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 269
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 298
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const unsigned char yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 47, 51, 2, 48, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 44,
+ 49, 52, 50, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 45, 2, 46, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const unsigned short yyprhs[] =
+{
+ 0, 0, 3, 5, 9, 13, 14, 15, 19, 20,
+ 26, 27, 32, 35, 36, 38, 40, 42, 44, 46,
+ 48, 50, 52, 54, 56, 58, 60, 62, 63, 70,
+ 73, 76, 79, 80, 88, 91, 92, 97, 101, 104,
+ 105, 108, 110, 113, 116, 119, 120, 127, 132, 136,
+ 139, 140, 142, 145, 148, 151, 152, 161, 164, 165,
+ 168, 169, 174, 178, 181, 182, 184, 187, 189, 191,
+ 193, 196, 200, 204, 207, 211, 215, 216, 222, 223,
+ 229, 231, 233, 236, 239, 242, 243, 251, 255, 257,
+ 259, 262, 263, 268, 272, 275, 276, 278, 282, 284,
+ 286, 288, 296, 304, 315, 326, 329, 332, 333, 340,
+ 346, 350, 352, 354, 356, 357, 359, 360, 361, 365,
+ 371, 376, 383, 387, 393, 396, 397, 399, 402, 406,
+ 408, 410, 412, 414, 416, 418, 420, 422, 424, 427,
+ 429, 431, 434, 437, 439, 443, 445, 447, 448, 450,
+ 452, 454, 456, 458, 460, 467, 473, 475, 477, 479,
+ 481, 483, 485, 487, 489, 491, 493, 495, 497, 499,
+ 501, 503, 505, 507, 509, 511, 513, 515, 517, 519,
+ 521, 523, 525, 527, 529
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yysigned_char yyrhs[] =
+{
+ 54, 0, -1, 57, -1, 41, 115, 42, -1, 39,
+ 115, 40, -1, -1, -1, 55, 58, 57, -1, -1,
+ 56, 61, 59, 44, 57, -1, -1, 1, 44, 60,
+ 57, -1, 56, 61, -1, -1, 62, -1, 79, -1,
+ 80, -1, 93, -1, 94, -1, 65, -1, 66, -1,
+ 73, -1, 74, -1, 102, -1, 103, -1, 105, -1,
+ 118, -1, -1, 3, 33, 63, 45, 57, 46, -1,
+ 6, 33, -1, 6, 119, -1, 116, 64, -1, -1,
+ 116, 64, 68, 67, 45, 69, 46, -1, 12, 112,
+ -1, -1, 56, 71, 44, 69, -1, 1, 44, 69,
+ -1, 56, 71, -1, -1, 113, 33, -1, 85, -1,
+ 7, 33, -1, 7, 119, -1, 116, 72, -1, -1,
+ 116, 72, 75, 45, 76, 46, -1, 56, 77, 44,
+ 76, -1, 1, 44, 76, -1, 56, 77, -1, -1,
+ 85, -1, 4, 33, -1, 4, 119, -1, 116, 78,
+ -1, -1, 116, 78, 82, 83, 81, 45, 84, 46,
+ -1, 12, 112, -1, -1, 13, 96, -1, -1, 56,
+ 91, 44, 84, -1, 1, 44, 84, -1, 56, 91,
+ -1, -1, 70, -1, 113, 119, -1, 113, -1, 113,
+ -1, 15, -1, 86, 37, -1, 30, 86, 37, -1,
+ 31, 86, 37, -1, 86, 38, -1, 30, 86, 38,
+ -1, 31, 86, 38, -1, -1, 87, 110, 47, 89,
+ 111, -1, -1, 87, 1, 47, 90, 111, -1, 85,
+ -1, 88, -1, 5, 33, -1, 5, 119, -1, 116,
+ 92, -1, -1, 116, 92, 97, 95, 45, 98, 46,
+ -1, 112, 48, 96, -1, 112, -1, 24, -1, 12,
+ 96, -1, -1, 56, 99, 44, 98, -1, 1, 44,
+ 98, -1, 56, 99, -1, -1, 88, -1, 101, 48,
+ 100, -1, 101, -1, 112, -1, 119, -1, 116, 8,
+ 49, 56, 113, 50, 33, -1, 116, 8, 49, 56,
+ 113, 50, 119, -1, 116, 9, 49, 56, 113, 48,
+ 56, 113, 50, 33, -1, 116, 9, 49, 56, 113,
+ 48, 56, 113, 50, 119, -1, 10, 33, -1, 10,
+ 119, -1, -1, 116, 104, 106, 45, 107, 46, -1,
+ 116, 10, 45, 107, 46, -1, 108, 48, 107, -1,
+ 108, -1, 33, -1, 119, -1, -1, 11, -1, -1,
+ -1, 109, 56, 70, -1, 110, 48, 109, 56, 70,
+ -1, 109, 56, 113, 119, -1, 110, 48, 109, 56,
+ 113, 119, -1, 109, 56, 113, -1, 110, 48, 109,
+ 56, 113, -1, 14, 100, -1, -1, 33, -1, 32,
+ 33, -1, 112, 32, 33, -1, 16, -1, 17, -1,
+ 18, -1, 19, -1, 20, -1, 21, -1, 22, -1,
+ 23, -1, 24, -1, 24, 51, -1, 25, -1, 112,
+ -1, 112, 51, -1, 34, 114, -1, 34, -1, 115,
+ 48, 114, -1, 114, -1, 26, -1, -1, 35, -1,
+ 36, -1, 112, -1, 34, -1, 28, -1, 29, -1,
+ 27, 56, 113, 33, 52, 117, -1, 27, 56, 113,
+ 52, 117, -1, 3, -1, 4, -1, 5, -1, 6,
+ -1, 7, -1, 8, -1, 9, -1, 10, -1, 11,
+ -1, 12, -1, 13, -1, 14, -1, 15, -1, 16,
+ -1, 17, -1, 18, -1, 19, -1, 20, -1, 21,
+ -1, 22, -1, 23, -1, 24, -1, 25, -1, 26,
+ -1, 27, -1, 28, -1, 29, -1, 30, -1, 31,
+ -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const unsigned short yyrline[] =
+{
+ 0, 105, 105, 113, 122, 127, 136, 135, 145, 144,
+ 156, 155, 160, 165, 172, 176, 180, 184, 188, 192,
+ 196, 200, 204, 208, 212, 216, 220, 230, 229, 262,
+ 266, 277, 288, 287, 314, 323, 331, 340, 343, 348,
+ 355, 368, 374, 378, 389, 400, 399, 435, 444, 447,
+ 452, 459, 465, 469, 480, 494, 493, 533, 568, 576,
+ 581, 589, 598, 601, 606, 613, 636, 658, 684, 685,
+ 694, 718, 759, 783, 807, 831, 861, 860, 883, 882,
+ 905, 906, 912, 916, 927, 942, 941, 976, 1011, 1046,
+ 1056, 1061, 1069, 1078, 1081, 1086, 1093, 1099, 1106, 1118,
+ 1130, 1141, 1150, 1165, 1176, 1193, 1197, 1209, 1208, 1232,
+ 1247, 1253, 1261, 1273, 1281, 1290, 1297, 1308, 1310, 1328,
+ 1346, 1358, 1370, 1381, 1397, 1402, 1410, 1413, 1419, 1432,
+ 1436, 1440, 1444, 1448, 1452, 1456, 1460, 1464, 1468, 1472,
+ 1476, 1495, 1536, 1542, 1550, 1557, 1569, 1576, 1586, 1599,
+ 1612, 1647, 1658, 1669, 1685, 1694, 1709, 1712, 1715, 1718,
+ 1721, 1724, 1727, 1730, 1733, 1736, 1739, 1742, 1745, 1748,
+ 1751, 1754, 1757, 1760, 1763, 1766, 1769, 1772, 1775, 1778,
+ 1781, 1784, 1787, 1790, 1793
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE
+/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "ICE_MODULE", "ICE_CLASS",
+ "ICE_INTERFACE", "ICE_EXCEPTION", "ICE_STRUCT", "ICE_SEQUENCE",
+ "ICE_DICTIONARY", "ICE_ENUM", "ICE_OUT", "ICE_EXTENDS", "ICE_IMPLEMENTS",
+ "ICE_THROWS", "ICE_VOID", "ICE_BYTE", "ICE_BOOL", "ICE_SHORT", "ICE_INT",
+ "ICE_LONG", "ICE_FLOAT", "ICE_DOUBLE", "ICE_STRING", "ICE_OBJECT",
+ "ICE_LOCAL_OBJECT", "ICE_LOCAL", "ICE_CONST", "ICE_FALSE", "ICE_TRUE",
+ "ICE_NONMUTATING", "ICE_IDEMPOTENT", "ICE_SCOPE_DELIMITER",
+ "ICE_IDENTIFIER", "ICE_STRING_LITERAL", "ICE_INTEGER_LITERAL",
+ "ICE_FLOATING_POINT_LITERAL", "ICE_IDENT_OP", "ICE_KEYWORD_OP",
+ "ICE_METADATA_OPEN", "ICE_METADATA_CLOSE", "ICE_GLOBAL_METADATA_OPEN",
+ "ICE_GLOBAL_METADATA_CLOSE", "BAD_CHAR", "';'", "'{'", "'}'", "')'",
+ "','", "'<'", "'>'", "'*'", "'='", "$accept", "start",
+ "global_meta_data", "meta_data", "definitions", "@1", "@2", "@3",
+ "definition", "module_def", "@4", "exception_id", "exception_decl",
+ "exception_def", "@5", "exception_extends", "exception_exports",
+ "type_id", "exception_export", "struct_id", "struct_decl", "struct_def",
+ "@6", "struct_exports", "struct_export", "class_id", "class_decl",
+ "class_def", "@7", "class_extends", "implements", "class_exports",
+ "data_member", "return_type", "operation_preamble", "operation", "@8",
+ "@9", "class_export", "interface_id", "interface_decl", "interface_def",
+ "@10", "interface_list", "interface_extends", "interface_exports",
+ "interface_export", "exception_list", "exception", "sequence_def",
+ "dictionary_def", "enum_id", "enum_def", "@11", "enumerator_list",
+ "enumerator", "out_qualifier", "parameters", "throws", "scoped_name",
+ "type", "string_literal", "string_list", "local_qualifier",
+ "const_initializer", "const_def", "keyword", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const unsigned short yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 59, 123, 125, 41, 44, 60,
+ 62, 42, 61
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const unsigned char yyr1[] =
+{
+ 0, 53, 54, 55, 56, 56, 58, 57, 59, 57,
+ 60, 57, 57, 57, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 63, 62, 64,
+ 64, 65, 67, 66, 68, 68, 69, 69, 69, 69,
+ 70, 71, 72, 72, 73, 75, 74, 76, 76, 76,
+ 76, 77, 78, 78, 79, 81, 80, 82, 82, 83,
+ 83, 84, 84, 84, 84, 85, 85, 85, 86, 86,
+ 87, 87, 87, 87, 87, 87, 89, 88, 90, 88,
+ 91, 91, 92, 92, 93, 95, 94, 96, 96, 96,
+ 97, 97, 98, 98, 98, 98, 99, 100, 100, 101,
+ 101, 102, 102, 103, 103, 104, 104, 106, 105, 105,
+ 107, 107, 108, 108, 108, 109, 109, 110, 110, 110,
+ 110, 110, 110, 110, 111, 111, 112, 112, 112, 113,
+ 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
+ 113, 113, 114, 114, 115, 115, 116, 116, 117, 117,
+ 117, 117, 117, 117, 118, 118, 119, 119, 119, 119,
+ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119,
+ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119,
+ 119, 119, 119, 119, 119
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const unsigned char yyr2[] =
+{
+ 0, 2, 1, 3, 3, 0, 0, 3, 0, 5,
+ 0, 4, 2, 0, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 0, 6, 2,
+ 2, 2, 0, 7, 2, 0, 4, 3, 2, 0,
+ 2, 1, 2, 2, 2, 0, 6, 4, 3, 2,
+ 0, 1, 2, 2, 2, 0, 8, 2, 0, 2,
+ 0, 4, 3, 2, 0, 1, 2, 1, 1, 1,
+ 2, 3, 3, 2, 3, 3, 0, 5, 0, 5,
+ 1, 1, 2, 2, 2, 0, 7, 3, 1, 1,
+ 2, 0, 4, 3, 2, 0, 1, 3, 1, 1,
+ 1, 7, 7, 10, 10, 2, 2, 0, 6, 5,
+ 3, 1, 1, 1, 0, 1, 0, 0, 3, 5,
+ 4, 6, 3, 5, 2, 0, 1, 2, 3, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 1,
+ 1, 2, 2, 1, 3, 1, 1, 0, 1, 1,
+ 1, 1, 1, 1, 6, 5, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const unsigned char yydefact[] =
+{
+ 0, 0, 0, 0, 0, 6, 147, 2, 10, 143,
+ 145, 0, 0, 1, 0, 0, 146, 5, 12, 14,
+ 19, 20, 21, 22, 15, 16, 17, 18, 23, 24,
+ 25, 0, 26, 0, 142, 4, 0, 3, 7, 27,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
+ 44, 54, 84, 107, 11, 144, 0, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 139, 0, 126, 140,
+ 0, 0, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 52, 53, 82, 83, 29, 30, 42, 43, 5,
+ 5, 105, 114, 106, 0, 32, 0, 0, 60, 0,
+ 85, 0, 0, 138, 127, 0, 141, 0, 0, 9,
+ 0, 0, 112, 0, 111, 113, 34, 0, 0, 57,
+ 0, 55, 89, 90, 88, 0, 114, 0, 128, 0,
+ 152, 153, 151, 148, 149, 150, 155, 0, 0, 109,
+ 114, 0, 0, 0, 0, 59, 0, 0, 0, 0,
+ 28, 154, 0, 5, 110, 0, 0, 0, 0, 65,
+ 49, 51, 67, 46, 0, 87, 0, 0, 0, 108,
+ 101, 102, 0, 0, 38, 41, 33, 48, 0, 40,
+ 66, 0, 0, 0, 0, 69, 0, 0, 0, 0,
+ 96, 94, 68, 86, 0, 37, 0, 47, 0, 80,
+ 81, 63, 67, 56, 93, 0, 0, 70, 73, 0,
+ 115, 5, 0, 0, 0, 36, 62, 0, 71, 74,
+ 72, 75, 78, 0, 76, 116, 92, 103, 104, 61,
+ 125, 118, 122, 125, 5, 0, 79, 120, 77, 0,
+ 124, 98, 99, 100, 119, 123, 0, 121, 97
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const short yydefgoto[] =
+{
+ -1, 4, 5, 6, 7, 14, 41, 33, 18, 19,
+ 56, 49, 20, 21, 137, 115, 177, 179, 194, 50,
+ 22, 23, 116, 164, 180, 51, 24, 25, 166, 118,
+ 141, 203, 181, 208, 209, 210, 253, 250, 221, 52,
+ 26, 27, 145, 143, 120, 188, 211, 260, 261, 28,
+ 29, 53, 30, 121, 133, 134, 231, 232, 256, 69,
+ 212, 10, 11, 31, 156, 32, 135
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -192
+static const short yypact[] =
+{
+ 400, -26, -9, -9, 27, -192, 62, -192, -192, -9,
+ -192, 18, 20, -192, 77, 30, -192, 35, 58, -192,
+ -192, -192, -192, -192, -192, -192, -192, -192, -192, -192,
+ -192, 130, -192, 77, -192, -192, -9, -192, -192, -192,
+ 186, 78, 506, 537, 568, 599, 75, 79, 366, -11,
+ 34, 9, 11, -192, -192, -192, 61, -192, -192, -192,
+ -192, -192, -192, -192, -192, 76, -192, 96, -192, -15,
+ 38, 77, -192, -192, -192, -192, -192, -192, -192, -192,
+ -192, -192, -192, -192, -192, -192, -192, -192, -192, -192,
+ -192, -192, -192, -192, -192, -192, -192, -192, -192, -192,
+ -192, -192, -192, -192, -192, -192, -192, -192, -192, 35,
+ 35, -192, 630, -192, -2, -192, 103, -2, 128, 93,
+ -192, 107, 104, -192, -192, 116, -192, 101, 156, -192,
+ 186, 186, -192, 108, 109, -192, 123, 114, 289, 123,
+ 93, -192, -192, -192, -8, 115, 630, 117, -192, 156,
+ -192, -192, -192, -192, -192, 123, -192, 118, 121, -192,
+ 630, 322, 120, 186, 119, -192, 125, 93, 223, 127,
+ -192, -192, 661, 35, -192, 122, 186, 129, 289, -192,
+ 133, -192, 692, -192, 256, -192, 134, 398, 137, -192,
+ -192, -192, 186, 322, 135, -192, -192, -192, 289, -192,
+ -192, 136, 398, 140, 223, -192, 742, 742, 32, 28,
+ -192, 149, -192, -192, 124, -192, 322, -192, 256, -192,
+ -192, 151, 439, -192, -192, 57, 59, -192, -192, 150,
+ -192, 35, 51, 223, 723, -192, -192, 256, -192, -192,
+ -192, -192, -192, 186, -192, 160, -192, -192, -192, -192,
+ 182, -192, 692, 182, 35, 475, -192, -192, -192, 186,
+ -192, 152, 123, -192, -192, 692, 475, -192, -192
+};
+
+/* YYPGOTO[NTERM-NUM]. */
+static const short yypgoto[] =
+{
+ -192, -192, -192, -17, -7, -192, -192, -192, -192, -192,
+ -192, -192, -192, -192, -192, -192, -179, -186, -192, -192,
+ -192, -192, -192, -163, -192, -192, -192, -192, -192, -192,
+ -192, -146, -164, -87, -192, -4, -192, -192, -192, -192,
+ -192, -192, -192, -124, -192, -191, -192, -49, -192, -192,
+ -192, -192, -192, -192, -127, -192, -24, -192, -31, -108,
+ -30, 19, 220, -192, 81, -192, -40
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -118
+static const short yytable[] =
+{
+ 40, 114, 102, 104, 106, 108, 136, 38, 113, 139,
+ 70, 144, 195, 224, 215, 197, 165, 125, 8, 169,
+ 155, 117, -58, 119, 125, 9, 54, 13, 34, 229,
+ 67, 68, 144, 174, -35, 217, 126, 235, 219, 230,
+ 167, 155, 246, 185, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -58, 55, -91, 251, 35, 144,
+ -116, -116, 37, 39, 129, 15, 36, -116, 36, 227,
+ 228, 127, 236, 264, 2, -117, -117, -13, 1, -45,
+ -5, -5, -5, -5, -5, -5, -5, -5, 16, 17,
+ 128, 249, 130, 131, 238, 239, 240, 241, 244, 245,
+ 157, 158, -8, -5, -5, 1, 122, -5, -5, -5,
+ -5, -5, -5, -5, -5, 147, 2, 142, 3, 225,
+ 226, 163, 71, -13, 109, 67, 68, 123, 110, 124,
+ -5, -5, 191, 182, 42, 43, 44, 45, 46, 47,
+ 48, 140, 200, 2, 176, 3, 182, 262, 138, 148,
+ -13, 187, 146, 149, 159, 125, 192, 160, 262, 161,
+ 168, 163, 214, 170, 178, 183, 193, 202, 172, 173,
+ 184, 230, 222, 189, 234, 196, 176, 198, 204, 216,
+ 218, 163, 200, 213, 150, 151, 223, 187, 67, 68,
+ 152, 153, 154, 233, 248, 237, 255, 242, 220, 176,
+ 266, 202, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 257, 252, 243, 263, 187, 268, 67, 68,
+ 202, 254, 258, 12, 186, 267, 263, 0, 0, 265,
+ 171, 0, 0, 0, 0, 0, 0, 259, -5, -5,
+ -5, -5, -5, -5, -5, -5, -5, -5, -5, 0,
+ 0, 0, 0, -5, -5, -5, -5, 201, 0, 0,
+ 0, 0, 2, 0, 0, 0, 0, 0, 0, -95,
+ 0, -5, -5, -5, -5, -5, -5, -5, -5, -5,
+ -5, -5, 0, 0, 0, 0, -5, -5, -5, -5,
+ 162, 0, 0, 0, 0, 2, 0, 0, 0, 0,
+ 0, 0, -64, 0, 0, -5, -5, -5, -5, -5,
+ -5, -5, -5, -5, -5, 0, 0, 0, 0, 0,
+ 0, -5, -5, 175, 0, 0, 0, 0, 2, 0,
+ 0, 0, 0, 0, 0, -50, 0, 0, -5, -5,
+ -5, -5, -5, -5, -5, -5, -5, -5, 0, 0,
+ 0, 0, 0, 0, -5, -5, 0, 0, 0, 0,
+ 0, 2, 0, 0, 0, 0, 0, 0, -39, 72,
+ 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
+ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
+ 93, 94, 95, 96, 97, 98, 99, 100, 0, 111,
+ -13, 1, 0, -5, -5, -5, -5, -5, -5, -5,
+ -5, 112, 0, 205, 57, 58, 59, 60, 61, 62,
+ 63, 64, 65, 66, 0, 0, -5, -5, 206, 207,
+ 67, 68, 0, 0, 0, 0, 0, 0, 0, 2,
+ 0, 3, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
+ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 0, 199, 0, 0, 0, -68, -68, 72, 73,
+ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
+ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
+ 94, 95, 96, 97, 98, 99, 100, 67, 68, 72,
+ 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
+ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
+ 93, 94, 95, 96, 97, 98, 99, 100, 0, 101,
+ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
+ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 0,
+ 103, 72, 73, 74, 75, 76, 77, 78, 79, 80,
+ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
+ 0, 105, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
+ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 0, 107, 72, 73, 74, 75, 76, 77, 78,
+ 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
+ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
+ 99, 100, 0, 132, 72, 73, 74, 75, 76, 77,
+ 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
+ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
+ 98, 99, 100, 0, 190, 72, 73, 74, 75, 76,
+ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
+ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
+ 97, 98, 99, 100, 0, 199, 72, 73, 74, 75,
+ 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
+ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99, 100, 0, 247, 205, 57, 58,
+ 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
+ 0, 0, 0, 0, 67, 68
+};
+
+static const short yycheck[] =
+{
+ 17, 12, 42, 43, 44, 45, 114, 14, 48, 117,
+ 40, 119, 176, 204, 193, 178, 140, 32, 44, 146,
+ 128, 12, 13, 12, 32, 34, 33, 0, 9, 1,
+ 32, 33, 140, 160, 45, 198, 51, 216, 202, 11,
+ 48, 149, 233, 167, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 45, 36, 45, 243, 40, 167,
+ 32, 33, 42, 33, 71, 3, 48, 39, 48, 37,
+ 38, 33, 218, 259, 39, 47, 48, 0, 1, 45,
+ 3, 4, 5, 6, 7, 8, 9, 10, 26, 27,
+ 52, 237, 109, 110, 37, 38, 37, 38, 47, 48,
+ 130, 131, 44, 26, 27, 1, 45, 3, 4, 5,
+ 6, 7, 8, 9, 10, 122, 39, 24, 41, 206,
+ 207, 138, 44, 46, 49, 32, 33, 51, 49, 33,
+ 26, 27, 172, 163, 4, 5, 6, 7, 8, 9,
+ 10, 13, 182, 39, 161, 41, 176, 255, 45, 33,
+ 46, 168, 45, 52, 46, 32, 173, 48, 266, 45,
+ 45, 178, 192, 46, 44, 46, 44, 184, 50, 48,
+ 45, 11, 202, 46, 50, 46, 193, 44, 44, 44,
+ 44, 198, 222, 46, 28, 29, 46, 204, 32, 33,
+ 34, 35, 36, 44, 234, 44, 14, 47, 202, 216,
+ 48, 218, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 252, 243, 231, 255, 233, 266, 32, 33,
+ 237, 245, 253, 3, 1, 265, 266, -1, -1, 259,
+ 149, -1, -1, -1, -1, -1, -1, 254, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, -1,
+ -1, -1, -1, 30, 31, 32, 33, 1, -1, -1,
+ -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
+ -1, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, -1, -1, -1, -1, 30, 31, 32, 33,
+ 1, -1, -1, -1, -1, 39, -1, -1, -1, -1,
+ -1, -1, 46, -1, -1, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
+ -1, 32, 33, 1, -1, -1, -1, -1, 39, -1,
+ -1, -1, -1, -1, -1, 46, -1, -1, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, -1, -1,
+ -1, -1, -1, -1, 32, 33, -1, -1, -1, -1,
+ -1, 39, -1, -1, -1, -1, -1, -1, 46, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, -1, 33,
+ 0, 1, -1, 3, 4, 5, 6, 7, 8, 9,
+ 10, 45, -1, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, -1, -1, 26, 27, 30, 31,
+ 32, 33, -1, -1, -1, -1, -1, -1, -1, 39,
+ -1, 41, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, -1, 33, -1, -1, -1, 37, 38, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, -1, 33,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, -1,
+ 33, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ -1, 33, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, -1, 33, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, -1, 33, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, -1, 33, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, -1, 33, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, -1, 33, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, -1, -1,
+ -1, -1, -1, -1, 32, 33
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const unsigned char yystos[] =
+{
+ 0, 1, 39, 41, 54, 55, 56, 57, 44, 34,
+ 114, 115, 115, 0, 58, 3, 26, 27, 61, 62,
+ 65, 66, 73, 74, 79, 80, 93, 94, 102, 103,
+ 105, 116, 118, 60, 114, 40, 48, 42, 57, 33,
+ 56, 59, 4, 5, 6, 7, 8, 9, 10, 64,
+ 72, 78, 92, 104, 57, 114, 63, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 32, 33, 112,
+ 113, 44, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 33, 119, 33, 119, 33, 119, 33, 119, 49,
+ 49, 33, 45, 119, 12, 68, 75, 12, 82, 12,
+ 97, 106, 45, 51, 33, 32, 51, 33, 52, 57,
+ 56, 56, 33, 107, 108, 119, 112, 67, 45, 112,
+ 13, 83, 24, 96, 112, 95, 45, 57, 33, 52,
+ 28, 29, 34, 35, 36, 112, 117, 113, 113, 46,
+ 48, 45, 1, 56, 76, 96, 81, 48, 45, 107,
+ 46, 117, 50, 48, 107, 1, 56, 69, 44, 70,
+ 77, 85, 113, 46, 45, 96, 1, 56, 98, 46,
+ 33, 119, 56, 44, 71, 85, 46, 76, 44, 33,
+ 119, 1, 56, 84, 44, 15, 30, 31, 86, 87,
+ 88, 99, 113, 46, 113, 69, 44, 76, 44, 85,
+ 88, 91, 113, 46, 98, 86, 86, 37, 38, 1,
+ 11, 109, 110, 44, 50, 69, 84, 44, 37, 38,
+ 37, 38, 47, 56, 47, 48, 98, 33, 119, 84,
+ 90, 70, 113, 89, 109, 14, 111, 119, 111, 56,
+ 100, 101, 112, 119, 70, 113, 48, 119, 100
+};
+
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# endif
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+
+#define YYFAIL goto yyerrlab
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
+ YYPOPSTACK; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror ("syntax error: cannot back up");\
+ YYERROR; \
+ } \
+while (0)
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+/* YYLLOC_DEFAULT -- Compute the default location (before the actions
+ are run). */
+
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ ((Current).first_line = (Rhs)[1].first_line, \
+ (Current).first_column = (Rhs)[1].first_column, \
+ (Current).last_line = (Rhs)[N].last_line, \
+ (Current).last_column = (Rhs)[N].last_column)
+#endif
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (&yylval, YYLEX_PARAM)
+#else
+# define YYLEX yylex (&yylval)
+#endif
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+# define YYDSYMPRINT(Args) \
+do { \
+ if (yydebug) \
+ yysymprint Args; \
+} while (0)
+
+# define YYDSYMPRINTF(Title, Token, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yysymprint (stderr, \
+ Token, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_stack_print (short *bottom, short *top)
+#else
+static void
+yy_stack_print (bottom, top)
+ short *bottom;
+ short *top;
+#endif
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (/* Nothing. */; bottom <= top; ++bottom)
+ YYFPRINTF (stderr, " %d", *bottom);
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_reduce_print (int yyrule)
+#else
+static void
+yy_reduce_print (yyrule)
+ int yyrule;
+#endif
+{
+ int yyi;
+ unsigned int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
+ yyrule - 1, yylno);
+ /* Print the symbols being reduced, and their result. */
+ for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
+ YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
+ YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (Rule); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YYDSYMPRINT(Args)
+# define YYDSYMPRINTF(Title, Token, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
+# undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined (__GLIBC__) && defined (_STRING_H)
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+# if defined (__STDC__) || defined (__cplusplus)
+yystrlen (const char *yystr)
+# else
+yystrlen (yystr)
+ const char *yystr;
+# endif
+{
+ register const char *yys = yystr;
+
+ while (*yys++ != '\0')
+ continue;
+
+ return yys - yystr - 1;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+# if defined (__STDC__) || defined (__cplusplus)
+yystpcpy (char *yydest, const char *yysrc)
+# else
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+# endif
+{
+ register char *yyd = yydest;
+ register const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+#endif /* !YYERROR_VERBOSE */
+
+
+
+#if YYDEBUG
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yysymprint (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ if (yytype < YYNTOKENS)
+ {
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+# ifdef YYPRINT
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+ }
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+ YYFPRINTF (yyoutput, ")");
+}
+
+#endif /* ! YYDEBUG */
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yydestruct (int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yytype, yyvaluep)
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
+}
+
+
+/* Prevent warnings from -Wmissing-prototypes. */
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM);
+# else
+int yyparse ();
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM)
+# else
+int yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+
+#endif
+#endif
+{
+ /* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far. */
+int yynerrs;
+
+ register int yystate;
+ register int yyn;
+ int yyresult;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken = 0;
+
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ short yyssa[YYINITDEPTH];
+ short *yyss = yyssa;
+ register short *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ register YYSTYPE *yyvsp;
+
+
+
+#define YYPOPSTACK (yyvsp--, yyssp--)
+
+ YYSIZE_T yystacksize = YYINITDEPTH;
+
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+
+ /* When reducing, the number of symbols on the RHS of the reduced
+ rule. */
+ int yylen;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+
+ yyssp = yyss;
+ yyvsp = yyvs;
+
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. so pushing a state here evens the stacks.
+ */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ short *yyss1 = yyss;
+
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow ("parser stack overflow",
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyoverflowlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyoverflowlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ short *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyoverflowlab;
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+/* Do appropriate processing given the current state. */
+/* Read a lookahead token if we need one and don't already have one. */
+/* yyresume: */
+
+ /* First try to decide what to do without reference to lookahead token. */
+
+ yyn = yypact[yystate];
+ if (yyn == YYPACT_NINF)
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = YYLEX;
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yyn == 0 || yyn == YYTABLE_NINF)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ /* Shift the lookahead token. */
+ YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
+
+ /* Discard the token being shifted unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
+ *++yyvsp = yylval;
+
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ `$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 2:
+#line 106 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 3:
+#line 114 "../Slice/Grammar.y"
+ {
+ yyval = yyvsp[-1];
+;}
+ break;
+
+ case 4:
+#line 123 "../Slice/Grammar.y"
+ {
+ yyval = yyvsp[-1];
+;}
+ break;
+
+ case 5:
+#line 127 "../Slice/Grammar.y"
+ {
+ yyval = new StringListTok;
+;}
+ break;
+
+ case 6:
+#line 136 "../Slice/Grammar.y"
+ {
+ StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[0]);
+ if(!metaData->v.empty())
+ {
+ unit->addGlobalMetaData(metaData->v);
+ }
+;}
+ break;
+
+ case 8:
+#line 145 "../Slice/Grammar.y"
+ {
+ StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-1]);
+ ContainedPtr contained = ContainedPtr::dynamicCast(yyvsp[0]);
+ if(contained && !metaData->v.empty())
+ {
+ contained->setMetaData(metaData->v);
+ }
+ unit->setSeenDefinition();
+;}
+ break;
+
+ case 10:
+#line 156 "../Slice/Grammar.y"
+ {
+ yyerrok;
+;}
+ break;
+
+ case 12:
+#line 161 "../Slice/Grammar.y"
+ {
+ unit->error("`;' missing after definition");
+;}
+ break;
+
+ case 13:
+#line 165 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 14:
+#line 173 "../Slice/Grammar.y"
+ {
+ assert(yyvsp[0] == 0 || ModulePtr::dynamicCast(yyvsp[0]));
+;}
+ break;
+
+ case 15:
+#line 177 "../Slice/Grammar.y"
+ {
+ assert(yyvsp[0] == 0 || ClassDeclPtr::dynamicCast(yyvsp[0]));
+;}
+ break;
+
+ case 16:
+#line 181 "../Slice/Grammar.y"
+ {
+ assert(yyvsp[0] == 0 || ClassDefPtr::dynamicCast(yyvsp[0]));
+;}
+ break;
+
+ case 17:
+#line 185 "../Slice/Grammar.y"
+ {
+ assert(yyvsp[0] == 0 || ClassDeclPtr::dynamicCast(yyvsp[0]));
+;}
+ break;
+
+ case 18:
+#line 189 "../Slice/Grammar.y"
+ {
+ assert(yyvsp[0] == 0 || ClassDefPtr::dynamicCast(yyvsp[0]));
+;}
+ break;
+
+ case 19:
+#line 193 "../Slice/Grammar.y"
+ {
+ assert(yyvsp[0] == 0);
+;}
+ break;
+
+ case 20:
+#line 197 "../Slice/Grammar.y"
+ {
+ assert(yyvsp[0] == 0 || ExceptionPtr::dynamicCast(yyvsp[0]));
+;}
+ break;
+
+ case 21:
+#line 201 "../Slice/Grammar.y"
+ {
+ assert(yyvsp[0] == 0);
+;}
+ break;
+
+ case 22:
+#line 205 "../Slice/Grammar.y"
+ {
+ assert(yyvsp[0] == 0 || StructPtr::dynamicCast(yyvsp[0]));
+;}
+ break;
+
+ case 23:
+#line 209 "../Slice/Grammar.y"
+ {
+ assert(yyvsp[0] == 0 || SequencePtr::dynamicCast(yyvsp[0]));
+;}
+ break;
+
+ case 24:
+#line 213 "../Slice/Grammar.y"
+ {
+ assert(yyvsp[0] == 0 || DictionaryPtr::dynamicCast(yyvsp[0]));
+;}
+ break;
+
+ case 25:
+#line 217 "../Slice/Grammar.y"
+ {
+ assert(yyvsp[0] == 0 || EnumPtr::dynamicCast(yyvsp[0]));
+;}
+ break;
+
+ case 26:
+#line 221 "../Slice/Grammar.y"
+ {
+ assert(yyvsp[0] == 0 || ConstPtr::dynamicCast(yyvsp[0]));
+;}
+ break;
+
+ case 27:
+#line 230 "../Slice/Grammar.y"
+ {
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ ContainerPtr cont = unit->currentContainer();
+ ModulePtr module = cont->createModule(ident->v);
+ if(module)
+ {
+ cont->checkIntroduced(ident->v, module);
+ unit->pushContainer(module);
+ yyval = module;
+ }
+ else
+ {
+ yyval = 0;
+ }
+;}
+ break;
+
+ case 28:
+#line 246 "../Slice/Grammar.y"
+ {
+ if(yyvsp[-3])
+ {
+ unit->popContainer();
+ yyval = yyvsp[-3];
+ }
+ else
+ {
+ yyval = 0;
+ }
+;}
+ break;
+
+ case 29:
+#line 263 "../Slice/Grammar.y"
+ {
+ yyval = yyvsp[0];
+;}
+ break;
+
+ case 30:
+#line 267 "../Slice/Grammar.y"
+ {
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ unit->error("keyword `" + ident->v + "' cannot be used as exception name");
+ yyval = yyvsp[0]; // Dummy
+;}
+ break;
+
+ case 31:
+#line 278 "../Slice/Grammar.y"
+ {
+ unit->error("exceptions cannot be forward declared");
+ yyval = 0;
+;}
+ break;
+
+ case 32:
+#line 288 "../Slice/Grammar.y"
+ {
+ BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-2]);
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[-1]);
+ ExceptionPtr base = ExceptionPtr::dynamicCast(yyvsp[0]);
+ ContainerPtr cont = unit->currentContainer();
+ ExceptionPtr ex = cont->createException(ident->v, base, local->v);
+ if(ex)
+ {
+ cont->checkIntroduced(ident->v, ex);
+ unit->pushContainer(ex);
+ }
+ yyval = ex;
+;}
+ break;
+
+ case 33:
+#line 302 "../Slice/Grammar.y"
+ {
+ if(yyvsp[-3])
+ {
+ unit->popContainer();
+ }
+ yyval = yyvsp[-3];
+;}
+ break;
+
+ case 34:
+#line 315 "../Slice/Grammar.y"
+ {
+ StringTokPtr scoped = StringTokPtr::dynamicCast(yyvsp[0]);
+ ContainerPtr cont = unit->currentContainer();
+ ContainedPtr contained = cont->lookupException(scoped->v);
+ cont->checkIntroduced(scoped->v);
+ yyval = contained;
+;}
+ break;
+
+ case 35:
+#line 323 "../Slice/Grammar.y"
+ {
+ yyval = 0;
+;}
+ break;
+
+ case 36:
+#line 332 "../Slice/Grammar.y"
+ {
+ StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-3]);
+ ContainedPtr contained = ContainedPtr::dynamicCast(yyvsp[-2]);
+ if(contained && !metaData->v.empty())
+ {
+ contained->setMetaData(metaData->v);
+ }
+;}
+ break;
+
+ case 37:
+#line 341 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 38:
+#line 344 "../Slice/Grammar.y"
+ {
+ unit->error("`;' missing after definition");
+;}
+ break;
+
+ case 39:
+#line 348 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 40:
+#line 356 "../Slice/Grammar.y"
+ {
+ TypePtr type = TypePtr::dynamicCast(yyvsp[-1]);
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ TypeStringTokPtr typestring = new TypeStringTok;
+ typestring->v = make_pair(type, ident->v);
+ yyval = typestring;
+;}
+ break;
+
+ case 42:
+#line 375 "../Slice/Grammar.y"
+ {
+ yyval = yyvsp[0];
+;}
+ break;
+
+ case 43:
+#line 379 "../Slice/Grammar.y"
+ {
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ unit->error("keyword `" + ident->v + "' cannot be used as struct name");
+ yyval = yyvsp[0]; // Dummy
+;}
+ break;
+
+ case 44:
+#line 390 "../Slice/Grammar.y"
+ {
+ unit->error("structs cannot be forward declared");
+ yyval = 0; // Dummy
+;}
+ break;
+
+ case 45:
+#line 400 "../Slice/Grammar.y"
+ {
+ BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-1]);
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ ContainerPtr cont = unit->currentContainer();
+ StructPtr st = cont->createStruct(ident->v, local->v);
+ if(st)
+ {
+ cont->checkIntroduced(ident->v, st);
+ unit->pushContainer(st);
+ }
+ yyval = st;
+;}
+ break;
+
+ case 46:
+#line 413 "../Slice/Grammar.y"
+ {
+ if(yyvsp[-3])
+ {
+ unit->popContainer();
+ }
+ yyval = yyvsp[-3];
+
+ //
+ // Empty structures are not allowed
+ //
+ StructPtr st = StructPtr::dynamicCast(yyval);
+ assert(st);
+ if(st->dataMembers().empty())
+ {
+ unit->error("struct `" + st->name() + "' must have at least one member"); // $$ is a dummy
+ }
+;}
+ break;
+
+ case 47:
+#line 436 "../Slice/Grammar.y"
+ {
+ StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-3]);
+ ContainedPtr contained = ContainedPtr::dynamicCast(yyvsp[-2]);
+ if(contained && !metaData->v.empty())
+ {
+ contained->setMetaData(metaData->v);
+ }
+;}
+ break;
+
+ case 48:
+#line 445 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 49:
+#line 448 "../Slice/Grammar.y"
+ {
+ unit->error("`;' missing after definition");
+;}
+ break;
+
+ case 50:
+#line 452 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 52:
+#line 466 "../Slice/Grammar.y"
+ {
+ yyval = yyvsp[0];
+;}
+ break;
+
+ case 53:
+#line 470 "../Slice/Grammar.y"
+ {
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ unit->error("keyword `" + ident->v + "' cannot be used as class name");
+ yyval = yyvsp[0]; // Dummy
+;}
+ break;
+
+ case 54:
+#line 481 "../Slice/Grammar.y"
+ {
+ BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-1]);
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ ContainerPtr cont = unit->currentContainer();
+ ClassDeclPtr cl = cont->createClassDecl(ident->v, false, local->v);
+ yyval = cl;
+;}
+ break;
+
+ case 55:
+#line 494 "../Slice/Grammar.y"
+ {
+ BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-3]);
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[-2]);
+ ContainerPtr cont = unit->currentContainer();
+ ClassDefPtr base = ClassDefPtr::dynamicCast(yyvsp[-1]);
+ ClassListTokPtr bases = ClassListTokPtr::dynamicCast(yyvsp[0]);
+ if(base)
+ {
+ bases->v.push_front(base);
+ }
+ ClassDefPtr cl = cont->createClassDef(ident->v, false, bases->v, local->v);
+ if(cl)
+ {
+ cont->checkIntroduced(ident->v, cl);
+ unit->pushContainer(cl);
+ yyval = cl;
+ }
+ else
+ {
+ yyval = 0;
+ }
+;}
+ break;
+
+ case 56:
+#line 517 "../Slice/Grammar.y"
+ {
+ if(yyvsp[-3])
+ {
+ unit->popContainer();
+ yyval = yyvsp[-3];
+ }
+ else
+ {
+ yyval = 0;
+ }
+;}
+ break;
+
+ case 57:
+#line 534 "../Slice/Grammar.y"
+ {
+ StringTokPtr scoped = StringTokPtr::dynamicCast(yyvsp[0]);
+ ContainerPtr cont = unit->currentContainer();
+ TypeList types = cont->lookupType(scoped->v);
+ yyval = 0;
+ if(!types.empty())
+ {
+ ClassDeclPtr cl = ClassDeclPtr::dynamicCast(types.front());
+ if(!cl || cl->isInterface())
+ {
+ string msg = "`";
+ msg += scoped->v;
+ msg += "' is not a class";
+ unit->error(msg);
+ }
+ else
+ {
+ ClassDefPtr def = cl->definition();
+ if(!def)
+ {
+ string msg = "`";
+ msg += scoped->v;
+ msg += "' has been declared but not defined";
+ unit->error(msg);
+ }
+ else
+ {
+ cont->checkIntroduced(scoped->v);
+ yyval = def;
+ }
+ }
+ }
+;}
+ break;
+
+ case 58:
+#line 568 "../Slice/Grammar.y"
+ {
+ yyval = 0;
+;}
+ break;
+
+ case 59:
+#line 577 "../Slice/Grammar.y"
+ {
+ yyval = yyvsp[0];
+;}
+ break;
+
+ case 60:
+#line 581 "../Slice/Grammar.y"
+ {
+ yyval = new ClassListTok;
+;}
+ break;
+
+ case 61:
+#line 590 "../Slice/Grammar.y"
+ {
+ StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-3]);
+ ContainedPtr contained = ContainedPtr::dynamicCast(yyvsp[-2]);
+ if(contained && !metaData->v.empty())
+ {
+ contained->setMetaData(metaData->v);
+ }
+;}
+ break;
+
+ case 62:
+#line 599 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 63:
+#line 602 "../Slice/Grammar.y"
+ {
+ unit->error("`;' missing after definition");
+;}
+ break;
+
+ case 64:
+#line 606 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 65:
+#line 614 "../Slice/Grammar.y"
+ {
+ TypePtr type = TypeStringTokPtr::dynamicCast(yyvsp[0])->v.first;
+ string name = TypeStringTokPtr::dynamicCast(yyvsp[0])->v.second;
+ ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer());
+ DataMemberPtr dm;
+ if(cl)
+ {
+ dm = cl->createDataMember(name, type);
+ }
+ StructPtr st = StructPtr::dynamicCast(unit->currentContainer());
+ if(st)
+ {
+ dm = st->createDataMember(name, type);
+ }
+ ExceptionPtr ex = ExceptionPtr::dynamicCast(unit->currentContainer());
+ if(ex)
+ {
+ dm = ex->createDataMember(name, type);
+ }
+ unit->currentContainer()->checkIntroduced(name, dm);
+ yyval = dm;
+;}
+ break;
+
+ case 66:
+#line 637 "../Slice/Grammar.y"
+ {
+ TypePtr type = TypePtr::dynamicCast(yyvsp[-1]);
+ string name = StringTokPtr::dynamicCast(yyvsp[0])->v;
+ ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer());
+ if(cl)
+ {
+ yyval = cl->createDataMember(name, type); // Dummy
+ }
+ StructPtr st = StructPtr::dynamicCast(unit->currentContainer());
+ if(st)
+ {
+ yyval = st->createDataMember(name, type); // Dummy
+ }
+ ExceptionPtr ex = ExceptionPtr::dynamicCast(unit->currentContainer());
+ if(ex)
+ {
+ yyval = ex->createDataMember(name, type); // Dummy
+ }
+ assert(yyval);
+ unit->error("keyword `" + name + "' cannot be used as data member name");
+;}
+ break;
+
+ case 67:
+#line 659 "../Slice/Grammar.y"
+ {
+ TypePtr type = TypePtr::dynamicCast(yyvsp[0]);
+ ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer());
+ if(cl)
+ {
+ yyval = cl->createDataMember(IceUtil::generateUUID(), type); // Dummy
+ }
+ StructPtr st = StructPtr::dynamicCast(unit->currentContainer());
+ if(st)
+ {
+ yyval = st->createDataMember(IceUtil::generateUUID(), type); // Dummy
+ }
+ ExceptionPtr ex = ExceptionPtr::dynamicCast(unit->currentContainer());
+ if(ex)
+ {
+ yyval = ex->createDataMember(IceUtil::generateUUID(), type); // Dummy
+ }
+ assert(yyval);
+ unit->error("missing data member name");
+;}
+ break;
+
+ case 69:
+#line 686 "../Slice/Grammar.y"
+ {
+ yyval = 0;
+;}
+ break;
+
+ case 70:
+#line 695 "../Slice/Grammar.y"
+ {
+ TypePtr returnType = TypePtr::dynamicCast(yyvsp[-1]);
+ string name = StringTokPtr::dynamicCast(yyvsp[0])->v;
+ ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer());
+ if(cl)
+ {
+ OperationPtr op = cl->createOperation(name, returnType);
+ if(op)
+ {
+ cl->checkIntroduced(name, op);
+ unit->pushContainer(op);
+ yyval = op;
+ }
+ else
+ {
+ yyval = 0;
+ }
+ }
+ else
+ {
+ yyval = 0;
+ }
+;}
+ break;
+
+ case 71:
+#line 719 "../Slice/Grammar.y"
+ {
+ TypePtr returnType = TypePtr::dynamicCast(yyvsp[-1]);
+ string name = StringTokPtr::dynamicCast(yyvsp[0])->v;
+ ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer());
+ if(cl)
+ {
+ OperationPtr op = cl->createOperation(name, returnType, Operation::Nonmutating);
+ if(op)
+ {
+ cl->checkIntroduced(name, op);
+ unit->pushContainer(op);
+ static bool firstWarning = true;
+
+ string msg = "the keyword 'nonmutating' is deprecated";
+ if(firstWarning)
+ {
+ msg += ";\n";
+ msg += "You should use instead 'idempotent' plus:\n";
+ msg += " - Freeze metadata ([\"freeze:read\"], [\"freeze:write\"]) if you implement your objects with a Freeze evictor\n";
+ msg += " - [\"nonmutating\"], if you need to maintain compatibility with operations that expect ";
+ msg += "'Nonmutating' as operation-mode. With this metadata, the generated code sends ";
+ msg += "'Nonmutating' instead of 'Idempotent'\n";
+ msg += " - [\"cpp:const\"], to get a const member function on the generated C++ servant base class";
+
+ firstWarning = false;
+ }
+
+ unit->warning(msg);
+ yyval = op;
+ }
+ else
+ {
+ yyval = 0;
+ }
+ }
+ else
+ {
+ yyval = 0;
+ }
+;}
+ break;
+
+ case 72:
+#line 760 "../Slice/Grammar.y"
+ {
+ TypePtr returnType = TypePtr::dynamicCast(yyvsp[-1]);
+ string name = StringTokPtr::dynamicCast(yyvsp[0])->v;
+ ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer());
+ if(cl)
+ {
+ OperationPtr op = cl->createOperation(name, returnType, Operation::Idempotent);
+ if(op)
+ {
+ cl->checkIntroduced(name, op);
+ unit->pushContainer(op);
+ yyval = op;
+ }
+ else
+ {
+ yyval = 0;
+ }
+ }
+ else
+ {
+ yyval = 0;
+ }
+;}
+ break;
+
+ case 73:
+#line 784 "../Slice/Grammar.y"
+ {
+ TypePtr returnType = TypePtr::dynamicCast(yyvsp[-1]);
+ string name = StringTokPtr::dynamicCast(yyvsp[0])->v;
+ ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer());
+ if(cl)
+ {
+ OperationPtr op = cl->createOperation(name, returnType);
+ if(op)
+ {
+ unit->pushContainer(op);
+ unit->error("keyword `" + name + "' cannot be used as operation name");
+ yyval = op; // Dummy
+ }
+ else
+ {
+ yyval = 0;
+ }
+ }
+ else
+ {
+ yyval = 0;
+ }
+;}
+ break;
+
+ case 74:
+#line 808 "../Slice/Grammar.y"
+ {
+ TypePtr returnType = TypePtr::dynamicCast(yyvsp[-1]);
+ string name = StringTokPtr::dynamicCast(yyvsp[0])->v;
+ ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer());
+ if(cl)
+ {
+ OperationPtr op = cl->createOperation(name, returnType, Operation::Nonmutating);
+ if(op)
+ {
+ unit->pushContainer(op);
+ unit->error("keyword `" + name + "' cannot be used as operation name");
+ yyval = op; // Dummy
+ }
+ else
+ {
+ yyval = 0;
+ }
+ }
+ else
+ {
+ yyval = 0;
+ }
+;}
+ break;
+
+ case 75:
+#line 832 "../Slice/Grammar.y"
+ {
+ TypePtr returnType = TypePtr::dynamicCast(yyvsp[-1]);
+ string name = StringTokPtr::dynamicCast(yyvsp[0])->v;
+ ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer());
+ if(cl)
+ {
+ OperationPtr op = cl->createOperation(name, returnType, Operation::Idempotent);
+ if(op)
+ {
+ unit->pushContainer(op);
+ unit->error("keyword `" + name + "' cannot be used as operation name");
+ yyval = op; // Dummy
+ }
+ else
+ {
+ return 0;
+ }
+ }
+ else
+ {
+ yyval = 0;
+ }
+;}
+ break;
+
+ case 76:
+#line 861 "../Slice/Grammar.y"
+ {
+ if(yyvsp[-2])
+ {
+ unit->popContainer();
+ yyval = yyvsp[-2];
+ }
+ else
+ {
+ yyval = 0;
+ }
+;}
+ break;
+
+ case 77:
+#line 873 "../Slice/Grammar.y"
+ {
+ OperationPtr op = OperationPtr::dynamicCast(yyvsp[-1]);
+ ExceptionListTokPtr el = ExceptionListTokPtr::dynamicCast(yyvsp[0]);
+ assert(el);
+ if(op)
+ {
+ op->setExceptionList(el->v);
+ }
+;}
+ break;
+
+ case 78:
+#line 883 "../Slice/Grammar.y"
+ {
+ if(yyvsp[-2])
+ {
+ unit->popContainer();
+ }
+ yyerrok;
+;}
+ break;
+
+ case 79:
+#line 891 "../Slice/Grammar.y"
+ {
+ OperationPtr op = OperationPtr::dynamicCast(yyvsp[-1]);
+ ExceptionListTokPtr el = ExceptionListTokPtr::dynamicCast(yyvsp[0]);
+ assert(el);
+ if(op)
+ {
+ op->setExceptionList(el->v); // Dummy
+ }
+;}
+ break;
+
+ case 82:
+#line 913 "../Slice/Grammar.y"
+ {
+ yyval = yyvsp[0];
+;}
+ break;
+
+ case 83:
+#line 917 "../Slice/Grammar.y"
+ {
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ unit->error("keyword `" + ident->v + "' cannot be used as interface name");
+ yyval = yyvsp[0]; // Dummy
+;}
+ break;
+
+ case 84:
+#line 928 "../Slice/Grammar.y"
+ {
+ BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-1]);
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ ContainerPtr cont = unit->currentContainer();
+ ClassDeclPtr cl = cont->createClassDecl(ident->v, true, local->v);
+ cont->checkIntroduced(ident->v, cl);
+ yyval = cl;
+;}
+ break;
+
+ case 85:
+#line 942 "../Slice/Grammar.y"
+ {
+ BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-2]);
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[-1]);
+ ContainerPtr cont = unit->currentContainer();
+ ClassListTokPtr bases = ClassListTokPtr::dynamicCast(yyvsp[0]);
+ ClassDefPtr cl = cont->createClassDef(ident->v, true, bases->v, local->v);
+ if(cl)
+ {
+ cont->checkIntroduced(ident->v, cl);
+ unit->pushContainer(cl);
+ yyval = cl;
+ }
+ else
+ {
+ yyval = 0;
+ }
+;}
+ break;
+
+ case 86:
+#line 960 "../Slice/Grammar.y"
+ {
+ if(yyvsp[-3])
+ {
+ unit->popContainer();
+ yyval = yyvsp[-3];
+ }
+ else
+ {
+ yyval = 0;
+ }
+;}
+ break;
+
+ case 87:
+#line 977 "../Slice/Grammar.y"
+ {
+ ClassListTokPtr intfs = ClassListTokPtr::dynamicCast(yyvsp[0]);
+ StringTokPtr scoped = StringTokPtr::dynamicCast(yyvsp[-2]);
+ ContainerPtr cont = unit->currentContainer();
+ TypeList types = cont->lookupType(scoped->v);
+ if(!types.empty())
+ {
+ ClassDeclPtr cl = ClassDeclPtr::dynamicCast(types.front());
+ if(!cl || !cl->isInterface())
+ {
+ string msg = "`";
+ msg += scoped->v;
+ msg += "' is not an interface";
+ unit->error(msg);
+ }
+ else
+ {
+ ClassDefPtr def = cl->definition();
+ if(!def)
+ {
+ string msg = "`";
+ msg += scoped->v;
+ msg += "' has been declared but not defined";
+ unit->error(msg);
+ }
+ else
+ {
+ cont->checkIntroduced(scoped->v);
+ intfs->v.push_front(def);
+ }
+ }
+ }
+ yyval = intfs;
+;}
+ break;
+
+ case 88:
+#line 1012 "../Slice/Grammar.y"
+ {
+ ClassListTokPtr intfs = new ClassListTok;
+ StringTokPtr scoped = StringTokPtr::dynamicCast(yyvsp[0]);
+ ContainerPtr cont = unit->currentContainer();
+ TypeList types = cont->lookupType(scoped->v);
+ if(!types.empty())
+ {
+ ClassDeclPtr cl = ClassDeclPtr::dynamicCast(types.front());
+ if(!cl || !cl->isInterface())
+ {
+ string msg = "`";
+ msg += scoped->v;
+ msg += "' is not an interface";
+ unit->error(msg); // $$ is a dummy
+ }
+ else
+ {
+ ClassDefPtr def = cl->definition();
+ if(!def)
+ {
+ string msg = "`";
+ msg += scoped->v;
+ msg += "' has been declared but not defined";
+ unit->error(msg); // $$ is a dummy
+ }
+ else
+ {
+ cont->checkIntroduced(scoped->v);
+ intfs->v.push_front(def);
+ }
+ }
+ }
+ yyval = intfs;
+;}
+ break;
+
+ case 89:
+#line 1047 "../Slice/Grammar.y"
+ {
+ unit->error("illegal inheritance from type Object");
+ yyval = new ClassListTok; // Dummy
+;}
+ break;
+
+ case 90:
+#line 1057 "../Slice/Grammar.y"
+ {
+ yyval = yyvsp[0];
+;}
+ break;
+
+ case 91:
+#line 1061 "../Slice/Grammar.y"
+ {
+ yyval = new ClassListTok;
+;}
+ break;
+
+ case 92:
+#line 1070 "../Slice/Grammar.y"
+ {
+ StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-3]);
+ ContainedPtr contained = ContainedPtr::dynamicCast(yyvsp[-2]);
+ if(contained && !metaData->v.empty())
+ {
+ contained->setMetaData(metaData->v);
+ }
+;}
+ break;
+
+ case 93:
+#line 1079 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 94:
+#line 1082 "../Slice/Grammar.y"
+ {
+ unit->error("`;' missing after definition");
+;}
+ break;
+
+ case 95:
+#line 1086 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 97:
+#line 1100 "../Slice/Grammar.y"
+ {
+ ExceptionPtr exception = ExceptionPtr::dynamicCast(yyvsp[-2]);
+ ExceptionListTokPtr exceptionList = ExceptionListTokPtr::dynamicCast(yyvsp[0]);
+ exceptionList->v.push_front(exception);
+ yyval = exceptionList;
+;}
+ break;
+
+ case 98:
+#line 1107 "../Slice/Grammar.y"
+ {
+ ExceptionPtr exception = ExceptionPtr::dynamicCast(yyvsp[0]);
+ ExceptionListTokPtr exceptionList = new ExceptionListTok;
+ exceptionList->v.push_front(exception);
+ yyval = exceptionList;
+;}
+ break;
+
+ case 99:
+#line 1119 "../Slice/Grammar.y"
+ {
+ StringTokPtr scoped = StringTokPtr::dynamicCast(yyvsp[0]);
+ ContainerPtr cont = unit->currentContainer();
+ ExceptionPtr exception = cont->lookupException(scoped->v);
+ if(!exception)
+ {
+ exception = cont->createException(IceUtil::generateUUID(), 0, false, Dummy); // Dummy
+ }
+ cont->checkIntroduced(scoped->v, exception);
+ yyval = exception;
+;}
+ break;
+
+ case 100:
+#line 1131 "../Slice/Grammar.y"
+ {
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ unit->error("keyword `" + ident->v + "' cannot be used as exception name");
+ yyval = unit->currentContainer()->createException(IceUtil::generateUUID(), 0, false, Dummy); // Dummy
+;}
+ break;
+
+ case 101:
+#line 1142 "../Slice/Grammar.y"
+ {
+ BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-6]);
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-3]);
+ TypePtr type = TypePtr::dynamicCast(yyvsp[-2]);
+ ContainerPtr cont = unit->currentContainer();
+ yyval = cont->createSequence(ident->v, type, metaData->v, local->v);
+;}
+ break;
+
+ case 102:
+#line 1151 "../Slice/Grammar.y"
+ {
+ BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-6]);
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-3]);
+ TypePtr type = TypePtr::dynamicCast(yyvsp[-2]);
+ ContainerPtr cont = unit->currentContainer();
+ yyval = cont->createSequence(ident->v, type, metaData->v, local->v); // Dummy
+ unit->error("keyword `" + ident->v + "' cannot be used as sequence name");
+;}
+ break;
+
+ case 103:
+#line 1166 "../Slice/Grammar.y"
+ {
+ BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-9]);
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ StringListTokPtr keyMetaData = StringListTokPtr::dynamicCast(yyvsp[-6]);
+ TypePtr keyType = TypePtr::dynamicCast(yyvsp[-5]);
+ StringListTokPtr valueMetaData = StringListTokPtr::dynamicCast(yyvsp[-3]);
+ TypePtr valueType = TypePtr::dynamicCast(yyvsp[-2]);
+ ContainerPtr cont = unit->currentContainer();
+ yyval = cont->createDictionary(ident->v, keyType, keyMetaData->v, valueType, valueMetaData->v, local->v);
+;}
+ break;
+
+ case 104:
+#line 1177 "../Slice/Grammar.y"
+ {
+ BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-9]);
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ StringListTokPtr keyMetaData = StringListTokPtr::dynamicCast(yyvsp[-6]);
+ TypePtr keyType = TypePtr::dynamicCast(yyvsp[-5]);
+ StringListTokPtr valueMetaData = StringListTokPtr::dynamicCast(yyvsp[-3]);
+ TypePtr valueType = TypePtr::dynamicCast(yyvsp[-2]);
+ ContainerPtr cont = unit->currentContainer();
+ yyval = cont->createDictionary(ident->v, keyType, keyMetaData->v, valueType, valueMetaData->v, local->v); // Dummy
+ unit->error("keyword `" + ident->v + "' cannot be used as dictionary name");
+;}
+ break;
+
+ case 105:
+#line 1194 "../Slice/Grammar.y"
+ {
+ yyval = yyvsp[0];
+;}
+ break;
+
+ case 106:
+#line 1198 "../Slice/Grammar.y"
+ {
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ unit->error("keyword `" + ident->v + "' cannot be used as enumeration name");
+ yyval = yyvsp[0]; // Dummy
+;}
+ break;
+
+ case 107:
+#line 1209 "../Slice/Grammar.y"
+ {
+ BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-1]);
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ ContainerPtr cont = unit->currentContainer();
+ EnumPtr en = cont->createEnum(ident->v, local->v);
+ cont->checkIntroduced(ident->v, en);
+ yyval = en;
+;}
+ break;
+
+ case 108:
+#line 1218 "../Slice/Grammar.y"
+ {
+ EnumPtr en = EnumPtr::dynamicCast(yyvsp[-3]);
+ if(en)
+ {
+ EnumeratorListTokPtr enumerators = EnumeratorListTokPtr::dynamicCast(yyvsp[-1]);
+ if(enumerators->v.empty())
+ {
+ unit->error("enum `" + en->name() + "' must have at least one enumerator");
+ }
+ en->setEnumerators(enumerators->v); // Dummy
+ }
+ yyval = yyvsp[-3];
+;}
+ break;
+
+ case 109:
+#line 1233 "../Slice/Grammar.y"
+ {
+ unit->error("missing enumeration name");
+ BoolTokPtr local = BoolTokPtr::dynamicCast(yyvsp[-4]);
+ ContainerPtr cont = unit->currentContainer();
+ EnumPtr en = cont->createEnum(IceUtil::generateUUID(), local->v, Dummy); // Dummy
+ EnumeratorListTokPtr enumerators = EnumeratorListTokPtr::dynamicCast(yyvsp[-1]);
+ en->setEnumerators(enumerators->v); // Dummy
+ yyval = en;
+;}
+ break;
+
+ case 110:
+#line 1248 "../Slice/Grammar.y"
+ {
+ EnumeratorListTokPtr ens = EnumeratorListTokPtr::dynamicCast(yyvsp[-2]);
+ ens->v.splice(ens->v.end(), EnumeratorListTokPtr::dynamicCast(yyvsp[0])->v);
+ yyval = ens;
+;}
+ break;
+
+ case 111:
+#line 1254 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 112:
+#line 1262 "../Slice/Grammar.y"
+ {
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ EnumeratorListTokPtr ens = new EnumeratorListTok;
+ ContainerPtr cont = unit->currentContainer();
+ EnumeratorPtr en = cont->createEnumerator(ident->v);
+ if(en)
+ {
+ ens->v.push_front(en);
+ }
+ yyval = ens;
+;}
+ break;
+
+ case 113:
+#line 1274 "../Slice/Grammar.y"
+ {
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ unit->error("keyword `" + ident->v + "' cannot be used as enumerator");
+ EnumeratorListTokPtr ens = new EnumeratorListTok; // Dummy
+ yyval = ens;
+;}
+ break;
+
+ case 114:
+#line 1281 "../Slice/Grammar.y"
+ {
+ EnumeratorListTokPtr ens = new EnumeratorListTok;
+ yyval = ens; // Dummy
+;}
+ break;
+
+ case 115:
+#line 1291 "../Slice/Grammar.y"
+ {
+ BoolTokPtr out = new BoolTok;
+ out->v = true;
+ yyval = out;
+;}
+ break;
+
+ case 116:
+#line 1297 "../Slice/Grammar.y"
+ {
+ BoolTokPtr out = new BoolTok;
+ out->v = false;
+ yyval = out;
+;}
+ break;
+
+ case 117:
+#line 1308 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 118:
+#line 1311 "../Slice/Grammar.y"
+ {
+ BoolTokPtr isOutParam = BoolTokPtr::dynamicCast(yyvsp[-2]);
+ TypeStringTokPtr tsp = TypeStringTokPtr::dynamicCast(yyvsp[0]);
+ TypePtr type = tsp->v.first;
+ string ident = tsp->v.second;
+ OperationPtr op = OperationPtr::dynamicCast(unit->currentContainer());
+ if(op)
+ {
+ ParamDeclPtr pd = op->createParamDecl(ident, type, isOutParam->v);
+ unit->currentContainer()->checkIntroduced(ident, pd);
+ StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-1]);
+ if(!metaData->v.empty())
+ {
+ pd->setMetaData(metaData->v);
+ }
+ }
+;}
+ break;
+
+ case 119:
+#line 1329 "../Slice/Grammar.y"
+ {
+ BoolTokPtr isOutParam = BoolTokPtr::dynamicCast(yyvsp[-2]);
+ TypeStringTokPtr tsp = TypeStringTokPtr::dynamicCast(yyvsp[0]);
+ TypePtr type = tsp->v.first;
+ string ident = tsp->v.second;
+ OperationPtr op = OperationPtr::dynamicCast(unit->currentContainer());
+ if(op)
+ {
+ ParamDeclPtr pd = op->createParamDecl(ident, type, isOutParam->v);
+ unit->currentContainer()->checkIntroduced(ident, pd);
+ StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-1]);
+ if(!metaData->v.empty())
+ {
+ pd->setMetaData(metaData->v);
+ }
+ }
+;}
+ break;
+
+ case 120:
+#line 1347 "../Slice/Grammar.y"
+ {
+ BoolTokPtr isOutParam = BoolTokPtr::dynamicCast(yyvsp[-3]);
+ TypePtr type = TypePtr::dynamicCast(yyvsp[-1]);
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ OperationPtr op = OperationPtr::dynamicCast(unit->currentContainer());
+ if(op)
+ {
+ op->createParamDecl(ident->v, type, isOutParam->v); // Dummy
+ unit->error("keyword `" + ident->v + "' cannot be used as parameter name");
+ }
+;}
+ break;
+
+ case 121:
+#line 1359 "../Slice/Grammar.y"
+ {
+ BoolTokPtr isOutParam = BoolTokPtr::dynamicCast(yyvsp[-3]);
+ TypePtr type = TypePtr::dynamicCast(yyvsp[-1]);
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ OperationPtr op = OperationPtr::dynamicCast(unit->currentContainer());
+ if(op)
+ {
+ op->createParamDecl(ident->v, type, isOutParam->v); // Dummy
+ unit->error("keyword `" + ident->v + "' cannot be used as parameter name");
+ }
+;}
+ break;
+
+ case 122:
+#line 1371 "../Slice/Grammar.y"
+ {
+ BoolTokPtr isOutParam = BoolTokPtr::dynamicCast(yyvsp[-2]);
+ TypePtr type = TypePtr::dynamicCast(yyvsp[0]);
+ OperationPtr op = OperationPtr::dynamicCast(unit->currentContainer());
+ if(op)
+ {
+ op->createParamDecl(IceUtil::generateUUID(), type, isOutParam->v); // Dummy
+ unit->error("missing parameter name");
+ }
+;}
+ break;
+
+ case 123:
+#line 1382 "../Slice/Grammar.y"
+ {
+ BoolTokPtr isOutParam = BoolTokPtr::dynamicCast(yyvsp[-2]);
+ TypePtr type = TypePtr::dynamicCast(yyvsp[0]);
+ OperationPtr op = OperationPtr::dynamicCast(unit->currentContainer());
+ if(op)
+ {
+ op->createParamDecl(IceUtil::generateUUID(), type, isOutParam->v); // Dummy
+ unit->error("missing parameter name");
+ }
+;}
+ break;
+
+ case 124:
+#line 1398 "../Slice/Grammar.y"
+ {
+ yyval = yyvsp[0];
+;}
+ break;
+
+ case 125:
+#line 1402 "../Slice/Grammar.y"
+ {
+ yyval = new ExceptionListTok;
+;}
+ break;
+
+ case 126:
+#line 1411 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 127:
+#line 1414 "../Slice/Grammar.y"
+ {
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ ident->v = "::" + ident->v;
+ yyval = ident;
+;}
+ break;
+
+ case 128:
+#line 1420 "../Slice/Grammar.y"
+ {
+ StringTokPtr scoped = StringTokPtr::dynamicCast(yyvsp[-2]);
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[0]);
+ scoped->v += "::";
+ scoped->v += ident->v;
+ yyval = scoped;
+;}
+ break;
+
+ case 129:
+#line 1433 "../Slice/Grammar.y"
+ {
+ yyval = unit->builtin(Builtin::KindByte);
+;}
+ break;
+
+ case 130:
+#line 1437 "../Slice/Grammar.y"
+ {
+ yyval = unit->builtin(Builtin::KindBool);
+;}
+ break;
+
+ case 131:
+#line 1441 "../Slice/Grammar.y"
+ {
+ yyval = unit->builtin(Builtin::KindShort);
+;}
+ break;
+
+ case 132:
+#line 1445 "../Slice/Grammar.y"
+ {
+ yyval = unit->builtin(Builtin::KindInt);
+;}
+ break;
+
+ case 133:
+#line 1449 "../Slice/Grammar.y"
+ {
+ yyval = unit->builtin(Builtin::KindLong);
+;}
+ break;
+
+ case 134:
+#line 1453 "../Slice/Grammar.y"
+ {
+ yyval = unit->builtin(Builtin::KindFloat);
+;}
+ break;
+
+ case 135:
+#line 1457 "../Slice/Grammar.y"
+ {
+ yyval = unit->builtin(Builtin::KindDouble);
+;}
+ break;
+
+ case 136:
+#line 1461 "../Slice/Grammar.y"
+ {
+ yyval = unit->builtin(Builtin::KindString);
+;}
+ break;
+
+ case 137:
+#line 1465 "../Slice/Grammar.y"
+ {
+ yyval = unit->builtin(Builtin::KindObject);
+;}
+ break;
+
+ case 138:
+#line 1469 "../Slice/Grammar.y"
+ {
+ yyval = unit->builtin(Builtin::KindObjectProxy);
+;}
+ break;
+
+ case 139:
+#line 1473 "../Slice/Grammar.y"
+ {
+ yyval = unit->builtin(Builtin::KindLocalObject);
+;}
+ break;
+
+ case 140:
+#line 1477 "../Slice/Grammar.y"
+ {
+ StringTokPtr scoped = StringTokPtr::dynamicCast(yyvsp[0]);
+ ContainerPtr cont = unit->currentContainer();
+ if(cont)
+ {
+ TypeList types = cont->lookupType(scoped->v);
+ if(types.empty())
+ {
+ YYERROR; // Can't continue, jump to next yyerrok
+ }
+ cont->checkIntroduced(scoped->v);
+ yyval = types.front();
+ }
+ else
+ {
+ yyval = 0;
+ }
+;}
+ break;
+
+ case 141:
+#line 1496 "../Slice/Grammar.y"
+ {
+ StringTokPtr scoped = StringTokPtr::dynamicCast(yyvsp[-1]);
+ ContainerPtr cont = unit->currentContainer();
+ if(cont)
+ {
+ TypeList types = cont->lookupType(scoped->v);
+ if(types.empty())
+ {
+ YYERROR; // Can't continue, jump to next yyerrok
+ }
+ for(TypeList::iterator p = types.begin(); p != types.end(); ++p)
+ {
+ ClassDeclPtr cl = ClassDeclPtr::dynamicCast(*p);
+ if(!cl)
+ {
+ string msg = "`";
+ msg += scoped->v;
+ msg += "' must be class or interface";
+ unit->error(msg);
+ YYERROR; // Can't continue, jump to next yyerrok
+ }
+ cont->checkIntroduced(scoped->v);
+ if(cl->isLocal())
+ {
+ unit->error("cannot create proxy for " + cl->kindOf() + " `" + cl->name() + "'"); // $$ is dummy
+ }
+ *p = new Proxy(cl);
+ }
+ yyval = types.front();
+ }
+ else
+ {
+ yyval = 0;
+ }
+;}
+ break;
+
+ case 142:
+#line 1537 "../Slice/Grammar.y"
+ {
+ StringTokPtr str1 = StringTokPtr::dynamicCast(yyvsp[-1]);
+ StringTokPtr str2 = StringTokPtr::dynamicCast(yyvsp[0]);
+ str1->v += str2->v;
+;}
+ break;
+
+ case 143:
+#line 1543 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 144:
+#line 1551 "../Slice/Grammar.y"
+ {
+ StringTokPtr str = StringTokPtr::dynamicCast(yyvsp[0]);
+ StringListTokPtr stringList = StringListTokPtr::dynamicCast(yyvsp[-2]);
+ stringList->v.push_back(str->v);
+ yyval = stringList;
+;}
+ break;
+
+ case 145:
+#line 1558 "../Slice/Grammar.y"
+ {
+ StringTokPtr str = StringTokPtr::dynamicCast(yyvsp[0]);
+ StringListTokPtr stringList = new StringListTok;
+ stringList->v.push_back(str->v);
+ yyval = stringList;
+;}
+ break;
+
+ case 146:
+#line 1570 "../Slice/Grammar.y"
+ {
+ BoolTokPtr local = new BoolTok;
+ local->v = true;
+ yyval = local;
+;}
+ break;
+
+ case 147:
+#line 1576 "../Slice/Grammar.y"
+ {
+ BoolTokPtr local = new BoolTok;
+ local->v = false;
+ yyval = local;
+;}
+ break;
+
+ case 148:
+#line 1587 "../Slice/Grammar.y"
+ {
+ BuiltinPtr type = unit->builtin(Builtin::KindLong);
+ IntegerTokPtr intVal = IntegerTokPtr::dynamicCast(yyvsp[0]);
+ ostringstream sstr;
+ sstr << intVal->v;
+ ConstDefTokPtr def = new ConstDefTok;
+ def->v.type = type;
+ def->v.value = type;
+ def->v.valueAsString = sstr.str();
+ def->v.valueAsLiteral = intVal->literal;
+ yyval = def;
+;}
+ break;
+
+ case 149:
+#line 1600 "../Slice/Grammar.y"
+ {
+ BuiltinPtr type = unit->builtin(Builtin::KindDouble);
+ FloatingTokPtr floatVal = FloatingTokPtr::dynamicCast(yyvsp[0]);
+ ostringstream sstr;
+ sstr << floatVal->v;
+ ConstDefTokPtr def = new ConstDefTok;
+ def->v.type = type;
+ def->v.value = type;
+ def->v.valueAsString = sstr.str();
+ def->v.valueAsLiteral = floatVal->literal;
+ yyval = def;
+;}
+ break;
+
+ case 150:
+#line 1613 "../Slice/Grammar.y"
+ {
+ StringTokPtr scoped = StringTokPtr::dynamicCast(yyvsp[0]);
+ ConstDefTokPtr def = new ConstDefTok;
+ ContainedList cl = unit->currentContainer()->lookupContained(scoped->v);
+ if(cl.empty())
+ {
+ def->v.type = TypePtr(0);
+ def->v.value = TypePtr(0);
+ def->v.valueAsString = scoped->v;
+ def->v.valueAsLiteral = scoped->v;
+ }
+ else
+ {
+ EnumeratorPtr enumerator = EnumeratorPtr::dynamicCast(cl.front());
+ if(!enumerator)
+ {
+ string msg = "illegal initializer: `" + scoped->v + "' is a";
+ static const string vowels = "aeiou";
+ string kindOf = cl.front()->kindOf();
+ if(vowels.find_first_of(kindOf[0]) != string::npos)
+ {
+ msg += "n";
+ }
+ msg += " " + kindOf;
+ unit->error(msg); // $$ is dummy
+ }
+ unit->currentContainer()->checkIntroduced(scoped->v, enumerator);
+ def->v.type = enumerator->type();
+ def->v.value = enumerator;
+ def->v.valueAsString = scoped->v;
+ def->v.valueAsLiteral = scoped->v;
+ }
+ yyval = def;
+;}
+ break;
+
+ case 151:
+#line 1648 "../Slice/Grammar.y"
+ {
+ BuiltinPtr type = unit->builtin(Builtin::KindString);
+ StringTokPtr literal = StringTokPtr::dynamicCast(yyvsp[0]);
+ ConstDefTokPtr def = new ConstDefTok;
+ def->v.type = type;
+ def->v.value = type;
+ def->v.valueAsString = literal->v;
+ def->v.valueAsLiteral = literal->literal;
+ yyval = def;
+;}
+ break;
+
+ case 152:
+#line 1659 "../Slice/Grammar.y"
+ {
+ BuiltinPtr type = unit->builtin(Builtin::KindBool);
+ StringTokPtr literal = StringTokPtr::dynamicCast(yyvsp[0]);
+ ConstDefTokPtr def = new ConstDefTok;
+ def->v.type = type;
+ def->v.value = type;
+ def->v.valueAsString = literal->v;
+ def->v.valueAsLiteral = "false";
+ yyval = def;
+;}
+ break;
+
+ case 153:
+#line 1670 "../Slice/Grammar.y"
+ {
+ BuiltinPtr type = unit->builtin(Builtin::KindBool);
+ StringTokPtr literal = StringTokPtr::dynamicCast(yyvsp[0]);
+ ConstDefTokPtr def = new ConstDefTok;
+ def->v.type = type;
+ def->v.value = type;
+ def->v.valueAsString = literal->v;
+ def->v.valueAsLiteral = "true";
+ yyval = def;
+;}
+ break;
+
+ case 154:
+#line 1686 "../Slice/Grammar.y"
+ {
+ StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-4]);
+ TypePtr const_type = TypePtr::dynamicCast(yyvsp[-3]);
+ StringTokPtr ident = StringTokPtr::dynamicCast(yyvsp[-2]);
+ ConstDefTokPtr value = ConstDefTokPtr::dynamicCast(yyvsp[0]);
+ yyval = unit->currentContainer()->createConst(ident->v, const_type, metaData->v,
+ value->v.value, value->v.valueAsString, value->v.valueAsLiteral);
+;}
+ break;
+
+ case 155:
+#line 1695 "../Slice/Grammar.y"
+ {
+ StringListTokPtr metaData = StringListTokPtr::dynamicCast(yyvsp[-3]);
+ TypePtr const_type = TypePtr::dynamicCast(yyvsp[-2]);
+ ConstDefTokPtr value = ConstDefTokPtr::dynamicCast(yyvsp[0]);
+ unit->error("missing constant name");
+ yyval = unit->currentContainer()->createConst(IceUtil::generateUUID(), const_type, metaData->v,
+ value->v.value, value->v.valueAsString,
+ value->v.valueAsLiteral, Dummy); // Dummy
+;}
+ break;
+
+ case 156:
+#line 1710 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 157:
+#line 1713 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 158:
+#line 1716 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 159:
+#line 1719 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 160:
+#line 1722 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 161:
+#line 1725 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 162:
+#line 1728 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 163:
+#line 1731 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 164:
+#line 1734 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 165:
+#line 1737 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 166:
+#line 1740 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 167:
+#line 1743 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 168:
+#line 1746 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 169:
+#line 1749 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 170:
+#line 1752 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 171:
+#line 1755 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 172:
+#line 1758 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 173:
+#line 1761 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 174:
+#line 1764 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 175:
+#line 1767 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 176:
+#line 1770 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 177:
+#line 1773 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 178:
+#line 1776 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 179:
+#line 1779 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 180:
+#line 1782 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 181:
+#line 1785 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 182:
+#line 1788 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 183:
+#line 1791 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+ case 184:
+#line 1794 "../Slice/Grammar.y"
+ {
+;}
+ break;
+
+
+ }
+
+/* Line 1000 of yacc.c. */
+#line 3429 "Grammar.tab.c"
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+
+
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+
+ /* Now `shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if YYERROR_VERBOSE
+ yyn = yypact[yystate];
+
+ if (YYPACT_NINF < yyn && yyn < YYLAST)
+ {
+ YYSIZE_T yysize = 0;
+ int yytype = YYTRANSLATE (yychar);
+ const char* yyprefix;
+ char *yymsg;
+ int yyx;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 0;
+
+ yyprefix = ", expecting ";
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
+ yycount += 1;
+ if (yycount == 5)
+ {
+ yysize = 0;
+ break;
+ }
+ }
+ yysize += (sizeof ("syntax error, unexpected ")
+ + yystrlen (yytname[yytype]));
+ yymsg = (char *) YYSTACK_ALLOC (yysize);
+ if (yymsg != 0)
+ {
+ char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
+ yyp = yystpcpy (yyp, yytname[yytype]);
+
+ if (yycount < 5)
+ {
+ yyprefix = ", expecting ";
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ yyp = yystpcpy (yyp, yyprefix);
+ yyp = yystpcpy (yyp, yytname[yyx]);
+ yyprefix = " or ";
+ }
+ }
+ yyerror (yymsg);
+ YYSTACK_FREE (yymsg);
+ }
+ else
+ yyerror ("syntax error; also virtual memory exhausted");
+ }
+ else
+#endif /* YYERROR_VERBOSE */
+ yyerror ("syntax error");
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* If at end of input, pop the error token,
+ then the rest of the stack, then return failure. */
+ if (yychar == YYEOF)
+ for (;;)
+ {
+ YYPOPSTACK;
+ if (yyssp == yyss)
+ YYABORT;
+ YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
+ yydestruct (yystos[*yyssp], yyvsp);
+ }
+ }
+ else
+ {
+ YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
+ yydestruct (yytoken, &yylval);
+ yychar = YYEMPTY;
+
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+#ifdef __GNUC__
+ /* Pacify GCC when the user code never invokes YYERROR and the label
+ yyerrorlab therefore never appears in user code. */
+ if (0)
+ goto yyerrorlab;
+#endif
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+ YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
+ yydestruct (yystos[yystate], yyvsp);
+ YYPOPSTACK;
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ YYDPRINTF ((stderr, "Shifting error token, "));
+
+ *++yyvsp = yylval;
+
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#ifndef yyoverflow
+/*----------------------------------------------.
+| yyoverflowlab -- parser overflow comes here. |
+`----------------------------------------------*/
+yyoverflowlab:
+ yyerror ("parser stack overflow");
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+ return yyresult;
+}
+
+
+#line 1798 "../Slice/Grammar.y"
+
+
diff --git a/cpp/src/Slice/Grammar.h b/cpp/src/Slice/Grammar.h
new file mode 100644
index 00000000000..08d77ed6fa6
--- /dev/null
+++ b/cpp/src/Slice/Grammar.h
@@ -0,0 +1,130 @@
+/* A Bison parser, made by GNU Bison 1.875c. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ ICE_MODULE = 258,
+ ICE_CLASS = 259,
+ ICE_INTERFACE = 260,
+ ICE_EXCEPTION = 261,
+ ICE_STRUCT = 262,
+ ICE_SEQUENCE = 263,
+ ICE_DICTIONARY = 264,
+ ICE_ENUM = 265,
+ ICE_OUT = 266,
+ ICE_EXTENDS = 267,
+ ICE_IMPLEMENTS = 268,
+ ICE_THROWS = 269,
+ ICE_VOID = 270,
+ ICE_BYTE = 271,
+ ICE_BOOL = 272,
+ ICE_SHORT = 273,
+ ICE_INT = 274,
+ ICE_LONG = 275,
+ ICE_FLOAT = 276,
+ ICE_DOUBLE = 277,
+ ICE_STRING = 278,
+ ICE_OBJECT = 279,
+ ICE_LOCAL_OBJECT = 280,
+ ICE_LOCAL = 281,
+ ICE_CONST = 282,
+ ICE_FALSE = 283,
+ ICE_TRUE = 284,
+ ICE_NONMUTATING = 285,
+ ICE_IDEMPOTENT = 286,
+ ICE_SCOPE_DELIMITER = 287,
+ ICE_IDENTIFIER = 288,
+ ICE_STRING_LITERAL = 289,
+ ICE_INTEGER_LITERAL = 290,
+ ICE_FLOATING_POINT_LITERAL = 291,
+ ICE_IDENT_OP = 292,
+ ICE_KEYWORD_OP = 293,
+ ICE_METADATA_OPEN = 294,
+ ICE_METADATA_CLOSE = 295,
+ ICE_GLOBAL_METADATA_OPEN = 296,
+ ICE_GLOBAL_METADATA_CLOSE = 297,
+ BAD_CHAR = 298
+ };
+#endif
+#define ICE_MODULE 258
+#define ICE_CLASS 259
+#define ICE_INTERFACE 260
+#define ICE_EXCEPTION 261
+#define ICE_STRUCT 262
+#define ICE_SEQUENCE 263
+#define ICE_DICTIONARY 264
+#define ICE_ENUM 265
+#define ICE_OUT 266
+#define ICE_EXTENDS 267
+#define ICE_IMPLEMENTS 268
+#define ICE_THROWS 269
+#define ICE_VOID 270
+#define ICE_BYTE 271
+#define ICE_BOOL 272
+#define ICE_SHORT 273
+#define ICE_INT 274
+#define ICE_LONG 275
+#define ICE_FLOAT 276
+#define ICE_DOUBLE 277
+#define ICE_STRING 278
+#define ICE_OBJECT 279
+#define ICE_LOCAL_OBJECT 280
+#define ICE_LOCAL 281
+#define ICE_CONST 282
+#define ICE_FALSE 283
+#define ICE_TRUE 284
+#define ICE_NONMUTATING 285
+#define ICE_IDEMPOTENT 286
+#define ICE_SCOPE_DELIMITER 287
+#define ICE_IDENTIFIER 288
+#define ICE_STRING_LITERAL 289
+#define ICE_INTEGER_LITERAL 290
+#define ICE_FLOATING_POINT_LITERAL 291
+#define ICE_IDENT_OP 292
+#define ICE_KEYWORD_OP 293
+#define ICE_METADATA_OPEN 294
+#define ICE_METADATA_CLOSE 295
+#define ICE_GLOBAL_METADATA_OPEN 296
+#define ICE_GLOBAL_METADATA_CLOSE 297
+#define BAD_CHAR 298
+
+
+
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+typedef int YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+
+
diff --git a/cpp/src/Slice/Makefile b/cpp/src/Slice/Makefile
index d4cca349e2f..fb5c0d5268d 100644
--- a/cpp/src/Slice/Makefile
+++ b/cpp/src/Slice/Makefile
@@ -56,10 +56,6 @@ $(libdir)/$(LIBNAME): $(libdir)/$(SONAME)
ln -s $(SONAME) $@
endif
-clean::
- -rm -f Grammar.cpp Grammar.h
- -rm -f Scanner.cpp
-
install:: all
$(call installlib,$(install_libdir),$(libdir),$(LIBFILENAME),$(SONAME),$(LIBNAME))
diff --git a/cpp/src/Slice/Makefile.mak b/cpp/src/Slice/Makefile.mak
index 43a937cb48b..e9312581b07 100644
--- a/cpp/src/Slice/Makefile.mak
+++ b/cpp/src/Slice/Makefile.mak
@@ -80,8 +80,6 @@ Grammar.cpp Grammar.h: Grammar.y
del /q Grammar.output
clean::
- -del /q Grammar.cpp Grammar.h
- -del /q Scanner.cpp
-del /q Slice.res
install:: all
diff --git a/cpp/src/Slice/Scanner.cpp b/cpp/src/Slice/Scanner.cpp
new file mode 100644
index 00000000000..273f116578c
--- /dev/null
+++ b/cpp/src/Slice/Scanner.cpp
@@ -0,0 +1,2133 @@
+#include <IceUtil/Config.h>
+#define yy_create_buffer slice__create_buffer
+#define yy_delete_buffer slice__delete_buffer
+#define yy_scan_buffer slice__scan_buffer
+#define yy_scan_string slice__scan_string
+#define yy_scan_bytes slice__scan_bytes
+#define yy_flex_debug slice__flex_debug
+#define yy_init_buffer slice__init_buffer
+#define yy_flush_buffer slice__flush_buffer
+#define yy_load_buffer_state slice__load_buffer_state
+#define yy_switch_to_buffer slice__switch_to_buffer
+#define yyin slice_in
+#define yyleng slice_leng
+#define yylex slice_lex
+#define yyout slice_out
+#define yyrestart slice_restart
+#define yytext slice_text
+
+#line 19 "lex.yy.c"
+/* A lexical scanner generated by flex */
+
+/* Scanner skeleton version:
+ * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
+ */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+
+#include <stdio.h>
+#include <unistd.h>
+
+
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
+#endif
+#endif
+
+
+#ifdef __cplusplus
+
+#include <stdlib.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_PROTOS
+#define YY_USE_CONST
+
+#endif /* __STDC__ */
+#endif /* ! __cplusplus */
+
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index. If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#define YY_BUF_SIZE 16384
+
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+extern int yyleng;
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator). This
+ * avoids problems with code like:
+ *
+ * if ( condition_holds )
+ * yyless( 5 );
+ * else
+ * do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ *yy_cp = yy_hold_char; \
+ YY_RESTORE_YY_MORE_OFFSET \
+ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
+
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ yy_size_t yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+ };
+
+static YY_BUFFER_STATE yy_current_buffer = 0;
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ */
+#define YY_CURRENT_BUFFER yy_current_buffer
+
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+
+
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 1; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart YY_PROTO(( FILE *input_file ));
+
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_is_interactive = is_interactive; \
+ }
+
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_at_bol = at_bol; \
+ }
+
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+
+#define yywrap() 1
+#define YY_SKIP_YYWRAP
+typedef unsigned char YY_CHAR;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+typedef int yy_state_type;
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ yytext_ptr = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ yy_hold_char = *yy_cp; \
+ *yy_cp = '\0'; \
+ yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 19
+#define YY_END_OF_BUFFER 20
+static yyconst short int yy_accept[66] =
+ { 0,
+ 0, 0, 20, 18, 17, 17, 14, 18, 18, 18,
+ 15, 15, 18, 13, 8, 18, 9, 18, 0, 15,
+ 15, 16, 6, 5, 16, 15, 0, 0, 7, 0,
+ 12, 13, 10, 13, 11, 0, 0, 0, 0, 16,
+ 0, 16, 15, 0, 1, 0, 0, 16, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 3, 0,
+ 0, 0, 0, 4, 0
+ } ;
+
+static yyconst int yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 4, 4, 4, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 1, 5, 6, 1, 1, 1, 1, 7,
+ 1, 8, 9, 1, 10, 11, 12, 13, 14, 14,
+ 14, 14, 14, 14, 14, 15, 15, 16, 1, 1,
+ 1, 1, 1, 1, 17, 17, 17, 17, 18, 19,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 21, 22, 23, 1, 20, 1, 17, 17, 17, 17,
+
+ 24, 19, 20, 20, 25, 20, 20, 26, 20, 27,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 28,
+ 20, 20, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1
+ } ;
+
+static yyconst int yy_meta[29] =
+ { 0,
+ 1, 2, 3, 4, 1, 1, 4, 1, 5, 5,
+ 1, 1, 6, 6, 6, 1, 7, 7, 7, 8,
+ 1, 1, 1, 7, 8, 9, 8, 8
+ } ;
+
+static yyconst short int yy_base[78] =
+ { 0,
+ 0, 177, 182, 184, 184, 184, 184, 18, 21, 29,
+ 31, 25, 165, 54, 159, 0, 137, 28, 37, 0,
+ 0, 49, 184, 184, 0, 131, 38, 0, 184, 67,
+ 184, 73, 184, 0, 184, 58, 63, 110, 69, 184,
+ 68, 72, 0, 87, 184, 107, 80, 83, 121, 101,
+ 118, 119, 119, 109, 184, 86, 101, 103, 184, 102,
+ 67, 40, 37, 184, 184, 107, 110, 118, 123, 124,
+ 130, 132, 138, 147, 155, 161, 170
+ } ;
+
+static yyconst short int yy_def[78] =
+ { 0,
+ 65, 1, 65, 65, 65, 65, 65, 65, 65, 65,
+ 65, 11, 65, 66, 65, 67, 65, 68, 65, 11,
+ 12, 65, 65, 65, 22, 11, 69, 70, 65, 65,
+ 65, 66, 65, 32, 65, 68, 71, 65, 72, 65,
+ 65, 65, 70, 65, 65, 65, 65, 65, 73, 65,
+ 73, 74, 65, 74, 65, 65, 75, 65, 65, 76,
+ 76, 77, 77, 65, 0, 65, 65, 65, 65, 65,
+ 65, 65, 65, 65, 65, 65, 65
+ } ;
+
+static yyconst short int yy_nxt[213] =
+ { 0,
+ 4, 5, 6, 5, 7, 4, 4, 4, 8, 8,
+ 9, 10, 11, 12, 12, 13, 14, 14, 14, 14,
+ 15, 16, 17, 14, 14, 14, 14, 14, 19, 36,
+ 20, 21, 21, 22, 22, 22, 23, 21, 21, 64,
+ 24, 25, 64, 26, 26, 21, 41, 41, 27, 22,
+ 22, 22, 65, 38, 27, 30, 30, 30, 28, 36,
+ 31, 22, 22, 22, 44, 45, 39, 40, 30, 30,
+ 30, 62, 39, 31, 30, 30, 30, 47, 47, 31,
+ 42, 42, 42, 38, 42, 42, 42, 56, 44, 45,
+ 40, 49, 48, 48, 48, 48, 48, 48, 57, 57,
+
+ 57, 40, 58, 59, 58, 59, 62, 60, 32, 32,
+ 32, 55, 32, 32, 32, 32, 34, 34, 34, 37,
+ 56, 55, 52, 37, 53, 52, 37, 42, 42, 43,
+ 43, 37, 37, 50, 46, 37, 48, 48, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 57, 57, 65, 35,
+ 57, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 33,
+ 29, 65, 18, 3, 65, 65, 65, 65, 65, 65,
+ 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+
+ 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+ 65, 65
+ } ;
+
+static yyconst short int yy_chk[213] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 8, 18,
+ 8, 8, 8, 9, 9, 9, 10, 12, 12, 63,
+ 10, 11, 62, 11, 11, 11, 27, 27, 11, 19,
+ 19, 19, 12, 18, 11, 14, 14, 14, 11, 36,
+ 14, 22, 22, 22, 37, 37, 22, 22, 30, 30,
+ 30, 61, 22, 30, 32, 32, 32, 39, 39, 32,
+ 41, 41, 41, 36, 42, 42, 42, 56, 44, 44,
+ 42, 44, 47, 47, 47, 48, 48, 48, 56, 56,
+
+ 56, 48, 57, 57, 58, 58, 60, 58, 66, 66,
+ 66, 54, 66, 66, 66, 66, 67, 67, 67, 68,
+ 53, 52, 51, 68, 50, 49, 68, 69, 69, 70,
+ 70, 71, 71, 46, 38, 71, 72, 72, 73, 73,
+ 73, 73, 73, 73, 73, 73, 73, 74, 74, 74,
+ 74, 74, 74, 74, 74, 74, 75, 75, 26, 17,
+ 75, 76, 76, 76, 76, 76, 76, 76, 76, 76,
+ 77, 77, 77, 77, 77, 77, 77, 77, 77, 15,
+ 13, 3, 2, 65, 65, 65, 65, 65, 65, 65,
+ 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+
+ 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+ 65, 65
+ } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "Scanner.l"
+#define INITIAL 0
+#line 2 "Scanner.l"
+
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Slice/GrammarUtil.h> // Before Grammer.h, so that YYSTYPE is defined
+#include <Slice/Grammar.h>
+#include <IceUtil/InputUtil.h>
+
+#include <stdlib.h>
+#include <math.h>
+
+#if defined(_MSC_VER) && defined(ICE_64)
+//
+// '=' : conversion from 'size_t' to 'int', possible loss of data
+// The result of fread() is a size_t and gets inserted into an int
+//
+# pragma warning( 4 : 4267 )
+//
+// 'initializing' : conversion from '__int64' to 'int', possible loss of data
+// Puts a pointer-difference into an int
+//
+# pragma warning( 4 : 4244 )
+#endif
+
+using namespace std;
+using namespace Slice;
+
+namespace Slice
+{
+
+//
+// Definitions for the case-insensitive keyword-token map.
+//
+typedef std::map<std::string, int, Slice::CICompare> StringTokenMap;
+static StringTokenMap keywordMap;
+
+void initScanner();
+void checkIdentifier(const string&);
+int checkKeyword(string&);
+
+}
+
+#define YY_USER_INIT initScanner();
+
+#define YY_NEVER_INTERACTIVE 1
+#line 504 "lex.yy.c"
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap YY_PROTO(( void ));
+#else
+extern int yywrap YY_PROTO(( void ));
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput YY_PROTO(( void ));
+#else
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines. This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( yy_current_buffer->yy_is_interactive ) \
+ { \
+ int c = '*', n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+ && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" );
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+ if ( yyleng > 0 ) \
+ yy_current_buffer->yy_at_bol = \
+ (yytext[yyleng - 1] == '\n'); \
+ YY_USER_ACTION
+
+YY_DECL
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp = NULL, *yy_bp = NULL;
+ register int yy_act;
+
+#line 65 "Scanner.l"
+
+
+#line 661 "lex.yy.c"
+
+ if ( yy_init )
+ {
+ yy_init = 0;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! yy_start )
+ yy_start = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = stdin;
+
+ if ( ! yyout )
+ yyout = stdout;
+
+ if ( ! yy_current_buffer )
+ yy_current_buffer =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_load_buffer_state();
+ }
+
+ while ( 1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = yy_c_buf_p;
+
+ /* Support of yytext. */
+ *yy_cp = yy_hold_char;
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = yy_start;
+ yy_current_state += YY_AT_BOL();
+yy_match:
+ do
+ {
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ if ( yy_accept[yy_current_state] )
+ {
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 66 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ ++yy_cp;
+ }
+ while ( yy_base[yy_current_state] != 184 );
+
+yy_find_action:
+ yy_act = yy_accept[yy_current_state];
+ if ( yy_act == 0 )
+ { /* have to back up */
+ yy_cp = yy_last_accepting_cpos;
+ yy_current_state = yy_last_accepting_state;
+ yy_act = yy_accept[yy_current_state];
+ }
+
+ YY_DO_BEFORE_ACTION;
+
+
+do_action: /* This label is used only to access EOF actions. */
+
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+ case 0: /* must back up */
+ /* undo the effects of YY_DO_BEFORE_ACTION */
+ *yy_cp = yy_hold_char;
+ yy_cp = yy_last_accepting_cpos;
+ yy_current_state = yy_last_accepting_state;
+ goto yy_find_action;
+
+case 1:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 67 "Scanner.l"
+{
+ unit->scanPosition(yytext);
+}
+ YY_BREAK
+case 2:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 71 "Scanner.l"
+{
+ unit->scanPosition(yytext);
+}
+ YY_BREAK
+case 3:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 75 "Scanner.l"
+{
+ unit->scanPosition(yytext);
+}
+ YY_BREAK
+case 4:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 79 "Scanner.l"
+{
+ unit->scanPosition(yytext);
+}
+ YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 83 "Scanner.l"
+{
+ // C++-style comment
+ int c;
+ do
+ {
+ c = yyinput();
+ if(c == '\n')
+ {
+ unit->nextLine();
+ }
+ }
+ while(c != '\n' && c != EOF);
+}
+ YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 97 "Scanner.l"
+{
+ // C-style comment
+ string comment = yytext + 2;
+ while(true)
+ {
+ int c = yyinput();
+ if(c == '\n')
+ {
+ comment += static_cast<char>(c);
+ unit->nextLine();
+ }
+ else if(c == '*')
+ {
+ int next = yyinput();
+ if(next == '/')
+ {
+ break;
+ }
+ else
+ {
+ comment += static_cast<char>(c);
+ unput(next);
+ }
+ }
+ else if(c == EOF)
+ {
+ unit->warning("EOF in comment");
+ break;
+ }
+ else
+ {
+ comment += static_cast<char>(c);
+ }
+ }
+ if(comment[0] == '*')
+ {
+ unit->setComment(comment);
+ }
+}
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 137 "Scanner.l"
+{
+ return ICE_SCOPE_DELIMITER;
+}
+ YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 141 "Scanner.l"
+{
+ return ICE_METADATA_OPEN;
+}
+ YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 145 "Scanner.l"
+{
+ return ICE_METADATA_CLOSE;
+}
+ YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 149 "Scanner.l"
+{
+ return ICE_GLOBAL_METADATA_OPEN;
+}
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 153 "Scanner.l"
+{
+ return ICE_GLOBAL_METADATA_CLOSE;
+}
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 157 "Scanner.l"
+{
+ StringTokPtr ident = new StringTok;
+ ident->v = *yytext == '\\' ? yytext + 1 : yytext;
+ ident->v.erase(ident->v.find_first_of(" \t\v\n\r\f("));
+ *yylvalp = ident;
+ checkIdentifier(ident->v);
+ if(*yytext == '\\')
+ {
+ return ICE_IDENT_OP;
+ }
+ return checkKeyword(ident->v) == ICE_IDENTIFIER ? ICE_IDENT_OP : ICE_KEYWORD_OP;
+}
+ YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 170 "Scanner.l"
+{
+ StringTokPtr ident = new StringTok;
+ ident->v = *yytext == '\\' ? yytext + 1 : yytext;
+ *yylvalp = ident;
+ checkIdentifier(ident->v);
+ return *yytext == '\\' ? ICE_IDENTIFIER : checkKeyword(ident->v);
+}
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 178 "Scanner.l"
+{
+ StringTokPtr str = new StringTok;
+ str->literal = "\"";
+ while(true)
+ {
+ char c = static_cast<char>(yyinput());
+ str->literal += c;
+ if(c == '"')
+ {
+ break;
+ }
+ else if(c == EOF)
+ {
+ unit->error("EOF in string");
+ break;
+ }
+ else if(c == '\n')
+ {
+ unit->error("newline in string");
+ }
+ else if(c == '\\')
+ {
+ char next = static_cast<char>(yyinput());
+ str->literal += next;
+ switch(next)
+ {
+ case '\\':
+ case '"':
+ case '\'':
+ {
+ str->v += next;
+ break;
+ }
+
+ case 'n':
+ {
+ str->v += '\n';
+ break;
+ }
+
+ case 'r':
+ {
+ str->v += '\r';
+ break;
+ }
+
+ case 't':
+ {
+ str->v += '\t';
+ break;
+ }
+
+ case 'v':
+ {
+ str->v += '\v';
+ break;
+ }
+
+ case 'f':
+ {
+ str->v += '\f';
+ break;
+ }
+
+ case 'a':
+ {
+ str->v += '\a';
+ break;
+ }
+
+ case 'b':
+ {
+ str->v += '\b';
+ break;
+ }
+
+ case '?':
+ {
+ str->v += '\?';
+ break;
+ }
+
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ {
+ static string octalDigits = "01234567";
+ unsigned short us = next - '0';
+ if(octalDigits.find_first_of(next = static_cast<char>(yyinput())) != string::npos)
+ {
+ str->literal += next;
+ us = us * 8 + next - '0';
+ if(octalDigits.find_first_of(next = static_cast<char>(yyinput())) != string::npos)
+ {
+ us = us * 8 + next - '0';
+ }
+ else
+ {
+ unput(next);
+ }
+ }
+ else
+ {
+ unput(next);
+ }
+ if(us == 0)
+ {
+ unit->error("illegal NUL character in string constant");
+ }
+ str->v += static_cast<char>(us);
+ break;
+ }
+ case 'x':
+ {
+ IceUtil::Int64 ull = 0;
+ while(isxdigit(static_cast<unsigned char>(next = static_cast<char>(yyinput()))))
+ {
+ str->literal += next;
+ ull *= 16;
+ if(isdigit(static_cast<unsigned char>(next)))
+ {
+ ull += next - '0';
+ }
+ else if(islower(static_cast<unsigned char>(next)))
+ {
+ ull += next - 'a' + 10;
+ }
+ else
+ {
+ ull += next - 'A' + 10;
+ }
+ }
+ unput(next);
+ if(ull == 0)
+ {
+ unit->error("illegal NUL character in string constant");
+ }
+ str->v += static_cast<char>(ull);
+ break;
+ }
+
+ // TODO: add universal character names
+
+ default:
+ {
+ str->v += c;
+ unput(next);
+ }
+ }
+ }
+ else
+ {
+ str->v += c;
+ }
+ }
+ *yylvalp = str;
+ return ICE_STRING_LITERAL;
+}
+ YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 338 "Scanner.l"
+{
+ IntegerTokPtr itp = new IntegerTok;
+ itp->literal = string(yytext);
+ *yylvalp = itp;
+ if(!IceUtilInternal::stringToInt64(string(yytext), itp->v))
+ {
+ assert(itp->v != 0);
+ string msg = "integer constant `";
+ msg += yytext;
+ msg += "' out of range";
+ unit->error(msg);
+ }
+ return ICE_INTEGER_LITERAL;
+}
+ YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 353 "Scanner.l"
+{
+ errno = 0;
+ FloatingTokPtr ftp = new FloatingTok;
+ *yylvalp = ftp;
+ string literal(yytext);
+ ftp->literal = literal;
+ char lastChar = literal[literal.size() - 1];
+ if(lastChar == 'f' || lastChar == 'F')
+ {
+ literal = literal.substr(0, literal.size() - 1); // Clobber trailing 'f' or 'F' suffix
+ }
+ ftp->v = strtod(literal.c_str(), 0);
+ if((ftp->v == HUGE_VAL || ftp->v == -HUGE_VAL) && errno == ERANGE)
+ {
+ string msg = "floating-point constant `";
+ msg += yytext;
+ msg += "' too large (overflow)";
+ unit->error(msg);
+ }
+ else if(ftp->v == 0 && errno == ERANGE)
+ {
+ string msg = "floating-point constant `";
+ msg += yytext;
+ msg += "' too small (underflow)";
+ unit->error(msg);
+ }
+ return ICE_FLOATING_POINT_LITERAL;
+}
+ YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 382 "Scanner.l"
+{
+ // Igore white-space
+
+ if(yytext[0] == '\n')
+ {
+ unit->nextLine();
+ }
+}
+ YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 391 "Scanner.l"
+{
+ if(yytext[0] < 32 || yytext[0] > 126)
+ {
+ stringstream s;
+ s << "illegal input character: '\\";
+ s.width(3);
+ s.fill('0');
+ s << oct << static_cast<int>(static_cast<unsigned char>(yytext[0]));
+ s << "'";
+ unit->error(s.str());
+ return BAD_CHAR;
+ }
+ return yytext[0];
+}
+ YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 406 "Scanner.l"
+ECHO;
+ YY_BREAK
+#line 1155 "lex.yy.c"
+case YY_STATE_EOF(INITIAL):
+ yyterminate();
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = yy_hold_char;
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
+ * consistency between yy_current_buffer and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yy_current_buffer->yy_input_file = yyin;
+ yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++yy_c_buf_p;
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = yy_c_buf_p;
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer() )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ yy_did_buffer_switch_on_eof = 0;
+
+ if ( yywrap() )
+ {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p =
+ yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ yy_c_buf_p =
+ &yy_current_buffer->yy_ch_buf[yy_n_chars];
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of yylex */
+
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+
+static int yy_get_next_buffer()
+ {
+ register char *dest = yy_current_buffer->yy_ch_buf;
+ register char *source = yytext_ptr;
+ register int number_to_move, i;
+ int ret_val;
+
+ if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( yy_current_buffer->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+
+ else
+ {
+ int num_to_read =
+ yy_current_buffer->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+ YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = yy_current_buffer;
+
+ int yy_c_buf_p_offset =
+ (int) (yy_c_buf_p - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yy_flex_realloc( (void *) b->yy_ch_buf,
+ b->yy_buf_size + 2 );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = 0;
+
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+
+ yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = yy_current_buffer->yy_buf_size -
+ number_to_move - 1;
+#endif
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+ yy_n_chars, num_to_read );
+
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ if ( yy_n_chars == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ yyrestart( yyin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ yy_current_buffer->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ yy_n_chars += number_to_move;
+ yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+ yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+ yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+
+ return ret_val;
+ }
+
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+static yy_state_type yy_get_previous_state()
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
+
+ yy_current_state = yy_start;
+ yy_current_state += YY_AT_BOL();
+
+ for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+ {
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ if ( yy_accept[yy_current_state] )
+ {
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 66 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ }
+
+ return yy_current_state;
+ }
+
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+ {
+ register int yy_is_jam;
+ register char *yy_cp = yy_c_buf_p;
+
+ register YY_CHAR yy_c = 1;
+ if ( yy_accept[yy_current_state] )
+ {
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 66 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_is_jam = (yy_current_state == 65);
+
+ return yy_is_jam ? 0 : yy_current_state;
+ }
+
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+ {
+ register char *yy_cp = yy_c_buf_p;
+
+ /* undo effects of setting up yytext */
+ *yy_cp = yy_hold_char;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ { /* need to shift things up to make room */
+ /* +2 for EOB chars. */
+ register int number_to_move = yy_n_chars + 2;
+ register char *dest = &yy_current_buffer->yy_ch_buf[
+ yy_current_buffer->yy_buf_size + 2];
+ register char *source =
+ &yy_current_buffer->yy_ch_buf[number_to_move];
+
+ while ( source > yy_current_buffer->yy_ch_buf )
+ *--dest = *--source;
+
+ yy_cp += (int) (dest - source);
+ yy_bp += (int) (dest - source);
+ yy_current_buffer->yy_n_chars =
+ yy_n_chars = yy_current_buffer->yy_buf_size;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
+ }
+
+ *--yy_cp = (char) c;
+
+
+ yytext_ptr = yy_bp;
+ yy_hold_char = *yy_cp;
+ yy_c_buf_p = yy_cp;
+ }
+#endif /* ifndef YY_NO_UNPUT */
+
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput()
+#else
+static int input()
+#endif
+ {
+ int c;
+
+ *yy_c_buf_p = yy_hold_char;
+
+ if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ /* This was really a NUL. */
+ *yy_c_buf_p = '\0';
+
+ else
+ { /* need more input */
+ int offset = yy_c_buf_p - yytext_ptr;
+ ++yy_c_buf_p;
+
+ switch ( yy_get_next_buffer() )
+ {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ yyrestart( yyin );
+
+ /* fall through */
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( yywrap() )
+ return EOF;
+
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p = yytext_ptr + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
+ *yy_c_buf_p = '\0'; /* preserve yytext */
+ yy_hold_char = *++yy_c_buf_p;
+
+ yy_current_buffer->yy_at_bol = (c == '\n');
+
+ return c;
+ }
+#endif /* YY_NO_INPUT */
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+ {
+ if ( ! yy_current_buffer )
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_init_buffer( yy_current_buffer, input_file );
+ yy_load_buffer_state();
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+ {
+ if ( yy_current_buffer == new_buffer )
+ return;
+
+ if ( yy_current_buffer )
+ {
+ /* Flush out information for old buffer. */
+ *yy_c_buf_p = yy_hold_char;
+ yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ yy_current_buffer = new_buffer;
+ yy_load_buffer_state();
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ yy_did_buffer_switch_on_eof = 1;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+ {
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+ yyin = yy_current_buffer->yy_input_file;
+ yy_hold_char = *yy_c_buf_p;
+ }
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+ {
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ yy_init_buffer( b, file );
+
+ return b;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+ {
+ if ( ! b )
+ return;
+
+ if ( b == yy_current_buffer )
+ yy_current_buffer = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ yy_flex_free( (void *) b->yy_ch_buf );
+
+ yy_flex_free( (void *) b );
+ }
+
+
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+ {
+ yy_flush_buffer( b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+#if YY_ALWAYS_INTERACTIVE
+ b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+ b->yy_is_interactive = 0;
+#else
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+ {
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == yy_current_buffer )
+ yy_load_buffer_state();
+ }
+
+
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+ {
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return 0;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = 0;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ yy_switch_to_buffer( b );
+
+ return b;
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+ {
+ int len;
+ for ( len = 0; yy_str[len]; ++len )
+ ;
+
+ return yy_scan_bytes( yy_str, len );
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+ {
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = len + 2;
+ buf = (char *) yy_flex_alloc( n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+ for ( i = 0; i < len; ++i )
+ buf[i] = bytes[i];
+
+ buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = yy_scan_buffer( buf, n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+ }
+#endif
+
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
+#endif
+ {
+ if ( yy_start_stack_ptr >= yy_start_stack_depth )
+ {
+ yy_size_t new_size;
+
+ yy_start_stack_depth += YY_START_STACK_INCR;
+ new_size = yy_start_stack_depth * sizeof( int );
+
+ if ( ! yy_start_stack )
+ yy_start_stack = (int *) yy_flex_alloc( new_size );
+
+ else
+ yy_start_stack = (int *) yy_flex_realloc(
+ (void *) yy_start_stack, new_size );
+
+ if ( ! yy_start_stack )
+ YY_FATAL_ERROR(
+ "out of memory expanding start-condition stack" );
+ }
+
+ yy_start_stack[yy_start_stack_ptr++] = YY_START;
+
+ BEGIN(new_state);
+ }
+#endif
+
+
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+ {
+ if ( --yy_start_stack_ptr < 0 )
+ YY_FATAL_ERROR( "start-condition stack underflow" );
+
+ BEGIN(yy_start_stack[yy_start_stack_ptr]);
+ }
+#endif
+
+
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+ {
+ return yy_start_stack[yy_start_stack_ptr - 1];
+ }
+#endif
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+ {
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+ }
+
+
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ yytext[yyleng] = yy_hold_char; \
+ yy_c_buf_p = yytext + n; \
+ yy_hold_char = *yy_c_buf_p; \
+ *yy_c_buf_p = '\0'; \
+ yyleng = n; \
+ } \
+ while ( 0 )
+
+
+/* Internal utility routines. */
+
+#ifndef yytext_ptr
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+ {
+ register int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+ }
+#endif
+
+#ifdef YY_NEED_STRLEN
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+ {
+ register int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+ }
+#endif
+
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+ {
+ return (void *) malloc( size );
+ }
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+ {
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return (void *) realloc( (char *) ptr, size );
+ }
+
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+ {
+ free( ptr );
+ }
+
+#if YY_MAIN
+int main()
+ {
+ yylex();
+ return 0;
+ }
+#endif
+#line 406 "Scanner.l"
+
+
+namespace Slice {
+
+//
+// initScanner() fills the keyword map with all keyword-token pairs.
+//
+
+void
+initScanner()
+{
+ keywordMap["module"] = ICE_MODULE;
+ keywordMap["class"] = ICE_CLASS;
+ keywordMap["interface"] = ICE_INTERFACE;
+ keywordMap["exception"] = ICE_EXCEPTION;
+ keywordMap["struct"] = ICE_STRUCT;
+ keywordMap["sequence"] = ICE_SEQUENCE;
+ keywordMap["dictionary"] = ICE_DICTIONARY;
+ keywordMap["enum"] = ICE_ENUM;
+ keywordMap["out"] = ICE_OUT;
+ keywordMap["extends"] = ICE_EXTENDS;
+ keywordMap["implements"] = ICE_IMPLEMENTS;
+ keywordMap["throws"] = ICE_THROWS;
+ keywordMap["void"] = ICE_VOID;
+ keywordMap["byte"] = ICE_BYTE;
+ keywordMap["bool"] = ICE_BOOL;
+ keywordMap["short"] = ICE_SHORT;
+ keywordMap["int"] = ICE_INT;
+ keywordMap["long"] = ICE_LONG;
+ keywordMap["float"] = ICE_FLOAT;
+ keywordMap["double"] = ICE_DOUBLE;
+ keywordMap["string"] = ICE_STRING;
+ keywordMap["Object"] = ICE_OBJECT;
+ keywordMap["LocalObject"] = ICE_LOCAL_OBJECT;
+ keywordMap["local"] = ICE_LOCAL;
+ keywordMap["const"] = ICE_CONST;
+ keywordMap["false"] = ICE_FALSE;
+ keywordMap["true"] = ICE_TRUE;
+ keywordMap["nonmutating"] = ICE_NONMUTATING;
+ keywordMap["idempotent"] = ICE_IDEMPOTENT;
+}
+
+//
+// Check if an identifier is well-formed.
+//
+
+void
+checkIdentifier(const string& id)
+{
+ if(id.find('_') != string::npos)
+ {
+ unit->error("illegal underscore in identifier `" + id + "'");
+ }
+
+ //
+ // Weed out identifiers with reserved suffixes.
+ //
+ static const string suffixBlacklist[] = { "Helper", "Holder", "Prx", "Ptr" };
+ for(size_t i = 0; i < sizeof(suffixBlacklist) / sizeof(*suffixBlacklist); ++i)
+ {
+ if(id.find(suffixBlacklist[i], id.size() - suffixBlacklist[i].size()) != string::npos)
+ {
+ unit->error("illegal identifier `" + id + "': `" + suffixBlacklist[i] + "' suffix is reserved");
+ }
+ }
+}
+
+//
+// Check if an identifier looks like a keyword.
+// If the identifier is a keyword, return the
+// corresponding keyword token; otherwise, return
+// an identifier token.
+//
+
+int
+checkKeyword(string& id)
+{
+ StringTokenMap::const_iterator pos = keywordMap.find(id);
+ if(pos != keywordMap.end())
+ {
+ if(pos->first != id)
+ {
+ string msg;
+ msg = "illegal identifier: `" + id + "' differs from keyword `";
+ msg += pos->first + "' only in capitalization";
+ unit->error(msg);
+ id = pos->first;
+ }
+ return pos->second;
+ }
+ return ICE_IDENTIFIER;
+}
+
+}