summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2012-08-08 01:33:30 +0200
committerJose <jose@zeroc.com>2012-08-08 01:33:30 +0200
commit6ed900b96833a2bfd1a37c7a6ba2112c04312b49 (patch)
tree07f1fbb33f7da9084198f55082d582cb6194eb38 /cpp
parentfixes for Scanner.l & VC comilers (diff)
downloadice-6ed900b96833a2bfd1a37c7a6ba2112c04312b49.tar.bz2
ice-6ed900b96833a2bfd1a37c7a6ba2112c04312b49.tar.xz
ice-6ed900b96833a2bfd1a37c7a6ba2112c04312b49.zip
remove ScannerConfig.h > move fixes to Scanner.l
Diffstat (limited to 'cpp')
-rw-r--r--cpp/demo/Freeze/library/Scanner.cpp86
-rw-r--r--cpp/demo/Freeze/library/Scanner.l14
-rw-r--r--cpp/demo/Freeze/phonebook/Grammar.cpp74
-rw-r--r--cpp/demo/Freeze/phonebook/Grammar.h7
-rw-r--r--cpp/demo/Freeze/phonebook/Scanner.cpp86
-rw-r--r--cpp/demo/Freeze/phonebook/Scanner.l14
-rw-r--r--cpp/demo/book/evictor_filesystem/Grammar.cpp74
-rw-r--r--cpp/demo/book/evictor_filesystem/Grammar.h7
-rw-r--r--cpp/demo/book/evictor_filesystem/Scanner.cpp84
-rw-r--r--cpp/demo/book/evictor_filesystem/Scanner.l14
-rw-r--r--cpp/demo/book/lifecycle/Scanner.cpp84
-rw-r--r--cpp/demo/book/lifecycle/Scanner.l14
-rw-r--r--cpp/demo/book/map_filesystem/Grammar.cpp335
-rw-r--r--cpp/demo/book/map_filesystem/Grammar.h44
-rw-r--r--cpp/demo/book/map_filesystem/Scanner.cpp84
-rw-r--r--cpp/demo/book/map_filesystem/Scanner.l14
-rw-r--r--cpp/include/IceUtil/ScannerConfig.h34
-rw-r--r--cpp/src/FreezeScript/Grammar.cpp110
-rw-r--r--cpp/src/FreezeScript/Grammar.h7
-rw-r--r--cpp/src/FreezeScript/Scanner.cpp98
-rw-r--r--cpp/src/FreezeScript/Scanner.l14
-rw-r--r--cpp/src/IceGrid/Scanner.cpp62
-rw-r--r--cpp/src/IceGrid/Scanner.l14
-rw-r--r--cpp/src/IceStorm/Scanner.cpp60
-rw-r--r--cpp/src/IceStorm/Scanner.l9
-rw-r--r--cpp/src/Slice/Grammar.cpp408
-rw-r--r--cpp/src/Slice/Grammar.h7
-rw-r--r--cpp/src/Slice/Scanner.cpp81
-rw-r--r--cpp/src/Slice/Scanner.l9
-rw-r--r--cpp/test/Freeze/complex/Scanner.cpp54
-rw-r--r--cpp/test/Freeze/complex/Scanner.l14
31 files changed, 1195 insertions, 821 deletions
diff --git a/cpp/demo/Freeze/library/Scanner.cpp b/cpp/demo/Freeze/library/Scanner.cpp
index 270a8300cd4..92119560e66 100644
--- a/cpp/demo/Freeze/library/Scanner.cpp
+++ b/cpp/demo/Freeze/library/Scanner.cpp
@@ -55,7 +55,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -86,6 +85,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -142,7 +143,15 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -510,12 +519,16 @@ char *yytext;
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <Parser.h>
#include <Grammar.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
//
@@ -524,9 +537,17 @@ char *yytext;
using namespace std;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
-#line 528 "lex.yy.c"
+#line 549 "lex.yy.c"
#define INITIAL 0
@@ -607,7 +628,12 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -626,7 +652,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -708,10 +734,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 36 "Scanner.l"
+#line 48 "Scanner.l"
-#line 713 "lex.yy.c"
+#line 739 "lex.yy.c"
if ( !(yy_init) )
{
@@ -796,7 +822,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 38 "Scanner.l"
+#line 50 "Scanner.l"
{
// C++-style comment
int c;
@@ -809,7 +835,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 48 "Scanner.l"
+#line 60 "Scanner.l"
{
// C-style comment
while(true)
@@ -837,84 +863,84 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 73 "Scanner.l"
+#line 85 "Scanner.l"
{
return TOK_HELP;
}
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 77 "Scanner.l"
+#line 89 "Scanner.l"
{
return TOK_EXIT;
}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 81 "Scanner.l"
+#line 93 "Scanner.l"
{
return TOK_ADD_BOOK;
}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 85 "Scanner.l"
+#line 97 "Scanner.l"
{
return TOK_FIND_ISBN;
}
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 89 "Scanner.l"
+#line 101 "Scanner.l"
{
return TOK_FIND_AUTHORS;
}
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 93 "Scanner.l"
+#line 105 "Scanner.l"
{
return TOK_NEXT_FOUND_BOOK;
}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 97 "Scanner.l"
+#line 109 "Scanner.l"
{
return TOK_PRINT_CURRENT;
}
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 101 "Scanner.l"
+#line 113 "Scanner.l"
{
return TOK_RENT_BOOK;
}
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 105 "Scanner.l"
+#line 117 "Scanner.l"
{
return TOK_RETURN_BOOK;
}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 109 "Scanner.l"
+#line 121 "Scanner.l"
{
return TOK_REMOVE_CURRENT;
}
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 113 "Scanner.l"
+#line 125 "Scanner.l"
{
return TOK_SET_EVICTOR_SIZE;
}
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 117 "Scanner.l"
+#line 129 "Scanner.l"
{
return TOK_SHUTDOWN;
}
@@ -922,7 +948,7 @@ YY_RULE_SETUP
case 15:
/* rule 15 can match eol */
YY_RULE_SETUP
-#line 121 "Scanner.l"
+#line 133 "Scanner.l"
{
size_t len = strlen(yytext);
for(size_t i = 0; i < len; ++i)
@@ -937,14 +963,14 @@ YY_RULE_SETUP
case 16:
/* rule 16 can match eol */
YY_RULE_SETUP
-#line 132 "Scanner.l"
+#line 144 "Scanner.l"
{
return ';';
}
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 136 "Scanner.l"
+#line 148 "Scanner.l"
{
// "..."-type strings
string s;
@@ -1021,7 +1047,7 @@ YY_RULE_SETUP
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 210 "Scanner.l"
+#line 222 "Scanner.l"
{
// '...'-type strings
string s;
@@ -1049,7 +1075,7 @@ YY_RULE_SETUP
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 235 "Scanner.l"
+#line 247 "Scanner.l"
{
// Simple strings
string s;
@@ -1076,10 +1102,10 @@ YY_RULE_SETUP
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 259 "Scanner.l"
+#line 271 "Scanner.l"
ECHO;
YY_BREAK
-#line 1081 "lex.yy.c"
+#line 1107 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1833,8 +1859,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
@@ -2073,7 +2099,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 259 "Scanner.l"
+#line 271 "Scanner.l"
diff --git a/cpp/demo/Freeze/library/Scanner.l b/cpp/demo/Freeze/library/Scanner.l
index 7092bb10d46..8494112f22d 100644
--- a/cpp/demo/Freeze/library/Scanner.l
+++ b/cpp/demo/Freeze/library/Scanner.l
@@ -9,12 +9,16 @@
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <Parser.h>
#include <Grammar.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
//
@@ -23,6 +27,14 @@
using namespace std;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
%}
diff --git a/cpp/demo/Freeze/phonebook/Grammar.cpp b/cpp/demo/Freeze/phonebook/Grammar.cpp
index ce1b477c0fb..7c42a9c5396 100644
--- a/cpp/demo/Freeze/phonebook/Grammar.cpp
+++ b/cpp/demo/Freeze/phonebook/Grammar.cpp
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 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
@@ -46,7 +45,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -102,7 +101,7 @@ yyerror(const char* s)
/* Line 189 of yacc.c */
-#line 106 "Grammar.tab.c"
+#line 105 "Grammar.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -159,7 +158,7 @@ typedef int YYSTYPE;
/* Line 264 of yacc.c */
-#line 163 "Grammar.tab.c"
+#line 162 "Grammar.tab.c"
#ifdef short
# undef short
@@ -209,7 +208,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -580,9 +579,18 @@ static const yytype_uint8 yystos[] =
/* 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. */
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -639,7 +647,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -1377,7 +1385,7 @@ yyreduce:
{
case 2:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 55 "Grammar.y"
{
;}
@@ -1385,7 +1393,7 @@ yyreduce:
case 3:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 58 "Grammar.y"
{
;}
@@ -1393,7 +1401,7 @@ yyreduce:
case 4:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 66 "Grammar.y"
{
;}
@@ -1401,7 +1409,7 @@ yyreduce:
case 5:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 69 "Grammar.y"
{
;}
@@ -1409,7 +1417,7 @@ yyreduce:
case 6:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 77 "Grammar.y"
{
parser->usage();
@@ -1418,7 +1426,7 @@ yyreduce:
case 7:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 81 "Grammar.y"
{
return 0;
@@ -1427,7 +1435,7 @@ yyreduce:
case 8:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 85 "Grammar.y"
{
parser->addContacts((yyvsp[(2) - (3)]));
@@ -1436,7 +1444,7 @@ yyreduce:
case 9:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 89 "Grammar.y"
{
parser->findContacts((yyvsp[(2) - (3)]));
@@ -1445,7 +1453,7 @@ yyreduce:
case 10:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 93 "Grammar.y"
{
parser->nextFoundContact();
@@ -1454,7 +1462,7 @@ yyreduce:
case 11:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 97 "Grammar.y"
{
parser->printCurrent();
@@ -1463,7 +1471,7 @@ yyreduce:
case 12:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 101 "Grammar.y"
{
parser->setCurrentName((yyvsp[(2) - (3)]));
@@ -1472,7 +1480,7 @@ yyreduce:
case 13:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 105 "Grammar.y"
{
parser->setCurrentAddress((yyvsp[(2) - (3)]));
@@ -1481,7 +1489,7 @@ yyreduce:
case 14:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 109 "Grammar.y"
{
parser->setCurrentPhone((yyvsp[(2) - (3)]));
@@ -1490,7 +1498,7 @@ yyreduce:
case 15:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 113 "Grammar.y"
{
parser->removeCurrent();
@@ -1499,7 +1507,7 @@ yyreduce:
case 16:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 117 "Grammar.y"
{
parser->setEvictorSize((yyvsp[(2) - (3)]));
@@ -1508,7 +1516,7 @@ yyreduce:
case 17:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 121 "Grammar.y"
{
parser->shutdown();
@@ -1517,7 +1525,7 @@ yyreduce:
case 18:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 125 "Grammar.y"
{
yyerrok;
@@ -1526,7 +1534,7 @@ yyreduce:
case 19:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 129 "Grammar.y"
{
;}
@@ -1534,7 +1542,7 @@ yyreduce:
case 20:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 137 "Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -1544,7 +1552,7 @@ yyreduce:
case 21:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 142 "Grammar.y"
{
(yyval) = (yyvsp[(1) - (1)]);
@@ -1553,8 +1561,8 @@ yyreduce:
-/* Line 1455 of yacc.c */
-#line 1558 "Grammar.tab.c"
+/* Line 1464 of yacc.c */
+#line 1566 "Grammar.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1765,7 +1773,7 @@ yyreturn:
-/* Line 1675 of yacc.c */
+/* Line 1684 of yacc.c */
#line 147 "Grammar.y"
diff --git a/cpp/demo/Freeze/phonebook/Grammar.h b/cpp/demo/Freeze/phonebook/Grammar.h
index fb5de6918c2..96e79b09faa 100644
--- a/cpp/demo/Freeze/phonebook/Grammar.h
+++ b/cpp/demo/Freeze/phonebook/Grammar.h
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton interface for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 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
diff --git a/cpp/demo/Freeze/phonebook/Scanner.cpp b/cpp/demo/Freeze/phonebook/Scanner.cpp
index a1d1d02e2b4..df64e0a3fb8 100644
--- a/cpp/demo/Freeze/phonebook/Scanner.cpp
+++ b/cpp/demo/Freeze/phonebook/Scanner.cpp
@@ -55,7 +55,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -86,6 +85,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -142,7 +143,15 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -510,12 +519,16 @@ char *yytext;
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <Parser.h>
#include <Grammar.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
//
@@ -524,9 +537,17 @@ char *yytext;
using namespace std;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
-#line 528 "lex.yy.c"
+#line 549 "lex.yy.c"
#define INITIAL 0
@@ -607,7 +628,12 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -626,7 +652,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -708,10 +734,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 36 "Scanner.l"
+#line 48 "Scanner.l"
-#line 713 "lex.yy.c"
+#line 739 "lex.yy.c"
if ( !(yy_init) )
{
@@ -796,7 +822,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 38 "Scanner.l"
+#line 50 "Scanner.l"
{
// C++-style comment
int c;
@@ -809,7 +835,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 48 "Scanner.l"
+#line 60 "Scanner.l"
{
// C-style comment
while(true)
@@ -837,84 +863,84 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 73 "Scanner.l"
+#line 85 "Scanner.l"
{
return TOK_HELP;
}
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 77 "Scanner.l"
+#line 89 "Scanner.l"
{
return TOK_EXIT;
}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 81 "Scanner.l"
+#line 93 "Scanner.l"
{
return TOK_ADD_CONTACTS;
}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 85 "Scanner.l"
+#line 97 "Scanner.l"
{
return TOK_FIND_CONTACTS;
}
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 89 "Scanner.l"
+#line 101 "Scanner.l"
{
return TOK_NEXT_FOUND_CONTACT;
}
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 93 "Scanner.l"
+#line 105 "Scanner.l"
{
return TOK_PRINT_CURRENT;
}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 97 "Scanner.l"
+#line 109 "Scanner.l"
{
return TOK_SET_CURRENT_NAME;
}
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 101 "Scanner.l"
+#line 113 "Scanner.l"
{
return TOK_SET_CURRENT_ADDRESS;
}
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 105 "Scanner.l"
+#line 117 "Scanner.l"
{
return TOK_SET_CURRENT_PHONE;
}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 109 "Scanner.l"
+#line 121 "Scanner.l"
{
return TOK_REMOVE_CURRENT;
}
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 113 "Scanner.l"
+#line 125 "Scanner.l"
{
return TOK_SET_EVICTOR_SIZE;
}
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 117 "Scanner.l"
+#line 129 "Scanner.l"
{
return TOK_SHUTDOWN;
}
@@ -922,7 +948,7 @@ YY_RULE_SETUP
case 15:
/* rule 15 can match eol */
YY_RULE_SETUP
-#line 121 "Scanner.l"
+#line 133 "Scanner.l"
{
size_t len = strlen(yytext);
for(size_t i = 0; i < len; ++i)
@@ -937,14 +963,14 @@ YY_RULE_SETUP
case 16:
/* rule 16 can match eol */
YY_RULE_SETUP
-#line 132 "Scanner.l"
+#line 144 "Scanner.l"
{
return ';';
}
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 136 "Scanner.l"
+#line 148 "Scanner.l"
{
// "..."-type strings
string s;
@@ -1021,7 +1047,7 @@ YY_RULE_SETUP
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 210 "Scanner.l"
+#line 222 "Scanner.l"
{
// '...'-type strings
string s;
@@ -1049,7 +1075,7 @@ YY_RULE_SETUP
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 235 "Scanner.l"
+#line 247 "Scanner.l"
{
// Simple strings
string s;
@@ -1076,10 +1102,10 @@ YY_RULE_SETUP
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 259 "Scanner.l"
+#line 271 "Scanner.l"
ECHO;
YY_BREAK
-#line 1081 "lex.yy.c"
+#line 1107 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1833,8 +1859,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
@@ -2073,7 +2099,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 259 "Scanner.l"
+#line 271 "Scanner.l"
diff --git a/cpp/demo/Freeze/phonebook/Scanner.l b/cpp/demo/Freeze/phonebook/Scanner.l
index 9f1b84d9240..02b0a4d0e44 100644
--- a/cpp/demo/Freeze/phonebook/Scanner.l
+++ b/cpp/demo/Freeze/phonebook/Scanner.l
@@ -9,12 +9,16 @@
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <Parser.h>
#include <Grammar.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
//
@@ -23,6 +27,14 @@
using namespace std;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
%}
diff --git a/cpp/demo/book/evictor_filesystem/Grammar.cpp b/cpp/demo/book/evictor_filesystem/Grammar.cpp
index 998449fa3d8..40ec4f9a977 100644
--- a/cpp/demo/book/evictor_filesystem/Grammar.cpp
+++ b/cpp/demo/book/evictor_filesystem/Grammar.cpp
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 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
@@ -46,7 +45,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -101,7 +100,7 @@ yyerror(const char* s)
/* Line 189 of yacc.c */
-#line 105 "Grammar.tab.c"
+#line 104 "Grammar.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -157,7 +156,7 @@ typedef int YYSTYPE;
/* Line 264 of yacc.c */
-#line 161 "Grammar.tab.c"
+#line 160 "Grammar.tab.c"
#ifdef short
# undef short
@@ -207,7 +206,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -566,9 +565,18 @@ static const yytype_uint8 yystos[] =
/* 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. */
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -625,7 +633,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -1363,7 +1371,7 @@ yyreduce:
{
case 2:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 53 "Grammar.y"
{
;}
@@ -1371,7 +1379,7 @@ yyreduce:
case 3:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 56 "Grammar.y"
{
;}
@@ -1379,7 +1387,7 @@ yyreduce:
case 4:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 64 "Grammar.y"
{
;}
@@ -1387,7 +1395,7 @@ yyreduce:
case 5:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 67 "Grammar.y"
{
;}
@@ -1395,7 +1403,7 @@ yyreduce:
case 6:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 75 "Grammar.y"
{
parser->usage();
@@ -1404,7 +1412,7 @@ yyreduce:
case 7:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 79 "Grammar.y"
{
return 0;
@@ -1413,7 +1421,7 @@ yyreduce:
case 8:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 83 "Grammar.y"
{
parser->list(false);
@@ -1422,7 +1430,7 @@ yyreduce:
case 9:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 87 "Grammar.y"
{
parser->list(true);
@@ -1431,7 +1439,7 @@ yyreduce:
case 10:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 91 "Grammar.y"
{
parser->createFile((yyvsp[(2) - (2)]));
@@ -1440,7 +1448,7 @@ yyreduce:
case 11:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 95 "Grammar.y"
{
parser->createDir((yyvsp[(2) - (2)]));
@@ -1449,7 +1457,7 @@ yyreduce:
case 12:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 99 "Grammar.y"
{
parser->pwd();
@@ -1458,7 +1466,7 @@ yyreduce:
case 13:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 103 "Grammar.y"
{
parser->cd("/");
@@ -1467,7 +1475,7 @@ yyreduce:
case 14:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 107 "Grammar.y"
{
parser->cd((yyvsp[(2) - (2)]).front());
@@ -1476,7 +1484,7 @@ yyreduce:
case 15:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 111 "Grammar.y"
{
parser->cat((yyvsp[(2) - (2)]).front());
@@ -1485,7 +1493,7 @@ yyreduce:
case 16:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 115 "Grammar.y"
{
parser->write((yyvsp[(2) - (2)]));
@@ -1494,7 +1502,7 @@ yyreduce:
case 17:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 119 "Grammar.y"
{
parser->destroy((yyvsp[(2) - (2)]));
@@ -1503,7 +1511,7 @@ yyreduce:
case 18:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 123 "Grammar.y"
{
parser->usage();
@@ -1513,7 +1521,7 @@ yyreduce:
case 19:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 128 "Grammar.y"
{
;}
@@ -1521,7 +1529,7 @@ yyreduce:
case 20:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 136 "Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -1531,7 +1539,7 @@ yyreduce:
case 21:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 141 "Grammar.y"
{
(yyval) = (yyvsp[(1) - (1)]);
@@ -1540,8 +1548,8 @@ yyreduce:
-/* Line 1455 of yacc.c */
-#line 1545 "Grammar.tab.c"
+/* Line 1464 of yacc.c */
+#line 1553 "Grammar.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1752,7 +1760,7 @@ yyreturn:
-/* Line 1675 of yacc.c */
+/* Line 1684 of yacc.c */
#line 146 "Grammar.y"
diff --git a/cpp/demo/book/evictor_filesystem/Grammar.h b/cpp/demo/book/evictor_filesystem/Grammar.h
index ca5a99150f6..69f4fec2594 100644
--- a/cpp/demo/book/evictor_filesystem/Grammar.h
+++ b/cpp/demo/book/evictor_filesystem/Grammar.h
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton interface for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 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
diff --git a/cpp/demo/book/evictor_filesystem/Scanner.cpp b/cpp/demo/book/evictor_filesystem/Scanner.cpp
index 13b008220aa..173be8598a7 100644
--- a/cpp/demo/book/evictor_filesystem/Scanner.cpp
+++ b/cpp/demo/book/evictor_filesystem/Scanner.cpp
@@ -55,7 +55,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -86,6 +85,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -142,7 +143,15 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -498,12 +507,16 @@ char *yytext;
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <Parser.h>
#include <Grammar.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
//
@@ -512,9 +525,17 @@ char *yytext;
using namespace std;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
-#line 516 "lex.yy.c"
+#line 537 "lex.yy.c"
#define INITIAL 0
@@ -595,7 +616,12 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -614,7 +640,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -696,10 +722,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 36 "Scanner.l"
+#line 48 "Scanner.l"
-#line 701 "lex.yy.c"
+#line 727 "lex.yy.c"
if ( !(yy_init) )
{
@@ -784,7 +810,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 38 "Scanner.l"
+#line 50 "Scanner.l"
{
// C++-style comment
int c;
@@ -797,7 +823,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 48 "Scanner.l"
+#line 60 "Scanner.l"
{
// C-style comment
while(true)
@@ -825,77 +851,77 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 73 "Scanner.l"
+#line 85 "Scanner.l"
{
return TOK_HELP;
}
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 77 "Scanner.l"
+#line 89 "Scanner.l"
{
return TOK_EXIT;
}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 81 "Scanner.l"
+#line 93 "Scanner.l"
{
return TOK_LIST;
}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 85 "Scanner.l"
+#line 97 "Scanner.l"
{
return TOK_LIST_RECURSIVE;
}
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 89 "Scanner.l"
+#line 101 "Scanner.l"
{
return TOK_CREATE_FILE;
}
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 93 "Scanner.l"
+#line 105 "Scanner.l"
{
return TOK_CREATE_DIR;
}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 97 "Scanner.l"
+#line 109 "Scanner.l"
{
return TOK_PWD;
}
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 101 "Scanner.l"
+#line 113 "Scanner.l"
{
return TOK_CD;
}
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 105 "Scanner.l"
+#line 117 "Scanner.l"
{
return TOK_CAT;
}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 109 "Scanner.l"
+#line 121 "Scanner.l"
{
return TOK_WRITE;
}
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 113 "Scanner.l"
+#line 125 "Scanner.l"
{
return TOK_RM;
}
@@ -903,7 +929,7 @@ YY_RULE_SETUP
case 14:
/* rule 14 can match eol */
YY_RULE_SETUP
-#line 117 "Scanner.l"
+#line 129 "Scanner.l"
{
size_t len = strlen(yytext);
for(size_t i = 0; i < len; ++i)
@@ -918,14 +944,14 @@ YY_RULE_SETUP
case 15:
/* rule 15 can match eol */
YY_RULE_SETUP
-#line 128 "Scanner.l"
+#line 140 "Scanner.l"
{
return ';';
}
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 132 "Scanner.l"
+#line 144 "Scanner.l"
{
// "..."-type strings
string s;
@@ -1002,7 +1028,7 @@ YY_RULE_SETUP
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 206 "Scanner.l"
+#line 218 "Scanner.l"
{
// '...'-type strings
string s;
@@ -1030,7 +1056,7 @@ YY_RULE_SETUP
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 231 "Scanner.l"
+#line 243 "Scanner.l"
{
// Simple strings
string s;
@@ -1057,10 +1083,10 @@ YY_RULE_SETUP
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 255 "Scanner.l"
+#line 267 "Scanner.l"
ECHO;
YY_BREAK
-#line 1062 "lex.yy.c"
+#line 1088 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1814,8 +1840,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
@@ -2054,7 +2080,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 255 "Scanner.l"
+#line 267 "Scanner.l"
diff --git a/cpp/demo/book/evictor_filesystem/Scanner.l b/cpp/demo/book/evictor_filesystem/Scanner.l
index ece9fd7db9d..611903c29ef 100644
--- a/cpp/demo/book/evictor_filesystem/Scanner.l
+++ b/cpp/demo/book/evictor_filesystem/Scanner.l
@@ -9,12 +9,16 @@
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <Parser.h>
#include <Grammar.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
//
@@ -23,6 +27,14 @@
using namespace std;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
%}
diff --git a/cpp/demo/book/lifecycle/Scanner.cpp b/cpp/demo/book/lifecycle/Scanner.cpp
index 13b008220aa..173be8598a7 100644
--- a/cpp/demo/book/lifecycle/Scanner.cpp
+++ b/cpp/demo/book/lifecycle/Scanner.cpp
@@ -55,7 +55,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -86,6 +85,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -142,7 +143,15 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -498,12 +507,16 @@ char *yytext;
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <Parser.h>
#include <Grammar.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
//
@@ -512,9 +525,17 @@ char *yytext;
using namespace std;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
-#line 516 "lex.yy.c"
+#line 537 "lex.yy.c"
#define INITIAL 0
@@ -595,7 +616,12 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -614,7 +640,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -696,10 +722,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 36 "Scanner.l"
+#line 48 "Scanner.l"
-#line 701 "lex.yy.c"
+#line 727 "lex.yy.c"
if ( !(yy_init) )
{
@@ -784,7 +810,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 38 "Scanner.l"
+#line 50 "Scanner.l"
{
// C++-style comment
int c;
@@ -797,7 +823,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 48 "Scanner.l"
+#line 60 "Scanner.l"
{
// C-style comment
while(true)
@@ -825,77 +851,77 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 73 "Scanner.l"
+#line 85 "Scanner.l"
{
return TOK_HELP;
}
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 77 "Scanner.l"
+#line 89 "Scanner.l"
{
return TOK_EXIT;
}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 81 "Scanner.l"
+#line 93 "Scanner.l"
{
return TOK_LIST;
}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 85 "Scanner.l"
+#line 97 "Scanner.l"
{
return TOK_LIST_RECURSIVE;
}
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 89 "Scanner.l"
+#line 101 "Scanner.l"
{
return TOK_CREATE_FILE;
}
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 93 "Scanner.l"
+#line 105 "Scanner.l"
{
return TOK_CREATE_DIR;
}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 97 "Scanner.l"
+#line 109 "Scanner.l"
{
return TOK_PWD;
}
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 101 "Scanner.l"
+#line 113 "Scanner.l"
{
return TOK_CD;
}
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 105 "Scanner.l"
+#line 117 "Scanner.l"
{
return TOK_CAT;
}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 109 "Scanner.l"
+#line 121 "Scanner.l"
{
return TOK_WRITE;
}
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 113 "Scanner.l"
+#line 125 "Scanner.l"
{
return TOK_RM;
}
@@ -903,7 +929,7 @@ YY_RULE_SETUP
case 14:
/* rule 14 can match eol */
YY_RULE_SETUP
-#line 117 "Scanner.l"
+#line 129 "Scanner.l"
{
size_t len = strlen(yytext);
for(size_t i = 0; i < len; ++i)
@@ -918,14 +944,14 @@ YY_RULE_SETUP
case 15:
/* rule 15 can match eol */
YY_RULE_SETUP
-#line 128 "Scanner.l"
+#line 140 "Scanner.l"
{
return ';';
}
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 132 "Scanner.l"
+#line 144 "Scanner.l"
{
// "..."-type strings
string s;
@@ -1002,7 +1028,7 @@ YY_RULE_SETUP
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 206 "Scanner.l"
+#line 218 "Scanner.l"
{
// '...'-type strings
string s;
@@ -1030,7 +1056,7 @@ YY_RULE_SETUP
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 231 "Scanner.l"
+#line 243 "Scanner.l"
{
// Simple strings
string s;
@@ -1057,10 +1083,10 @@ YY_RULE_SETUP
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 255 "Scanner.l"
+#line 267 "Scanner.l"
ECHO;
YY_BREAK
-#line 1062 "lex.yy.c"
+#line 1088 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1814,8 +1840,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
@@ -2054,7 +2080,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 255 "Scanner.l"
+#line 267 "Scanner.l"
diff --git a/cpp/demo/book/lifecycle/Scanner.l b/cpp/demo/book/lifecycle/Scanner.l
index ece9fd7db9d..611903c29ef 100644
--- a/cpp/demo/book/lifecycle/Scanner.l
+++ b/cpp/demo/book/lifecycle/Scanner.l
@@ -9,12 +9,16 @@
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <Parser.h>
#include <Grammar.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
//
@@ -23,6 +27,14 @@
using namespace std;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
%}
diff --git a/cpp/demo/book/map_filesystem/Grammar.cpp b/cpp/demo/book/map_filesystem/Grammar.cpp
index 5fa9ec99dc6..40ec4f9a977 100644
--- a/cpp/demo/book/map_filesystem/Grammar.cpp
+++ b/cpp/demo/book/map_filesystem/Grammar.cpp
@@ -1,24 +1,22 @@
-/* A Bison parser, made by GNU Bison 2.3. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 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.
-
+ the Free Software Foundation, either version 3 of the License, 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., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,7 +27,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -47,7 +45,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.4.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -55,49 +53,20 @@
/* Pure parsers. */
#define YYPURE 1
-/* Using locations. */
-#define YYLSP_NEEDED 0
-
+/* Push parsers. */
+#define YYPUSH 0
+/* Pull parsers. */
+#define YYPULL 1
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- TOK_HELP = 258,
- TOK_EXIT = 259,
- TOK_STRING = 260,
- TOK_LIST = 261,
- TOK_LIST_RECURSIVE = 262,
- TOK_CREATE_FILE = 263,
- TOK_CREATE_DIR = 264,
- TOK_PWD = 265,
- TOK_CD = 266,
- TOK_CAT = 267,
- TOK_WRITE = 268,
- TOK_RM = 269
- };
-#endif
-/* Tokens. */
-#define TOK_HELP 258
-#define TOK_EXIT 259
-#define TOK_STRING 260
-#define TOK_LIST 261
-#define TOK_LIST_RECURSIVE 262
-#define TOK_CREATE_FILE 263
-#define TOK_CREATE_DIR 264
-#define TOK_PWD 265
-#define TOK_CD 266
-#define TOK_CAT 267
-#define TOK_WRITE 268
-#define TOK_RM 269
-
+/* Using locations. */
+#define YYLSP_NEEDED 0
/* Copy the first part of user declarations. */
+
+/* Line 189 of yacc.c */
#line 1 "Grammar.y"
@@ -130,6 +99,9 @@ yyerror(const char* s)
+/* Line 189 of yacc.c */
+#line 104 "Grammar.tab.c"
+
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
@@ -148,20 +120,43 @@ yyerror(const char* s)
# define YYTOKEN_TABLE 0
#endif
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ TOK_HELP = 258,
+ TOK_EXIT = 259,
+ TOK_STRING = 260,
+ TOK_LIST = 261,
+ TOK_LIST_RECURSIVE = 262,
+ TOK_CREATE_FILE = 263,
+ TOK_CREATE_DIR = 264,
+ TOK_PWD = 265,
+ TOK_CD = 266,
+ TOK_CAT = 267,
+ TOK_WRITE = 268,
+ TOK_RM = 269
+ };
+#endif
+
+
+
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# 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 216 of yacc.c. */
-#line 165 "Grammar.tab.c"
+/* Line 264 of yacc.c */
+#line 160 "Grammar.tab.c"
#ifdef short
# undef short
@@ -211,7 +206,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -236,14 +231,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int i)
+YYID (int yyi)
#else
static int
-YYID (i)
- int i;
+YYID (yyi)
+ int yyi;
#endif
{
- return i;
+ return yyi;
}
#endif
@@ -324,9 +319,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss;
- YYSTYPE yyvs;
- };
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
@@ -360,12 +355,12 @@ union yyalloc
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) \
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
@@ -570,9 +565,18 @@ static const yytype_uint8 yystos[] =
/* 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. */
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -629,7 +633,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -740,17 +744,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
-yy_stack_print (bottom, top)
- yytype_int16 *bottom;
- yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; bottom <= top; ++bottom)
- YYFPRINTF (stderr, " %d", *bottom);
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
YYFPRINTF (stderr, "\n");
}
@@ -784,11 +791,11 @@ yy_reduce_print (yyvsp, yyrule)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- fprintf (stderr, " $%d = ", yyi + 1);
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
);
- fprintf (stderr, "\n");
+ YYFPRINTF (stderr, "\n");
}
}
@@ -1068,10 +1075,8 @@ yydestruct (yymsg, yytype, yyvaluep)
break;
}
}
-
/* Prevent warnings from -Wmissing-prototypes. */
-
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@@ -1090,10 +1095,9 @@ int yyparse ();
-
-/*----------.
-| yyparse. |
-`----------*/
+/*-------------------------.
+| yyparse or yypush_parse. |
+`-------------------------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1117,74 +1121,75 @@ yyparse ()
#endif
#endif
{
- /* The look-ahead symbol. */
+/* The lookahead symbol. */
int yychar;
-/* The semantic value of the look-ahead symbol. */
+/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
-/* Number of syntax errors so far. */
-int yynerrs;
-
- int yystate;
- int yyn;
- int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
- int yytoken = 0;
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
+ /* Number of syntax errors so far. */
+ int yynerrs;
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss = yyssa;
- yytype_int16 *yyssp;
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp;
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
-
- YYSIZE_T yystacksize = YYINITDEPTH;
+ YYSIZE_T yystacksize;
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ 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;
@@ -1214,7 +1219,6 @@ int yynerrs;
YYSTYPE *yyvs1 = yyvs;
yytype_int16 *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
@@ -1222,7 +1226,6 @@ int yynerrs;
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
-
&yystacksize);
yyss = yyss1;
@@ -1245,9 +1248,8 @@ int yynerrs;
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
-
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -1258,7 +1260,6 @@ int yynerrs;
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
-
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
@@ -1268,6 +1269,9 @@ int yynerrs;
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
goto yybackup;
/*-----------.
@@ -1276,16 +1280,16 @@ int yynerrs;
yybackup:
/* Do appropriate processing given the current state. Read a
- look-ahead token if we need one and don't already have one. */
+ lookahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to look-ahead token. */
+ /* 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 look-ahead token if don't already have one. */
+ /* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -1317,20 +1321,16 @@ yybackup:
goto yyreduce;
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the look-ahead token. */
+ /* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -1370,30 +1370,40 @@ yyreduce:
switch (yyn)
{
case 2:
+
+/* Line 1464 of yacc.c */
#line 53 "Grammar.y"
{
;}
break;
case 3:
+
+/* Line 1464 of yacc.c */
#line 56 "Grammar.y"
{
;}
break;
case 4:
+
+/* Line 1464 of yacc.c */
#line 64 "Grammar.y"
{
;}
break;
case 5:
+
+/* Line 1464 of yacc.c */
#line 67 "Grammar.y"
{
;}
break;
case 6:
+
+/* Line 1464 of yacc.c */
#line 75 "Grammar.y"
{
parser->usage();
@@ -1401,6 +1411,8 @@ yyreduce:
break;
case 7:
+
+/* Line 1464 of yacc.c */
#line 79 "Grammar.y"
{
return 0;
@@ -1408,6 +1420,8 @@ yyreduce:
break;
case 8:
+
+/* Line 1464 of yacc.c */
#line 83 "Grammar.y"
{
parser->list(false);
@@ -1415,6 +1429,8 @@ yyreduce:
break;
case 9:
+
+/* Line 1464 of yacc.c */
#line 87 "Grammar.y"
{
parser->list(true);
@@ -1422,6 +1438,8 @@ yyreduce:
break;
case 10:
+
+/* Line 1464 of yacc.c */
#line 91 "Grammar.y"
{
parser->createFile((yyvsp[(2) - (2)]));
@@ -1429,6 +1447,8 @@ yyreduce:
break;
case 11:
+
+/* Line 1464 of yacc.c */
#line 95 "Grammar.y"
{
parser->createDir((yyvsp[(2) - (2)]));
@@ -1436,6 +1456,8 @@ yyreduce:
break;
case 12:
+
+/* Line 1464 of yacc.c */
#line 99 "Grammar.y"
{
parser->pwd();
@@ -1443,6 +1465,8 @@ yyreduce:
break;
case 13:
+
+/* Line 1464 of yacc.c */
#line 103 "Grammar.y"
{
parser->cd("/");
@@ -1450,6 +1474,8 @@ yyreduce:
break;
case 14:
+
+/* Line 1464 of yacc.c */
#line 107 "Grammar.y"
{
parser->cd((yyvsp[(2) - (2)]).front());
@@ -1457,6 +1483,8 @@ yyreduce:
break;
case 15:
+
+/* Line 1464 of yacc.c */
#line 111 "Grammar.y"
{
parser->cat((yyvsp[(2) - (2)]).front());
@@ -1464,6 +1492,8 @@ yyreduce:
break;
case 16:
+
+/* Line 1464 of yacc.c */
#line 115 "Grammar.y"
{
parser->write((yyvsp[(2) - (2)]));
@@ -1471,6 +1501,8 @@ yyreduce:
break;
case 17:
+
+/* Line 1464 of yacc.c */
#line 119 "Grammar.y"
{
parser->destroy((yyvsp[(2) - (2)]));
@@ -1478,6 +1510,8 @@ yyreduce:
break;
case 18:
+
+/* Line 1464 of yacc.c */
#line 123 "Grammar.y"
{
parser->usage();
@@ -1486,12 +1520,16 @@ yyreduce:
break;
case 19:
+
+/* Line 1464 of yacc.c */
#line 128 "Grammar.y"
{
;}
break;
case 20:
+
+/* Line 1464 of yacc.c */
#line 136 "Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -1500,6 +1538,8 @@ yyreduce:
break;
case 21:
+
+/* Line 1464 of yacc.c */
#line 141 "Grammar.y"
{
(yyval) = (yyvsp[(1) - (1)]);
@@ -1507,8 +1547,9 @@ yyreduce:
break;
-/* Line 1267 of yacc.c. */
-#line 1512 "Grammar.tab.c"
+
+/* Line 1464 of yacc.c */
+#line 1553 "Grammar.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1519,7 +1560,6 @@ yyreduce:
*++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. */
@@ -1584,7 +1624,7 @@ yyerrlab:
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse look-ahead token after an
+ /* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -1601,7 +1641,7 @@ yyerrlab:
}
}
- /* Else will try to reuse look-ahead token after shifting the error
+ /* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
@@ -1658,9 +1698,6 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
*++yyvsp = yylval;
@@ -1685,7 +1722,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -1696,7 +1733,7 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
+ if (yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval);
/* Do not reclaim the symbols of the rule which action triggered
@@ -1722,6 +1759,8 @@ yyreturn:
}
+
+/* Line 1684 of yacc.c */
#line 146 "Grammar.y"
diff --git a/cpp/demo/book/map_filesystem/Grammar.h b/cpp/demo/book/map_filesystem/Grammar.h
index b5b8e41ade4..69f4fec2594 100644
--- a/cpp/demo/book/map_filesystem/Grammar.h
+++ b/cpp/demo/book/map_filesystem/Grammar.h
@@ -1,24 +1,22 @@
-/* A Bison parser, made by GNU Bison 2.3. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton interface for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 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.
-
+ the Free Software Foundation, either version 3 of the License, 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., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,10 +27,11 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
+
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -53,29 +52,16 @@
TOK_RM = 269
};
#endif
-/* Tokens. */
-#define TOK_HELP 258
-#define TOK_EXIT 259
-#define TOK_STRING 260
-#define TOK_LIST 261
-#define TOK_LIST_RECURSIVE 262
-#define TOK_CREATE_FILE 263
-#define TOK_CREATE_DIR 264
-#define TOK_PWD 265
-#define TOK_CD 266
-#define TOK_CAT 267
-#define TOK_WRITE 268
-#define TOK_RM 269
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
+
diff --git a/cpp/demo/book/map_filesystem/Scanner.cpp b/cpp/demo/book/map_filesystem/Scanner.cpp
index 13b008220aa..173be8598a7 100644
--- a/cpp/demo/book/map_filesystem/Scanner.cpp
+++ b/cpp/demo/book/map_filesystem/Scanner.cpp
@@ -55,7 +55,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -86,6 +85,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -142,7 +143,15 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -498,12 +507,16 @@ char *yytext;
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <Parser.h>
#include <Grammar.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
//
@@ -512,9 +525,17 @@ char *yytext;
using namespace std;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
-#line 516 "lex.yy.c"
+#line 537 "lex.yy.c"
#define INITIAL 0
@@ -595,7 +616,12 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -614,7 +640,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -696,10 +722,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 36 "Scanner.l"
+#line 48 "Scanner.l"
-#line 701 "lex.yy.c"
+#line 727 "lex.yy.c"
if ( !(yy_init) )
{
@@ -784,7 +810,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 38 "Scanner.l"
+#line 50 "Scanner.l"
{
// C++-style comment
int c;
@@ -797,7 +823,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 48 "Scanner.l"
+#line 60 "Scanner.l"
{
// C-style comment
while(true)
@@ -825,77 +851,77 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 73 "Scanner.l"
+#line 85 "Scanner.l"
{
return TOK_HELP;
}
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 77 "Scanner.l"
+#line 89 "Scanner.l"
{
return TOK_EXIT;
}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 81 "Scanner.l"
+#line 93 "Scanner.l"
{
return TOK_LIST;
}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 85 "Scanner.l"
+#line 97 "Scanner.l"
{
return TOK_LIST_RECURSIVE;
}
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 89 "Scanner.l"
+#line 101 "Scanner.l"
{
return TOK_CREATE_FILE;
}
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 93 "Scanner.l"
+#line 105 "Scanner.l"
{
return TOK_CREATE_DIR;
}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 97 "Scanner.l"
+#line 109 "Scanner.l"
{
return TOK_PWD;
}
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 101 "Scanner.l"
+#line 113 "Scanner.l"
{
return TOK_CD;
}
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 105 "Scanner.l"
+#line 117 "Scanner.l"
{
return TOK_CAT;
}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 109 "Scanner.l"
+#line 121 "Scanner.l"
{
return TOK_WRITE;
}
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 113 "Scanner.l"
+#line 125 "Scanner.l"
{
return TOK_RM;
}
@@ -903,7 +929,7 @@ YY_RULE_SETUP
case 14:
/* rule 14 can match eol */
YY_RULE_SETUP
-#line 117 "Scanner.l"
+#line 129 "Scanner.l"
{
size_t len = strlen(yytext);
for(size_t i = 0; i < len; ++i)
@@ -918,14 +944,14 @@ YY_RULE_SETUP
case 15:
/* rule 15 can match eol */
YY_RULE_SETUP
-#line 128 "Scanner.l"
+#line 140 "Scanner.l"
{
return ';';
}
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 132 "Scanner.l"
+#line 144 "Scanner.l"
{
// "..."-type strings
string s;
@@ -1002,7 +1028,7 @@ YY_RULE_SETUP
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 206 "Scanner.l"
+#line 218 "Scanner.l"
{
// '...'-type strings
string s;
@@ -1030,7 +1056,7 @@ YY_RULE_SETUP
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 231 "Scanner.l"
+#line 243 "Scanner.l"
{
// Simple strings
string s;
@@ -1057,10 +1083,10 @@ YY_RULE_SETUP
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 255 "Scanner.l"
+#line 267 "Scanner.l"
ECHO;
YY_BREAK
-#line 1062 "lex.yy.c"
+#line 1088 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1814,8 +1840,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
@@ -2054,7 +2080,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 255 "Scanner.l"
+#line 267 "Scanner.l"
diff --git a/cpp/demo/book/map_filesystem/Scanner.l b/cpp/demo/book/map_filesystem/Scanner.l
index ece9fd7db9d..611903c29ef 100644
--- a/cpp/demo/book/map_filesystem/Scanner.l
+++ b/cpp/demo/book/map_filesystem/Scanner.l
@@ -9,12 +9,16 @@
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <Parser.h>
#include <Grammar.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
//
@@ -23,6 +27,14 @@
using namespace std;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
%}
diff --git a/cpp/include/IceUtil/ScannerConfig.h b/cpp/include/IceUtil/ScannerConfig.h
deleted file mode 100644
index 30cc6b41cdf..00000000000
--- a/cpp/include/IceUtil/ScannerConfig.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2012 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.
-//
-// **********************************************************************
-
-#pragma once
-
-//
-// COMPILERFIX: With VC++ flex generated files doesn't compile because
-// yywrap is called without args.
-//
-// The macro could have a different name if flex use "%option prefix".
-//
-#ifdef _MSC_VER
-# ifdef slice_wrap
-# undef slice_wrap
-# define slice_wrap() 1
-# endif
-# ifdef freeze_script_wrap
-# undef freeze_script_wrap
-# define freeze_script_wrap() 1
-# endif
-# undef yywrap
-# define yywrap() 1
- //
- // We define YY_NO_UNISTD_H so unistd.h doesn't
- // get included
- //
-# define YY_NO_UNISTD_H
-#endif
diff --git a/cpp/src/FreezeScript/Grammar.cpp b/cpp/src/FreezeScript/Grammar.cpp
index 8e47febf5d7..c435a0ad234 100644
--- a/cpp/src/FreezeScript/Grammar.cpp
+++ b/cpp/src/FreezeScript/Grammar.cpp
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 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
@@ -46,7 +45,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -120,7 +119,7 @@ freeze_script_error(const char* s)
/* Line 189 of yacc.c */
-#line 124 "Grammar.tab.c"
+#line 123 "Grammar.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -191,7 +190,7 @@ typedef int YYSTYPE;
/* Line 264 of yacc.c */
-#line 195 "Grammar.tab.c"
+#line 194 "Grammar.tab.c"
#ifdef short
# undef short
@@ -241,7 +240,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -646,9 +645,18 @@ static const yytype_uint8 yystos[] =
/* 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. */
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -705,7 +713,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -1443,7 +1451,7 @@ yyreduce:
{
case 2:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 85 "../FreezeScript/Grammar.y"
{
parseResult = (yyvsp[(1) - (1)]);
@@ -1452,7 +1460,7 @@ yyreduce:
case 3:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 94 "../FreezeScript/Grammar.y"
{
(yyval) = (yyvsp[(1) - (1)]);
@@ -1461,7 +1469,7 @@ yyreduce:
case 4:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 103 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpLess, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1470,7 +1478,7 @@ yyreduce:
case 5:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 107 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpGreater, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1479,7 +1487,7 @@ yyreduce:
case 6:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 111 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpLessEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1488,7 +1496,7 @@ yyreduce:
case 7:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 115 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpGrEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1497,7 +1505,7 @@ yyreduce:
case 8:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 119 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1506,7 +1514,7 @@ yyreduce:
case 9:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 123 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpNotEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1515,7 +1523,7 @@ yyreduce:
case 10:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 127 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpOr, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1524,7 +1532,7 @@ yyreduce:
case 11:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 131 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpAnd, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1533,7 +1541,7 @@ yyreduce:
case 12:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 135 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpMul, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1542,7 +1550,7 @@ yyreduce:
case 13:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 139 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpDiv, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1551,7 +1559,7 @@ yyreduce:
case 14:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 143 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpMod, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1560,7 +1568,7 @@ yyreduce:
case 15:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 147 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpAdd, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1569,7 +1577,7 @@ yyreduce:
case 16:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 151 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpSub, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1578,7 +1586,7 @@ yyreduce:
case 17:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 155 "../FreezeScript/Grammar.y"
{
(yyval) = (yyvsp[(1) - (1)]);
@@ -1587,7 +1595,7 @@ yyreduce:
case 18:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 164 "../FreezeScript/Grammar.y"
{
(yyval) = (yyvsp[(2) - (3)]);
@@ -1596,7 +1604,7 @@ yyreduce:
case 19:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 168 "../FreezeScript/Grammar.y"
{
(yyval) = new UnaryNode(UnaryOpNeg, parseDataFactory, (yyvsp[(2) - (2)]));
@@ -1605,7 +1613,7 @@ yyreduce:
case 20:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 172 "../FreezeScript/Grammar.y"
{
(yyval) = new UnaryNode(UnaryOpNot, parseDataFactory, (yyvsp[(2) - (2)]));
@@ -1614,7 +1622,7 @@ yyreduce:
case 21:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 176 "../FreezeScript/Grammar.y"
{
IntegerTokPtr intVal = IntegerTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -1625,7 +1633,7 @@ yyreduce:
case 22:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 182 "../FreezeScript/Grammar.y"
{
FloatingTokPtr floatVal = FloatingTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -1636,7 +1644,7 @@ yyreduce:
case 23:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 188 "../FreezeScript/Grammar.y"
{
StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -1647,7 +1655,7 @@ yyreduce:
case 24:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 194 "../FreezeScript/Grammar.y"
{
(yyval) = new DataNode(parseDataFactory->createBoolean(true, true));
@@ -1656,7 +1664,7 @@ yyreduce:
case 25:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 198 "../FreezeScript/Grammar.y"
{
(yyval) = new DataNode(parseDataFactory->createBoolean(false, true));
@@ -1665,7 +1673,7 @@ yyreduce:
case 26:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 202 "../FreezeScript/Grammar.y"
{
(yyval) = new DataNode(parseDataFactory->createNil(true));
@@ -1674,7 +1682,7 @@ yyreduce:
case 27:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 206 "../FreezeScript/Grammar.y"
{
(yyval) = (yyvsp[(1) - (1)]);
@@ -1683,7 +1691,7 @@ yyreduce:
case 28:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 210 "../FreezeScript/Grammar.y"
{
EntityNodePtr entity = EntityNodePtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -1697,7 +1705,7 @@ yyreduce:
case 29:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 219 "../FreezeScript/Grammar.y"
{
(yyval) = (yyvsp[(1) - (1)]);
@@ -1706,7 +1714,7 @@ yyreduce:
case 30:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 223 "../FreezeScript/Grammar.y"
{
StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -1717,7 +1725,7 @@ yyreduce:
case 31:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 234 "../FreezeScript/Grammar.y"
{
EntityNodePtr entity = EntityNodePtr::dynamicCast((yyvsp[(1) - (4)]));
@@ -1729,7 +1737,7 @@ yyreduce:
case 32:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 241 "../FreezeScript/Grammar.y"
{
StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]));
@@ -1743,7 +1751,7 @@ yyreduce:
case 33:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 250 "../FreezeScript/Grammar.y"
{
StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -1754,7 +1762,7 @@ yyreduce:
case 34:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 261 "../FreezeScript/Grammar.y"
{
StringTokPtr func = StringTokPtr::dynamicCast((yyvsp[(1) - (4)]));
@@ -1767,7 +1775,7 @@ yyreduce:
case 35:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 274 "../FreezeScript/Grammar.y"
{
NodeListTokPtr l = NodeListTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -1779,7 +1787,7 @@ yyreduce:
case 36:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 281 "../FreezeScript/Grammar.y"
{
NodeListTokPtr result = new NodeListTok;
@@ -1790,7 +1798,7 @@ yyreduce:
case 37:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 287 "../FreezeScript/Grammar.y"
{
(yyval) = new NodeListTok;
@@ -1799,7 +1807,7 @@ yyreduce:
case 38:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 296 "../FreezeScript/Grammar.y"
{
StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -1813,7 +1821,7 @@ yyreduce:
case 39:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 305 "../FreezeScript/Grammar.y"
{
StringTokPtr idVal = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -1826,8 +1834,8 @@ yyreduce:
-/* Line 1455 of yacc.c */
-#line 1831 "Grammar.tab.c"
+/* Line 1464 of yacc.c */
+#line 1839 "Grammar.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2038,7 +2046,7 @@ yyreturn:
-/* Line 1675 of yacc.c */
+/* Line 1684 of yacc.c */
#line 314 "../FreezeScript/Grammar.y"
diff --git a/cpp/src/FreezeScript/Grammar.h b/cpp/src/FreezeScript/Grammar.h
index ae561a72f12..de0df9778b2 100644
--- a/cpp/src/FreezeScript/Grammar.h
+++ b/cpp/src/FreezeScript/Grammar.h
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton interface for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 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
diff --git a/cpp/src/FreezeScript/Scanner.cpp b/cpp/src/FreezeScript/Scanner.cpp
index ee7882b26d6..f5cdbaf7f81 100644
--- a/cpp/src/FreezeScript/Scanner.cpp
+++ b/cpp/src/FreezeScript/Scanner.cpp
@@ -75,7 +75,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -106,6 +105,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -162,7 +163,15 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -525,7 +534,6 @@ char *freeze_script_text;
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <FreezeScript/GrammarUtil.h> // Before Grammar.h, so that YYSTYPE is defined
#include <FreezeScript/Grammar.h>
#include <IceUtil/InputUtil.h>
@@ -537,12 +545,25 @@ char *freeze_script_text;
#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
+#ifdef _MSC_VER
+# ifdef freeze_script_wrap
+# undef freeze_script_wrap
+# define freeze_script_wrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
using namespace std;
using namespace FreezeScript;
@@ -561,7 +582,7 @@ StringTokPtr parseString(char);
#define YY_USER_INIT initScanner();
#define YY_INPUT(buf, result, max_size) { result = getInput(buf, max_size); }
-#line 563 "lex.yy.c"
+#line 584 "lex.yy.c"
#define INITIAL 0
@@ -642,7 +663,12 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -661,7 +687,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( freeze_script_in )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -743,10 +769,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 61 "Scanner.l"
+#line 73 "Scanner.l"
-#line 748 "lex.yy.c"
+#line 774 "lex.yy.c"
if ( !(yy_init) )
{
@@ -827,7 +853,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 63 "Scanner.l"
+#line 75 "Scanner.l"
{
// C++-style comment
int c;
@@ -844,7 +870,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 77 "Scanner.l"
+#line 89 "Scanner.l"
{
// C-style comment
while(true)
@@ -876,7 +902,7 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 106 "Scanner.l"
+#line 118 "Scanner.l"
{
StringTokPtr ident = new StringTok;
ident->v = freeze_script_text;
@@ -886,7 +912,7 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 113 "Scanner.l"
+#line 125 "Scanner.l"
{
StringTokPtr str = parseString('"');
*yylvalp = str;
@@ -895,7 +921,7 @@ YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 119 "Scanner.l"
+#line 131 "Scanner.l"
{
StringTokPtr str = parseString('\'');
*yylvalp = str;
@@ -904,7 +930,7 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 125 "Scanner.l"
+#line 137 "Scanner.l"
{
IntegerTokPtr itp = new IntegerTok;
*yylvalp = itp;
@@ -921,7 +947,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 139 "Scanner.l"
+#line 151 "Scanner.l"
{
errno = 0;
FloatingTokPtr ftp = new FloatingTok;
@@ -953,7 +979,7 @@ YY_RULE_SETUP
case 8:
/* rule 8 can match eol */
YY_RULE_SETUP
-#line 167 "Scanner.l"
+#line 179 "Scanner.l"
{
// Igore white-space
@@ -965,97 +991,97 @@ YY_RULE_SETUP
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 176 "Scanner.l"
+#line 188 "Scanner.l"
return TOK_LESS_THAN;
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 177 "Scanner.l"
+#line 189 "Scanner.l"
return TOK_GREATER_THAN;
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 178 "Scanner.l"
+#line 190 "Scanner.l"
return TOK_LESS_EQUAL;
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 179 "Scanner.l"
+#line 191 "Scanner.l"
return TOK_GREATER_EQUAL;
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 180 "Scanner.l"
+#line 192 "Scanner.l"
return TOK_EQUAL;
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 181 "Scanner.l"
+#line 193 "Scanner.l"
return TOK_NEQ;
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 182 "Scanner.l"
+#line 194 "Scanner.l"
return TOK_ADD;
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 183 "Scanner.l"
+#line 195 "Scanner.l"
return TOK_SUB;
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 184 "Scanner.l"
+#line 196 "Scanner.l"
return TOK_MUL;
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 185 "Scanner.l"
+#line 197 "Scanner.l"
return TOK_DIV;
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 186 "Scanner.l"
+#line 198 "Scanner.l"
return TOK_MOD;
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 187 "Scanner.l"
+#line 199 "Scanner.l"
return TOK_LPAREN;
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 188 "Scanner.l"
+#line 200 "Scanner.l"
return TOK_RPAREN;
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 189 "Scanner.l"
+#line 201 "Scanner.l"
return TOK_LBRACKET;
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 190 "Scanner.l"
+#line 202 "Scanner.l"
return TOK_RBRACKET;
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 191 "Scanner.l"
+#line 203 "Scanner.l"
return TOK_SCOPE_DELIMITER;
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 193 "Scanner.l"
+#line 205 "Scanner.l"
{
return freeze_script_text[0];
}
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 197 "Scanner.l"
+#line 209 "Scanner.l"
ECHO;
YY_BREAK
-#line 1057 "lex.yy.c"
+#line 1083 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1810,8 +1836,8 @@ YY_BUFFER_STATE freeze_script__scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to freeze_script_lex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
@@ -2050,7 +2076,7 @@ void freeze_script_free (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 197 "Scanner.l"
+#line 209 "Scanner.l"
diff --git a/cpp/src/FreezeScript/Scanner.l b/cpp/src/FreezeScript/Scanner.l
index a78144547c8..81974e656b5 100644
--- a/cpp/src/FreezeScript/Scanner.l
+++ b/cpp/src/FreezeScript/Scanner.l
@@ -9,7 +9,6 @@
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <FreezeScript/GrammarUtil.h> // Before Grammar.h, so that YYSTYPE is defined
#include <FreezeScript/Grammar.h>
#include <IceUtil/InputUtil.h>
@@ -21,12 +20,25 @@
#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
+#ifdef _MSC_VER
+# ifdef freeze_script_wrap
+# undef freeze_script_wrap
+# define freeze_script_wrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
using namespace std;
using namespace FreezeScript;
diff --git a/cpp/src/IceGrid/Scanner.cpp b/cpp/src/IceGrid/Scanner.cpp
index 379cb9e8788..3c7df338064 100644
--- a/cpp/src/IceGrid/Scanner.cpp
+++ b/cpp/src/IceGrid/Scanner.cpp
@@ -55,7 +55,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -86,6 +85,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -142,7 +143,15 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -470,13 +479,17 @@ char *yytext;
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <Ice/Ice.h>
#include <IceGrid/Parser.h>
#include <IceGrid/Grammar.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
//
@@ -487,6 +500,14 @@ using namespace std;
using namespace Ice;
using namespace IceGrid;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
namespace IceGrid
@@ -502,7 +523,7 @@ std::string parseSingleQuotedString();
}
#define YY_USER_INIT initScanner();
-#line 504 "lex.yy.c"
+#line 525 "lex.yy.c"
#define INITIAL 0
@@ -583,7 +604,12 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -602,7 +628,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -684,10 +710,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 53 "Scanner.l"
+#line 65 "Scanner.l"
-#line 689 "lex.yy.c"
+#line 715 "lex.yy.c"
if ( !(yy_init) )
{
@@ -772,7 +798,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 55 "Scanner.l"
+#line 67 "Scanner.l"
{
// C++-style comment
int c;
@@ -785,7 +811,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 65 "Scanner.l"
+#line 77 "Scanner.l"
{
// C-style comment
while(true)
@@ -814,7 +840,7 @@ YY_RULE_SETUP
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
-#line 90 "Scanner.l"
+#line 102 "Scanner.l"
{
size_t len = strlen(yytext);
for(size_t i = 0; i < len; ++i)
@@ -829,14 +855,14 @@ YY_RULE_SETUP
case 4:
/* rule 4 can match eol */
YY_RULE_SETUP
-#line 101 "Scanner.l"
+#line 113 "Scanner.l"
{
return ';';
}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 105 "Scanner.l"
+#line 117 "Scanner.l"
{
// "..."-type strings
string s = parseDoubleQuotedString();
@@ -847,7 +873,7 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 113 "Scanner.l"
+#line 125 "Scanner.l"
{
// '...'-type strings
string s;
@@ -875,7 +901,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 138 "Scanner.l"
+#line 150 "Scanner.l"
{
// Simple strings
string s;
@@ -914,10 +940,10 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 174 "Scanner.l"
+#line 186 "Scanner.l"
ECHO;
YY_BREAK
-#line 919 "lex.yy.c"
+#line 945 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1671,8 +1697,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
@@ -1911,7 +1937,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 174 "Scanner.l"
+#line 186 "Scanner.l"
diff --git a/cpp/src/IceGrid/Scanner.l b/cpp/src/IceGrid/Scanner.l
index 2a4b2986649..200b4f7598d 100644
--- a/cpp/src/IceGrid/Scanner.l
+++ b/cpp/src/IceGrid/Scanner.l
@@ -9,13 +9,17 @@
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <Ice/Ice.h>
#include <IceGrid/Parser.h>
#include <IceGrid/Grammar.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
//
@@ -26,6 +30,14 @@ using namespace std;
using namespace Ice;
using namespace IceGrid;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
namespace IceGrid
diff --git a/cpp/src/IceStorm/Scanner.cpp b/cpp/src/IceStorm/Scanner.cpp
index 1fdc0e03d4b..c1aaeef67a2 100644
--- a/cpp/src/IceStorm/Scanner.cpp
+++ b/cpp/src/IceStorm/Scanner.cpp
@@ -55,7 +55,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -86,6 +85,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -142,7 +143,15 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -470,7 +479,6 @@ char *yytext;
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <Ice/Ice.h>
#include <IceStorm/Parser.h>
#include <IceStorm/Grammar.h>
@@ -492,13 +500,16 @@ using namespace std;
using namespace Ice;
using namespace IceStorm;
-#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
-
#ifdef _MSC_VER
-# undef yywrap
-# define yywrap() 1
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
#endif
+#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
+
namespace IceStorm
{
@@ -510,7 +521,7 @@ void initScanner();
}
#define YY_USER_INIT initScanner();
-#line 512 "lex.yy.c"
+#line 523 "lex.yy.c"
#define INITIAL 0
@@ -591,7 +602,12 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -610,7 +626,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -692,10 +708,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 61 "Scanner.l"
+#line 63 "Scanner.l"
-#line 697 "lex.yy.c"
+#line 713 "lex.yy.c"
if ( !(yy_init) )
{
@@ -780,7 +796,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 63 "Scanner.l"
+#line 65 "Scanner.l"
{
// C++-style comment
int c;
@@ -793,7 +809,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 73 "Scanner.l"
+#line 75 "Scanner.l"
{
// C-style comment
while(true)
@@ -822,7 +838,7 @@ YY_RULE_SETUP
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
-#line 98 "Scanner.l"
+#line 100 "Scanner.l"
{
size_t len = strlen(yytext);
for(size_t i = 0; i < len; ++i)
@@ -837,14 +853,14 @@ YY_RULE_SETUP
case 4:
/* rule 4 can match eol */
YY_RULE_SETUP
-#line 109 "Scanner.l"
+#line 111 "Scanner.l"
{
return ';';
}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 113 "Scanner.l"
+#line 115 "Scanner.l"
{
// "..."-type strings
string s;
@@ -921,7 +937,7 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 187 "Scanner.l"
+#line 189 "Scanner.l"
{
// '...'-type strings
string s;
@@ -949,7 +965,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 212 "Scanner.l"
+#line 214 "Scanner.l"
{
// Simple strings
string s;
@@ -979,10 +995,10 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 239 "Scanner.l"
+#line 241 "Scanner.l"
ECHO;
YY_BREAK
-#line 984 "lex.yy.c"
+#line 1000 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1736,8 +1752,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
@@ -1976,7 +1992,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 239 "Scanner.l"
+#line 241 "Scanner.l"
diff --git a/cpp/src/IceStorm/Scanner.l b/cpp/src/IceStorm/Scanner.l
index 31f33b0396f..4051c044020 100644
--- a/cpp/src/IceStorm/Scanner.l
+++ b/cpp/src/IceStorm/Scanner.l
@@ -9,7 +9,6 @@
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <Ice/Ice.h>
#include <IceStorm/Parser.h>
#include <IceStorm/Grammar.h>
@@ -31,6 +30,14 @@ using namespace std;
using namespace Ice;
using namespace IceStorm;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
namespace IceStorm
diff --git a/cpp/src/Slice/Grammar.cpp b/cpp/src/Slice/Grammar.cpp
index 5f241254f07..842a30745e7 100644
--- a/cpp/src/Slice/Grammar.cpp
+++ b/cpp/src/Slice/Grammar.cpp
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 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
@@ -46,7 +45,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -123,7 +122,7 @@ slice_error(const char* s)
/* Line 189 of yacc.c */
-#line 127 "Grammar.tab.c"
+#line 126 "Grammar.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -209,7 +208,7 @@ typedef int YYSTYPE;
/* Line 264 of yacc.c */
-#line 213 "Grammar.tab.c"
+#line 212 "Grammar.tab.c"
#ifdef short
# undef short
@@ -259,7 +258,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -1026,9 +1025,18 @@ static const yytype_uint8 yystos[] =
/* 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. */
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -1085,7 +1093,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -1823,7 +1831,7 @@ yyreduce:
{
case 2:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 108 "../Slice/Grammar.y"
{
;}
@@ -1831,7 +1839,7 @@ yyreduce:
case 3:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 116 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (3)]);
@@ -1840,7 +1848,7 @@ yyreduce:
case 4:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 125 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (3)]);
@@ -1849,7 +1857,7 @@ yyreduce:
case 5:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 129 "../Slice/Grammar.y"
{
(yyval) = new StringListTok;
@@ -1858,7 +1866,7 @@ yyreduce:
case 6:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 138 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -1871,7 +1879,7 @@ yyreduce:
case 8:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 147 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -1885,7 +1893,7 @@ yyreduce:
case 10:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 157 "../Slice/Grammar.y"
{
yyerrok;
@@ -1894,7 +1902,7 @@ yyreduce:
case 12:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 162 "../Slice/Grammar.y"
{
unit->error("`;' missing after definition");
@@ -1903,7 +1911,7 @@ yyreduce:
case 13:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 166 "../Slice/Grammar.y"
{
;}
@@ -1911,7 +1919,7 @@ yyreduce:
case 14:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 174 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ModulePtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -1920,7 +1928,7 @@ yyreduce:
case 15:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 178 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ClassDeclPtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -1929,7 +1937,7 @@ yyreduce:
case 16:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 182 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ClassDefPtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -1938,7 +1946,7 @@ yyreduce:
case 17:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 186 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ClassDeclPtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -1947,7 +1955,7 @@ yyreduce:
case 18:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 190 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ClassDefPtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -1956,7 +1964,7 @@ yyreduce:
case 19:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 194 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0);
@@ -1965,7 +1973,7 @@ yyreduce:
case 20:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 198 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ExceptionPtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -1974,7 +1982,7 @@ yyreduce:
case 21:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 202 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0);
@@ -1983,7 +1991,7 @@ yyreduce:
case 22:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 206 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || StructPtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -1992,7 +2000,7 @@ yyreduce:
case 23:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 210 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || SequencePtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -2001,7 +2009,7 @@ yyreduce:
case 24:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 214 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || DictionaryPtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -2010,7 +2018,7 @@ yyreduce:
case 25:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 218 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || EnumPtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -2019,7 +2027,7 @@ yyreduce:
case 26:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 222 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ConstPtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -2028,7 +2036,7 @@ yyreduce:
case 27:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 231 "../Slice/Grammar.y"
{
unit->setSeenDefinition();
@@ -2050,7 +2058,7 @@ yyreduce:
case 28:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 248 "../Slice/Grammar.y"
{
if((yyvsp[(3) - (6)]))
@@ -2067,7 +2075,7 @@ yyreduce:
case 29:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 265 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -2076,7 +2084,7 @@ yyreduce:
case 30:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 269 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -2087,7 +2095,7 @@ yyreduce:
case 31:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 280 "../Slice/Grammar.y"
{
unit->error("exceptions cannot be forward declared");
@@ -2097,7 +2105,7 @@ yyreduce:
case 32:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 290 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -2116,7 +2124,7 @@ yyreduce:
case 33:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 304 "../Slice/Grammar.y"
{
if((yyvsp[(4) - (7)]))
@@ -2129,7 +2137,7 @@ yyreduce:
case 34:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 317 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -2142,7 +2150,7 @@ yyreduce:
case 35:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 325 "../Slice/Grammar.y"
{
(yyval) = 0;
@@ -2151,7 +2159,7 @@ yyreduce:
case 36:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 334 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)]));
@@ -2165,7 +2173,7 @@ yyreduce:
case 37:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 343 "../Slice/Grammar.y"
{
;}
@@ -2173,7 +2181,7 @@ yyreduce:
case 38:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 346 "../Slice/Grammar.y"
{
unit->error("`;' missing after definition");
@@ -2182,7 +2190,7 @@ yyreduce:
case 39:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 350 "../Slice/Grammar.y"
{
;}
@@ -2190,7 +2198,7 @@ yyreduce:
case 40:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 358 "../Slice/Grammar.y"
{
TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -2203,7 +2211,7 @@ yyreduce:
case 41:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 371 "../Slice/Grammar.y"
{
IntegerTokPtr i = IntegerTokPtr::dynamicCast((yyvsp[(2) - (3)]));
@@ -2228,7 +2236,7 @@ yyreduce:
case 42:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 391 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (3)]));
@@ -2303,7 +2311,7 @@ yyreduce:
case 43:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 461 "../Slice/Grammar.y"
{
unit->error("missing tag for optional");
@@ -2316,7 +2324,7 @@ yyreduce:
case 44:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 469 "../Slice/Grammar.y"
{
unit->error("missing tag for optional");
@@ -2329,7 +2337,7 @@ yyreduce:
case 45:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 482 "../Slice/Grammar.y"
{
OptionalDefTokPtr m = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -2342,7 +2350,7 @@ yyreduce:
case 46:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 490 "../Slice/Grammar.y"
{
TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -2357,7 +2365,7 @@ yyreduce:
case 48:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 511 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -2366,7 +2374,7 @@ yyreduce:
case 49:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 515 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -2377,7 +2385,7 @@ yyreduce:
case 50:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 526 "../Slice/Grammar.y"
{
unit->error("structs cannot be forward declared");
@@ -2387,7 +2395,7 @@ yyreduce:
case 51:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 536 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -2405,7 +2413,7 @@ yyreduce:
case 52:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 549 "../Slice/Grammar.y"
{
if((yyvsp[(3) - (6)]))
@@ -2428,7 +2436,7 @@ yyreduce:
case 53:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 572 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)]));
@@ -2442,7 +2450,7 @@ yyreduce:
case 54:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 581 "../Slice/Grammar.y"
{
;}
@@ -2450,7 +2458,7 @@ yyreduce:
case 55:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 584 "../Slice/Grammar.y"
{
unit->error("`;' missing after definition");
@@ -2459,7 +2467,7 @@ yyreduce:
case 56:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 588 "../Slice/Grammar.y"
{
;}
@@ -2467,7 +2475,7 @@ yyreduce:
case 58:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 602 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -2476,7 +2484,7 @@ yyreduce:
case 59:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 606 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -2487,7 +2495,7 @@ yyreduce:
case 60:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 617 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -2500,7 +2508,7 @@ yyreduce:
case 61:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 630 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (4)]));
@@ -2528,7 +2536,7 @@ yyreduce:
case 62:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 653 "../Slice/Grammar.y"
{
if((yyvsp[(5) - (8)]))
@@ -2545,7 +2553,7 @@ yyreduce:
case 63:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 670 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -2584,7 +2592,7 @@ yyreduce:
case 64:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 704 "../Slice/Grammar.y"
{
(yyval) = 0;
@@ -2593,7 +2601,7 @@ yyreduce:
case 65:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 713 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -2602,7 +2610,7 @@ yyreduce:
case 66:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 717 "../Slice/Grammar.y"
{
(yyval) = new ClassListTok;
@@ -2611,7 +2619,7 @@ yyreduce:
case 67:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 726 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)]));
@@ -2625,7 +2633,7 @@ yyreduce:
case 68:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 735 "../Slice/Grammar.y"
{
;}
@@ -2633,7 +2641,7 @@ yyreduce:
case 69:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 738 "../Slice/Grammar.y"
{
unit->error("`;' missing after definition");
@@ -2642,7 +2650,7 @@ yyreduce:
case 70:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 742 "../Slice/Grammar.y"
{
;}
@@ -2650,7 +2658,7 @@ yyreduce:
case 71:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 750 "../Slice/Grammar.y"
{
OptionalDefTokPtr def = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -2677,7 +2685,7 @@ yyreduce:
case 72:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 772 "../Slice/Grammar.y"
{
OptionalDefTokPtr def = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -2709,7 +2717,7 @@ yyreduce:
case 73:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 799 "../Slice/Grammar.y"
{
TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -2736,7 +2744,7 @@ yyreduce:
case 74:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 821 "../Slice/Grammar.y"
{
TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -2762,7 +2770,7 @@ yyreduce:
case 75:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 847 "../Slice/Grammar.y"
{
TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -2776,7 +2784,7 @@ yyreduce:
case 76:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 856 "../Slice/Grammar.y"
{
TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -2792,7 +2800,7 @@ yyreduce:
case 77:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 867 "../Slice/Grammar.y"
{
TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -2806,7 +2814,7 @@ yyreduce:
case 78:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 876 "../Slice/Grammar.y"
{
TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(2) - (4)]));
@@ -2820,7 +2828,7 @@ yyreduce:
case 79:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 885 "../Slice/Grammar.y"
{
TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -2835,7 +2843,7 @@ yyreduce:
case 80:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 895 "../Slice/Grammar.y"
{
TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -2849,7 +2857,7 @@ yyreduce:
case 81:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 909 "../Slice/Grammar.y"
{
OptionalDefTokPtr m = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -2860,7 +2868,7 @@ yyreduce:
case 82:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 915 "../Slice/Grammar.y"
{
OptionalDefTokPtr m = new OptionalDefTok();
@@ -2873,7 +2881,7 @@ yyreduce:
case 83:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 923 "../Slice/Grammar.y"
{
OptionalDefTokPtr m = new OptionalDefTok;
@@ -2885,7 +2893,7 @@ yyreduce:
case 84:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 935 "../Slice/Grammar.y"
{
OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -2914,7 +2922,7 @@ yyreduce:
case 85:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 959 "../Slice/Grammar.y"
{
OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(2) - (3)]));
@@ -2944,7 +2952,7 @@ yyreduce:
case 86:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 984 "../Slice/Grammar.y"
{
OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -2973,7 +2981,7 @@ yyreduce:
case 87:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1008 "../Slice/Grammar.y"
{
OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(2) - (3)]));
@@ -3003,7 +3011,7 @@ yyreduce:
case 88:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1038 "../Slice/Grammar.y"
{
if((yyvsp[(1) - (3)]))
@@ -3020,7 +3028,7 @@ yyreduce:
case 89:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1050 "../Slice/Grammar.y"
{
OperationPtr op = OperationPtr::dynamicCast((yyvsp[(4) - (5)]));
@@ -3035,7 +3043,7 @@ yyreduce:
case 90:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1060 "../Slice/Grammar.y"
{
if((yyvsp[(1) - (3)]))
@@ -3048,7 +3056,7 @@ yyreduce:
case 91:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1068 "../Slice/Grammar.y"
{
OperationPtr op = OperationPtr::dynamicCast((yyvsp[(4) - (5)]));
@@ -3063,7 +3071,7 @@ yyreduce:
case 94:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1090 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -3072,7 +3080,7 @@ yyreduce:
case 95:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1094 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -3083,7 +3091,7 @@ yyreduce:
case 96:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1105 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -3097,7 +3105,7 @@ yyreduce:
case 97:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1119 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -3120,7 +3128,7 @@ yyreduce:
case 98:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1137 "../Slice/Grammar.y"
{
if((yyvsp[(4) - (7)]))
@@ -3137,7 +3145,7 @@ yyreduce:
case 99:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1154 "../Slice/Grammar.y"
{
ClassListTokPtr intfs = ClassListTokPtr::dynamicCast((yyvsp[(3) - (3)]));
@@ -3177,7 +3185,7 @@ yyreduce:
case 100:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1189 "../Slice/Grammar.y"
{
ClassListTokPtr intfs = new ClassListTok;
@@ -3217,7 +3225,7 @@ yyreduce:
case 101:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1224 "../Slice/Grammar.y"
{
unit->error("illegal inheritance from type Object");
@@ -3227,7 +3235,7 @@ yyreduce:
case 102:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1234 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -3236,7 +3244,7 @@ yyreduce:
case 103:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1238 "../Slice/Grammar.y"
{
(yyval) = new ClassListTok;
@@ -3245,7 +3253,7 @@ yyreduce:
case 104:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1247 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)]));
@@ -3259,7 +3267,7 @@ yyreduce:
case 105:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1256 "../Slice/Grammar.y"
{
;}
@@ -3267,7 +3275,7 @@ yyreduce:
case 106:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1259 "../Slice/Grammar.y"
{
unit->error("`;' missing after definition");
@@ -3276,7 +3284,7 @@ yyreduce:
case 107:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1263 "../Slice/Grammar.y"
{
;}
@@ -3284,7 +3292,7 @@ yyreduce:
case 109:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1277 "../Slice/Grammar.y"
{
ExceptionPtr exception = ExceptionPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -3296,7 +3304,7 @@ yyreduce:
case 110:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1284 "../Slice/Grammar.y"
{
ExceptionPtr exception = ExceptionPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -3308,7 +3316,7 @@ yyreduce:
case 111:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1296 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -3325,7 +3333,7 @@ yyreduce:
case 112:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1308 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -3336,7 +3344,7 @@ yyreduce:
case 113:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1319 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (7)]));
@@ -3350,7 +3358,7 @@ yyreduce:
case 114:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1328 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (7)]));
@@ -3365,7 +3373,7 @@ yyreduce:
case 115:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1343 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (10)]));
@@ -3381,7 +3389,7 @@ yyreduce:
case 116:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1354 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (10)]));
@@ -3398,7 +3406,7 @@ yyreduce:
case 117:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1371 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -3407,7 +3415,7 @@ yyreduce:
case 118:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1375 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -3418,7 +3426,7 @@ yyreduce:
case 119:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1386 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -3432,7 +3440,7 @@ yyreduce:
case 120:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1395 "../Slice/Grammar.y"
{
EnumPtr en = EnumPtr::dynamicCast((yyvsp[(3) - (6)]));
@@ -3451,7 +3459,7 @@ yyreduce:
case 121:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1410 "../Slice/Grammar.y"
{
unit->error("missing enumeration name");
@@ -3466,7 +3474,7 @@ yyreduce:
case 122:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1425 "../Slice/Grammar.y"
{
EnumeratorListTokPtr ens = EnumeratorListTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -3477,7 +3485,7 @@ yyreduce:
case 123:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1431 "../Slice/Grammar.y"
{
;}
@@ -3485,7 +3493,7 @@ yyreduce:
case 124:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1439 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -3502,7 +3510,7 @@ yyreduce:
case 125:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1451 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -3514,7 +3522,7 @@ yyreduce:
case 126:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1458 "../Slice/Grammar.y"
{
EnumeratorListTokPtr ens = new EnumeratorListTok;
@@ -3524,7 +3532,7 @@ yyreduce:
case 127:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1468 "../Slice/Grammar.y"
{
BoolTokPtr out = new BoolTok;
@@ -3535,7 +3543,7 @@ yyreduce:
case 128:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1474 "../Slice/Grammar.y"
{
BoolTokPtr out = new BoolTok;
@@ -3546,7 +3554,7 @@ yyreduce:
case 129:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1485 "../Slice/Grammar.y"
{
;}
@@ -3554,7 +3562,7 @@ yyreduce:
case 130:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1488 "../Slice/Grammar.y"
{
BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -3575,7 +3583,7 @@ yyreduce:
case 131:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1504 "../Slice/Grammar.y"
{
BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (5)]));
@@ -3596,7 +3604,7 @@ yyreduce:
case 132:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1520 "../Slice/Grammar.y"
{
BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (4)]));
@@ -3613,7 +3621,7 @@ yyreduce:
case 133:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1532 "../Slice/Grammar.y"
{
BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (6)]));
@@ -3630,7 +3638,7 @@ yyreduce:
case 134:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1544 "../Slice/Grammar.y"
{
BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -3646,7 +3654,7 @@ yyreduce:
case 135:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1555 "../Slice/Grammar.y"
{
BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (5)]));
@@ -3662,7 +3670,7 @@ yyreduce:
case 136:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1571 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -3671,7 +3679,7 @@ yyreduce:
case 137:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1575 "../Slice/Grammar.y"
{
(yyval) = new ExceptionListTok;
@@ -3680,7 +3688,7 @@ yyreduce:
case 138:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1584 "../Slice/Grammar.y"
{
;}
@@ -3688,7 +3696,7 @@ yyreduce:
case 139:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1587 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -3699,7 +3707,7 @@ yyreduce:
case 140:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1593 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -3712,7 +3720,7 @@ yyreduce:
case 141:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1606 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindByte);
@@ -3721,7 +3729,7 @@ yyreduce:
case 142:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1610 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindBool);
@@ -3730,7 +3738,7 @@ yyreduce:
case 143:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1614 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindShort);
@@ -3739,7 +3747,7 @@ yyreduce:
case 144:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1618 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindInt);
@@ -3748,7 +3756,7 @@ yyreduce:
case 145:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1622 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindLong);
@@ -3757,7 +3765,7 @@ yyreduce:
case 146:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1626 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindFloat);
@@ -3766,7 +3774,7 @@ yyreduce:
case 147:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1630 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindDouble);
@@ -3775,7 +3783,7 @@ yyreduce:
case 148:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1634 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindString);
@@ -3784,7 +3792,7 @@ yyreduce:
case 149:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1638 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindObject);
@@ -3793,7 +3801,7 @@ yyreduce:
case 150:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1642 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindObjectProxy);
@@ -3802,7 +3810,7 @@ yyreduce:
case 151:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1646 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindLocalObject);
@@ -3811,7 +3819,7 @@ yyreduce:
case 152:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1650 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -3835,7 +3843,7 @@ yyreduce:
case 153:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1669 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -3876,7 +3884,7 @@ yyreduce:
case 154:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1710 "../Slice/Grammar.y"
{
StringTokPtr str1 = StringTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -3887,7 +3895,7 @@ yyreduce:
case 155:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1716 "../Slice/Grammar.y"
{
;}
@@ -3895,7 +3903,7 @@ yyreduce:
case 156:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1724 "../Slice/Grammar.y"
{
StringTokPtr str = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]));
@@ -3907,7 +3915,7 @@ yyreduce:
case 157:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1731 "../Slice/Grammar.y"
{
StringTokPtr str = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -3919,7 +3927,7 @@ yyreduce:
case 158:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1743 "../Slice/Grammar.y"
{
BoolTokPtr local = new BoolTok;
@@ -3930,7 +3938,7 @@ yyreduce:
case 159:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1749 "../Slice/Grammar.y"
{
BoolTokPtr local = new BoolTok;
@@ -3941,7 +3949,7 @@ yyreduce:
case 160:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1760 "../Slice/Grammar.y"
{
BuiltinPtr type = unit->builtin(Builtin::KindLong);
@@ -3959,7 +3967,7 @@ yyreduce:
case 161:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1773 "../Slice/Grammar.y"
{
BuiltinPtr type = unit->builtin(Builtin::KindDouble);
@@ -3977,7 +3985,7 @@ yyreduce:
case 162:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1786 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -4028,7 +4036,7 @@ yyreduce:
case 163:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1832 "../Slice/Grammar.y"
{
BuiltinPtr type = unit->builtin(Builtin::KindString);
@@ -4044,7 +4052,7 @@ yyreduce:
case 164:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1843 "../Slice/Grammar.y"
{
BuiltinPtr type = unit->builtin(Builtin::KindBool);
@@ -4060,7 +4068,7 @@ yyreduce:
case 165:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1854 "../Slice/Grammar.y"
{
BuiltinPtr type = unit->builtin(Builtin::KindBool);
@@ -4076,7 +4084,7 @@ yyreduce:
case 166:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1870 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(2) - (6)]));
@@ -4090,7 +4098,7 @@ yyreduce:
case 167:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1879 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(2) - (5)]));
@@ -4104,7 +4112,7 @@ yyreduce:
case 168:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1893 "../Slice/Grammar.y"
{
;}
@@ -4112,7 +4120,7 @@ yyreduce:
case 169:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1896 "../Slice/Grammar.y"
{
;}
@@ -4120,7 +4128,7 @@ yyreduce:
case 170:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1899 "../Slice/Grammar.y"
{
;}
@@ -4128,7 +4136,7 @@ yyreduce:
case 171:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1902 "../Slice/Grammar.y"
{
;}
@@ -4136,7 +4144,7 @@ yyreduce:
case 172:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1905 "../Slice/Grammar.y"
{
;}
@@ -4144,7 +4152,7 @@ yyreduce:
case 173:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1908 "../Slice/Grammar.y"
{
;}
@@ -4152,7 +4160,7 @@ yyreduce:
case 174:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1911 "../Slice/Grammar.y"
{
;}
@@ -4160,7 +4168,7 @@ yyreduce:
case 175:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1914 "../Slice/Grammar.y"
{
;}
@@ -4168,7 +4176,7 @@ yyreduce:
case 176:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1917 "../Slice/Grammar.y"
{
;}
@@ -4176,7 +4184,7 @@ yyreduce:
case 177:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1920 "../Slice/Grammar.y"
{
;}
@@ -4184,7 +4192,7 @@ yyreduce:
case 178:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1923 "../Slice/Grammar.y"
{
;}
@@ -4192,7 +4200,7 @@ yyreduce:
case 179:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1926 "../Slice/Grammar.y"
{
;}
@@ -4200,7 +4208,7 @@ yyreduce:
case 180:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1929 "../Slice/Grammar.y"
{
;}
@@ -4208,7 +4216,7 @@ yyreduce:
case 181:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1932 "../Slice/Grammar.y"
{
;}
@@ -4216,7 +4224,7 @@ yyreduce:
case 182:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1935 "../Slice/Grammar.y"
{
;}
@@ -4224,7 +4232,7 @@ yyreduce:
case 183:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1938 "../Slice/Grammar.y"
{
;}
@@ -4232,7 +4240,7 @@ yyreduce:
case 184:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1941 "../Slice/Grammar.y"
{
;}
@@ -4240,7 +4248,7 @@ yyreduce:
case 185:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1944 "../Slice/Grammar.y"
{
;}
@@ -4248,7 +4256,7 @@ yyreduce:
case 186:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1947 "../Slice/Grammar.y"
{
;}
@@ -4256,7 +4264,7 @@ yyreduce:
case 187:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1950 "../Slice/Grammar.y"
{
;}
@@ -4264,7 +4272,7 @@ yyreduce:
case 188:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1953 "../Slice/Grammar.y"
{
;}
@@ -4272,7 +4280,7 @@ yyreduce:
case 189:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1956 "../Slice/Grammar.y"
{
;}
@@ -4280,7 +4288,7 @@ yyreduce:
case 190:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1959 "../Slice/Grammar.y"
{
;}
@@ -4288,7 +4296,7 @@ yyreduce:
case 191:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1962 "../Slice/Grammar.y"
{
;}
@@ -4296,7 +4304,7 @@ yyreduce:
case 192:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1965 "../Slice/Grammar.y"
{
;}
@@ -4304,7 +4312,7 @@ yyreduce:
case 193:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1968 "../Slice/Grammar.y"
{
;}
@@ -4312,7 +4320,7 @@ yyreduce:
case 194:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1971 "../Slice/Grammar.y"
{
;}
@@ -4320,7 +4328,7 @@ yyreduce:
case 195:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1974 "../Slice/Grammar.y"
{
;}
@@ -4328,7 +4336,7 @@ yyreduce:
case 196:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1977 "../Slice/Grammar.y"
{
;}
@@ -4336,8 +4344,8 @@ yyreduce:
-/* Line 1455 of yacc.c */
-#line 4341 "Grammar.tab.c"
+/* Line 1464 of yacc.c */
+#line 4349 "Grammar.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -4548,7 +4556,7 @@ yyreturn:
-/* Line 1675 of yacc.c */
+/* Line 1684 of yacc.c */
#line 1981 "../Slice/Grammar.y"
diff --git a/cpp/src/Slice/Grammar.h b/cpp/src/Slice/Grammar.h
index 0ee3d141315..4bae650f0c4 100644
--- a/cpp/src/Slice/Grammar.h
+++ b/cpp/src/Slice/Grammar.h
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton interface for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 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
diff --git a/cpp/src/Slice/Scanner.cpp b/cpp/src/Slice/Scanner.cpp
index 0b5d6f11a4c..f18e3165c68 100644
--- a/cpp/src/Slice/Scanner.cpp
+++ b/cpp/src/Slice/Scanner.cpp
@@ -75,7 +75,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -106,6 +105,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -162,7 +163,15 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -555,7 +564,6 @@ char *slice_text;
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <Slice/GrammarUtil.h> // Before Grammer.h, so that YYSTYPE is defined
#include <Slice/Grammar.h>
#include <IceUtil/InputUtil.h>
@@ -576,6 +584,14 @@ char *slice_text;
# pragma warning( 4 : 4244 )
#endif
+#ifdef _MSC_VER
+# ifdef slice_wrap
+# undef slice_wrap
+# define slice_wrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
using namespace std;
using namespace Slice;
@@ -597,7 +613,7 @@ int checkKeyword(string&);
-#line 599 "lex.yy.c"
+#line 615 "lex.yy.c"
#define INITIAL 0
#define BOMSCAN 1
@@ -680,7 +696,12 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -699,7 +720,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( slice_in )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -784,10 +805,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 68 "Scanner.l"
+#line 75 "Scanner.l"
-#line 789 "lex.yy.c"
+#line 810 "lex.yy.c"
if ( !(yy_init) )
{
@@ -872,7 +893,7 @@ case 1:
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up slice_text again */
YY_RULE_SETUP
-#line 70 "Scanner.l"
+#line 77 "Scanner.l"
{
if(unit->scanPosition(slice_text))
{
@@ -886,7 +907,7 @@ case 2:
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up slice_text again */
YY_RULE_SETUP
-#line 77 "Scanner.l"
+#line 84 "Scanner.l"
{
if(unit->scanPosition(slice_text))
{
@@ -899,7 +920,7 @@ case 3:
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up slice_text again */
YY_RULE_SETUP
-#line 84 "Scanner.l"
+#line 91 "Scanner.l"
{
if(unit->scanPosition(slice_text))
{
@@ -913,7 +934,7 @@ case 4:
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up slice_text again */
YY_RULE_SETUP
-#line 91 "Scanner.l"
+#line 98 "Scanner.l"
{
if(unit->scanPosition(slice_text))
{
@@ -923,7 +944,7 @@ YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 98 "Scanner.l"
+#line 105 "Scanner.l"
{
// C++-style comment
BEGIN(MAINSCAN);
@@ -941,7 +962,7 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 113 "Scanner.l"
+#line 120 "Scanner.l"
{
// C-style comment
BEGIN(MAINSCAN);
@@ -985,7 +1006,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 154 "Scanner.l"
+#line 161 "Scanner.l"
{
BEGIN(MAINSCAN);
return ICE_SCOPE_DELIMITER;
@@ -993,7 +1014,7 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 159 "Scanner.l"
+#line 166 "Scanner.l"
{
BEGIN(MAINSCAN);
return ICE_METADATA_OPEN;
@@ -1001,7 +1022,7 @@ YY_RULE_SETUP
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 164 "Scanner.l"
+#line 171 "Scanner.l"
{
BEGIN(MAINSCAN);
return ICE_METADATA_CLOSE;
@@ -1009,7 +1030,7 @@ YY_RULE_SETUP
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 169 "Scanner.l"
+#line 176 "Scanner.l"
{
BEGIN(MAINSCAN);
return ICE_GLOBAL_METADATA_OPEN;
@@ -1017,7 +1038,7 @@ YY_RULE_SETUP
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 174 "Scanner.l"
+#line 181 "Scanner.l"
{
BEGIN(MAINSCAN);
return ICE_GLOBAL_METADATA_CLOSE;
@@ -1026,7 +1047,7 @@ YY_RULE_SETUP
case 12:
/* rule 12 can match eol */
YY_RULE_SETUP
-#line 179 "Scanner.l"
+#line 186 "Scanner.l"
{
BEGIN(MAINSCAN);
StringTokPtr ident = new StringTok;
@@ -1054,7 +1075,7 @@ YY_RULE_SETUP
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 204 "Scanner.l"
+#line 211 "Scanner.l"
{
BEGIN(MAINSCAN);
StringTokPtr ident = new StringTok;
@@ -1065,7 +1086,7 @@ YY_RULE_SETUP
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 212 "Scanner.l"
+#line 219 "Scanner.l"
{
BEGIN(MAINSCAN);
StringTokPtr str = new StringTok;
@@ -1229,7 +1250,7 @@ YY_RULE_SETUP
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 373 "Scanner.l"
+#line 380 "Scanner.l"
{
BEGIN(MAINSCAN);
IntegerTokPtr itp = new IntegerTok;
@@ -1248,7 +1269,7 @@ YY_RULE_SETUP
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 389 "Scanner.l"
+#line 396 "Scanner.l"
{
BEGIN(MAINSCAN);
errno = 0;
@@ -1282,7 +1303,7 @@ YY_RULE_SETUP
case 17:
/* rule 17 can match eol */
YY_RULE_SETUP
-#line 419 "Scanner.l"
+#line 426 "Scanner.l"
{
// Ignore white-space
@@ -1298,7 +1319,7 @@ YY_RULE_SETUP
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 432 "Scanner.l"
+#line 439 "Scanner.l"
{
// Ignore UTF-8 BOM, rule only active when parsing start of file.
@@ -1307,7 +1328,7 @@ YY_RULE_SETUP
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 438 "Scanner.l"
+#line 445 "Scanner.l"
{
BEGIN(MAINSCAN);
if(slice_text[0] < 32 || slice_text[0] > 126)
@@ -1326,10 +1347,10 @@ YY_RULE_SETUP
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 454 "Scanner.l"
+#line 461 "Scanner.l"
ECHO;
YY_BREAK
-#line 1331 "lex.yy.c"
+#line 1352 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(BOMSCAN):
case YY_STATE_EOF(MAINSCAN):
@@ -2089,8 +2110,8 @@ YY_BUFFER_STATE slice__scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to slice_lex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
@@ -2329,7 +2350,7 @@ void slice_free (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 454 "Scanner.l"
+#line 461 "Scanner.l"
diff --git a/cpp/src/Slice/Scanner.l b/cpp/src/Slice/Scanner.l
index fc130fe6c8d..2363abeb847 100644
--- a/cpp/src/Slice/Scanner.l
+++ b/cpp/src/Slice/Scanner.l
@@ -9,7 +9,6 @@
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <Slice/GrammarUtil.h> // Before Grammer.h, so that YYSTYPE is defined
#include <Slice/Grammar.h>
#include <IceUtil/InputUtil.h>
@@ -30,6 +29,14 @@
# pragma warning( 4 : 4244 )
#endif
+#ifdef _MSC_VER
+# ifdef slice_wrap
+# undef slice_wrap
+# define slice_wrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
using namespace std;
using namespace Slice;
diff --git a/cpp/test/Freeze/complex/Scanner.cpp b/cpp/test/Freeze/complex/Scanner.cpp
index bda3a878f1b..6f5b100bb2d 100644
--- a/cpp/test/Freeze/complex/Scanner.cpp
+++ b/cpp/test/Freeze/complex/Scanner.cpp
@@ -55,7 +55,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -86,6 +85,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -142,7 +143,15 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -465,7 +474,6 @@ char *yytext;
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <Ice/Ice.h>
#include <Parser.h>
#include <Grammar.h>
@@ -473,6 +481,11 @@ char *yytext;
#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
//
@@ -482,9 +495,17 @@ char *yytext;
using namespace std;
using namespace Ice;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
-#line 486 "lex.yy.c"
+#line 507 "lex.yy.c"
#define INITIAL 0
@@ -565,7 +586,12 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -584,7 +610,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -666,10 +692,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 40 "Scanner.l"
+#line 52 "Scanner.l"
-#line 671 "lex.yy.c"
+#line 697 "lex.yy.c"
if ( !(yy_init) )
{
@@ -750,7 +776,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 42 "Scanner.l"
+#line 54 "Scanner.l"
{
*yylvalp = new Complex::NumberNodeI(atoi(yytext));
return TOK_NUMBER;
@@ -758,20 +784,20 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 47 "Scanner.l"
+#line 59 "Scanner.l"
/* eat whitespace */
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 49 "Scanner.l"
+#line 61 "Scanner.l"
{ return *yytext; }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 51 "Scanner.l"
+#line 63 "Scanner.l"
ECHO;
YY_BREAK
-#line 773 "lex.yy.c"
+#line 799 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1526,8 +1552,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
@@ -1766,7 +1792,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 51 "Scanner.l"
+#line 63 "Scanner.l"
diff --git a/cpp/test/Freeze/complex/Scanner.l b/cpp/test/Freeze/complex/Scanner.l
index d6bbbbc033a..4b309f6a16f 100644
--- a/cpp/test/Freeze/complex/Scanner.l
+++ b/cpp/test/Freeze/complex/Scanner.l
@@ -9,7 +9,6 @@
//
// **********************************************************************
-#include <IceUtil/ScannerConfig.h>
#include <Ice/Ice.h>
#include <Parser.h>
#include <Grammar.h>
@@ -17,6 +16,11 @@
#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
//
@@ -26,6 +30,14 @@
using namespace std;
using namespace Ice;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
%}