summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2014-10-30 16:03:47 +0100
committerJose <jose@zeroc.com>2014-10-30 16:03:47 +0100
commitda8c267316512436ba19f28fa42510be305093f6 (patch)
tree935f3eefd77e909c847a44883fef38fce4bda48d
parentMerge branch 'master' of ssh://git/home/git/ice (diff)
downloadice-da8c267316512436ba19f28fa42510be305093f6.tar.bz2
ice-da8c267316512436ba19f28fa42510be305093f6.tar.xz
ice-da8c267316512436ba19f28fa42510be305093f6.zip
ICE-5804 - Warnings when building with GCC (Eliminate C style casts)
-rw-r--r--cpp/include/IceUtil/ScannerConfig.h8
-rw-r--r--cpp/include/IceUtil/Time.h2
-rw-r--r--cpp/src/FreezeScript/Grammar.cpp101
-rw-r--r--cpp/src/FreezeScript/Grammar.y7
-rw-r--r--cpp/src/FreezeScript/Scanner.cpp2253
-rw-r--r--cpp/src/Glacier2/Glacier2Router.cpp2
-rw-r--r--cpp/src/Ice/ConnectionI.cpp2
-rw-r--r--cpp/src/Ice/Instance.cpp2
-rw-r--r--cpp/src/Ice/Network.cpp28
-rw-r--r--cpp/src/Ice/OpaqueEndpointI.cpp2
-rw-r--r--cpp/src/Ice/PluginManagerI.cpp2
-rw-r--r--cpp/src/IceBox/Admin.cpp2
-rw-r--r--cpp/src/IceBox/ServiceManagerI.cpp2
-rw-r--r--cpp/src/IceGrid/Grammar.cpp391
-rw-r--r--cpp/src/IceGrid/Grammar.y7
-rw-r--r--cpp/src/IceGrid/IceGridRegistry.cpp2
-rw-r--r--cpp/src/IceGrid/ServerI.cpp5
-rw-r--r--cpp/src/IcePatch2/Client.cpp2
-rw-r--r--cpp/src/IcePatch2/Server.cpp2
-rw-r--r--cpp/src/IceSSL/Certificate.cpp4
-rw-r--r--cpp/src/IceSSL/RFC2253.cpp2
-rw-r--r--cpp/src/IceSSL/Util.cpp4
-rw-r--r--cpp/src/IceStorm/Admin.cpp2
-rw-r--r--cpp/src/IceStorm/Grammar.cpp83
-rw-r--r--cpp/src/IceStorm/Grammar.y7
-rw-r--r--cpp/src/IceStorm/Parser.cpp2
-rw-r--r--cpp/src/IceUtil/ConvertUTF.cpp5
-rw-r--r--cpp/src/IceUtil/ConvertUTF.h10
-rw-r--r--cpp/src/IceUtil/StringConverter.cpp4
-rw-r--r--cpp/src/IceUtil/StringUtil.cpp4
-rw-r--r--cpp/src/Slice/Grammar.cpp443
-rw-r--r--cpp/src/Slice/Grammar.y7
-rw-r--r--cpp/src/Slice/MD5I.cpp4
-rw-r--r--cpp/src/Slice/PythonUtil.cpp2
-rw-r--r--cpp/src/Slice/RubyUtil.cpp2
-rw-r--r--cpp/src/slice2cpp/Gen.cpp2
-rw-r--r--cpp/src/slice2cpp/Main.cpp2
-rw-r--r--cpp/src/slice2cs/Gen.cpp2
-rw-r--r--cpp/src/slice2cs/Main.cpp2
-rw-r--r--cpp/src/slice2freeze/Main.cpp2
-rw-r--r--cpp/src/slice2freezej/Main.cpp2
-rw-r--r--cpp/src/slice2html/Main.cpp2
-rw-r--r--cpp/src/slice2java/Gen.cpp2
-rw-r--r--cpp/src/slice2java/Main.cpp2
-rw-r--r--cpp/src/slice2js/Main.cpp2
-rw-r--r--cpp/src/slice2php/Main.cpp4
-rw-r--r--cpp/src/slice2py/Main.cpp2
-rw-r--r--cpp/src/slice2rb/Main.cpp2
48 files changed, 632 insertions, 2803 deletions
diff --git a/cpp/include/IceUtil/ScannerConfig.h b/cpp/include/IceUtil/ScannerConfig.h
index c1352fad827..8a5c86c8a85 100644
--- a/cpp/include/IceUtil/ScannerConfig.h
+++ b/cpp/include/IceUtil/ScannerConfig.h
@@ -33,4 +33,12 @@
# pragma clang diagnostic ignored "-Wdeprecated-register"
#endif
+
+//
+// Avoid old style cast warnings in generated scanners
+//
+#ifdef __GNUC__
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
+
#endif
diff --git a/cpp/include/IceUtil/Time.h b/cpp/include/IceUtil/Time.h
index 94975995214..e7d9c97afb6 100644
--- a/cpp/include/IceUtil/Time.h
+++ b/cpp/include/IceUtil/Time.h
@@ -114,7 +114,7 @@ public:
double operator/(const Time& rhs) const
{
- return (double)_usec / (double)rhs._usec;
+ return static_cast<double>(_usec) / static_cast<double>(rhs._usec);
}
Time& operator*=(int rhs)
diff --git a/cpp/src/FreezeScript/Grammar.cpp b/cpp/src/FreezeScript/Grammar.cpp
index d1e0c157ea5..93f2d55858b 100644
--- a/cpp/src/FreezeScript/Grammar.cpp
+++ b/cpp/src/FreezeScript/Grammar.cpp
@@ -76,7 +76,7 @@
/* Copy the first part of user declarations. */
/* Line 189 of yacc.c */
-#line 1 "Grammar.y"
+#line 1 "../FreezeScript/Grammar.y"
// **********************************************************************
@@ -98,6 +98,13 @@
# pragma warning( disable : 4065 )
#endif
+//
+// Avoid old style cast warnings in generated grammar
+//
+#ifdef __GNUC__
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
+
using namespace std;
using namespace FreezeScript;
@@ -120,7 +127,7 @@ freeze_script_error(const char* s)
/* Line 189 of yacc.c */
-#line 124 "Grammar.tab.c"
+#line 131 "Grammar.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -191,7 +198,7 @@ typedef int YYSTYPE;
/* Line 264 of yacc.c */
-#line 195 "Grammar.tab.c"
+#line 202 "Grammar.tab.c"
#ifdef short
# undef short
@@ -490,10 +497,10 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 84, 84, 93, 102, 106, 110, 114, 118, 122,
- 126, 130, 134, 138, 142, 146, 150, 154, 163, 167,
- 171, 175, 181, 187, 193, 197, 201, 205, 209, 218,
- 222, 233, 240, 249, 260, 273, 280, 287, 295, 304
+ 0, 91, 91, 100, 109, 113, 117, 121, 125, 129,
+ 133, 137, 141, 145, 149, 153, 157, 161, 170, 174,
+ 178, 182, 188, 194, 200, 204, 208, 212, 216, 225,
+ 229, 240, 247, 256, 267, 280, 287, 294, 302, 311
};
#endif
@@ -1444,7 +1451,7 @@ yyreduce:
case 2:
/* Line 1455 of yacc.c */
-#line 85 "Grammar.y"
+#line 92 "../FreezeScript/Grammar.y"
{
parseResult = (yyvsp[(1) - (1)]);
;}
@@ -1453,7 +1460,7 @@ yyreduce:
case 3:
/* Line 1455 of yacc.c */
-#line 94 "Grammar.y"
+#line 101 "../FreezeScript/Grammar.y"
{
(yyval) = (yyvsp[(1) - (1)]);
;}
@@ -1462,7 +1469,7 @@ yyreduce:
case 4:
/* Line 1455 of yacc.c */
-#line 103 "Grammar.y"
+#line 110 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpLess, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
;}
@@ -1471,7 +1478,7 @@ yyreduce:
case 5:
/* Line 1455 of yacc.c */
-#line 107 "Grammar.y"
+#line 114 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpGreater, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
;}
@@ -1480,7 +1487,7 @@ yyreduce:
case 6:
/* Line 1455 of yacc.c */
-#line 111 "Grammar.y"
+#line 118 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpLessEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
;}
@@ -1489,7 +1496,7 @@ yyreduce:
case 7:
/* Line 1455 of yacc.c */
-#line 115 "Grammar.y"
+#line 122 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpGrEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
;}
@@ -1498,7 +1505,7 @@ yyreduce:
case 8:
/* Line 1455 of yacc.c */
-#line 119 "Grammar.y"
+#line 126 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
;}
@@ -1507,7 +1514,7 @@ yyreduce:
case 9:
/* Line 1455 of yacc.c */
-#line 123 "Grammar.y"
+#line 130 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpNotEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
;}
@@ -1516,7 +1523,7 @@ yyreduce:
case 10:
/* Line 1455 of yacc.c */
-#line 127 "Grammar.y"
+#line 134 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpOr, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
;}
@@ -1525,7 +1532,7 @@ yyreduce:
case 11:
/* Line 1455 of yacc.c */
-#line 131 "Grammar.y"
+#line 138 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpAnd, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
;}
@@ -1534,7 +1541,7 @@ yyreduce:
case 12:
/* Line 1455 of yacc.c */
-#line 135 "Grammar.y"
+#line 142 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpMul, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
;}
@@ -1543,7 +1550,7 @@ yyreduce:
case 13:
/* Line 1455 of yacc.c */
-#line 139 "Grammar.y"
+#line 146 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpDiv, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
;}
@@ -1552,7 +1559,7 @@ yyreduce:
case 14:
/* Line 1455 of yacc.c */
-#line 143 "Grammar.y"
+#line 150 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpMod, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
;}
@@ -1561,7 +1568,7 @@ yyreduce:
case 15:
/* Line 1455 of yacc.c */
-#line 147 "Grammar.y"
+#line 154 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpAdd, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
;}
@@ -1570,7 +1577,7 @@ yyreduce:
case 16:
/* Line 1455 of yacc.c */
-#line 151 "Grammar.y"
+#line 158 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpSub, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
;}
@@ -1579,7 +1586,7 @@ yyreduce:
case 17:
/* Line 1455 of yacc.c */
-#line 155 "Grammar.y"
+#line 162 "../FreezeScript/Grammar.y"
{
(yyval) = (yyvsp[(1) - (1)]);
;}
@@ -1588,7 +1595,7 @@ yyreduce:
case 18:
/* Line 1455 of yacc.c */
-#line 164 "Grammar.y"
+#line 171 "../FreezeScript/Grammar.y"
{
(yyval) = (yyvsp[(2) - (3)]);
;}
@@ -1597,7 +1604,7 @@ yyreduce:
case 19:
/* Line 1455 of yacc.c */
-#line 168 "Grammar.y"
+#line 175 "../FreezeScript/Grammar.y"
{
(yyval) = new UnaryNode(UnaryOpNeg, parseDataFactory, (yyvsp[(2) - (2)]));
;}
@@ -1606,7 +1613,7 @@ yyreduce:
case 20:
/* Line 1455 of yacc.c */
-#line 172 "Grammar.y"
+#line 179 "../FreezeScript/Grammar.y"
{
(yyval) = new UnaryNode(UnaryOpNot, parseDataFactory, (yyvsp[(2) - (2)]));
;}
@@ -1615,7 +1622,7 @@ yyreduce:
case 21:
/* Line 1455 of yacc.c */
-#line 176 "Grammar.y"
+#line 183 "../FreezeScript/Grammar.y"
{
IntegerTokPtr intVal = IntegerTokPtr::dynamicCast((yyvsp[(1) - (1)]));
assert(intVal);
@@ -1626,7 +1633,7 @@ yyreduce:
case 22:
/* Line 1455 of yacc.c */
-#line 182 "Grammar.y"
+#line 189 "../FreezeScript/Grammar.y"
{
FloatingTokPtr floatVal = FloatingTokPtr::dynamicCast((yyvsp[(1) - (1)]));
assert(floatVal);
@@ -1637,7 +1644,7 @@ yyreduce:
case 23:
/* Line 1455 of yacc.c */
-#line 188 "Grammar.y"
+#line 195 "../FreezeScript/Grammar.y"
{
StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
assert(stringVal);
@@ -1648,7 +1655,7 @@ yyreduce:
case 24:
/* Line 1455 of yacc.c */
-#line 194 "Grammar.y"
+#line 201 "../FreezeScript/Grammar.y"
{
(yyval) = new DataNode(parseDataFactory->createBoolean(true, true));
;}
@@ -1657,7 +1664,7 @@ yyreduce:
case 25:
/* Line 1455 of yacc.c */
-#line 198 "Grammar.y"
+#line 205 "../FreezeScript/Grammar.y"
{
(yyval) = new DataNode(parseDataFactory->createBoolean(false, true));
;}
@@ -1666,7 +1673,7 @@ yyreduce:
case 26:
/* Line 1455 of yacc.c */
-#line 202 "Grammar.y"
+#line 209 "../FreezeScript/Grammar.y"
{
(yyval) = new DataNode(parseDataFactory->createNil(true));
;}
@@ -1675,7 +1682,7 @@ yyreduce:
case 27:
/* Line 1455 of yacc.c */
-#line 206 "Grammar.y"
+#line 213 "../FreezeScript/Grammar.y"
{
(yyval) = (yyvsp[(1) - (1)]);
;}
@@ -1684,7 +1691,7 @@ yyreduce:
case 28:
/* Line 1455 of yacc.c */
-#line 210 "Grammar.y"
+#line 217 "../FreezeScript/Grammar.y"
{
EntityNodePtr entity = EntityNodePtr::dynamicCast((yyvsp[(1) - (3)]));
assert(entity);
@@ -1698,7 +1705,7 @@ yyreduce:
case 29:
/* Line 1455 of yacc.c */
-#line 219 "Grammar.y"
+#line 226 "../FreezeScript/Grammar.y"
{
(yyval) = (yyvsp[(1) - (1)]);
;}
@@ -1707,7 +1714,7 @@ yyreduce:
case 30:
/* Line 1455 of yacc.c */
-#line 223 "Grammar.y"
+#line 230 "../FreezeScript/Grammar.y"
{
StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
assert(stringVal);
@@ -1718,7 +1725,7 @@ yyreduce:
case 31:
/* Line 1455 of yacc.c */
-#line 234 "Grammar.y"
+#line 241 "../FreezeScript/Grammar.y"
{
EntityNodePtr entity = EntityNodePtr::dynamicCast((yyvsp[(1) - (4)]));
assert(entity);
@@ -1730,7 +1737,7 @@ yyreduce:
case 32:
/* Line 1455 of yacc.c */
-#line 241 "Grammar.y"
+#line 248 "../FreezeScript/Grammar.y"
{
StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]));
assert(stringVal);
@@ -1744,7 +1751,7 @@ yyreduce:
case 33:
/* Line 1455 of yacc.c */
-#line 250 "Grammar.y"
+#line 257 "../FreezeScript/Grammar.y"
{
StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
assert(stringVal);
@@ -1755,7 +1762,7 @@ yyreduce:
case 34:
/* Line 1455 of yacc.c */
-#line 261 "Grammar.y"
+#line 268 "../FreezeScript/Grammar.y"
{
StringTokPtr func = StringTokPtr::dynamicCast((yyvsp[(1) - (4)]));
assert(func);
@@ -1768,7 +1775,7 @@ yyreduce:
case 35:
/* Line 1455 of yacc.c */
-#line 274 "Grammar.y"
+#line 281 "../FreezeScript/Grammar.y"
{
NodeListTokPtr l = NodeListTokPtr::dynamicCast((yyvsp[(1) - (3)]));
assert(l);
@@ -1780,7 +1787,7 @@ yyreduce:
case 36:
/* Line 1455 of yacc.c */
-#line 281 "Grammar.y"
+#line 288 "../FreezeScript/Grammar.y"
{
NodeListTokPtr result = new NodeListTok;
result->v.push_back((yyvsp[(1) - (1)]));
@@ -1791,7 +1798,7 @@ yyreduce:
case 37:
/* Line 1455 of yacc.c */
-#line 287 "Grammar.y"
+#line 294 "../FreezeScript/Grammar.y"
{
(yyval) = new NodeListTok;
;}
@@ -1800,7 +1807,7 @@ yyreduce:
case 38:
/* Line 1455 of yacc.c */
-#line 296 "Grammar.y"
+#line 303 "../FreezeScript/Grammar.y"
{
StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (3)]));
assert(stringVal);
@@ -1814,7 +1821,7 @@ yyreduce:
case 39:
/* Line 1455 of yacc.c */
-#line 305 "Grammar.y"
+#line 312 "../FreezeScript/Grammar.y"
{
StringTokPtr idVal = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
assert(idVal);
@@ -1827,7 +1834,7 @@ yyreduce:
/* Line 1455 of yacc.c */
-#line 1831 "Grammar.tab.c"
+#line 1838 "Grammar.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2039,6 +2046,6 @@ yyreturn:
/* Line 1675 of yacc.c */
-#line 314 "Grammar.y"
+#line 321 "../FreezeScript/Grammar.y"
diff --git a/cpp/src/FreezeScript/Grammar.y b/cpp/src/FreezeScript/Grammar.y
index a8ee9743010..0f993df096b 100644
--- a/cpp/src/FreezeScript/Grammar.y
+++ b/cpp/src/FreezeScript/Grammar.y
@@ -19,6 +19,13 @@
# pragma warning( disable : 4065 )
#endif
+//
+// Avoid old style cast warnings in generated grammar
+//
+#ifdef __GNUC__
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
+
using namespace std;
using namespace FreezeScript;
diff --git a/cpp/src/FreezeScript/Scanner.cpp b/cpp/src/FreezeScript/Scanner.cpp
deleted file mode 100644
index 0a4bc104454..00000000000
--- a/cpp/src/FreezeScript/Scanner.cpp
+++ /dev/null
@@ -1,2253 +0,0 @@
-#include <IceUtil/ScannerConfig.h>
-#line 2 "lex.yy.c"
-
-#line 4 "lex.yy.c"
-
-#define YY_INT_ALIGNED short int
-
-/* A lexical scanner generated by flex */
-
-#define yy_create_buffer freeze_script__create_buffer
-#define yy_delete_buffer freeze_script__delete_buffer
-#define yy_flex_debug freeze_script__flex_debug
-#define yy_init_buffer freeze_script__init_buffer
-#define yy_flush_buffer freeze_script__flush_buffer
-#define yy_load_buffer_state freeze_script__load_buffer_state
-#define yy_switch_to_buffer freeze_script__switch_to_buffer
-#define yyin freeze_script_in
-#define yyleng freeze_script_leng
-#define yylex freeze_script_lex
-#define yylineno freeze_script_lineno
-#define yyout freeze_script_out
-#define yyrestart freeze_script_restart
-#define yytext freeze_script_text
-#define yywrap freeze_script_wrap
-#define yyalloc freeze_script_alloc
-#define yyrealloc freeze_script_realloc
-#define yyfree freeze_script_free
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
-
-/* First, we deal with platform-specific or compiler-specific issues. */
-
-/* begin standard C headers. */
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-
-/* end standard C headers. */
-
-/* flex integer type definitions */
-
-#ifndef FLEXINT_H
-#define FLEXINT_H
-
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
- */
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS 1
-#endif
-
-#include <inttypes.h>
-typedef int8_t flex_int8_t;
-typedef uint8_t flex_uint8_t;
-typedef int16_t flex_int16_t;
-typedef uint16_t flex_uint16_t;
-typedef int32_t flex_int32_t;
-typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
-typedef short int flex_int16_t;
-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
-#define INT8_MIN (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX (65535U)
-#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX (4294967295U)
-#endif
-
-#endif /* ! FLEXINT_H */
-
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition. This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN (yy_start) = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state. The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START (((yy_start) - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE freeze_script_restart(freeze_script_in )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
-#define YY_BUF_SIZE 16384
-#endif
-
-/* The state buf must be large enough to hold one state per character in the main buffer.
- */
-#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
-
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
-
-extern int freeze_script_leng;
-
-extern FILE *freeze_script_in, *freeze_script_out;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
- #define YY_LESS_LINENO(n)
-
-/* Return all but the first "n" matched characters back to the input stream. */
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up freeze_script_text. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
- *yy_cp = (yy_hold_char); \
- YY_RESTORE_YY_MORE_OFFSET \
- (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up freeze_script_text again */ \
- } \
- while ( 0 )
-
-#define unput(c) yyunput( c, (yytext_ptr) )
-
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
-struct yy_buffer_state
- {
- FILE *yy_input_file;
-
- char *yy_ch_buf; /* input buffer */
- char *yy_buf_pos; /* current position in input buffer */
-
- /* Size of input buffer in bytes, not including room for EOB
- * characters.
- */
- yy_size_t yy_buf_size;
-
- /* Number of characters read into yy_ch_buf, not including EOB
- * characters.
- */
- int yy_n_chars;
-
- /* Whether we "own" the buffer - i.e., we know we created it,
- * and can realloc() it to grow it, and should free() it to
- * delete it.
- */
- int yy_is_our_buffer;
-
- /* Whether this is an "interactive" input source; if so, and
- * if we're using stdio for input, then we want to use getc()
- * instead of fread(), to make sure we stop fetching input after
- * each newline.
- */
- int yy_is_interactive;
-
- /* Whether we're considered to be at the beginning of a line.
- * If so, '^' rules will be active on the next match, otherwise
- * not.
- */
- int yy_at_bol;
-
- int yy_bs_lineno; /**< The line count. */
- int yy_bs_column; /**< The column count. */
-
- /* Whether to try to fill the input buffer when we reach the
- * end of it.
- */
- int yy_fill_buffer;
-
- int yy_buffer_status;
-
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
- /* When an EOF's been seen but there's still some text to process
- * then we mark the buffer as YY_EOF_PENDING, to indicate that we
- * shouldn't try reading from the input source any more. We might
- * still have a bunch of tokens to match, though, because of
- * possible backing-up.
- *
- * When we actually see the EOF, we change the status to "new"
- * (via freeze_script_restart()), so that the user can continue scanning by
- * just pointing freeze_script_in at a new input file.
- */
-#define YY_BUFFER_EOF_PENDING 2
-
- };
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-
-/* Stack of input buffers. */
-static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
-static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- *
- * Returns the top of the stack, or NULL.
- */
-#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
- ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
- : NULL)
-
-/* Same as previous macro, but useful when we know that the buffer stack is not
- * NULL or when we need an lvalue. For internal use only.
- */
-#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
-
-/* yy_hold_char holds the character lost when freeze_script_text is formed. */
-static char yy_hold_char;
-static int yy_n_chars; /* number of characters read into yy_ch_buf */
-int freeze_script_leng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 0; /* whether we need to initialize */
-static int yy_start = 0; /* start state number */
-
-/* Flag which is used to allow freeze_script_wrap()'s to do buffer switches
- * instead of setting up a fresh freeze_script_in. A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void freeze_script_restart (FILE *input_file );
-void freeze_script__switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE freeze_script__create_buffer (FILE *file,int size );
-void freeze_script__delete_buffer (YY_BUFFER_STATE b );
-void freeze_script__flush_buffer (YY_BUFFER_STATE b );
-void freeze_script_push_buffer_state (YY_BUFFER_STATE new_buffer );
-void freeze_script_pop_buffer_state (void );
-
-static void freeze_script_ensure_buffer_stack (void );
-static void freeze_script__load_buffer_state (void );
-static void freeze_script__init_buffer (YY_BUFFER_STATE b,FILE *file );
-
-#define YY_FLUSH_BUFFER freeze_script__flush_buffer(YY_CURRENT_BUFFER )
-
-YY_BUFFER_STATE freeze_script__scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE freeze_script__scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE freeze_script__scan_bytes (yyconst char *bytes,int len );
-
-void *freeze_script_alloc (yy_size_t );
-void *freeze_script_realloc (void *,yy_size_t );
-void freeze_script_free (void * );
-
-#define yy_new_buffer freeze_script__create_buffer
-
-#define yy_set_interactive(is_interactive) \
- { \
- if ( ! YY_CURRENT_BUFFER ){ \
- freeze_script_ensure_buffer_stack (); \
- YY_CURRENT_BUFFER_LVALUE = \
- freeze_script__create_buffer(freeze_script_in,YY_BUF_SIZE ); \
- } \
- YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
- }
-
-#define yy_set_bol(at_bol) \
- { \
- if ( ! YY_CURRENT_BUFFER ){\
- freeze_script_ensure_buffer_stack (); \
- YY_CURRENT_BUFFER_LVALUE = \
- freeze_script__create_buffer(freeze_script_in,YY_BUF_SIZE ); \
- } \
- YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
- }
-
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-
-/* Begin user sect3 */
-
-#define freeze_script_wrap(n) 1
-#define YY_SKIP_YYWRAP
-
-typedef unsigned char YY_CHAR;
-
-FILE *freeze_script_in = (FILE *) 0, *freeze_script_out = (FILE *) 0;
-
-typedef int yy_state_type;
-
-extern int freeze_script_lineno;
-
-int freeze_script_lineno = 1;
-
-extern char *freeze_script_text;
-#define yytext_ptr freeze_script_text
-
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[] );
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up freeze_script_text.
- */
-#define YY_DO_BEFORE_ACTION \
- (yytext_ptr) = yy_bp; \
- freeze_script_leng = (size_t) (yy_cp - yy_bp); \
- (yy_hold_char) = *yy_cp; \
- *yy_cp = '\0'; \
- (yy_c_buf_p) = yy_cp;
-
-#define YY_NUM_RULES 26
-#define YY_END_OF_BUFFER 27
-/* This struct is not used in this scanner,
- but its presence is necessary. */
-struct yy_trans_info
- {
- flex_int32_t yy_verify;
- flex_int32_t yy_nxt;
- };
-static yyconst flex_int16_t yy_accept[51] =
- { 0,
- 0, 0, 27, 25, 8, 8, 25, 4, 19, 5,
- 20, 21, 17, 15, 16, 25, 18, 6, 6, 25,
- 9, 25, 10, 3, 22, 23, 14, 0, 6, 6,
- 7, 2, 1, 7, 6, 0, 0, 24, 11, 13,
- 12, 3, 0, 7, 0, 7, 6, 0, 7, 0
- } ;
-
-static yyconst flex_int32_t yy_ec[256] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 4, 5, 1, 1, 6, 1, 7, 8,
- 9, 10, 11, 1, 12, 13, 14, 15, 16, 16,
- 16, 16, 16, 16, 16, 17, 17, 18, 1, 19,
- 20, 21, 1, 1, 22, 22, 22, 22, 23, 24,
- 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 26, 1, 27, 1, 25, 1, 22, 22, 22, 22,
-
- 28, 24, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 25, 25, 29,
- 25, 25, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1
- } ;
-
-static yyconst flex_int32_t yy_meta[30] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 2, 1, 1, 3, 3, 3, 1, 1, 1,
- 1, 4, 4, 4, 5, 1, 1, 4, 5
- } ;
-
-static yyconst flex_int16_t yy_base[55] =
- { 0,
- 0, 0, 72, 104, 104, 104, 51, 104, 104, 104,
- 104, 104, 104, 17, 22, 25, 33, 35, 30, 44,
- 29, 24, 16, 0, 104, 104, 104, 38, 0, 0,
- 50, 104, 104, 0, 2, 45, 0, 104, 104, 104,
- 104, 0, 49, 104, 53, 60, 0, 64, 70, 104,
- 92, 96, 97, 100
- } ;
-
-static yyconst flex_int16_t yy_def[55] =
- { 0,
- 50, 1, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 18, 50,
- 50, 50, 50, 51, 50, 50, 50, 50, 18, 19,
- 50, 50, 50, 31, 18, 52, 53, 50, 50, 50,
- 50, 51, 54, 50, 50, 50, 53, 50, 50, 0,
- 50, 50, 50, 50
- } ;
-
-static yyconst flex_int16_t yy_nxt[134] =
- { 0,
- 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
- 14, 15, 16, 17, 18, 19, 19, 20, 21, 22,
- 23, 24, 24, 24, 24, 25, 26, 24, 24, 28,
- 50, 29, 30, 30, 28, 41, 29, 30, 30, 31,
- 31, 31, 32, 40, 30, 30, 33, 34, 39, 35,
- 35, 30, 31, 31, 31, 45, 45, 36, 50, 48,
- 48, 38, 36, 37, 31, 31, 31, 46, 46, 46,
- 27, 50, 43, 44, 46, 46, 46, 43, 49, 49,
- 49, 50, 50, 44, 49, 49, 49, 50, 50, 50,
- 50, 50, 50, 44, 42, 42, 42, 46, 46, 47,
-
- 47, 49, 49, 3, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50
- } ;
-
-static yyconst flex_int16_t yy_chk[134] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 14,
- 35, 14, 14, 14, 15, 23, 15, 15, 15, 16,
- 16, 16, 17, 22, 19, 19, 17, 18, 21, 18,
- 18, 18, 28, 28, 28, 36, 36, 18, 19, 43,
- 43, 20, 18, 18, 31, 31, 31, 45, 45, 45,
- 7, 3, 31, 31, 46, 46, 46, 31, 48, 48,
- 48, 0, 0, 46, 49, 49, 49, 0, 0, 0,
- 0, 0, 0, 49, 51, 51, 51, 52, 52, 53,
-
- 53, 54, 54, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50
- } ;
-
-static yy_state_type yy_last_accepting_state;
-static char *yy_last_accepting_cpos;
-
-extern int freeze_script__flex_debug;
-int freeze_script__flex_debug = 0;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *freeze_script_text;
-#line 1 "Scanner.l"
-#line 2 "Scanner.l"
-
-// **********************************************************************
-//
-// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-#include <FreezeScript/GrammarUtil.h> // Before Grammar.h, so that YYSTYPE is defined
-#include <FreezeScript/Grammar.h>
-#include <IceUtil/InputUtil.h>
-
-#include <stdlib.h>
-#include <math.h>
-
-#include <map>
-
-#if defined(_MSC_VER) && defined(ICE_64)
-//
-// '=' : 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
-
-#ifdef __SUNPRO_CC
-# ifdef freeze_script_wrap
-# undef freeze_script_wrap
-# define freeze_script_wrap() 1
-# endif
-# ifdef ICE_64
-# pragma error_messages(off,truncwarn)
-# endif
-#endif
-
-using namespace std;
-using namespace FreezeScript;
-
-namespace FreezeScript
-{
-
-typedef map<string, int> KeywordMap;
-static KeywordMap keywordMap;
-
-void initScanner();
-int checkKeyword(const string&);
-StringTokPtr parseString(char);
-
-}
-
-#define YY_USER_INIT initScanner();
-
-#define YY_INPUT(buf, result, max_size) { result = getInput(buf, max_size); }
-#line 585 "lex.yy.c"
-
-#define INITIAL 0
-
-#ifndef YY_NO_UNISTD_H
-/* Special case for "unistd.h", since it is non-ANSI. We include it way
- * down here because we want the user's section 1 to have been scanned first.
- * The user has a chance to override it with an option.
- */
-#include <unistd.h>
-#endif
-
-#ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
-#endif
-
-static int yy_init_globals (void );
-
-/* Accessor methods to globals.
- These are made visible to non-reentrant scanners for convenience. */
-
-int freeze_script_lex_destroy (void );
-
-int freeze_script_get_debug (void );
-
-void freeze_script_set_debug (int debug_flag );
-
-YY_EXTRA_TYPE freeze_script_get_extra (void );
-
-void freeze_script_set_extra (YY_EXTRA_TYPE user_defined );
-
-FILE *freeze_script_get_in (void );
-
-void freeze_script_set_in (FILE * in_str );
-
-FILE *freeze_script_get_out (void );
-
-void freeze_script_set_out (FILE * out_str );
-
-int freeze_script_get_leng (void );
-
-char *freeze_script_get_text (void );
-
-int freeze_script_get_lineno (void );
-
-void freeze_script_set_lineno (int line_number );
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int freeze_script_wrap (void );
-#else
-extern int freeze_script_wrap (void );
-#endif
-#endif
-
- static void yyunput (int c,char *buf_ptr );
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
-#endif
-
-#ifndef YY_NO_INPUT
-
-#ifdef __cplusplus
-static int yyinput (void );
-#else
-static int input (void );
-#endif
-
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO do { if (fwrite( freeze_script_text, freeze_script_leng, 1, freeze_script_out )) {} } while (0)
-#endif
-
-/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
- if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
- { \
- int c = '*'; \
- unsigned n; \
- for ( n = 0; n < max_size && \
- (c = getc( freeze_script_in )) != EOF && c != '\n'; ++n ) \
- buf[n] = (char) c; \
- if ( c == '\n' ) \
- buf[n++] = (char) c; \
- if ( c == EOF && ferror( freeze_script_in ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
- result = n; \
- } \
- else \
- { \
- errno=0; \
- while ( (result = fread(buf, 1, max_size, freeze_script_in))==0 && ferror(freeze_script_in)) \
- { \
- if( errno != EINTR) \
- { \
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
- break; \
- } \
- errno=0; \
- clearerr(freeze_script_in); \
- } \
- }\
-\
-
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* end tables serialization structures and prototypes */
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
-
-extern int freeze_script_lex (void);
-
-#define YY_DECL int freeze_script_lex (void)
-#endif /* !YY_DECL */
-
-/* Code executed at the beginning of each rule, after freeze_script_text and freeze_script_leng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
- YY_USER_ACTION
-
-/** The main scanner function which does all the work.
- */
-YY_DECL
-{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
-
-#line 83 "Scanner.l"
-
-
-#line 770 "lex.yy.c"
-
- if ( !(yy_init) )
- {
- (yy_init) = 1;
-
-#ifdef YY_USER_INIT
- YY_USER_INIT;
-#endif
-
- if ( ! (yy_start) )
- (yy_start) = 1; /* first start state */
-
- if ( ! freeze_script_in )
- freeze_script_in = stdin;
-
- if ( ! freeze_script_out )
- freeze_script_out = stdout;
-
- if ( ! YY_CURRENT_BUFFER ) {
- freeze_script_ensure_buffer_stack ();
- YY_CURRENT_BUFFER_LVALUE =
- freeze_script__create_buffer(freeze_script_in,YY_BUF_SIZE );
- }
-
- freeze_script__load_buffer_state( );
- }
-
- while ( 1 ) /* loops until end-of-file is reached */
- {
- yy_cp = (yy_c_buf_p);
-
- /* Support of freeze_script_text. */
- *yy_cp = (yy_hold_char);
-
- /* yy_bp points to the position in yy_ch_buf of the start of
- * the current run.
- */
- yy_bp = yy_cp;
-
- yy_current_state = (yy_start);
-yy_match:
- do
- {
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
- if ( yy_accept[yy_current_state] )
- {
- (yy_last_accepting_state) = yy_current_state;
- (yy_last_accepting_cpos) = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 51 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- ++yy_cp;
- }
- while ( yy_current_state != 50 );
- yy_cp = (yy_last_accepting_cpos);
- yy_current_state = (yy_last_accepting_state);
-
-yy_find_action:
- yy_act = yy_accept[yy_current_state];
-
- YY_DO_BEFORE_ACTION;
-
-do_action: /* This label is used only to access EOF actions. */
-
- switch ( yy_act )
- { /* beginning of action switch */
- case 0: /* must back up */
- /* undo the effects of YY_DO_BEFORE_ACTION */
- *yy_cp = (yy_hold_char);
- yy_cp = (yy_last_accepting_cpos);
- yy_current_state = (yy_last_accepting_state);
- goto yy_find_action;
-
-case 1:
-YY_RULE_SETUP
-#line 85 "Scanner.l"
-{
- // C++-style comment
- int c;
- do
- {
- c = yyinput();
- if(c == '\n')
- {
- parseLine++;
- }
- }
- while(c != '\n' && c != EOF);
-}
- YY_BREAK
-case 2:
-YY_RULE_SETUP
-#line 99 "Scanner.l"
-{
- // C-style comment
- while(true)
- {
- int c = yyinput();
- if(c == '\n')
- {
- parseLine++;
- }
- else if(c == '*')
- {
- int next = yyinput();
- if(next == '/')
- {
- break;
- }
- else
- {
- unput(next);
- }
- }
- else if(c == EOF)
- {
- parseErrorReporter->expressionSyntaxError("EOF in comment");
- break;
- }
- }
-}
- YY_BREAK
-case 3:
-YY_RULE_SETUP
-#line 128 "Scanner.l"
-{
- StringTokPtr ident = new StringTok;
- ident->v = freeze_script_text;
- *yylvalp = ident;
- return checkKeyword(ident->v);
-}
- YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 135 "Scanner.l"
-{
- StringTokPtr str = parseString('"');
- *yylvalp = str;
- return TOK_STRING_LITERAL;
-}
- YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 141 "Scanner.l"
-{
- StringTokPtr str = parseString('\'');
- *yylvalp = str;
- return TOK_STRING_LITERAL;
-}
- YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 147 "Scanner.l"
-{
- IntegerTokPtr itp = new IntegerTok;
- *yylvalp = itp;
- if(!IceUtilInternal::stringToInt64(string(freeze_script_text), itp->v))
- {
- assert(itp->v != 0);
- string msg = "integer constant `";
- msg += freeze_script_text;
- msg += "' out of range";
- parseErrorReporter->expressionSyntaxError(msg);
- }
- return TOK_INTEGER_LITERAL;
-}
- YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 161 "Scanner.l"
-{
- errno = 0;
- FloatingTokPtr ftp = new FloatingTok;
- *yylvalp = ftp;
- string literal(freeze_script_text);
- char lastChar = literal[literal.size() - 1];
- if(lastChar == 'f' || lastChar == 'F')
- {
- literal = literal.substr(0, literal.size() - 1); // Clobber trailing 'f' or 'F' suffix
- }
- ftp->v = strtod(literal.c_str(), 0);
- if((ftp->v == HUGE_VAL || ftp->v == -HUGE_VAL) && errno == ERANGE)
- {
- string msg = "floating-point constant `";
- msg += freeze_script_text;
- msg += "' too large (overflow)";
- parseErrorReporter->expressionSyntaxError(msg);
- }
- else if(ftp->v == 0 && errno == ERANGE)
- {
- string msg = "floating-point constant `";
- msg += freeze_script_text;
- msg += "' too small (underflow)";
- parseErrorReporter->expressionSyntaxError(msg);
- }
- return TOK_FLOATING_POINT_LITERAL;
-}
- YY_BREAK
-case 8:
-/* rule 8 can match eol */
-YY_RULE_SETUP
-#line 189 "Scanner.l"
-{
- // Igore white-space
-
- if(freeze_script_text[0] == '\n')
- {
- parseLine++;
- }
-}
- YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 198 "Scanner.l"
-return TOK_LESS_THAN;
- YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 199 "Scanner.l"
-return TOK_GREATER_THAN;
- YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 200 "Scanner.l"
-return TOK_LESS_EQUAL;
- YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 201 "Scanner.l"
-return TOK_GREATER_EQUAL;
- YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 202 "Scanner.l"
-return TOK_EQUAL;
- YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 203 "Scanner.l"
-return TOK_NEQ;
- YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 204 "Scanner.l"
-return TOK_ADD;
- YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 205 "Scanner.l"
-return TOK_SUB;
- YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 206 "Scanner.l"
-return TOK_MUL;
- YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 207 "Scanner.l"
-return TOK_DIV;
- YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 208 "Scanner.l"
-return TOK_MOD;
- YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 209 "Scanner.l"
-return TOK_LPAREN;
- YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 210 "Scanner.l"
-return TOK_RPAREN;
- YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 211 "Scanner.l"
-return TOK_LBRACKET;
- YY_BREAK
-case 23:
-YY_RULE_SETUP
-#line 212 "Scanner.l"
-return TOK_RBRACKET;
- YY_BREAK
-case 24:
-YY_RULE_SETUP
-#line 213 "Scanner.l"
-return TOK_SCOPE_DELIMITER;
- YY_BREAK
-case 25:
-YY_RULE_SETUP
-#line 215 "Scanner.l"
-{
- return freeze_script_text[0];
-}
- YY_BREAK
-case 26:
-YY_RULE_SETUP
-#line 219 "Scanner.l"
-ECHO;
- YY_BREAK
-#line 1079 "lex.yy.c"
-case YY_STATE_EOF(INITIAL):
- yyterminate();
-
- case YY_END_OF_BUFFER:
- {
- /* Amount of text matched not including the EOB char. */
- int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
-
- /* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = (yy_hold_char);
- YY_RESTORE_YY_MORE_OFFSET
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
- {
- /* We're scanning a new file or input source. It's
- * possible that this happened because the user
- * just pointed freeze_script_in at a new source and called
- * freeze_script_lex(). If so, then we have to assure
- * consistency between YY_CURRENT_BUFFER and our
- * globals. Here is the right place to do so, because
- * this is the first action (other than possibly a
- * back-up) that will match for the new input source.
- */
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = freeze_script_in;
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
- }
-
- /* Note that here we test for yy_c_buf_p "<=" to the position
- * of the first EOB in the buffer, since yy_c_buf_p will
- * already have been incremented past the NUL character
- * (since all states make transitions on EOB to the
- * end-of-buffer state). Contrast this with the test
- * in input().
- */
- if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
- { /* This was really a NUL. */
- yy_state_type yy_next_state;
-
- (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state( );
-
- /* Okay, we're now positioned to make the NUL
- * transition. We couldn't have
- * yy_get_previous_state() go ahead and do it
- * for us because it doesn't know how to deal
- * with the possibility of jamming (and we don't
- * want to build jamming into it because then it
- * will run more slowly).
- */
-
- yy_next_state = yy_try_NUL_trans( yy_current_state );
-
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
-
- if ( yy_next_state )
- {
- /* Consume the NUL. */
- yy_cp = ++(yy_c_buf_p);
- yy_current_state = yy_next_state;
- goto yy_match;
- }
-
- else
- {
- yy_cp = (yy_last_accepting_cpos);
- yy_current_state = (yy_last_accepting_state);
- goto yy_find_action;
- }
- }
-
- else switch ( yy_get_next_buffer( ) )
- {
- case EOB_ACT_END_OF_FILE:
- {
- (yy_did_buffer_switch_on_eof) = 0;
-
- if ( freeze_script_wrap( ) )
- {
- /* Note: because we've taken care in
- * yy_get_next_buffer() to have set up
- * freeze_script_text, we can now set up
- * yy_c_buf_p so that if some total
- * hoser (like flex itself) wants to
- * call the scanner after we return the
- * YY_NULL, it'll still work - another
- * YY_NULL will get returned.
- */
- (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
-
- yy_act = YY_STATE_EOF(YY_START);
- goto do_action;
- }
-
- else
- {
- if ( ! (yy_did_buffer_switch_on_eof) )
- YY_NEW_FILE;
- }
- break;
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- (yy_c_buf_p) =
- (yytext_ptr) + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state( );
-
- yy_cp = (yy_c_buf_p);
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
- goto yy_match;
-
- case EOB_ACT_LAST_MATCH:
- (yy_c_buf_p) =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
-
- yy_current_state = yy_get_previous_state( );
-
- yy_cp = (yy_c_buf_p);
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
- goto yy_find_action;
- }
- break;
- }
-
- default:
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--no action found" );
- } /* end of action switch */
- } /* end of scanning one token */
-} /* end of freeze_script_lex */
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- * EOB_ACT_LAST_MATCH -
- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- * EOB_ACT_END_OF_FILE - end of file
- */
-static int yy_get_next_buffer (void)
-{
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = (yytext_ptr);
- register int number_to_move, i;
- int ret_val;
-
- if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--end of buffer missed" );
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
- { /* Don't try to fill the buffer, so this is an EOF. */
- if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
- {
- /* We matched a single character, the EOB, so
- * treat this as a final EOF.
- */
- return EOB_ACT_END_OF_FILE;
- }
-
- else
- {
- /* We matched some text prior to the EOB, first
- * process it.
- */
- return EOB_ACT_LAST_MATCH;
- }
- }
-
- /* Try to read more data. */
-
- /* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
-
- for ( i = 0; i < number_to_move; ++i )
- *(dest++) = *(source++);
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
- /* don't do the read, it's not guaranteed to return an EOF,
- * just force an EOF
- */
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
-
- else
- {
- int num_to_read =
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
-
- while ( num_to_read <= 0 )
- { /* Not enough room in the buffer - grow it. */
-
- /* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
-
- int yy_c_buf_p_offset =
- (int) ((yy_c_buf_p) - b->yy_ch_buf);
-
- if ( b->yy_is_our_buffer )
- {
- int new_size = b->yy_buf_size * 2;
-
- if ( new_size <= 0 )
- b->yy_buf_size += b->yy_buf_size / 8;
- else
- b->yy_buf_size *= 2;
-
- b->yy_ch_buf = (char *)
- /* Include room in for 2 EOB chars. */
- freeze_script_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
- }
- else
- /* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
-
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR(
- "fatal error - scanner input buffer overflow" );
-
- (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
-
- num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
- number_to_move - 1;
-
- }
-
- if ( num_to_read > YY_READ_BUF_SIZE )
- num_to_read = YY_READ_BUF_SIZE;
-
- /* Read in more data. */
- YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), (size_t) num_to_read );
-
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
-
- if ( (yy_n_chars) == 0 )
- {
- if ( number_to_move == YY_MORE_ADJ )
- {
- ret_val = EOB_ACT_END_OF_FILE;
- freeze_script_restart(freeze_script_in );
- }
-
- else
- {
- ret_val = EOB_ACT_LAST_MATCH;
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
- YY_BUFFER_EOF_PENDING;
- }
- }
-
- else
- ret_val = EOB_ACT_CONTINUE_SCAN;
-
- if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
- /* Extend the array by 50%, plus the number we really need. */
- yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) freeze_script_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
- if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
- }
-
- (yy_n_chars) += number_to_move;
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
-
- (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
-
- return ret_val;
-}
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
- static yy_state_type yy_get_previous_state (void)
-{
- register yy_state_type yy_current_state;
- register char *yy_cp;
-
- yy_current_state = (yy_start);
-
- for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
- {
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
- if ( yy_accept[yy_current_state] )
- {
- (yy_last_accepting_state) = yy_current_state;
- (yy_last_accepting_cpos) = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 51 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- }
-
- return yy_current_state;
-}
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- * next_state = yy_try_NUL_trans( current_state );
- */
- static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
-{
- register int yy_is_jam;
- register char *yy_cp = (yy_c_buf_p);
-
- register YY_CHAR yy_c = 1;
- if ( yy_accept[yy_current_state] )
- {
- (yy_last_accepting_state) = yy_current_state;
- (yy_last_accepting_cpos) = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 51 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 50);
-
- return yy_is_jam ? 0 : yy_current_state;
-}
-
- static void yyunput (int c, register char * yy_bp )
-{
- register char *yy_cp;
-
- yy_cp = (yy_c_buf_p);
-
- /* undo effects of setting up freeze_script_text */
- *yy_cp = (yy_hold_char);
-
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- { /* need to shift things up to make room */
- /* +2 for EOB chars. */
- register int number_to_move = (yy_n_chars) + 2;
- register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
- register char *source =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
-
- while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
- *--dest = *--source;
-
- yy_cp += (int) (dest - source);
- yy_bp += (int) (dest - source);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
-
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- YY_FATAL_ERROR( "flex scanner push-back overflow" );
- }
-
- *--yy_cp = (char) c;
-
- (yytext_ptr) = yy_bp;
- (yy_hold_char) = *yy_cp;
- (yy_c_buf_p) = yy_cp;
-}
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
- static int yyinput (void)
-#else
- static int input (void)
-#endif
-
-{
- int c;
-
- *(yy_c_buf_p) = (yy_hold_char);
-
- if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
- {
- /* yy_c_buf_p now points to the character we want to return.
- * If this occurs *before* the EOB characters, then it's a
- * valid NUL; if not, then we've hit the end of the buffer.
- */
- if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
- /* This was really a NUL. */
- *(yy_c_buf_p) = '\0';
-
- else
- { /* need more input */
- int offset = (yy_c_buf_p) - (yytext_ptr);
- ++(yy_c_buf_p);
-
- switch ( yy_get_next_buffer( ) )
- {
- case EOB_ACT_LAST_MATCH:
- /* This happens because yy_g_n_b()
- * sees that we've accumulated a
- * token and flags that we need to
- * try matching the token before
- * proceeding. But for input(),
- * there's no matching to consider.
- * So convert the EOB_ACT_LAST_MATCH
- * to EOB_ACT_END_OF_FILE.
- */
-
- /* Reset buffer status. */
- freeze_script_restart(freeze_script_in );
-
- /*FALLTHROUGH*/
-
- case EOB_ACT_END_OF_FILE:
- {
- if ( freeze_script_wrap( ) )
- return EOF;
-
- if ( ! (yy_did_buffer_switch_on_eof) )
- YY_NEW_FILE;
-#ifdef __cplusplus
- return yyinput();
-#else
- return input();
-#endif
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- (yy_c_buf_p) = (yytext_ptr) + offset;
- break;
- }
- }
- }
-
- c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve freeze_script_text */
- (yy_hold_char) = *++(yy_c_buf_p);
-
- return c;
-}
-#endif /* ifndef YY_NO_INPUT */
-
-/** Immediately switch to a different input stream.
- * @param input_file A readable stream.
- *
- * @note This function does not reset the start condition to @c INITIAL .
- */
- void freeze_script_restart (FILE * input_file )
-{
-
- if ( ! YY_CURRENT_BUFFER ){
- freeze_script_ensure_buffer_stack ();
- YY_CURRENT_BUFFER_LVALUE =
- freeze_script__create_buffer(freeze_script_in,YY_BUF_SIZE );
- }
-
- freeze_script__init_buffer(YY_CURRENT_BUFFER,input_file );
- freeze_script__load_buffer_state( );
-}
-
-/** Switch to a different input buffer.
- * @param new_buffer The new input buffer.
- *
- */
- void freeze_script__switch_to_buffer (YY_BUFFER_STATE new_buffer )
-{
-
- /* TODO. We should be able to replace this entire function body
- * with
- * freeze_script_pop_buffer_state();
- * freeze_script_push_buffer_state(new_buffer);
- */
- freeze_script_ensure_buffer_stack ();
- if ( YY_CURRENT_BUFFER == new_buffer )
- return;
-
- if ( YY_CURRENT_BUFFER )
- {
- /* Flush out information for old buffer. */
- *(yy_c_buf_p) = (yy_hold_char);
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
-
- YY_CURRENT_BUFFER_LVALUE = new_buffer;
- freeze_script__load_buffer_state( );
-
- /* We don't actually know whether we did this switch during
- * EOF (freeze_script_wrap()) processing, but the only time this flag
- * is looked at is after freeze_script_wrap() is called, so it's safe
- * to go ahead and always set it.
- */
- (yy_did_buffer_switch_on_eof) = 1;
-}
-
-static void freeze_script__load_buffer_state (void)
-{
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- freeze_script_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
- (yy_hold_char) = *(yy_c_buf_p);
-}
-
-/** Allocate and initialize an input buffer state.
- * @param file A readable stream.
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- *
- * @return the allocated buffer state.
- */
- YY_BUFFER_STATE freeze_script__create_buffer (FILE * file, int size )
-{
- YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) freeze_script_alloc(sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in freeze_script__create_buffer()" );
-
- b->yy_buf_size = size;
-
- /* yy_ch_buf has to be 2 characters longer than the size given because
- * we need to put in 2 end-of-buffer characters.
- */
- b->yy_ch_buf = (char *) freeze_script_alloc(b->yy_buf_size + 2 );
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in freeze_script__create_buffer()" );
-
- b->yy_is_our_buffer = 1;
-
- freeze_script__init_buffer(b,file );
-
- return b;
-}
-
-/** Destroy the buffer.
- * @param b a buffer created with freeze_script__create_buffer()
- *
- */
- void freeze_script__delete_buffer (YY_BUFFER_STATE b )
-{
-
- if ( ! b )
- return;
-
- if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
- YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
-
- if ( b->yy_is_our_buffer )
- freeze_script_free((void *) b->yy_ch_buf );
-
- freeze_script_free((void *) b );
-}
-
-/* Initializes or reinitializes a buffer.
- * This function is sometimes called more than once on the same buffer,
- * such as during a freeze_script_restart() or at EOF.
- */
- static void freeze_script__init_buffer (YY_BUFFER_STATE b, FILE * file )
-
-{
- int oerrno = errno;
-
- freeze_script__flush_buffer(b );
-
- b->yy_input_file = file;
- b->yy_fill_buffer = 1;
-
- /* If b is the current buffer, then freeze_script__init_buffer was _probably_
- * called from freeze_script_restart() or through yy_get_next_buffer.
- * In that case, we don't want to reset the lineno or column.
- */
- if (b != YY_CURRENT_BUFFER){
- b->yy_bs_lineno = 1;
- b->yy_bs_column = 0;
- }
-
- b->yy_is_interactive = 0;
-
- errno = oerrno;
-}
-
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- *
- */
- void freeze_script__flush_buffer (YY_BUFFER_STATE b )
-{
- if ( ! b )
- return;
-
- b->yy_n_chars = 0;
-
- /* We always need two end-of-buffer characters. The first causes
- * a transition to the end-of-buffer state. The second causes
- * a jam in that state.
- */
- b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
- b->yy_buf_pos = &b->yy_ch_buf[0];
-
- b->yy_at_bol = 1;
- b->yy_buffer_status = YY_BUFFER_NEW;
-
- if ( b == YY_CURRENT_BUFFER )
- freeze_script__load_buffer_state( );
-}
-
-/** Pushes the new state onto the stack. The new state becomes
- * the current state. This function will allocate the stack
- * if necessary.
- * @param new_buffer The new state.
- *
- */
-void freeze_script_push_buffer_state (YY_BUFFER_STATE new_buffer )
-{
- if (new_buffer == NULL)
- return;
-
- freeze_script_ensure_buffer_stack();
-
- /* This block is copied from freeze_script__switch_to_buffer. */
- if ( YY_CURRENT_BUFFER )
- {
- /* Flush out information for old buffer. */
- *(yy_c_buf_p) = (yy_hold_char);
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
-
- /* Only push if top exists. Otherwise, replace top. */
- if (YY_CURRENT_BUFFER)
- (yy_buffer_stack_top)++;
- YY_CURRENT_BUFFER_LVALUE = new_buffer;
-
- /* copied from freeze_script__switch_to_buffer. */
- freeze_script__load_buffer_state( );
- (yy_did_buffer_switch_on_eof) = 1;
-}
-
-/** Removes and deletes the top of the stack, if present.
- * The next element becomes the new top.
- *
- */
-void freeze_script_pop_buffer_state (void)
-{
- if (!YY_CURRENT_BUFFER)
- return;
-
- freeze_script__delete_buffer(YY_CURRENT_BUFFER );
- YY_CURRENT_BUFFER_LVALUE = NULL;
- if ((yy_buffer_stack_top) > 0)
- --(yy_buffer_stack_top);
-
- if (YY_CURRENT_BUFFER) {
- freeze_script__load_buffer_state( );
- (yy_did_buffer_switch_on_eof) = 1;
- }
-}
-
-/* Allocates the stack if it does not exist.
- * Guarantees space for at least one push.
- */
-static void freeze_script_ensure_buffer_stack (void)
-{
- int num_to_alloc;
-
- if (!(yy_buffer_stack)) {
-
- /* First allocation is just for 2 elements, since we don't know if this
- * scanner will even need a stack. We use 2 instead of 1 to avoid an
- * immediate realloc on the next call.
- */
- num_to_alloc = 1;
- (yy_buffer_stack) = (struct yy_buffer_state**)freeze_script_alloc
- (num_to_alloc * sizeof(struct yy_buffer_state*)
- );
- if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in freeze_script_ensure_buffer_stack()" );
-
- memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
- (yy_buffer_stack_max) = num_to_alloc;
- (yy_buffer_stack_top) = 0;
- return;
- }
-
- if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
-
- /* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
-
- num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)freeze_script_realloc
- ((yy_buffer_stack),
- num_to_alloc * sizeof(struct yy_buffer_state*)
- );
- if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in freeze_script_ensure_buffer_stack()" );
-
- /* zero only the new slots.*/
- memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
- (yy_buffer_stack_max) = num_to_alloc;
- }
-}
-
-/** Setup the input buffer state to scan directly from a user-specified character buffer.
- * @param base the character buffer
- * @param size the size in bytes of the character buffer
- *
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE freeze_script__scan_buffer (char * base, yy_size_t size )
-{
- YY_BUFFER_STATE b;
-
- if ( size < 2 ||
- base[size-2] != YY_END_OF_BUFFER_CHAR ||
- base[size-1] != YY_END_OF_BUFFER_CHAR )
- /* They forgot to leave room for the EOB's. */
- return 0;
-
- b = (YY_BUFFER_STATE) freeze_script_alloc(sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in freeze_script__scan_buffer()" );
-
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
- b->yy_buf_pos = b->yy_ch_buf = base;
- b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
- b->yy_n_chars = b->yy_buf_size;
- b->yy_is_interactive = 0;
- b->yy_at_bol = 1;
- b->yy_fill_buffer = 0;
- b->yy_buffer_status = YY_BUFFER_NEW;
-
- freeze_script__switch_to_buffer(b );
-
- return b;
-}
-
-/** Setup the input buffer state to scan a string. The next call to freeze_script_lex() will
- * scan from a @e copy of @a str.
- * @param yystr a NUL-terminated string to scan
- *
- * @return the newly allocated buffer state object.
- * @note If you want to scan bytes that may contain NUL values, then use
- * freeze_script__scan_bytes() instead.
- */
-YY_BUFFER_STATE freeze_script__scan_string (yyconst char * yystr )
-{
-
- return freeze_script__scan_bytes(yystr,strlen(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.
- *
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE freeze_script__scan_bytes (yyconst char * yybytes, int _yybytes_len )
-{
- YY_BUFFER_STATE b;
- char *buf;
- yy_size_t n;
- int i;
-
- /* Get memory for full buffer, including space for trailing EOB's. */
- n = _yybytes_len + 2;
- buf = (char *) freeze_script_alloc(n );
- if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in freeze_script__scan_bytes()" );
-
- for ( i = 0; i < _yybytes_len; ++i )
- buf[i] = yybytes[i];
-
- buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
-
- b = freeze_script__scan_buffer(buf,n );
- if ( ! b )
- YY_FATAL_ERROR( "bad buffer in freeze_script__scan_bytes()" );
-
- /* It's okay to grow etc. this buffer, and we should throw it
- * away when we're done.
- */
- b->yy_is_our_buffer = 1;
-
- return b;
-}
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-static void yy_fatal_error (yyconst char* msg )
-{
- (void) fprintf( stderr, "%s\n", msg );
- exit( YY_EXIT_FAILURE );
-}
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up freeze_script_text. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
- freeze_script_text[freeze_script_leng] = (yy_hold_char); \
- (yy_c_buf_p) = freeze_script_text + yyless_macro_arg; \
- (yy_hold_char) = *(yy_c_buf_p); \
- *(yy_c_buf_p) = '\0'; \
- freeze_script_leng = yyless_macro_arg; \
- } \
- while ( 0 )
-
-/* Accessor methods (get/set functions) to struct members. */
-
-/** Get the current line number.
- *
- */
-int freeze_script_get_lineno (void)
-{
-
- return freeze_script_lineno;
-}
-
-/** Get the input stream.
- *
- */
-FILE *freeze_script_get_in (void)
-{
- return freeze_script_in;
-}
-
-/** Get the output stream.
- *
- */
-FILE *freeze_script_get_out (void)
-{
- return freeze_script_out;
-}
-
-/** Get the length of the current token.
- *
- */
-int freeze_script_get_leng (void)
-{
- return freeze_script_leng;
-}
-
-/** Get the current token.
- *
- */
-
-char *freeze_script_get_text (void)
-{
- return freeze_script_text;
-}
-
-/** Set the current line number.
- * @param line_number
- *
- */
-void freeze_script_set_lineno (int line_number )
-{
-
- freeze_script_lineno = line_number;
-}
-
-/** Set the input stream. This does not discard the current
- * input buffer.
- * @param in_str A readable stream.
- *
- * @see freeze_script__switch_to_buffer
- */
-void freeze_script_set_in (FILE * in_str )
-{
- freeze_script_in = in_str ;
-}
-
-void freeze_script_set_out (FILE * out_str )
-{
- freeze_script_out = out_str ;
-}
-
-int freeze_script_get_debug (void)
-{
- return freeze_script__flex_debug;
-}
-
-void freeze_script_set_debug (int bdebug )
-{
- freeze_script__flex_debug = bdebug ;
-}
-
-static int yy_init_globals (void)
-{
- /* Initialization is the same as for the non-reentrant scanner.
- * This function is called from freeze_script_lex_destroy(), so don't allocate here.
- */
-
- (yy_buffer_stack) = 0;
- (yy_buffer_stack_top) = 0;
- (yy_buffer_stack_max) = 0;
- (yy_c_buf_p) = (char *) 0;
- (yy_init) = 0;
- (yy_start) = 0;
-
-/* Defined in main.c */
-#ifdef YY_STDINIT
- freeze_script_in = stdin;
- freeze_script_out = stdout;
-#else
- freeze_script_in = (FILE *) 0;
- freeze_script_out = (FILE *) 0;
-#endif
-
- /* For future reference: Set errno on error, since we are called by
- * freeze_script_lex_init()
- */
- return 0;
-}
-
-/* freeze_script_lex_destroy is for both reentrant and non-reentrant scanners. */
-int freeze_script_lex_destroy (void)
-{
-
- /* Pop the buffer stack, destroying each element. */
- while(YY_CURRENT_BUFFER){
- freeze_script__delete_buffer(YY_CURRENT_BUFFER );
- YY_CURRENT_BUFFER_LVALUE = NULL;
- freeze_script_pop_buffer_state();
- }
-
- /* Destroy the stack itself. */
- freeze_script_free((yy_buffer_stack) );
- (yy_buffer_stack) = NULL;
-
- /* Reset the globals. This is important in a non-reentrant scanner so the next time
- * freeze_script_lex() is called, initialization will occur. */
- yy_init_globals( );
-
- return 0;
-}
-
-/*
- * Internal utility routines.
- */
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
-{
- register int i;
- for ( i = 0; i < n; ++i )
- s1[i] = s2[i];
-}
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
-{
- register int n;
- for ( n = 0; s[n]; ++n )
- ;
-
- return n;
-}
-#endif
-
-void *freeze_script_alloc (yy_size_t size )
-{
- return (void *) malloc( size );
-}
-
-void *freeze_script_realloc (void * ptr, yy_size_t size )
-{
- /* The cast to (char *) in the following accommodates both
- * implementations that use char* generic pointers, and those
- * that use void* generic pointers. It works with the latter
- * because both ANSI C and C++ allow castless assignment from
- * any pointer type to void*, and deal with argument conversions
- * as though doing an assignment.
- */
- return (void *) realloc( (char *) ptr, size );
-}
-
-void freeze_script_free (void * ptr )
-{
- free( (char *) ptr ); /* see freeze_script_realloc() for (char *) cast */
-}
-
-#define YYTABLES_NAME "yytables"
-
-#line 219 "Scanner.l"
-
-
-
-namespace FreezeScript
-{
-
-void
-initScanner()
-{
- keywordMap["true"] = TOK_TRUE;
- keywordMap["false"] = TOK_FALSE;
- keywordMap["and"] = TOK_AND;
- keywordMap["or"] = TOK_OR;
- keywordMap["not"] = TOK_NOT;
- keywordMap["nil"] = TOK_NIL;
-}
-
-int
-checkKeyword(const string& id)
-{
- KeywordMap::const_iterator pos = keywordMap.find(id);
- if(pos != keywordMap.end())
- {
- return pos->second;
- }
- return TOK_IDENTIFIER;
-}
-
-StringTokPtr
-parseString(char start)
-{
- StringTokPtr str = new StringTok;
- while(true)
- {
- char c = static_cast<char>(yyinput());
- if(c == start)
- {
- break;
- }
- else if(c == EOF)
- {
- parseErrorReporter->expressionSyntaxError("EOF in string");
- break;
- }
- else if(c == '\n')
- {
- parseErrorReporter->expressionSyntaxError("newline in string");
- }
- else if(c == '\\')
- {
- char next = static_cast<char>(yyinput());
- switch(next)
- {
- case '\\':
- case '"':
- case '\'':
- {
- str->v += next;
- break;
- }
-
- case 'n':
- {
- str->v += '\n';
- break;
- }
-
- case 'r':
- {
- str->v += '\r';
- break;
- }
-
- case 't':
- {
- str->v += '\t';
- break;
- }
-
- case 'v':
- {
- str->v += '\v';
- break;
- }
-
- case 'f':
- {
- str->v += '\f';
- break;
- }
-
- case 'a':
- {
- str->v += '\a';
- break;
- }
-
- case 'b':
- {
- str->v += '\b';
- break;
- }
-
- case '?':
- {
- str->v += '\?';
- break;
- }
-
- case '0':
- case '1':
- case '2':
- case '3':
- {
- static string octalDigits = "01234567";
- unsigned short us = next - '0';
- if(octalDigits.find_first_of(next = static_cast<char>(yyinput())) != string::npos)
- {
- us = us * 8 + next - '0';
- if(octalDigits.find_first_of(next = static_cast<char>(yyinput())) != string::npos)
- {
- us = us * 8 + next - '0';
- }
- else
- {
- unput(next);
- }
- }
- else
- {
- unput(next);
- }
- str->v += static_cast<char>(us);
- break;
- }
- case 'x':
- {
- IceUtil::Int64 ull = 0;
- while(isxdigit(static_cast<unsigned char>(next = static_cast<char>(yyinput()))))
- {
- ull *= 16;
- if(isdigit(static_cast<unsigned char>(next)))
- {
- ull += next - '0';
- }
- else if(islower(static_cast<unsigned char>(next)))
- {
- ull += next - 'a' + 10;
- }
- else
- {
- ull += next - 'A' + 10;
- }
- }
- unput(next);
- str->v += static_cast<char>(ull);
- break;
- }
-
- // TODO: add universal character names
-
- default:
- {
- str->v += c;
- unput(next);
- }
- }
- }
- else
- {
- str->v += c;
- }
- }
-
- return str;
-}
-
-} // End of namespace FreezeScript
-
diff --git a/cpp/src/Glacier2/Glacier2Router.cpp b/cpp/src/Glacier2/Glacier2Router.cpp
index 9d4a499941a..e621c8e2b0b 100644
--- a/cpp/src/Glacier2/Glacier2Router.cpp
+++ b/cpp/src/Glacier2/Glacier2Router.cpp
@@ -83,7 +83,7 @@ RouterService::start(int argc, char* argv[], int& status)
vector<string> args;
try
{
- args = opts.parse(argc, (const char**)argv);
+ args = opts.parse(argc, const_cast<const char**>(argv));
}
catch(const IceUtilInternal::BadOptException& e)
{
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp
index 8da88c6842e..b9eba1e2461 100644
--- a/cpp/src/Ice/ConnectionI.cpp
+++ b/cpp/src/Ice/ConnectionI.cpp
@@ -2740,7 +2740,7 @@ Ice::ConnectionI::initiateShutdown()
os.write(currentProtocol);
os.write(currentProtocolEncoding);
os.write(closeConnectionMsg);
- os.write((Byte)1); // compression status: compression supported but not used.
+ os.write(static_cast<Byte>(1)); // compression status: compression supported but not used.
os.write(headerSize); // Message size.
OutgoingMessage message(&os, false);
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index b4bd3d1ae14..bf3dc73c8ed 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -1263,7 +1263,7 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi
{
const_cast<size_t&>(_messageSizeMax) = defaultMessageSizeMax * 1024; // Ignore non-sensical values.
}
- else if(static_cast<size_t>(num) > (size_t)(0x7fffffff / 1024))
+ else if(static_cast<size_t>(num) > static_cast<size_t>(0x7fffffff / 1024))
{
const_cast<size_t&>(_messageSizeMax) = static_cast<size_t>(0x7fffffff);
}
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp
index fd2f5220a3f..960734086b2 100644
--- a/cpp/src/Ice/Network.cpp
+++ b/cpp/src/Ice/Network.cpp
@@ -133,7 +133,7 @@ void
setTcpNoDelay(SOCKET fd)
{
int flag = 1;
- if(setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char*)&flag, int(sizeof(int))) == SOCKET_ERROR)
+ if(setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast<char*>(&flag), int(sizeof(int))) == SOCKET_ERROR)
{
closeSocketNoThrow(fd);
SocketException ex(__FILE__, __LINE__);
@@ -146,7 +146,7 @@ void
setKeepAlive(SOCKET fd)
{
int flag = 1;
- if(setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&flag, int(sizeof(int))) == SOCKET_ERROR)
+ if(setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, reinterpret_cast<char*>(&flag), int(sizeof(int))) == SOCKET_ERROR)
{
closeSocketNoThrow(fd);
SocketException ex(__FILE__, __LINE__);
@@ -1137,7 +1137,7 @@ IceInternal::createServerSocket(bool udp, const Address& addr, ProtocolSupport p
if(addr.saStorage.ss_family == AF_INET6 && protocol != EnableIPv4)
{
int flag = protocol == EnableIPv6 ? 1 : 0;
- if(setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&flag, int(sizeof(int))) == SOCKET_ERROR)
+ if(setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, reinterpret_cast<char*>(&flag), int(sizeof(int))) == SOCKET_ERROR)
{
#ifdef _WIN32
if(getSocketErrno() == WSAENOPROTOOPT)
@@ -1708,7 +1708,7 @@ void
IceInternal::setSendBufferSize(SOCKET fd, int sz)
{
#ifndef ICE_OS_WINRT
- if(setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (char*)&sz, int(sizeof(int))) == SOCKET_ERROR)
+ if(setsockopt(fd, SOL_SOCKET, SO_SNDBUF, reinterpret_cast<char*>(&sz), int(sizeof(int))) == SOCKET_ERROR)
{
closeSocketNoThrow(fd);
SocketException ex(__FILE__, __LINE__);
@@ -1730,7 +1730,7 @@ IceInternal::getSendBufferSize(SOCKET fd)
#ifndef ICE_OS_WINRT
int sz;
socklen_t len = sizeof(sz);
- if(getsockopt(fd, SOL_SOCKET, SO_SNDBUF, (char*)&sz, &len) == SOCKET_ERROR ||
+ if(getsockopt(fd, SOL_SOCKET, SO_SNDBUF, reinterpret_cast<char*>(&sz), &len) == SOCKET_ERROR ||
static_cast<unsigned int>(len) != sizeof(sz))
{
closeSocketNoThrow(fd);
@@ -1758,7 +1758,7 @@ IceInternal::setRecvBufferSize(SOCKET, int)
void
IceInternal::setRecvBufferSize(SOCKET fd, int sz)
{
- if(setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char*)&sz, int(sizeof(int))) == SOCKET_ERROR)
+ if(setsockopt(fd, SOL_SOCKET, SO_RCVBUF, reinterpret_cast<char*>(&sz), int(sizeof(int))) == SOCKET_ERROR)
{
closeSocketNoThrow(fd);
SocketException ex(__FILE__, __LINE__);
@@ -1774,7 +1774,7 @@ IceInternal::getRecvBufferSize(SOCKET fd)
#ifndef ICE_OS_WINRT
int sz;
socklen_t len = sizeof(sz);
- if(getsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char*)&sz, &len) == SOCKET_ERROR ||
+ if(getsockopt(fd, SOL_SOCKET, SO_RCVBUF, reinterpret_cast<char*>(&sz), &len) == SOCKET_ERROR ||
static_cast<unsigned int>(len) != sizeof(sz))
{
closeSocketNoThrow(fd);
@@ -1798,14 +1798,14 @@ IceInternal::setMcastGroup(SOCKET fd, const Address& group, const string& intf)
struct ip_mreq mreq;
mreq.imr_multiaddr = group.saIn.sin_addr;
mreq.imr_interface = getInterfaceAddress(intf);
- rc = setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char*)&mreq, int(sizeof(mreq)));
+ rc = setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, reinterpret_cast<char*>(&mreq), int(sizeof(mreq)));
}
else
{
struct ipv6_mreq mreq;
mreq.ipv6mr_multiaddr = group.saIn6.sin6_addr;
mreq.ipv6mr_interface = getInterfaceIndex(intf);
- rc = setsockopt(fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, (char*)&mreq, int(sizeof(mreq)));
+ rc = setsockopt(fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, reinterpret_cast<char*>(&mreq), int(sizeof(mreq)));
}
if(rc == SOCKET_ERROR)
{
@@ -1846,12 +1846,12 @@ IceInternal::setMcastInterface(SOCKET fd, const string& intf, const Address& add
if(addr.saStorage.ss_family == AF_INET)
{
struct in_addr iface = getInterfaceAddress(intf);
- rc = setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, (char*)&iface, int(sizeof(iface)));
+ rc = setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, reinterpret_cast<char*>(&iface), int(sizeof(iface)));
}
else
{
int interfaceNum = getInterfaceIndex(intf);
- rc = setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF, (char*)&interfaceNum, int(sizeof(int)));
+ rc = setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF, reinterpret_cast<char*>(&interfaceNum), int(sizeof(int)));
}
if(rc == SOCKET_ERROR)
{
@@ -1875,11 +1875,11 @@ IceInternal::setMcastTtl(SOCKET fd, int ttl, const Address& addr)
int rc;
if(addr.saStorage.ss_family == AF_INET)
{
- rc = setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, (char*)&ttl, int(sizeof(int)));
+ rc = setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, reinterpret_cast<char*>(&ttl), int(sizeof(int)));
}
else
{
- rc = setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, (char*)&ttl, int(sizeof(int)));
+ rc = setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, reinterpret_cast<char*>(&ttl), int(sizeof(int)));
}
if(rc == SOCKET_ERROR)
{
@@ -1901,7 +1901,7 @@ void
IceInternal::setReuseAddress(SOCKET fd, bool reuse)
{
int flag = reuse ? 1 : 0;
- if(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char*)&flag, int(sizeof(int))) == SOCKET_ERROR)
+ if(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<char*>(&flag), int(sizeof(int))) == SOCKET_ERROR)
{
closeSocketNoThrow(fd);
SocketException ex(__FILE__, __LINE__);
diff --git a/cpp/src/Ice/OpaqueEndpointI.cpp b/cpp/src/Ice/OpaqueEndpointI.cpp
index c7dab1d1f63..ff495474d3c 100644
--- a/cpp/src/Ice/OpaqueEndpointI.cpp
+++ b/cpp/src/Ice/OpaqueEndpointI.cpp
@@ -374,7 +374,7 @@ IceInternal::OpaqueEndpointI::checkOption(const string& option, const string& ar
{
EndpointParseException ex(__FILE__, __LINE__);
ostringstream ostr;
- ostr << "invalid base64 character `" << argument[i] << "' (ordinal " << (int)argument[i]
+ ostr << "invalid base64 character `" << argument[i] << "' (ordinal " << static_cast<int>(argument[i])
<< ") in endpoint " << endpoint;
ex.str = ostr.str();
throw ex;
diff --git a/cpp/src/Ice/PluginManagerI.cpp b/cpp/src/Ice/PluginManagerI.cpp
index 81fbd6a922a..526bd930484 100644
--- a/cpp/src/Ice/PluginManagerI.cpp
+++ b/cpp/src/Ice/PluginManagerI.cpp
@@ -362,7 +362,7 @@ Ice::PluginManagerI::loadPlugin(const string& name, const string& pluginSpec, St
// Invoke the factory function. No exceptions can be raised
// by the factory function because it's declared extern "C".
//
- PLUGIN_FACTORY factory = (PLUGIN_FACTORY)sym;
+ PLUGIN_FACTORY factory = reinterpret_cast<PLUGIN_FACTORY>(sym);
plugin = factory(_communicator, name, args);
if(!plugin)
{
diff --git a/cpp/src/IceBox/Admin.cpp b/cpp/src/IceBox/Admin.cpp
index 3b493aa6aa8..2eaed0c2886 100644
--- a/cpp/src/IceBox/Admin.cpp
+++ b/cpp/src/IceBox/Admin.cpp
@@ -65,7 +65,7 @@ Client::run(int argc, char* argv[])
vector<string> commands;
try
{
- commands = opts.parse(argc, (const char**)argv);
+ commands = opts.parse(argc, const_cast<const char**>(argv));
}
catch(const IceUtilInternal::BadOptException& e)
{
diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp
index 36d34ee94dd..04e385c2424 100644
--- a/cpp/src/IceBox/ServiceManagerI.cpp
+++ b/cpp/src/IceBox/ServiceManagerI.cpp
@@ -664,7 +664,7 @@ IceBox::ServiceManagerI::start(const string& service, const string& entryPoint,
//
// Invoke the factory function.
//
- SERVICE_FACTORY factory = (SERVICE_FACTORY)sym;
+ SERVICE_FACTORY factory = reinterpret_cast<SERVICE_FACTORY>(sym);
try
{
info.service = factory(_communicator);
diff --git a/cpp/src/IceGrid/Grammar.cpp b/cpp/src/IceGrid/Grammar.cpp
index 5d519722114..c4790117810 100644
--- a/cpp/src/IceGrid/Grammar.cpp
+++ b/cpp/src/IceGrid/Grammar.cpp
@@ -91,6 +91,13 @@
# pragma warning( disable : 4065 )
#endif
+//
+// Avoid old style cast warnings in generated grammar
+//
+#ifdef __GNUC__
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
+
using namespace std;
using namespace Ice;
using namespace IceGrid;
@@ -104,7 +111,7 @@ yyerror(const char* s)
/* Line 189 of yacc.c */
-#line 108 "Grammar.tab.c"
+#line 115 "Grammar.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -188,7 +195,7 @@ typedef int YYSTYPE;
/* Line 264 of yacc.c */
-#line 192 "Grammar.tab.c"
+#line 199 "Grammar.tab.c"
#ifdef short
# undef short
@@ -561,24 +568,24 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 88, 88, 92, 99, 102, 109, 117, 121, 125,
- 129, 133, 137, 141, 145, 149, 153, 157, 161, 165,
- 169, 173, 177, 181, 185, 189, 193, 197, 201, 205,
- 209, 213, 217, 221, 225, 229, 233, 237, 241, 245,
- 249, 253, 257, 261, 265, 269, 273, 277, 281, 285,
- 289, 293, 297, 301, 305, 309, 313, 317, 321, 325,
- 329, 333, 337, 341, 345, 349, 353, 357, 361, 365,
- 369, 373, 377, 381, 385, 389, 393, 397, 401, 405,
- 409, 413, 417, 421, 425, 429, 433, 437, 441, 445,
- 449, 453, 457, 461, 465, 469, 473, 477, 481, 485,
- 489, 493, 497, 501, 505, 509, 513, 517, 521, 525,
- 529, 533, 537, 541, 545, 549, 553, 557, 561, 572,
- 576, 587, 598, 602, 606, 610, 616, 621, 626, 630,
- 639, 644, 649, 655, 662, 670, 673, 676, 679, 682,
- 685, 688, 691, 694, 697, 700, 703, 706, 709, 712,
- 715, 718, 721, 724, 727, 730, 733, 736, 739, 742,
- 745, 748, 751, 754, 757, 760, 763, 766, 769, 772,
- 775, 778, 781
+ 0, 95, 95, 99, 106, 109, 116, 124, 128, 132,
+ 136, 140, 144, 148, 152, 156, 160, 164, 168, 172,
+ 176, 180, 184, 188, 192, 196, 200, 204, 208, 212,
+ 216, 220, 224, 228, 232, 236, 240, 244, 248, 252,
+ 256, 260, 264, 268, 272, 276, 280, 284, 288, 292,
+ 296, 300, 304, 308, 312, 316, 320, 324, 328, 332,
+ 336, 340, 344, 348, 352, 356, 360, 364, 368, 372,
+ 376, 380, 384, 388, 392, 396, 400, 404, 408, 412,
+ 416, 420, 424, 428, 432, 436, 440, 444, 448, 452,
+ 456, 460, 464, 468, 472, 476, 480, 484, 488, 492,
+ 496, 500, 504, 508, 512, 516, 520, 524, 528, 532,
+ 536, 540, 544, 548, 552, 556, 560, 564, 568, 579,
+ 583, 594, 605, 609, 613, 617, 623, 628, 633, 637,
+ 646, 651, 656, 662, 669, 677, 680, 683, 686, 689,
+ 692, 695, 698, 701, 704, 707, 710, 713, 716, 719,
+ 722, 725, 728, 731, 734, 737, 740, 743, 746, 749,
+ 752, 755, 758, 761, 764, 767, 770, 773, 776, 779,
+ 782, 785, 788
};
#endif
@@ -2153,7 +2160,7 @@ yyreduce:
case 2:
/* Line 1455 of yacc.c */
-#line 89 "Grammar.y"
+#line 96 "Grammar.y"
{
;}
break;
@@ -2161,7 +2168,7 @@ yyreduce:
case 3:
/* Line 1455 of yacc.c */
-#line 92 "Grammar.y"
+#line 99 "Grammar.y"
{
;}
break;
@@ -2169,7 +2176,7 @@ yyreduce:
case 4:
/* Line 1455 of yacc.c */
-#line 100 "Grammar.y"
+#line 107 "Grammar.y"
{
;}
break;
@@ -2177,7 +2184,7 @@ yyreduce:
case 5:
/* Line 1455 of yacc.c */
-#line 103 "Grammar.y"
+#line 110 "Grammar.y"
{
;}
break;
@@ -2185,7 +2192,7 @@ yyreduce:
case 6:
/* Line 1455 of yacc.c */
-#line 109 "Grammar.y"
+#line 116 "Grammar.y"
{
parser->checkInterrupted();
;}
@@ -2194,7 +2201,7 @@ yyreduce:
case 7:
/* Line 1455 of yacc.c */
-#line 118 "Grammar.y"
+#line 125 "Grammar.y"
{
parser->usage();
;}
@@ -2203,7 +2210,7 @@ yyreduce:
case 8:
/* Line 1455 of yacc.c */
-#line 122 "Grammar.y"
+#line 129 "Grammar.y"
{
return 0;
;}
@@ -2212,7 +2219,7 @@ yyreduce:
case 9:
/* Line 1455 of yacc.c */
-#line 126 "Grammar.y"
+#line 133 "Grammar.y"
{
parser->addApplication((yyvsp[(3) - (4)]));
;}
@@ -2221,7 +2228,7 @@ yyreduce:
case 10:
/* Line 1455 of yacc.c */
-#line 130 "Grammar.y"
+#line 137 "Grammar.y"
{
parser->usage("application", "add");
;}
@@ -2230,7 +2237,7 @@ yyreduce:
case 11:
/* Line 1455 of yacc.c */
-#line 134 "Grammar.y"
+#line 141 "Grammar.y"
{
parser->removeApplication((yyvsp[(3) - (4)]));
;}
@@ -2239,7 +2246,7 @@ yyreduce:
case 12:
/* Line 1455 of yacc.c */
-#line 138 "Grammar.y"
+#line 145 "Grammar.y"
{
parser->usage("application", "remove");
;}
@@ -2248,7 +2255,7 @@ yyreduce:
case 13:
/* Line 1455 of yacc.c */
-#line 142 "Grammar.y"
+#line 149 "Grammar.y"
{
parser->diffApplication((yyvsp[(3) - (4)]));
;}
@@ -2257,7 +2264,7 @@ yyreduce:
case 14:
/* Line 1455 of yacc.c */
-#line 146 "Grammar.y"
+#line 153 "Grammar.y"
{
parser->usage("application", "diff");
;}
@@ -2266,7 +2273,7 @@ yyreduce:
case 15:
/* Line 1455 of yacc.c */
-#line 150 "Grammar.y"
+#line 157 "Grammar.y"
{
parser->updateApplication((yyvsp[(3) - (4)]));
;}
@@ -2275,7 +2282,7 @@ yyreduce:
case 16:
/* Line 1455 of yacc.c */
-#line 154 "Grammar.y"
+#line 161 "Grammar.y"
{
parser->usage("application", "update");
;}
@@ -2284,7 +2291,7 @@ yyreduce:
case 17:
/* Line 1455 of yacc.c */
-#line 158 "Grammar.y"
+#line 165 "Grammar.y"
{
parser->describeApplication((yyvsp[(3) - (4)]));
;}
@@ -2293,7 +2300,7 @@ yyreduce:
case 18:
/* Line 1455 of yacc.c */
-#line 162 "Grammar.y"
+#line 169 "Grammar.y"
{
parser->usage("application", "describe");
;}
@@ -2302,7 +2309,7 @@ yyreduce:
case 19:
/* Line 1455 of yacc.c */
-#line 166 "Grammar.y"
+#line 173 "Grammar.y"
{
parser->patchApplication((yyvsp[(3) - (4)]));
;}
@@ -2311,7 +2318,7 @@ yyreduce:
case 20:
/* Line 1455 of yacc.c */
-#line 170 "Grammar.y"
+#line 177 "Grammar.y"
{
parser->usage("application", "patch");
;}
@@ -2320,7 +2327,7 @@ yyreduce:
case 21:
/* Line 1455 of yacc.c */
-#line 174 "Grammar.y"
+#line 181 "Grammar.y"
{
parser->listAllApplications((yyvsp[(3) - (4)]));
;}
@@ -2329,7 +2336,7 @@ yyreduce:
case 22:
/* Line 1455 of yacc.c */
-#line 178 "Grammar.y"
+#line 185 "Grammar.y"
{
parser->usage("application", "list");
;}
@@ -2338,7 +2345,7 @@ yyreduce:
case 23:
/* Line 1455 of yacc.c */
-#line 182 "Grammar.y"
+#line 189 "Grammar.y"
{
parser->describeServerTemplate((yyvsp[(4) - (5)]));
;}
@@ -2347,7 +2354,7 @@ yyreduce:
case 24:
/* Line 1455 of yacc.c */
-#line 186 "Grammar.y"
+#line 193 "Grammar.y"
{
parser->usage("server template", "describe");
;}
@@ -2356,7 +2363,7 @@ yyreduce:
case 25:
/* Line 1455 of yacc.c */
-#line 190 "Grammar.y"
+#line 197 "Grammar.y"
{
parser->instantiateServerTemplate((yyvsp[(4) - (5)]));
;}
@@ -2365,7 +2372,7 @@ yyreduce:
case 26:
/* Line 1455 of yacc.c */
-#line 194 "Grammar.y"
+#line 201 "Grammar.y"
{
parser->usage("server template", "instantiate");
;}
@@ -2374,7 +2381,7 @@ yyreduce:
case 27:
/* Line 1455 of yacc.c */
-#line 198 "Grammar.y"
+#line 205 "Grammar.y"
{
parser->usage("server template");
;}
@@ -2383,7 +2390,7 @@ yyreduce:
case 28:
/* Line 1455 of yacc.c */
-#line 202 "Grammar.y"
+#line 209 "Grammar.y"
{
parser->describeServiceTemplate((yyvsp[(4) - (5)]));
;}
@@ -2392,7 +2399,7 @@ yyreduce:
case 29:
/* Line 1455 of yacc.c */
-#line 206 "Grammar.y"
+#line 213 "Grammar.y"
{
parser->usage("service template", "describe");
;}
@@ -2401,7 +2408,7 @@ yyreduce:
case 30:
/* Line 1455 of yacc.c */
-#line 210 "Grammar.y"
+#line 217 "Grammar.y"
{
parser->usage("service template");
;}
@@ -2410,7 +2417,7 @@ yyreduce:
case 31:
/* Line 1455 of yacc.c */
-#line 214 "Grammar.y"
+#line 221 "Grammar.y"
{
parser->describeNode((yyvsp[(3) - (4)]));
;}
@@ -2419,7 +2426,7 @@ yyreduce:
case 32:
/* Line 1455 of yacc.c */
-#line 218 "Grammar.y"
+#line 225 "Grammar.y"
{
parser->usage("node", "describe");
;}
@@ -2428,7 +2435,7 @@ yyreduce:
case 33:
/* Line 1455 of yacc.c */
-#line 222 "Grammar.y"
+#line 229 "Grammar.y"
{
parser->pingNode((yyvsp[(3) - (4)]));
;}
@@ -2437,7 +2444,7 @@ yyreduce:
case 34:
/* Line 1455 of yacc.c */
-#line 226 "Grammar.y"
+#line 233 "Grammar.y"
{
parser->usage("node", "ping");
;}
@@ -2446,7 +2453,7 @@ yyreduce:
case 35:
/* Line 1455 of yacc.c */
-#line 230 "Grammar.y"
+#line 237 "Grammar.y"
{
parser->printLoadNode((yyvsp[(3) - (4)]));
;}
@@ -2455,7 +2462,7 @@ yyreduce:
case 36:
/* Line 1455 of yacc.c */
-#line 234 "Grammar.y"
+#line 241 "Grammar.y"
{
parser->usage("node", "load");
;}
@@ -2464,7 +2471,7 @@ yyreduce:
case 37:
/* Line 1455 of yacc.c */
-#line 238 "Grammar.y"
+#line 245 "Grammar.y"
{
parser->printNodeProcessorSockets((yyvsp[(3) - (4)]));
;}
@@ -2473,7 +2480,7 @@ yyreduce:
case 38:
/* Line 1455 of yacc.c */
-#line 242 "Grammar.y"
+#line 249 "Grammar.y"
{
parser->usage("node", "sockets");
;}
@@ -2482,7 +2489,7 @@ yyreduce:
case 39:
/* Line 1455 of yacc.c */
-#line 246 "Grammar.y"
+#line 253 "Grammar.y"
{
parser->shutdownNode((yyvsp[(3) - (4)]));
;}
@@ -2491,7 +2498,7 @@ yyreduce:
case 40:
/* Line 1455 of yacc.c */
-#line 250 "Grammar.y"
+#line 257 "Grammar.y"
{
parser->usage("node", "shutdown");
;}
@@ -2500,7 +2507,7 @@ yyreduce:
case 41:
/* Line 1455 of yacc.c */
-#line 254 "Grammar.y"
+#line 261 "Grammar.y"
{
parser->listAllNodes((yyvsp[(3) - (4)]));
;}
@@ -2509,7 +2516,7 @@ yyreduce:
case 42:
/* Line 1455 of yacc.c */
-#line 258 "Grammar.y"
+#line 265 "Grammar.y"
{
parser->usage("node", "list");
;}
@@ -2518,7 +2525,7 @@ yyreduce:
case 43:
/* Line 1455 of yacc.c */
-#line 262 "Grammar.y"
+#line 269 "Grammar.y"
{
parser->show("node", (yyvsp[(3) - (4)]));
;}
@@ -2527,7 +2534,7 @@ yyreduce:
case 44:
/* Line 1455 of yacc.c */
-#line 266 "Grammar.y"
+#line 273 "Grammar.y"
{
parser->usage("node", "show");
;}
@@ -2536,7 +2543,7 @@ yyreduce:
case 45:
/* Line 1455 of yacc.c */
-#line 270 "Grammar.y"
+#line 277 "Grammar.y"
{
parser->describeRegistry((yyvsp[(3) - (4)]));
;}
@@ -2545,7 +2552,7 @@ yyreduce:
case 46:
/* Line 1455 of yacc.c */
-#line 274 "Grammar.y"
+#line 281 "Grammar.y"
{
parser->usage("registry", "describe");
;}
@@ -2554,7 +2561,7 @@ yyreduce:
case 47:
/* Line 1455 of yacc.c */
-#line 278 "Grammar.y"
+#line 285 "Grammar.y"
{
parser->pingRegistry((yyvsp[(3) - (4)]));
;}
@@ -2563,7 +2570,7 @@ yyreduce:
case 48:
/* Line 1455 of yacc.c */
-#line 282 "Grammar.y"
+#line 289 "Grammar.y"
{
parser->usage("registry", "ping");
;}
@@ -2572,7 +2579,7 @@ yyreduce:
case 49:
/* Line 1455 of yacc.c */
-#line 286 "Grammar.y"
+#line 293 "Grammar.y"
{
parser->shutdownRegistry((yyvsp[(3) - (4)]));
;}
@@ -2581,7 +2588,7 @@ yyreduce:
case 50:
/* Line 1455 of yacc.c */
-#line 290 "Grammar.y"
+#line 297 "Grammar.y"
{
parser->usage("registry", "shutdown");
;}
@@ -2590,7 +2597,7 @@ yyreduce:
case 51:
/* Line 1455 of yacc.c */
-#line 294 "Grammar.y"
+#line 301 "Grammar.y"
{
parser->listAllRegistries((yyvsp[(3) - (4)]));
;}
@@ -2599,7 +2606,7 @@ yyreduce:
case 52:
/* Line 1455 of yacc.c */
-#line 298 "Grammar.y"
+#line 305 "Grammar.y"
{
parser->usage("registry", "list");
;}
@@ -2608,7 +2615,7 @@ yyreduce:
case 53:
/* Line 1455 of yacc.c */
-#line 302 "Grammar.y"
+#line 309 "Grammar.y"
{
parser->show("registry", (yyvsp[(3) - (4)]));
;}
@@ -2617,7 +2624,7 @@ yyreduce:
case 54:
/* Line 1455 of yacc.c */
-#line 306 "Grammar.y"
+#line 313 "Grammar.y"
{
parser->usage("registry", "show");
;}
@@ -2626,7 +2633,7 @@ yyreduce:
case 55:
/* Line 1455 of yacc.c */
-#line 310 "Grammar.y"
+#line 317 "Grammar.y"
{
parser->removeServer((yyvsp[(3) - (4)]));
;}
@@ -2635,7 +2642,7 @@ yyreduce:
case 56:
/* Line 1455 of yacc.c */
-#line 314 "Grammar.y"
+#line 321 "Grammar.y"
{
parser->usage("server", "remove");
;}
@@ -2644,7 +2651,7 @@ yyreduce:
case 57:
/* Line 1455 of yacc.c */
-#line 318 "Grammar.y"
+#line 325 "Grammar.y"
{
parser->describeServer((yyvsp[(3) - (4)]));
;}
@@ -2653,7 +2660,7 @@ yyreduce:
case 58:
/* Line 1455 of yacc.c */
-#line 322 "Grammar.y"
+#line 329 "Grammar.y"
{
parser->usage("server", "describe");
;}
@@ -2662,7 +2669,7 @@ yyreduce:
case 59:
/* Line 1455 of yacc.c */
-#line 326 "Grammar.y"
+#line 333 "Grammar.y"
{
parser->startServer((yyvsp[(3) - (4)]));
;}
@@ -2671,7 +2678,7 @@ yyreduce:
case 60:
/* Line 1455 of yacc.c */
-#line 330 "Grammar.y"
+#line 337 "Grammar.y"
{
parser->usage("server", "start");
;}
@@ -2680,7 +2687,7 @@ yyreduce:
case 61:
/* Line 1455 of yacc.c */
-#line 334 "Grammar.y"
+#line 341 "Grammar.y"
{
parser->stopServer((yyvsp[(3) - (4)]));
;}
@@ -2689,7 +2696,7 @@ yyreduce:
case 62:
/* Line 1455 of yacc.c */
-#line 338 "Grammar.y"
+#line 345 "Grammar.y"
{
parser->usage("server", "stop");
;}
@@ -2698,7 +2705,7 @@ yyreduce:
case 63:
/* Line 1455 of yacc.c */
-#line 342 "Grammar.y"
+#line 349 "Grammar.y"
{
parser->patchServer((yyvsp[(3) - (4)]));
;}
@@ -2707,7 +2714,7 @@ yyreduce:
case 64:
/* Line 1455 of yacc.c */
-#line 346 "Grammar.y"
+#line 353 "Grammar.y"
{
parser->usage("server", "patch");
;}
@@ -2716,7 +2723,7 @@ yyreduce:
case 65:
/* Line 1455 of yacc.c */
-#line 350 "Grammar.y"
+#line 357 "Grammar.y"
{
parser->signalServer((yyvsp[(3) - (4)]));
;}
@@ -2725,7 +2732,7 @@ yyreduce:
case 66:
/* Line 1455 of yacc.c */
-#line 354 "Grammar.y"
+#line 361 "Grammar.y"
{
parser->usage("server", "signal");
;}
@@ -2734,7 +2741,7 @@ yyreduce:
case 67:
/* Line 1455 of yacc.c */
-#line 358 "Grammar.y"
+#line 365 "Grammar.y"
{
parser->writeMessage((yyvsp[(3) - (4)]), 1);
;}
@@ -2743,7 +2750,7 @@ yyreduce:
case 68:
/* Line 1455 of yacc.c */
-#line 362 "Grammar.y"
+#line 369 "Grammar.y"
{
parser->usage("server", "stdout");
;}
@@ -2752,7 +2759,7 @@ yyreduce:
case 69:
/* Line 1455 of yacc.c */
-#line 366 "Grammar.y"
+#line 373 "Grammar.y"
{
parser->writeMessage((yyvsp[(3) - (4)]), 2);
;}
@@ -2761,7 +2768,7 @@ yyreduce:
case 70:
/* Line 1455 of yacc.c */
-#line 370 "Grammar.y"
+#line 377 "Grammar.y"
{
parser->usage("server", "stderr");
;}
@@ -2770,7 +2777,7 @@ yyreduce:
case 71:
/* Line 1455 of yacc.c */
-#line 374 "Grammar.y"
+#line 381 "Grammar.y"
{
parser->stateServer((yyvsp[(3) - (4)]));
;}
@@ -2779,7 +2786,7 @@ yyreduce:
case 72:
/* Line 1455 of yacc.c */
-#line 378 "Grammar.y"
+#line 385 "Grammar.y"
{
parser->usage("server", "start");
;}
@@ -2788,7 +2795,7 @@ yyreduce:
case 73:
/* Line 1455 of yacc.c */
-#line 382 "Grammar.y"
+#line 389 "Grammar.y"
{
parser->pidServer((yyvsp[(3) - (4)]));
;}
@@ -2797,7 +2804,7 @@ yyreduce:
case 74:
/* Line 1455 of yacc.c */
-#line 386 "Grammar.y"
+#line 393 "Grammar.y"
{
parser->usage("server", "pid");
;}
@@ -2806,7 +2813,7 @@ yyreduce:
case 75:
/* Line 1455 of yacc.c */
-#line 390 "Grammar.y"
+#line 397 "Grammar.y"
{
parser->propertiesServer((yyvsp[(3) - (4)]), false);
;}
@@ -2815,7 +2822,7 @@ yyreduce:
case 76:
/* Line 1455 of yacc.c */
-#line 394 "Grammar.y"
+#line 401 "Grammar.y"
{
parser->usage("server", "properties");
;}
@@ -2824,7 +2831,7 @@ yyreduce:
case 77:
/* Line 1455 of yacc.c */
-#line 398 "Grammar.y"
+#line 405 "Grammar.y"
{
parser->propertiesServer((yyvsp[(3) - (4)]), true);
;}
@@ -2833,7 +2840,7 @@ yyreduce:
case 78:
/* Line 1455 of yacc.c */
-#line 402 "Grammar.y"
+#line 409 "Grammar.y"
{
parser->usage("server", "property");
;}
@@ -2842,7 +2849,7 @@ yyreduce:
case 79:
/* Line 1455 of yacc.c */
-#line 406 "Grammar.y"
+#line 413 "Grammar.y"
{
parser->enableServer((yyvsp[(3) - (4)]), true);
;}
@@ -2851,7 +2858,7 @@ yyreduce:
case 80:
/* Line 1455 of yacc.c */
-#line 410 "Grammar.y"
+#line 417 "Grammar.y"
{
parser->usage("server", "enable");
;}
@@ -2860,7 +2867,7 @@ yyreduce:
case 81:
/* Line 1455 of yacc.c */
-#line 414 "Grammar.y"
+#line 421 "Grammar.y"
{
parser->enableServer((yyvsp[(3) - (4)]), false);
;}
@@ -2869,7 +2876,7 @@ yyreduce:
case 82:
/* Line 1455 of yacc.c */
-#line 418 "Grammar.y"
+#line 425 "Grammar.y"
{
parser->usage("server", "disable");
;}
@@ -2878,7 +2885,7 @@ yyreduce:
case 83:
/* Line 1455 of yacc.c */
-#line 422 "Grammar.y"
+#line 429 "Grammar.y"
{
parser->listAllServers((yyvsp[(3) - (4)]));
;}
@@ -2887,7 +2894,7 @@ yyreduce:
case 84:
/* Line 1455 of yacc.c */
-#line 426 "Grammar.y"
+#line 433 "Grammar.y"
{
parser->usage("server", "list");
;}
@@ -2896,7 +2903,7 @@ yyreduce:
case 85:
/* Line 1455 of yacc.c */
-#line 430 "Grammar.y"
+#line 437 "Grammar.y"
{
parser->show("server", (yyvsp[(3) - (4)]));
;}
@@ -2905,7 +2912,7 @@ yyreduce:
case 86:
/* Line 1455 of yacc.c */
-#line 434 "Grammar.y"
+#line 441 "Grammar.y"
{
parser->usage("server", "show");
;}
@@ -2914,7 +2921,7 @@ yyreduce:
case 87:
/* Line 1455 of yacc.c */
-#line 438 "Grammar.y"
+#line 445 "Grammar.y"
{
parser->startService((yyvsp[(3) - (4)]));
;}
@@ -2923,7 +2930,7 @@ yyreduce:
case 88:
/* Line 1455 of yacc.c */
-#line 442 "Grammar.y"
+#line 449 "Grammar.y"
{
parser->usage("service", "start");
;}
@@ -2932,7 +2939,7 @@ yyreduce:
case 89:
/* Line 1455 of yacc.c */
-#line 446 "Grammar.y"
+#line 453 "Grammar.y"
{
parser->stopService((yyvsp[(3) - (4)]));
;}
@@ -2941,7 +2948,7 @@ yyreduce:
case 90:
/* Line 1455 of yacc.c */
-#line 450 "Grammar.y"
+#line 457 "Grammar.y"
{
parser->usage("service", "stop");
;}
@@ -2950,7 +2957,7 @@ yyreduce:
case 91:
/* Line 1455 of yacc.c */
-#line 454 "Grammar.y"
+#line 461 "Grammar.y"
{
parser->describeService((yyvsp[(3) - (4)]));
;}
@@ -2959,7 +2966,7 @@ yyreduce:
case 92:
/* Line 1455 of yacc.c */
-#line 458 "Grammar.y"
+#line 465 "Grammar.y"
{
parser->usage("service", "describe");
;}
@@ -2968,7 +2975,7 @@ yyreduce:
case 93:
/* Line 1455 of yacc.c */
-#line 462 "Grammar.y"
+#line 469 "Grammar.y"
{
parser->propertiesService((yyvsp[(3) - (4)]), false);
;}
@@ -2977,7 +2984,7 @@ yyreduce:
case 94:
/* Line 1455 of yacc.c */
-#line 466 "Grammar.y"
+#line 473 "Grammar.y"
{
parser->usage("service", "properties");
;}
@@ -2986,7 +2993,7 @@ yyreduce:
case 95:
/* Line 1455 of yacc.c */
-#line 470 "Grammar.y"
+#line 477 "Grammar.y"
{
parser->propertiesService((yyvsp[(3) - (4)]), true);
;}
@@ -2995,7 +3002,7 @@ yyreduce:
case 96:
/* Line 1455 of yacc.c */
-#line 474 "Grammar.y"
+#line 481 "Grammar.y"
{
parser->usage("service", "property");
;}
@@ -3004,7 +3011,7 @@ yyreduce:
case 97:
/* Line 1455 of yacc.c */
-#line 478 "Grammar.y"
+#line 485 "Grammar.y"
{
parser->listServices((yyvsp[(3) - (4)]));
;}
@@ -3013,7 +3020,7 @@ yyreduce:
case 98:
/* Line 1455 of yacc.c */
-#line 482 "Grammar.y"
+#line 489 "Grammar.y"
{
parser->usage("service", "list");
;}
@@ -3022,7 +3029,7 @@ yyreduce:
case 99:
/* Line 1455 of yacc.c */
-#line 486 "Grammar.y"
+#line 493 "Grammar.y"
{
parser->endpointsAdapter((yyvsp[(3) - (4)]));
;}
@@ -3031,7 +3038,7 @@ yyreduce:
case 100:
/* Line 1455 of yacc.c */
-#line 490 "Grammar.y"
+#line 497 "Grammar.y"
{
parser->usage("adapter", "endpoints");
;}
@@ -3040,7 +3047,7 @@ yyreduce:
case 101:
/* Line 1455 of yacc.c */
-#line 494 "Grammar.y"
+#line 501 "Grammar.y"
{
parser->removeAdapter((yyvsp[(3) - (4)]));
;}
@@ -3049,7 +3056,7 @@ yyreduce:
case 102:
/* Line 1455 of yacc.c */
-#line 498 "Grammar.y"
+#line 505 "Grammar.y"
{
parser->usage("adapter", "remove");
;}
@@ -3058,7 +3065,7 @@ yyreduce:
case 103:
/* Line 1455 of yacc.c */
-#line 502 "Grammar.y"
+#line 509 "Grammar.y"
{
parser->listAllAdapters((yyvsp[(3) - (4)]));
;}
@@ -3067,7 +3074,7 @@ yyreduce:
case 104:
/* Line 1455 of yacc.c */
-#line 506 "Grammar.y"
+#line 513 "Grammar.y"
{
parser->usage("adapter", "list");
;}
@@ -3076,7 +3083,7 @@ yyreduce:
case 105:
/* Line 1455 of yacc.c */
-#line 510 "Grammar.y"
+#line 517 "Grammar.y"
{
parser->addObject((yyvsp[(3) - (4)]));
;}
@@ -3085,7 +3092,7 @@ yyreduce:
case 106:
/* Line 1455 of yacc.c */
-#line 514 "Grammar.y"
+#line 521 "Grammar.y"
{
parser->usage("object", "add");
;}
@@ -3094,7 +3101,7 @@ yyreduce:
case 107:
/* Line 1455 of yacc.c */
-#line 518 "Grammar.y"
+#line 525 "Grammar.y"
{
parser->removeObject((yyvsp[(3) - (4)]));
;}
@@ -3103,7 +3110,7 @@ yyreduce:
case 108:
/* Line 1455 of yacc.c */
-#line 522 "Grammar.y"
+#line 529 "Grammar.y"
{
parser->usage("object", "remove");
;}
@@ -3112,7 +3119,7 @@ yyreduce:
case 109:
/* Line 1455 of yacc.c */
-#line 526 "Grammar.y"
+#line 533 "Grammar.y"
{
parser->findObject((yyvsp[(3) - (4)]));
;}
@@ -3121,7 +3128,7 @@ yyreduce:
case 110:
/* Line 1455 of yacc.c */
-#line 530 "Grammar.y"
+#line 537 "Grammar.y"
{
parser->usage("object", "find");
;}
@@ -3130,7 +3137,7 @@ yyreduce:
case 111:
/* Line 1455 of yacc.c */
-#line 534 "Grammar.y"
+#line 541 "Grammar.y"
{
parser->listObject((yyvsp[(3) - (4)]));
;}
@@ -3139,7 +3146,7 @@ yyreduce:
case 112:
/* Line 1455 of yacc.c */
-#line 538 "Grammar.y"
+#line 545 "Grammar.y"
{
parser->usage("object", "list");
;}
@@ -3148,7 +3155,7 @@ yyreduce:
case 113:
/* Line 1455 of yacc.c */
-#line 542 "Grammar.y"
+#line 549 "Grammar.y"
{
parser->describeObject((yyvsp[(3) - (4)]));
;}
@@ -3157,7 +3164,7 @@ yyreduce:
case 114:
/* Line 1455 of yacc.c */
-#line 546 "Grammar.y"
+#line 553 "Grammar.y"
{
parser->usage("object", "describe");
;}
@@ -3166,7 +3173,7 @@ yyreduce:
case 115:
/* Line 1455 of yacc.c */
-#line 550 "Grammar.y"
+#line 557 "Grammar.y"
{
parser->showCopying();
;}
@@ -3175,7 +3182,7 @@ yyreduce:
case 116:
/* Line 1455 of yacc.c */
-#line 554 "Grammar.y"
+#line 561 "Grammar.y"
{
parser->showWarranty();
;}
@@ -3184,7 +3191,7 @@ yyreduce:
case 117:
/* Line 1455 of yacc.c */
-#line 558 "Grammar.y"
+#line 565 "Grammar.y"
{
parser->usage((yyvsp[(2) - (3)]).front());
;}
@@ -3193,7 +3200,7 @@ yyreduce:
case 118:
/* Line 1455 of yacc.c */
-#line 562 "Grammar.y"
+#line 569 "Grammar.y"
{
if(((yyvsp[(2) - (4)]).front() == "server" || (yyvsp[(2) - (4)]).front() == "service") && (yyvsp[(3) - (4)]).front() == "template")
{
@@ -3209,7 +3216,7 @@ yyreduce:
case 119:
/* Line 1455 of yacc.c */
-#line 573 "Grammar.y"
+#line 580 "Grammar.y"
{
parser->usage((yyvsp[(2) - (5)]).front(), (yyvsp[(3) - (5)]).front());
;}
@@ -3218,7 +3225,7 @@ yyreduce:
case 120:
/* Line 1455 of yacc.c */
-#line 577 "Grammar.y"
+#line 584 "Grammar.y"
{
if(((yyvsp[(2) - (5)]).front() == "server" || (yyvsp[(2) - (5)]).front() == "service") && (yyvsp[(3) - (5)]).front() == "template")
{
@@ -3234,7 +3241,7 @@ yyreduce:
case 121:
/* Line 1455 of yacc.c */
-#line 588 "Grammar.y"
+#line 595 "Grammar.y"
{
if(((yyvsp[(2) - (6)]).front() == "server" || (yyvsp[(2) - (6)]).front() == "service") && (yyvsp[(3) - (6)]).front() == "template")
{
@@ -3250,7 +3257,7 @@ yyreduce:
case 122:
/* Line 1455 of yacc.c */
-#line 599 "Grammar.y"
+#line 606 "Grammar.y"
{
parser->usage((yyvsp[(2) - (4)]).front());
;}
@@ -3259,7 +3266,7 @@ yyreduce:
case 123:
/* Line 1455 of yacc.c */
-#line 603 "Grammar.y"
+#line 610 "Grammar.y"
{
parser->usage();
;}
@@ -3268,7 +3275,7 @@ yyreduce:
case 124:
/* Line 1455 of yacc.c */
-#line 607 "Grammar.y"
+#line 614 "Grammar.y"
{
parser->usage((yyvsp[(1) - (3)]).front());
;}
@@ -3277,7 +3284,7 @@ yyreduce:
case 125:
/* Line 1455 of yacc.c */
-#line 611 "Grammar.y"
+#line 618 "Grammar.y"
{
(yyvsp[(1) - (4)]).push_back((yyvsp[(2) - (4)]).front());
parser->invalidCommand((yyvsp[(1) - (4)]));
@@ -3288,7 +3295,7 @@ yyreduce:
case 126:
/* Line 1455 of yacc.c */
-#line 617 "Grammar.y"
+#line 624 "Grammar.y"
{
parser->invalidCommand((yyvsp[(1) - (3)]));
yyerrok;
@@ -3298,7 +3305,7 @@ yyreduce:
case 127:
/* Line 1455 of yacc.c */
-#line 622 "Grammar.y"
+#line 629 "Grammar.y"
{
parser->invalidCommand((yyvsp[(1) - (3)]));
yyerrok;
@@ -3308,7 +3315,7 @@ yyreduce:
case 128:
/* Line 1455 of yacc.c */
-#line 627 "Grammar.y"
+#line 634 "Grammar.y"
{
yyerrok;
;}
@@ -3317,7 +3324,7 @@ yyreduce:
case 129:
/* Line 1455 of yacc.c */
-#line 631 "Grammar.y"
+#line 638 "Grammar.y"
{
;}
break;
@@ -3325,7 +3332,7 @@ yyreduce:
case 130:
/* Line 1455 of yacc.c */
-#line 640 "Grammar.y"
+#line 647 "Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
(yyval).push_front((yyvsp[(1) - (2)]).front());
@@ -3335,7 +3342,7 @@ yyreduce:
case 131:
/* Line 1455 of yacc.c */
-#line 645 "Grammar.y"
+#line 652 "Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
(yyval).push_front((yyvsp[(1) - (2)]).front());
@@ -3345,7 +3352,7 @@ yyreduce:
case 132:
/* Line 1455 of yacc.c */
-#line 650 "Grammar.y"
+#line 657 "Grammar.y"
{
(yyval) = (yyvsp[(2) - (3)]);
(yyval).push_front("help");
@@ -3356,7 +3363,7 @@ yyreduce:
case 133:
/* Line 1455 of yacc.c */
-#line 656 "Grammar.y"
+#line 663 "Grammar.y"
{
(yyval) = (yyvsp[(2) - (3)]);
(yyval).push_front("help");
@@ -3367,7 +3374,7 @@ yyreduce:
case 134:
/* Line 1455 of yacc.c */
-#line 662 "Grammar.y"
+#line 669 "Grammar.y"
{
(yyval) = YYSTYPE();
;}
@@ -3376,7 +3383,7 @@ yyreduce:
case 135:
/* Line 1455 of yacc.c */
-#line 671 "Grammar.y"
+#line 678 "Grammar.y"
{
;}
break;
@@ -3384,7 +3391,7 @@ yyreduce:
case 136:
/* Line 1455 of yacc.c */
-#line 674 "Grammar.y"
+#line 681 "Grammar.y"
{
;}
break;
@@ -3392,7 +3399,7 @@ yyreduce:
case 137:
/* Line 1455 of yacc.c */
-#line 677 "Grammar.y"
+#line 684 "Grammar.y"
{
;}
break;
@@ -3400,7 +3407,7 @@ yyreduce:
case 138:
/* Line 1455 of yacc.c */
-#line 680 "Grammar.y"
+#line 687 "Grammar.y"
{
;}
break;
@@ -3408,7 +3415,7 @@ yyreduce:
case 139:
/* Line 1455 of yacc.c */
-#line 683 "Grammar.y"
+#line 690 "Grammar.y"
{
;}
break;
@@ -3416,7 +3423,7 @@ yyreduce:
case 140:
/* Line 1455 of yacc.c */
-#line 686 "Grammar.y"
+#line 693 "Grammar.y"
{
;}
break;
@@ -3424,7 +3431,7 @@ yyreduce:
case 141:
/* Line 1455 of yacc.c */
-#line 689 "Grammar.y"
+#line 696 "Grammar.y"
{
;}
break;
@@ -3432,7 +3439,7 @@ yyreduce:
case 142:
/* Line 1455 of yacc.c */
-#line 692 "Grammar.y"
+#line 699 "Grammar.y"
{
;}
break;
@@ -3440,7 +3447,7 @@ yyreduce:
case 143:
/* Line 1455 of yacc.c */
-#line 695 "Grammar.y"
+#line 702 "Grammar.y"
{
;}
break;
@@ -3448,7 +3455,7 @@ yyreduce:
case 144:
/* Line 1455 of yacc.c */
-#line 698 "Grammar.y"
+#line 705 "Grammar.y"
{
;}
break;
@@ -3456,7 +3463,7 @@ yyreduce:
case 145:
/* Line 1455 of yacc.c */
-#line 701 "Grammar.y"
+#line 708 "Grammar.y"
{
;}
break;
@@ -3464,7 +3471,7 @@ yyreduce:
case 146:
/* Line 1455 of yacc.c */
-#line 704 "Grammar.y"
+#line 711 "Grammar.y"
{
;}
break;
@@ -3472,7 +3479,7 @@ yyreduce:
case 147:
/* Line 1455 of yacc.c */
-#line 707 "Grammar.y"
+#line 714 "Grammar.y"
{
;}
break;
@@ -3480,7 +3487,7 @@ yyreduce:
case 148:
/* Line 1455 of yacc.c */
-#line 710 "Grammar.y"
+#line 717 "Grammar.y"
{
;}
break;
@@ -3488,7 +3495,7 @@ yyreduce:
case 149:
/* Line 1455 of yacc.c */
-#line 713 "Grammar.y"
+#line 720 "Grammar.y"
{
;}
break;
@@ -3496,7 +3503,7 @@ yyreduce:
case 150:
/* Line 1455 of yacc.c */
-#line 716 "Grammar.y"
+#line 723 "Grammar.y"
{
;}
break;
@@ -3504,7 +3511,7 @@ yyreduce:
case 151:
/* Line 1455 of yacc.c */
-#line 719 "Grammar.y"
+#line 726 "Grammar.y"
{
;}
break;
@@ -3512,7 +3519,7 @@ yyreduce:
case 152:
/* Line 1455 of yacc.c */
-#line 722 "Grammar.y"
+#line 729 "Grammar.y"
{
;}
break;
@@ -3520,7 +3527,7 @@ yyreduce:
case 153:
/* Line 1455 of yacc.c */
-#line 725 "Grammar.y"
+#line 732 "Grammar.y"
{
;}
break;
@@ -3528,7 +3535,7 @@ yyreduce:
case 154:
/* Line 1455 of yacc.c */
-#line 728 "Grammar.y"
+#line 735 "Grammar.y"
{
;}
break;
@@ -3536,7 +3543,7 @@ yyreduce:
case 155:
/* Line 1455 of yacc.c */
-#line 731 "Grammar.y"
+#line 738 "Grammar.y"
{
;}
break;
@@ -3544,7 +3551,7 @@ yyreduce:
case 156:
/* Line 1455 of yacc.c */
-#line 734 "Grammar.y"
+#line 741 "Grammar.y"
{
;}
break;
@@ -3552,7 +3559,7 @@ yyreduce:
case 157:
/* Line 1455 of yacc.c */
-#line 737 "Grammar.y"
+#line 744 "Grammar.y"
{
;}
break;
@@ -3560,7 +3567,7 @@ yyreduce:
case 158:
/* Line 1455 of yacc.c */
-#line 740 "Grammar.y"
+#line 747 "Grammar.y"
{
;}
break;
@@ -3568,7 +3575,7 @@ yyreduce:
case 159:
/* Line 1455 of yacc.c */
-#line 743 "Grammar.y"
+#line 750 "Grammar.y"
{
;}
break;
@@ -3576,7 +3583,7 @@ yyreduce:
case 160:
/* Line 1455 of yacc.c */
-#line 746 "Grammar.y"
+#line 753 "Grammar.y"
{
;}
break;
@@ -3584,7 +3591,7 @@ yyreduce:
case 161:
/* Line 1455 of yacc.c */
-#line 749 "Grammar.y"
+#line 756 "Grammar.y"
{
;}
break;
@@ -3592,7 +3599,7 @@ yyreduce:
case 162:
/* Line 1455 of yacc.c */
-#line 752 "Grammar.y"
+#line 759 "Grammar.y"
{
;}
break;
@@ -3600,7 +3607,7 @@ yyreduce:
case 163:
/* Line 1455 of yacc.c */
-#line 755 "Grammar.y"
+#line 762 "Grammar.y"
{
;}
break;
@@ -3608,7 +3615,7 @@ yyreduce:
case 164:
/* Line 1455 of yacc.c */
-#line 758 "Grammar.y"
+#line 765 "Grammar.y"
{
;}
break;
@@ -3616,7 +3623,7 @@ yyreduce:
case 165:
/* Line 1455 of yacc.c */
-#line 761 "Grammar.y"
+#line 768 "Grammar.y"
{
;}
break;
@@ -3624,7 +3631,7 @@ yyreduce:
case 166:
/* Line 1455 of yacc.c */
-#line 764 "Grammar.y"
+#line 771 "Grammar.y"
{
;}
break;
@@ -3632,7 +3639,7 @@ yyreduce:
case 167:
/* Line 1455 of yacc.c */
-#line 767 "Grammar.y"
+#line 774 "Grammar.y"
{
;}
break;
@@ -3640,7 +3647,7 @@ yyreduce:
case 168:
/* Line 1455 of yacc.c */
-#line 770 "Grammar.y"
+#line 777 "Grammar.y"
{
;}
break;
@@ -3648,7 +3655,7 @@ yyreduce:
case 169:
/* Line 1455 of yacc.c */
-#line 773 "Grammar.y"
+#line 780 "Grammar.y"
{
;}
break;
@@ -3656,7 +3663,7 @@ yyreduce:
case 170:
/* Line 1455 of yacc.c */
-#line 776 "Grammar.y"
+#line 783 "Grammar.y"
{
;}
break;
@@ -3664,7 +3671,7 @@ yyreduce:
case 171:
/* Line 1455 of yacc.c */
-#line 779 "Grammar.y"
+#line 786 "Grammar.y"
{
;}
break;
@@ -3672,7 +3679,7 @@ yyreduce:
case 172:
/* Line 1455 of yacc.c */
-#line 782 "Grammar.y"
+#line 789 "Grammar.y"
{
;}
break;
@@ -3680,7 +3687,7 @@ yyreduce:
/* Line 1455 of yacc.c */
-#line 3684 "Grammar.tab.c"
+#line 3691 "Grammar.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
diff --git a/cpp/src/IceGrid/Grammar.y b/cpp/src/IceGrid/Grammar.y
index 6e96279c1d0..23247bec6a7 100644
--- a/cpp/src/IceGrid/Grammar.y
+++ b/cpp/src/IceGrid/Grammar.y
@@ -20,6 +20,13 @@
# pragma warning( disable : 4065 )
#endif
+//
+// Avoid old style cast warnings in generated grammar
+//
+#ifdef __GNUC__
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
+
using namespace std;
using namespace Ice;
using namespace IceGrid;
diff --git a/cpp/src/IceGrid/IceGridRegistry.cpp b/cpp/src/IceGrid/IceGridRegistry.cpp
index b411ef459bc..776ea10de09 100644
--- a/cpp/src/IceGrid/IceGridRegistry.cpp
+++ b/cpp/src/IceGrid/IceGridRegistry.cpp
@@ -79,7 +79,7 @@ RegistryService::start(int argc, char* argv[], int& status)
vector<string> args;
try
{
- args = opts.parse(argc, (const char**)argv);
+ args = opts.parse(argc, const_cast<const char**>(argv));
}
catch(const IceUtilInternal::BadOptException& e)
{
diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp
index d75277ebb85..cbd97b94b0b 100644
--- a/cpp/src/IceGrid/ServerI.cpp
+++ b/cpp/src/IceGrid/ServerI.cpp
@@ -55,7 +55,8 @@ chownRecursive(const string& path, uid_t uid, gid_t gid)
int n = 0;
while((entry = readdir(d)) != 0)
{
- namelist = (struct dirent**)realloc((void*)namelist, (size_t)((n + 1) * sizeof(struct dirent*)));
+ namelist = static_cast<struct dirent**>(
+ realloc(namelist, static_cast<size_t>((n + 1) * sizeof(struct dirent*))));
if(namelist == 0)
{
closedir(d);
@@ -63,7 +64,7 @@ chownRecursive(const string& path, uid_t uid, gid_t gid)
}
size_t entrysize = sizeof(struct dirent) - sizeof(entry->d_name) + strlen(entry->d_name) + 1;
- namelist[n] = (struct dirent*)malloc(entrysize);
+ namelist[n] = static_cast<struct dirent*>(malloc(entrysize));
if(namelist[n] == 0)
{
closedir(d);
diff --git a/cpp/src/IcePatch2/Client.cpp b/cpp/src/IcePatch2/Client.cpp
index a080d253a25..5401c4c2d1c 100644
--- a/cpp/src/IcePatch2/Client.cpp
+++ b/cpp/src/IcePatch2/Client.cpp
@@ -242,7 +242,7 @@ Client::run(int argc, char* argv[])
vector<string> args;
try
{
- args = opts.parse(argc, (const char**)argv);
+ args = opts.parse(argc, const_cast<const char**>(argv));
}
catch(const IceUtilInternal::BadOptException& e)
{
diff --git a/cpp/src/IcePatch2/Server.cpp b/cpp/src/IcePatch2/Server.cpp
index 0eb0aaf730e..e97a91757b6 100644
--- a/cpp/src/IcePatch2/Server.cpp
+++ b/cpp/src/IcePatch2/Server.cpp
@@ -55,7 +55,7 @@ IcePatch2::PatcherService::start(int argc, char* argv[], int& status)
vector<string> args;
try
{
- args = opts.parse(argc, (const char**)argv);
+ args = opts.parse(argc, const_cast<const char**>(argv));
}
catch(const IceUtilInternal::BadOptException& e)
{
diff --git a/cpp/src/IceSSL/Certificate.cpp b/cpp/src/IceSSL/Certificate.cpp
index 197a6ee3c36..b2881824d3f 100644
--- a/cpp/src/IceSSL/Certificate.cpp
+++ b/cpp/src/IceSSL/Certificate.cpp
@@ -19,6 +19,10 @@
#if defined(ICE_USE_OPENSSL)
# include <openssl/x509v3.h>
# include <openssl/pem.h>
+//
+// Avoid old style cast warnings from OpenSSL macros
+//
+# pragma GCC diagnostic ignored "-Wold-style-cast"
#elif defined(ICE_USE_SECURE_TRANSPORT)
# include <Security/Security.h>
#endif
diff --git a/cpp/src/IceSSL/RFC2253.cpp b/cpp/src/IceSSL/RFC2253.cpp
index eaa86e979c5..578b55efa4d 100644
--- a/cpp/src/IceSSL/RFC2253.cpp
+++ b/cpp/src/IceSSL/RFC2253.cpp
@@ -198,7 +198,7 @@ unescapeHex(const string& data, size_t pos)
{
throw ParseException(__FILE__, __LINE__, "unescape: invalid hex pair");
}
- return (char)(hexToInt(data[pos]) * 16 + hexToInt(data[pos + 1]));
+ return static_cast<char>(hexToInt(data[pos]) * 16 + hexToInt(data[pos + 1]));
}
static pair<string,string>
diff --git a/cpp/src/IceSSL/Util.cpp b/cpp/src/IceSSL/Util.cpp
index 4150f377b8e..0f7ba1186b2 100644
--- a/cpp/src/IceSSL/Util.cpp
+++ b/cpp/src/IceSSL/Util.cpp
@@ -22,6 +22,10 @@
#ifdef ICE_USE_OPENSSL
# include <openssl/err.h>
+//
+// Avoid old style cast warnings from OpenSSL macros
+//
+# pragma GCC diagnostic ignored "-Wold-style-cast"
#endif
using namespace std;
diff --git a/cpp/src/IceStorm/Admin.cpp b/cpp/src/IceStorm/Admin.cpp
index 392d58fea8c..2fc0a4708df 100644
--- a/cpp/src/IceStorm/Admin.cpp
+++ b/cpp/src/IceStorm/Admin.cpp
@@ -74,7 +74,7 @@ Client::run(int argc, char* argv[])
vector<string> args;
try
{
- args = opts.parse(argc, (const char**)argv);
+ args = opts.parse(argc, const_cast<const char**>(argv));
}
catch(const IceUtilInternal::BadOptException& e)
{
diff --git a/cpp/src/IceStorm/Grammar.cpp b/cpp/src/IceStorm/Grammar.cpp
index 27e050e8b7c..7370e6cc4ef 100644
--- a/cpp/src/IceStorm/Grammar.cpp
+++ b/cpp/src/IceStorm/Grammar.cpp
@@ -91,6 +91,13 @@
# pragma warning( disable : 4065 )
#endif
+//
+// Avoid old style cast warnings in generated grammar
+//
+#ifdef __GNUC__
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
+
using namespace std;
using namespace Ice;
using namespace IceStorm;
@@ -104,7 +111,7 @@ yyerror(const char* s)
/* Line 189 of yacc.c */
-#line 108 "Grammar.tab.c"
+#line 115 "Grammar.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -160,7 +167,7 @@ typedef int YYSTYPE;
/* Line 264 of yacc.c */
-#line 164 "Grammar.tab.c"
+#line 171 "Grammar.tab.c"
#ifdef short
# undef short
@@ -453,10 +460,10 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
- 0, 60, 60, 64, 71, 74, 82, 86, 90, 94,
- 98, 102, 106, 110, 114, 118, 122, 126, 130, 134,
- 142, 147, 153, 161, 164, 167, 170, 173, 176, 179,
- 182, 185
+ 0, 67, 67, 71, 78, 81, 89, 93, 97, 101,
+ 105, 109, 113, 117, 121, 125, 129, 133, 137, 141,
+ 149, 154, 160, 168, 171, 174, 177, 180, 183, 186,
+ 189, 192
};
#endif
@@ -1389,7 +1396,7 @@ yyreduce:
case 2:
/* Line 1455 of yacc.c */
-#line 61 "Grammar.y"
+#line 68 "Grammar.y"
{
;}
break;
@@ -1397,7 +1404,7 @@ yyreduce:
case 3:
/* Line 1455 of yacc.c */
-#line 64 "Grammar.y"
+#line 71 "Grammar.y"
{
;}
break;
@@ -1405,7 +1412,7 @@ yyreduce:
case 4:
/* Line 1455 of yacc.c */
-#line 72 "Grammar.y"
+#line 79 "Grammar.y"
{
;}
break;
@@ -1413,7 +1420,7 @@ yyreduce:
case 5:
/* Line 1455 of yacc.c */
-#line 75 "Grammar.y"
+#line 82 "Grammar.y"
{
;}
break;
@@ -1421,7 +1428,7 @@ yyreduce:
case 6:
/* Line 1455 of yacc.c */
-#line 83 "Grammar.y"
+#line 90 "Grammar.y"
{
parser->usage();
;}
@@ -1430,7 +1437,7 @@ yyreduce:
case 7:
/* Line 1455 of yacc.c */
-#line 87 "Grammar.y"
+#line 94 "Grammar.y"
{
return 0;
;}
@@ -1439,7 +1446,7 @@ yyreduce:
case 8:
/* Line 1455 of yacc.c */
-#line 91 "Grammar.y"
+#line 98 "Grammar.y"
{
parser->create((yyvsp[(2) - (3)]));
;}
@@ -1448,7 +1455,7 @@ yyreduce:
case 9:
/* Line 1455 of yacc.c */
-#line 95 "Grammar.y"
+#line 102 "Grammar.y"
{
parser->current((yyvsp[(2) - (3)]));
;}
@@ -1457,7 +1464,7 @@ yyreduce:
case 10:
/* Line 1455 of yacc.c */
-#line 99 "Grammar.y"
+#line 106 "Grammar.y"
{
parser->destroy((yyvsp[(2) - (3)]));
;}
@@ -1466,7 +1473,7 @@ yyreduce:
case 11:
/* Line 1455 of yacc.c */
-#line 103 "Grammar.y"
+#line 110 "Grammar.y"
{
parser->link((yyvsp[(2) - (3)]));
;}
@@ -1475,7 +1482,7 @@ yyreduce:
case 12:
/* Line 1455 of yacc.c */
-#line 107 "Grammar.y"
+#line 114 "Grammar.y"
{
parser->unlink((yyvsp[(2) - (3)]));
;}
@@ -1484,7 +1491,7 @@ yyreduce:
case 13:
/* Line 1455 of yacc.c */
-#line 111 "Grammar.y"
+#line 118 "Grammar.y"
{
parser->links((yyvsp[(2) - (3)]));
;}
@@ -1493,7 +1500,7 @@ yyreduce:
case 14:
/* Line 1455 of yacc.c */
-#line 115 "Grammar.y"
+#line 122 "Grammar.y"
{
parser->topics((yyvsp[(2) - (3)]));
;}
@@ -1502,7 +1509,7 @@ yyreduce:
case 15:
/* Line 1455 of yacc.c */
-#line 119 "Grammar.y"
+#line 126 "Grammar.y"
{
parser->replica((yyvsp[(2) - (3)]));
;}
@@ -1511,7 +1518,7 @@ yyreduce:
case 16:
/* Line 1455 of yacc.c */
-#line 123 "Grammar.y"
+#line 130 "Grammar.y"
{
parser->subscribers((yyvsp[(2) - (3)]));
;}
@@ -1520,7 +1527,7 @@ yyreduce:
case 17:
/* Line 1455 of yacc.c */
-#line 127 "Grammar.y"
+#line 134 "Grammar.y"
{
parser->invalidCommand("unknown command `" + (yyvsp[(1) - (3)]).front() + "' (type `help' for more info)");
;}
@@ -1529,7 +1536,7 @@ yyreduce:
case 18:
/* Line 1455 of yacc.c */
-#line 131 "Grammar.y"
+#line 138 "Grammar.y"
{
yyerrok;
;}
@@ -1538,7 +1545,7 @@ yyreduce:
case 19:
/* Line 1455 of yacc.c */
-#line 135 "Grammar.y"
+#line 142 "Grammar.y"
{
;}
break;
@@ -1546,7 +1553,7 @@ yyreduce:
case 20:
/* Line 1455 of yacc.c */
-#line 143 "Grammar.y"
+#line 150 "Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
(yyval).push_front((yyvsp[(1) - (2)]).front());
@@ -1556,7 +1563,7 @@ yyreduce:
case 21:
/* Line 1455 of yacc.c */
-#line 148 "Grammar.y"
+#line 155 "Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
(yyval).push_front((yyvsp[(1) - (2)]).front());
@@ -1566,7 +1573,7 @@ yyreduce:
case 22:
/* Line 1455 of yacc.c */
-#line 153 "Grammar.y"
+#line 160 "Grammar.y"
{
(yyval) = YYSTYPE();
;}
@@ -1575,7 +1582,7 @@ yyreduce:
case 23:
/* Line 1455 of yacc.c */
-#line 162 "Grammar.y"
+#line 169 "Grammar.y"
{
;}
break;
@@ -1583,7 +1590,7 @@ yyreduce:
case 24:
/* Line 1455 of yacc.c */
-#line 165 "Grammar.y"
+#line 172 "Grammar.y"
{
;}
break;
@@ -1591,7 +1598,7 @@ yyreduce:
case 25:
/* Line 1455 of yacc.c */
-#line 168 "Grammar.y"
+#line 175 "Grammar.y"
{
;}
break;
@@ -1599,7 +1606,7 @@ yyreduce:
case 26:
/* Line 1455 of yacc.c */
-#line 171 "Grammar.y"
+#line 178 "Grammar.y"
{
;}
break;
@@ -1607,7 +1614,7 @@ yyreduce:
case 27:
/* Line 1455 of yacc.c */
-#line 174 "Grammar.y"
+#line 181 "Grammar.y"
{
;}
break;
@@ -1615,7 +1622,7 @@ yyreduce:
case 28:
/* Line 1455 of yacc.c */
-#line 177 "Grammar.y"
+#line 184 "Grammar.y"
{
;}
break;
@@ -1623,7 +1630,7 @@ yyreduce:
case 29:
/* Line 1455 of yacc.c */
-#line 180 "Grammar.y"
+#line 187 "Grammar.y"
{
;}
break;
@@ -1631,7 +1638,7 @@ yyreduce:
case 30:
/* Line 1455 of yacc.c */
-#line 183 "Grammar.y"
+#line 190 "Grammar.y"
{
;}
break;
@@ -1639,7 +1646,7 @@ yyreduce:
case 31:
/* Line 1455 of yacc.c */
-#line 186 "Grammar.y"
+#line 193 "Grammar.y"
{
;}
break;
@@ -1647,7 +1654,7 @@ yyreduce:
/* Line 1455 of yacc.c */
-#line 1651 "Grammar.tab.c"
+#line 1658 "Grammar.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1859,6 +1866,6 @@ yyreturn:
/* Line 1675 of yacc.c */
-#line 189 "Grammar.y"
+#line 196 "Grammar.y"
diff --git a/cpp/src/IceStorm/Grammar.y b/cpp/src/IceStorm/Grammar.y
index 2c6daad2d27..1f1f80754d0 100644
--- a/cpp/src/IceStorm/Grammar.y
+++ b/cpp/src/IceStorm/Grammar.y
@@ -20,6 +20,13 @@
# pragma warning( disable : 4065 )
#endif
+//
+// Avoid old style cast warnings in generated grammar
+//
+#ifdef __GNUC__
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
+
using namespace std;
using namespace Ice;
using namespace IceStorm;
diff --git a/cpp/src/IceStorm/Parser.cpp b/cpp/src/IceStorm/Parser.cpp
index 462a46dca03..d8ea7429dd4 100644
--- a/cpp/src/IceStorm/Parser.cpp
+++ b/cpp/src/IceStorm/Parser.cpp
@@ -480,7 +480,7 @@ Parser::getInput(char* buf, int& result, int maxSize)
}
}
- result = (int) line.length();
+ result = static_cast<int>(line.length());
if(result > maxSize)
{
error("input line too long");
diff --git a/cpp/src/IceUtil/ConvertUTF.cpp b/cpp/src/IceUtil/ConvertUTF.cpp
index 0797c332062..14b409bc622 100644
--- a/cpp/src/IceUtil/ConvertUTF.cpp
+++ b/cpp/src/IceUtil/ConvertUTF.cpp
@@ -57,6 +57,11 @@
using namespace IceUtil;
+#ifdef __GNUC__
+//# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
+
namespace IceUtilInternal
{
diff --git a/cpp/src/IceUtil/ConvertUTF.h b/cpp/src/IceUtil/ConvertUTF.h
index 17a638f320c..81414351ebf 100644
--- a/cpp/src/IceUtil/ConvertUTF.h
+++ b/cpp/src/IceUtil/ConvertUTF.h
@@ -111,11 +111,11 @@ typedef unsigned char UTF8; /* typically 8 bits */
typedef bool Boolean; /* 0 or 1 */
/* Some fundamental constants */
-#define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD
-#define UNI_MAX_BMP (UTF32)0x0000FFFF
-#define UNI_MAX_UTF16 (UTF32)0x0010FFFF
-#define UNI_MAX_UTF32 (UTF32)0x7FFFFFFF
-#define UNI_MAX_LEGAL_UTF32 (UTF32)0x0010FFFF
+#define UNI_REPLACEMENT_CHAR static_cast<UTF32>(0x0000FFFD)
+#define UNI_MAX_BMP static_cast<UTF32>(0x0000FFFF)
+#define UNI_MAX_UTF16 static_cast<UTF32>(0x0010FFFF)
+#define UNI_MAX_UTF32 static_cast<UTF32>(0x7FFFFFFF)
+#define UNI_MAX_LEGAL_UTF32 static_cast<UTF32>(0x0010FFFF)
ConversionResult ConvertUTF8toUTF16(
diff --git a/cpp/src/IceUtil/StringConverter.cpp b/cpp/src/IceUtil/StringConverter.cpp
index 2026cdc3d08..03436ad78d9 100644
--- a/cpp/src/IceUtil/StringConverter.cpp
+++ b/cpp/src/IceUtil/StringConverter.cpp
@@ -67,13 +67,13 @@ public:
{
if(_buffer == 0)
{
- _buffer = (Byte*)malloc(howMany);
+ _buffer = static_cast<Byte*>(malloc(howMany));
}
else
{
assert(firstUnused != 0);
_offset = firstUnused - _buffer;
- _buffer = (Byte*)realloc(_buffer, _offset + howMany);
+ _buffer = static_cast<Byte*>(realloc(_buffer, _offset + howMany));
}
if(!_buffer)
diff --git a/cpp/src/IceUtil/StringUtil.cpp b/cpp/src/IceUtil/StringUtil.cpp
index e8b234f91e3..b45298a6e98 100644
--- a/cpp/src/IceUtil/StringUtil.cpp
+++ b/cpp/src/IceUtil/StringUtil.cpp
@@ -178,7 +178,7 @@ checkChar(const string& s, string::size_type pos)
{
ostr << "first character";
}
- ostr << " is not a printable ASCII character (ordinal " << (int)c << ")";
+ ostr << " is not a printable ASCII character (ordinal " << static_cast<int>(c) << ")";
throw IllegalArgumentException(__FILE__, __LINE__, ostr.str());
}
return c;
@@ -273,7 +273,7 @@ decodeChar(const string& s, string::size_type start, string::size_type end, stri
ostr << "octal value \\" << oct << val << dec << " (" << val << ") is out of range";
throw IllegalArgumentException(__FILE__, __LINE__, ostr.str());
}
- c = (char)val;
+ c = static_cast<char>(val);
break;
}
default:
diff --git a/cpp/src/Slice/Grammar.cpp b/cpp/src/Slice/Grammar.cpp
index 1d12b32567c..54bba9d542d 100644
--- a/cpp/src/Slice/Grammar.cpp
+++ b/cpp/src/Slice/Grammar.cpp
@@ -101,6 +101,13 @@
# pragma warning( disable : 4065 )
#endif
+//
+// Avoid old style cast warnings in generated grammar
+//
+#ifdef __GNUC__
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
+
using namespace std;
using namespace Slice;
@@ -123,7 +130,7 @@ slice_error(const char* s)
/* Line 189 of yacc.c */
-#line 127 "Grammar.tab.c"
+#line 134 "Grammar.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -209,7 +216,7 @@ typedef int YYSTYPE;
/* Line 264 of yacc.c */
-#line 213 "Grammar.tab.c"
+#line 220 "Grammar.tab.c"
#ifdef short
# undef short
@@ -572,27 +579,27 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 107, 107, 115, 124, 129, 138, 137, 147, 146,
- 157, 156, 161, 166, 173, 177, 181, 185, 189, 193,
- 197, 201, 205, 209, 213, 217, 221, 231, 230, 264,
- 268, 279, 290, 289, 316, 325, 333, 342, 345, 350,
- 357, 370, 390, 446, 454, 467, 475, 490, 496, 500,
- 511, 522, 521, 563, 572, 575, 580, 587, 593, 597,
- 608, 633, 698, 710, 724, 723, 763, 798, 806, 811,
- 819, 828, 831, 836, 843, 865, 892, 914, 940, 949,
- 960, 969, 978, 988, 1002, 1008, 1016, 1028, 1052, 1077,
- 1101, 1132, 1131, 1154, 1153, 1176, 1177, 1183, 1187, 1198,
- 1213, 1212, 1247, 1282, 1317, 1327, 1332, 1340, 1349, 1352,
- 1357, 1364, 1370, 1377, 1389, 1401, 1412, 1421, 1436, 1447,
- 1464, 1468, 1480, 1479, 1503, 1518, 1524, 1532, 1544, 1567,
- 1575, 1584, 1588, 1627, 1634, 1645, 1647, 1663, 1679, 1691,
- 1703, 1714, 1730, 1735, 1743, 1746, 1752, 1765, 1769, 1773,
- 1777, 1781, 1785, 1789, 1793, 1797, 1801, 1805, 1809, 1828,
- 1869, 1875, 1883, 1890, 1902, 1909, 1919, 1932, 1945, 1991,
- 2002, 2013, 2029, 2038, 2052, 2055, 2058, 2061, 2064, 2067,
- 2070, 2073, 2076, 2079, 2082, 2085, 2088, 2091, 2094, 2097,
- 2100, 2103, 2106, 2109, 2112, 2115, 2118, 2121, 2124, 2127,
- 2130, 2133, 2136
+ 0, 114, 114, 122, 131, 136, 145, 144, 154, 153,
+ 164, 163, 168, 173, 180, 184, 188, 192, 196, 200,
+ 204, 208, 212, 216, 220, 224, 228, 238, 237, 271,
+ 275, 286, 297, 296, 323, 332, 340, 349, 352, 357,
+ 364, 377, 397, 453, 461, 474, 482, 497, 503, 507,
+ 518, 529, 528, 570, 579, 582, 587, 594, 600, 604,
+ 615, 640, 705, 717, 731, 730, 770, 805, 813, 818,
+ 826, 835, 838, 843, 850, 872, 899, 921, 947, 956,
+ 967, 976, 985, 995, 1009, 1015, 1023, 1035, 1059, 1084,
+ 1108, 1139, 1138, 1161, 1160, 1183, 1184, 1190, 1194, 1205,
+ 1220, 1219, 1254, 1289, 1324, 1334, 1339, 1347, 1356, 1359,
+ 1364, 1371, 1377, 1384, 1396, 1408, 1419, 1428, 1443, 1454,
+ 1471, 1475, 1487, 1486, 1510, 1525, 1531, 1539, 1551, 1574,
+ 1582, 1591, 1595, 1634, 1641, 1652, 1654, 1670, 1686, 1698,
+ 1710, 1721, 1737, 1742, 1750, 1753, 1759, 1772, 1776, 1780,
+ 1784, 1788, 1792, 1796, 1800, 1804, 1808, 1812, 1816, 1835,
+ 1876, 1882, 1890, 1897, 1909, 1916, 1926, 1939, 1952, 1998,
+ 2009, 2020, 2036, 2045, 2059, 2062, 2065, 2068, 2071, 2074,
+ 2077, 2080, 2083, 2086, 2089, 2092, 2095, 2098, 2101, 2104,
+ 2107, 2110, 2113, 2116, 2119, 2122, 2125, 2128, 2131, 2134,
+ 2137, 2140, 2143
};
#endif
@@ -1838,7 +1845,7 @@ yyreduce:
case 2:
/* Line 1455 of yacc.c */
-#line 108 "../Slice/Grammar.y"
+#line 115 "../Slice/Grammar.y"
{
;}
break;
@@ -1846,7 +1853,7 @@ yyreduce:
case 3:
/* Line 1455 of yacc.c */
-#line 116 "../Slice/Grammar.y"
+#line 123 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (3)]);
;}
@@ -1855,7 +1862,7 @@ yyreduce:
case 4:
/* Line 1455 of yacc.c */
-#line 125 "../Slice/Grammar.y"
+#line 132 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (3)]);
;}
@@ -1864,7 +1871,7 @@ yyreduce:
case 5:
/* Line 1455 of yacc.c */
-#line 129 "../Slice/Grammar.y"
+#line 136 "../Slice/Grammar.y"
{
(yyval) = new StringListTok;
;}
@@ -1873,7 +1880,7 @@ yyreduce:
case 6:
/* Line 1455 of yacc.c */
-#line 138 "../Slice/Grammar.y"
+#line 145 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (1)]));
if(!metaData->v.empty())
@@ -1886,7 +1893,7 @@ yyreduce:
case 8:
/* Line 1455 of yacc.c */
-#line 147 "../Slice/Grammar.y"
+#line 154 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (2)]));
ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -1900,7 +1907,7 @@ yyreduce:
case 10:
/* Line 1455 of yacc.c */
-#line 157 "../Slice/Grammar.y"
+#line 164 "../Slice/Grammar.y"
{
yyerrok;
;}
@@ -1909,7 +1916,7 @@ yyreduce:
case 12:
/* Line 1455 of yacc.c */
-#line 162 "../Slice/Grammar.y"
+#line 169 "../Slice/Grammar.y"
{
unit->error("`;' missing after definition");
;}
@@ -1918,7 +1925,7 @@ yyreduce:
case 13:
/* Line 1455 of yacc.c */
-#line 166 "../Slice/Grammar.y"
+#line 173 "../Slice/Grammar.y"
{
;}
break;
@@ -1926,7 +1933,7 @@ yyreduce:
case 14:
/* Line 1455 of yacc.c */
-#line 174 "../Slice/Grammar.y"
+#line 181 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ModulePtr::dynamicCast((yyvsp[(1) - (1)])));
;}
@@ -1935,7 +1942,7 @@ yyreduce:
case 15:
/* Line 1455 of yacc.c */
-#line 178 "../Slice/Grammar.y"
+#line 185 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ClassDeclPtr::dynamicCast((yyvsp[(1) - (1)])));
;}
@@ -1944,7 +1951,7 @@ yyreduce:
case 16:
/* Line 1455 of yacc.c */
-#line 182 "../Slice/Grammar.y"
+#line 189 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ClassDefPtr::dynamicCast((yyvsp[(1) - (1)])));
;}
@@ -1953,7 +1960,7 @@ yyreduce:
case 17:
/* Line 1455 of yacc.c */
-#line 186 "../Slice/Grammar.y"
+#line 193 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ClassDeclPtr::dynamicCast((yyvsp[(1) - (1)])));
;}
@@ -1962,7 +1969,7 @@ yyreduce:
case 18:
/* Line 1455 of yacc.c */
-#line 190 "../Slice/Grammar.y"
+#line 197 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ClassDefPtr::dynamicCast((yyvsp[(1) - (1)])));
;}
@@ -1971,7 +1978,7 @@ yyreduce:
case 19:
/* Line 1455 of yacc.c */
-#line 194 "../Slice/Grammar.y"
+#line 201 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0);
;}
@@ -1980,7 +1987,7 @@ yyreduce:
case 20:
/* Line 1455 of yacc.c */
-#line 198 "../Slice/Grammar.y"
+#line 205 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ExceptionPtr::dynamicCast((yyvsp[(1) - (1)])));
;}
@@ -1989,7 +1996,7 @@ yyreduce:
case 21:
/* Line 1455 of yacc.c */
-#line 202 "../Slice/Grammar.y"
+#line 209 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0);
;}
@@ -1998,7 +2005,7 @@ yyreduce:
case 22:
/* Line 1455 of yacc.c */
-#line 206 "../Slice/Grammar.y"
+#line 213 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || StructPtr::dynamicCast((yyvsp[(1) - (1)])));
;}
@@ -2007,7 +2014,7 @@ yyreduce:
case 23:
/* Line 1455 of yacc.c */
-#line 210 "../Slice/Grammar.y"
+#line 217 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || SequencePtr::dynamicCast((yyvsp[(1) - (1)])));
;}
@@ -2016,7 +2023,7 @@ yyreduce:
case 24:
/* Line 1455 of yacc.c */
-#line 214 "../Slice/Grammar.y"
+#line 221 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || DictionaryPtr::dynamicCast((yyvsp[(1) - (1)])));
;}
@@ -2025,7 +2032,7 @@ yyreduce:
case 25:
/* Line 1455 of yacc.c */
-#line 218 "../Slice/Grammar.y"
+#line 225 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || EnumPtr::dynamicCast((yyvsp[(1) - (1)])));
;}
@@ -2034,7 +2041,7 @@ yyreduce:
case 26:
/* Line 1455 of yacc.c */
-#line 222 "../Slice/Grammar.y"
+#line 229 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ConstPtr::dynamicCast((yyvsp[(1) - (1)])));
;}
@@ -2043,7 +2050,7 @@ yyreduce:
case 27:
/* Line 1455 of yacc.c */
-#line 231 "../Slice/Grammar.y"
+#line 238 "../Slice/Grammar.y"
{
unit->setSeenDefinition();
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -2065,7 +2072,7 @@ yyreduce:
case 28:
/* Line 1455 of yacc.c */
-#line 248 "../Slice/Grammar.y"
+#line 255 "../Slice/Grammar.y"
{
if((yyvsp[(3) - (6)]))
{
@@ -2082,7 +2089,7 @@ yyreduce:
case 29:
/* Line 1455 of yacc.c */
-#line 265 "../Slice/Grammar.y"
+#line 272 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
;}
@@ -2091,7 +2098,7 @@ yyreduce:
case 30:
/* Line 1455 of yacc.c */
-#line 269 "../Slice/Grammar.y"
+#line 276 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
unit->error("keyword `" + ident->v + "' cannot be used as exception name");
@@ -2102,7 +2109,7 @@ yyreduce:
case 31:
/* Line 1455 of yacc.c */
-#line 280 "../Slice/Grammar.y"
+#line 287 "../Slice/Grammar.y"
{
unit->error("exceptions cannot be forward declared");
(yyval) = 0;
@@ -2112,7 +2119,7 @@ yyreduce:
case 32:
/* Line 1455 of yacc.c */
-#line 290 "../Slice/Grammar.y"
+#line 297 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)]));
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (3)]));
@@ -2131,7 +2138,7 @@ yyreduce:
case 33:
/* Line 1455 of yacc.c */
-#line 304 "../Slice/Grammar.y"
+#line 311 "../Slice/Grammar.y"
{
if((yyvsp[(4) - (7)]))
{
@@ -2144,7 +2151,7 @@ yyreduce:
case 34:
/* Line 1455 of yacc.c */
-#line 317 "../Slice/Grammar.y"
+#line 324 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
ContainerPtr cont = unit->currentContainer();
@@ -2157,7 +2164,7 @@ yyreduce:
case 35:
/* Line 1455 of yacc.c */
-#line 325 "../Slice/Grammar.y"
+#line 332 "../Slice/Grammar.y"
{
(yyval) = 0;
;}
@@ -2166,7 +2173,7 @@ yyreduce:
case 36:
/* Line 1455 of yacc.c */
-#line 334 "../Slice/Grammar.y"
+#line 341 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)]));
ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)]));
@@ -2180,7 +2187,7 @@ yyreduce:
case 37:
/* Line 1455 of yacc.c */
-#line 343 "../Slice/Grammar.y"
+#line 350 "../Slice/Grammar.y"
{
;}
break;
@@ -2188,7 +2195,7 @@ yyreduce:
case 38:
/* Line 1455 of yacc.c */
-#line 346 "../Slice/Grammar.y"
+#line 353 "../Slice/Grammar.y"
{
unit->error("`;' missing after definition");
;}
@@ -2197,7 +2204,7 @@ yyreduce:
case 39:
/* Line 1455 of yacc.c */
-#line 350 "../Slice/Grammar.y"
+#line 357 "../Slice/Grammar.y"
{
;}
break;
@@ -2205,7 +2212,7 @@ yyreduce:
case 40:
/* Line 1455 of yacc.c */
-#line 358 "../Slice/Grammar.y"
+#line 365 "../Slice/Grammar.y"
{
TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)]));
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -2218,7 +2225,7 @@ yyreduce:
case 41:
/* Line 1455 of yacc.c */
-#line 371 "../Slice/Grammar.y"
+#line 378 "../Slice/Grammar.y"
{
IntegerTokPtr i = IntegerTokPtr::dynamicCast((yyvsp[(2) - (3)]));
@@ -2243,7 +2250,7 @@ yyreduce:
case 42:
/* Line 1455 of yacc.c */
-#line 391 "../Slice/Grammar.y"
+#line 398 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (3)]));
@@ -2304,7 +2311,7 @@ yyreduce:
case 43:
/* Line 1455 of yacc.c */
-#line 447 "../Slice/Grammar.y"
+#line 454 "../Slice/Grammar.y"
{
unit->error("missing tag for optional");
OptionalDefTokPtr m = new OptionalDefTok; // Dummy
@@ -2317,7 +2324,7 @@ yyreduce:
case 44:
/* Line 1455 of yacc.c */
-#line 455 "../Slice/Grammar.y"
+#line 462 "../Slice/Grammar.y"
{
unit->error("missing tag for optional");
OptionalDefTokPtr m = new OptionalDefTok; // Dummy
@@ -2330,7 +2337,7 @@ yyreduce:
case 45:
/* Line 1455 of yacc.c */
-#line 468 "../Slice/Grammar.y"
+#line 475 "../Slice/Grammar.y"
{
OptionalDefTokPtr m = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)]));
TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -2343,7 +2350,7 @@ yyreduce:
case 46:
/* Line 1455 of yacc.c */
-#line 476 "../Slice/Grammar.y"
+#line 483 "../Slice/Grammar.y"
{
TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
OptionalDefTokPtr m = new OptionalDefTok;
@@ -2358,7 +2365,7 @@ yyreduce:
case 48:
/* Line 1455 of yacc.c */
-#line 497 "../Slice/Grammar.y"
+#line 504 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
;}
@@ -2367,7 +2374,7 @@ yyreduce:
case 49:
/* Line 1455 of yacc.c */
-#line 501 "../Slice/Grammar.y"
+#line 508 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
unit->error("keyword `" + ident->v + "' cannot be used as struct name");
@@ -2378,7 +2385,7 @@ yyreduce:
case 50:
/* Line 1455 of yacc.c */
-#line 512 "../Slice/Grammar.y"
+#line 519 "../Slice/Grammar.y"
{
unit->error("structs cannot be forward declared");
(yyval) = 0; // Dummy
@@ -2388,7 +2395,7 @@ yyreduce:
case 51:
/* Line 1455 of yacc.c */
-#line 522 "../Slice/Grammar.y"
+#line 529 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)]));
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -2412,7 +2419,7 @@ yyreduce:
case 52:
/* Line 1455 of yacc.c */
-#line 541 "../Slice/Grammar.y"
+#line 548 "../Slice/Grammar.y"
{
if((yyvsp[(3) - (6)]))
{
@@ -2435,7 +2442,7 @@ yyreduce:
case 53:
/* Line 1455 of yacc.c */
-#line 564 "../Slice/Grammar.y"
+#line 571 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)]));
ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)]));
@@ -2449,7 +2456,7 @@ yyreduce:
case 54:
/* Line 1455 of yacc.c */
-#line 573 "../Slice/Grammar.y"
+#line 580 "../Slice/Grammar.y"
{
;}
break;
@@ -2457,7 +2464,7 @@ yyreduce:
case 55:
/* Line 1455 of yacc.c */
-#line 576 "../Slice/Grammar.y"
+#line 583 "../Slice/Grammar.y"
{
unit->error("`;' missing after definition");
;}
@@ -2466,7 +2473,7 @@ yyreduce:
case 56:
/* Line 1455 of yacc.c */
-#line 580 "../Slice/Grammar.y"
+#line 587 "../Slice/Grammar.y"
{
;}
break;
@@ -2474,7 +2481,7 @@ yyreduce:
case 58:
/* Line 1455 of yacc.c */
-#line 594 "../Slice/Grammar.y"
+#line 601 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
;}
@@ -2483,7 +2490,7 @@ yyreduce:
case 59:
/* Line 1455 of yacc.c */
-#line 598 "../Slice/Grammar.y"
+#line 605 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
unit->error("keyword `" + ident->v + "' cannot be used as class name");
@@ -2494,7 +2501,7 @@ yyreduce:
case 60:
/* Line 1455 of yacc.c */
-#line 609 "../Slice/Grammar.y"
+#line 616 "../Slice/Grammar.y"
{
IceUtil::Int64 id = IntegerTokPtr::dynamicCast((yyvsp[(3) - (4)]))->v;
if(id < 0)
@@ -2524,7 +2531,7 @@ yyreduce:
case 61:
/* Line 1455 of yacc.c */
-#line 634 "../Slice/Grammar.y"
+#line 641 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(3) - (4)]));
@@ -2594,7 +2601,7 @@ yyreduce:
case 62:
/* Line 1455 of yacc.c */
-#line 699 "../Slice/Grammar.y"
+#line 706 "../Slice/Grammar.y"
{
ClassIdTokPtr classId = new ClassIdTok();
classId->v = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]))->v;
@@ -2606,7 +2613,7 @@ yyreduce:
case 63:
/* Line 1455 of yacc.c */
-#line 711 "../Slice/Grammar.y"
+#line 718 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)]));
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -2619,7 +2626,7 @@ yyreduce:
case 64:
/* Line 1455 of yacc.c */
-#line 724 "../Slice/Grammar.y"
+#line 731 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (4)]));
ClassIdTokPtr ident = ClassIdTokPtr::dynamicCast((yyvsp[(2) - (4)]));
@@ -2647,7 +2654,7 @@ yyreduce:
case 65:
/* Line 1455 of yacc.c */
-#line 747 "../Slice/Grammar.y"
+#line 754 "../Slice/Grammar.y"
{
if((yyvsp[(5) - (8)]))
{
@@ -2664,7 +2671,7 @@ yyreduce:
case 66:
/* Line 1455 of yacc.c */
-#line 764 "../Slice/Grammar.y"
+#line 771 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
ContainerPtr cont = unit->currentContainer();
@@ -2703,7 +2710,7 @@ yyreduce:
case 67:
/* Line 1455 of yacc.c */
-#line 798 "../Slice/Grammar.y"
+#line 805 "../Slice/Grammar.y"
{
(yyval) = 0;
;}
@@ -2712,7 +2719,7 @@ yyreduce:
case 68:
/* Line 1455 of yacc.c */
-#line 807 "../Slice/Grammar.y"
+#line 814 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
;}
@@ -2721,7 +2728,7 @@ yyreduce:
case 69:
/* Line 1455 of yacc.c */
-#line 811 "../Slice/Grammar.y"
+#line 818 "../Slice/Grammar.y"
{
(yyval) = new ClassListTok;
;}
@@ -2730,7 +2737,7 @@ yyreduce:
case 70:
/* Line 1455 of yacc.c */
-#line 820 "../Slice/Grammar.y"
+#line 827 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)]));
ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)]));
@@ -2744,7 +2751,7 @@ yyreduce:
case 71:
/* Line 1455 of yacc.c */
-#line 829 "../Slice/Grammar.y"
+#line 836 "../Slice/Grammar.y"
{
;}
break;
@@ -2752,7 +2759,7 @@ yyreduce:
case 72:
/* Line 1455 of yacc.c */
-#line 832 "../Slice/Grammar.y"
+#line 839 "../Slice/Grammar.y"
{
unit->error("`;' missing after definition");
;}
@@ -2761,7 +2768,7 @@ yyreduce:
case 73:
/* Line 1455 of yacc.c */
-#line 836 "../Slice/Grammar.y"
+#line 843 "../Slice/Grammar.y"
{
;}
break;
@@ -2769,7 +2776,7 @@ yyreduce:
case 74:
/* Line 1455 of yacc.c */
-#line 844 "../Slice/Grammar.y"
+#line 851 "../Slice/Grammar.y"
{
OptionalDefTokPtr def = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (1)]));
ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer());
@@ -2796,7 +2803,7 @@ yyreduce:
case 75:
/* Line 1455 of yacc.c */
-#line 866 "../Slice/Grammar.y"
+#line 873 "../Slice/Grammar.y"
{
OptionalDefTokPtr def = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (3)]));
ConstDefTokPtr value = ConstDefTokPtr::dynamicCast((yyvsp[(3) - (3)]));
@@ -2828,7 +2835,7 @@ yyreduce:
case 76:
/* Line 1455 of yacc.c */
-#line 893 "../Slice/Grammar.y"
+#line 900 "../Slice/Grammar.y"
{
TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)]));
string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v;
@@ -2855,7 +2862,7 @@ yyreduce:
case 77:
/* Line 1455 of yacc.c */
-#line 915 "../Slice/Grammar.y"
+#line 922 "../Slice/Grammar.y"
{
TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (1)]));
ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer());
@@ -2881,7 +2888,7 @@ yyreduce:
case 78:
/* Line 1455 of yacc.c */
-#line 941 "../Slice/Grammar.y"
+#line 948 "../Slice/Grammar.y"
{
TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
StructPtr st = StructPtr::dynamicCast(unit->currentContainer());
@@ -2895,7 +2902,7 @@ yyreduce:
case 79:
/* Line 1455 of yacc.c */
-#line 950 "../Slice/Grammar.y"
+#line 957 "../Slice/Grammar.y"
{
TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (3)]));
ConstDefTokPtr value = ConstDefTokPtr::dynamicCast((yyvsp[(3) - (3)]));
@@ -2911,7 +2918,7 @@ yyreduce:
case 80:
/* Line 1455 of yacc.c */
-#line 961 "../Slice/Grammar.y"
+#line 968 "../Slice/Grammar.y"
{
TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
StructPtr st = StructPtr::dynamicCast(unit->currentContainer());
@@ -2925,7 +2932,7 @@ yyreduce:
case 81:
/* Line 1455 of yacc.c */
-#line 970 "../Slice/Grammar.y"
+#line 977 "../Slice/Grammar.y"
{
TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(2) - (4)]));
StructPtr st = StructPtr::dynamicCast(unit->currentContainer());
@@ -2939,7 +2946,7 @@ yyreduce:
case 82:
/* Line 1455 of yacc.c */
-#line 979 "../Slice/Grammar.y"
+#line 986 "../Slice/Grammar.y"
{
TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)]));
string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v;
@@ -2954,7 +2961,7 @@ yyreduce:
case 83:
/* Line 1455 of yacc.c */
-#line 989 "../Slice/Grammar.y"
+#line 996 "../Slice/Grammar.y"
{
TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (1)]));
StructPtr st = StructPtr::dynamicCast(unit->currentContainer());
@@ -2968,7 +2975,7 @@ yyreduce:
case 84:
/* Line 1455 of yacc.c */
-#line 1003 "../Slice/Grammar.y"
+#line 1010 "../Slice/Grammar.y"
{
OptionalDefTokPtr m = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)]));
m->v.type = TypePtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -2979,7 +2986,7 @@ yyreduce:
case 85:
/* Line 1455 of yacc.c */
-#line 1009 "../Slice/Grammar.y"
+#line 1016 "../Slice/Grammar.y"
{
OptionalDefTokPtr m = new OptionalDefTok();
m->v.type = TypePtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -2992,7 +2999,7 @@ yyreduce:
case 86:
/* Line 1455 of yacc.c */
-#line 1017 "../Slice/Grammar.y"
+#line 1024 "../Slice/Grammar.y"
{
OptionalDefTokPtr m = new OptionalDefTok;
m->v.optional = false;
@@ -3004,7 +3011,7 @@ yyreduce:
case 87:
/* Line 1455 of yacc.c */
-#line 1029 "../Slice/Grammar.y"
+#line 1036 "../Slice/Grammar.y"
{
OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)]));
string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v;
@@ -3033,7 +3040,7 @@ yyreduce:
case 88:
/* Line 1455 of yacc.c */
-#line 1053 "../Slice/Grammar.y"
+#line 1060 "../Slice/Grammar.y"
{
OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(2) - (3)]));
string name = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]))->v;
@@ -3063,7 +3070,7 @@ yyreduce:
case 89:
/* Line 1455 of yacc.c */
-#line 1078 "../Slice/Grammar.y"
+#line 1085 "../Slice/Grammar.y"
{
OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)]));
string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v;
@@ -3092,7 +3099,7 @@ yyreduce:
case 90:
/* Line 1455 of yacc.c */
-#line 1102 "../Slice/Grammar.y"
+#line 1109 "../Slice/Grammar.y"
{
OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(2) - (3)]));
string name = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]))->v;
@@ -3122,7 +3129,7 @@ yyreduce:
case 91:
/* Line 1455 of yacc.c */
-#line 1132 "../Slice/Grammar.y"
+#line 1139 "../Slice/Grammar.y"
{
if((yyvsp[(1) - (3)]))
{
@@ -3139,7 +3146,7 @@ yyreduce:
case 92:
/* Line 1455 of yacc.c */
-#line 1144 "../Slice/Grammar.y"
+#line 1151 "../Slice/Grammar.y"
{
OperationPtr op = OperationPtr::dynamicCast((yyvsp[(4) - (5)]));
ExceptionListTokPtr el = ExceptionListTokPtr::dynamicCast((yyvsp[(5) - (5)]));
@@ -3154,7 +3161,7 @@ yyreduce:
case 93:
/* Line 1455 of yacc.c */
-#line 1154 "../Slice/Grammar.y"
+#line 1161 "../Slice/Grammar.y"
{
if((yyvsp[(1) - (3)]))
{
@@ -3167,7 +3174,7 @@ yyreduce:
case 94:
/* Line 1455 of yacc.c */
-#line 1162 "../Slice/Grammar.y"
+#line 1169 "../Slice/Grammar.y"
{
OperationPtr op = OperationPtr::dynamicCast((yyvsp[(4) - (5)]));
ExceptionListTokPtr el = ExceptionListTokPtr::dynamicCast((yyvsp[(5) - (5)]));
@@ -3182,7 +3189,7 @@ yyreduce:
case 97:
/* Line 1455 of yacc.c */
-#line 1184 "../Slice/Grammar.y"
+#line 1191 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
;}
@@ -3191,7 +3198,7 @@ yyreduce:
case 98:
/* Line 1455 of yacc.c */
-#line 1188 "../Slice/Grammar.y"
+#line 1195 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
unit->error("keyword `" + ident->v + "' cannot be used as interface name");
@@ -3202,7 +3209,7 @@ yyreduce:
case 99:
/* Line 1455 of yacc.c */
-#line 1199 "../Slice/Grammar.y"
+#line 1206 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)]));
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -3216,7 +3223,7 @@ yyreduce:
case 100:
/* Line 1455 of yacc.c */
-#line 1213 "../Slice/Grammar.y"
+#line 1220 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)]));
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (3)]));
@@ -3239,7 +3246,7 @@ yyreduce:
case 101:
/* Line 1455 of yacc.c */
-#line 1231 "../Slice/Grammar.y"
+#line 1238 "../Slice/Grammar.y"
{
if((yyvsp[(4) - (7)]))
{
@@ -3256,7 +3263,7 @@ yyreduce:
case 102:
/* Line 1455 of yacc.c */
-#line 1248 "../Slice/Grammar.y"
+#line 1255 "../Slice/Grammar.y"
{
ClassListTokPtr intfs = ClassListTokPtr::dynamicCast((yyvsp[(3) - (3)]));
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -3296,7 +3303,7 @@ yyreduce:
case 103:
/* Line 1455 of yacc.c */
-#line 1283 "../Slice/Grammar.y"
+#line 1290 "../Slice/Grammar.y"
{
ClassListTokPtr intfs = new ClassListTok;
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -3336,7 +3343,7 @@ yyreduce:
case 104:
/* Line 1455 of yacc.c */
-#line 1318 "../Slice/Grammar.y"
+#line 1325 "../Slice/Grammar.y"
{
unit->error("illegal inheritance from type Object");
(yyval) = new ClassListTok; // Dummy
@@ -3346,7 +3353,7 @@ yyreduce:
case 105:
/* Line 1455 of yacc.c */
-#line 1328 "../Slice/Grammar.y"
+#line 1335 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
;}
@@ -3355,7 +3362,7 @@ yyreduce:
case 106:
/* Line 1455 of yacc.c */
-#line 1332 "../Slice/Grammar.y"
+#line 1339 "../Slice/Grammar.y"
{
(yyval) = new ClassListTok;
;}
@@ -3364,7 +3371,7 @@ yyreduce:
case 107:
/* Line 1455 of yacc.c */
-#line 1341 "../Slice/Grammar.y"
+#line 1348 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)]));
ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)]));
@@ -3378,7 +3385,7 @@ yyreduce:
case 108:
/* Line 1455 of yacc.c */
-#line 1350 "../Slice/Grammar.y"
+#line 1357 "../Slice/Grammar.y"
{
;}
break;
@@ -3386,7 +3393,7 @@ yyreduce:
case 109:
/* Line 1455 of yacc.c */
-#line 1353 "../Slice/Grammar.y"
+#line 1360 "../Slice/Grammar.y"
{
unit->error("`;' missing after definition");
;}
@@ -3395,7 +3402,7 @@ yyreduce:
case 110:
/* Line 1455 of yacc.c */
-#line 1357 "../Slice/Grammar.y"
+#line 1364 "../Slice/Grammar.y"
{
;}
break;
@@ -3403,7 +3410,7 @@ yyreduce:
case 112:
/* Line 1455 of yacc.c */
-#line 1371 "../Slice/Grammar.y"
+#line 1378 "../Slice/Grammar.y"
{
ExceptionPtr exception = ExceptionPtr::dynamicCast((yyvsp[(1) - (3)]));
ExceptionListTokPtr exceptionList = ExceptionListTokPtr::dynamicCast((yyvsp[(3) - (3)]));
@@ -3415,7 +3422,7 @@ yyreduce:
case 113:
/* Line 1455 of yacc.c */
-#line 1378 "../Slice/Grammar.y"
+#line 1385 "../Slice/Grammar.y"
{
ExceptionPtr exception = ExceptionPtr::dynamicCast((yyvsp[(1) - (1)]));
ExceptionListTokPtr exceptionList = new ExceptionListTok;
@@ -3427,7 +3434,7 @@ yyreduce:
case 114:
/* Line 1455 of yacc.c */
-#line 1390 "../Slice/Grammar.y"
+#line 1397 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
ContainerPtr cont = unit->currentContainer();
@@ -3444,7 +3451,7 @@ yyreduce:
case 115:
/* Line 1455 of yacc.c */
-#line 1402 "../Slice/Grammar.y"
+#line 1409 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
unit->error("keyword `" + ident->v + "' cannot be used as exception name");
@@ -3455,7 +3462,7 @@ yyreduce:
case 116:
/* Line 1455 of yacc.c */
-#line 1413 "../Slice/Grammar.y"
+#line 1420 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (7)]));
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(7) - (7)]));
@@ -3469,7 +3476,7 @@ yyreduce:
case 117:
/* Line 1455 of yacc.c */
-#line 1422 "../Slice/Grammar.y"
+#line 1429 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (7)]));
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(7) - (7)]));
@@ -3484,7 +3491,7 @@ yyreduce:
case 118:
/* Line 1455 of yacc.c */
-#line 1437 "../Slice/Grammar.y"
+#line 1444 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (10)]));
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(10) - (10)]));
@@ -3500,7 +3507,7 @@ yyreduce:
case 119:
/* Line 1455 of yacc.c */
-#line 1448 "../Slice/Grammar.y"
+#line 1455 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (10)]));
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(10) - (10)]));
@@ -3517,7 +3524,7 @@ yyreduce:
case 120:
/* Line 1455 of yacc.c */
-#line 1465 "../Slice/Grammar.y"
+#line 1472 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
;}
@@ -3526,7 +3533,7 @@ yyreduce:
case 121:
/* Line 1455 of yacc.c */
-#line 1469 "../Slice/Grammar.y"
+#line 1476 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
unit->error("keyword `" + ident->v + "' cannot be used as enumeration name");
@@ -3537,7 +3544,7 @@ yyreduce:
case 122:
/* Line 1455 of yacc.c */
-#line 1480 "../Slice/Grammar.y"
+#line 1487 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)]));
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -3551,7 +3558,7 @@ yyreduce:
case 123:
/* Line 1455 of yacc.c */
-#line 1489 "../Slice/Grammar.y"
+#line 1496 "../Slice/Grammar.y"
{
EnumPtr en = EnumPtr::dynamicCast((yyvsp[(3) - (6)]));
if(en)
@@ -3570,7 +3577,7 @@ yyreduce:
case 124:
/* Line 1455 of yacc.c */
-#line 1504 "../Slice/Grammar.y"
+#line 1511 "../Slice/Grammar.y"
{
unit->error("missing enumeration name");
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (5)]));
@@ -3585,7 +3592,7 @@ yyreduce:
case 125:
/* Line 1455 of yacc.c */
-#line 1519 "../Slice/Grammar.y"
+#line 1526 "../Slice/Grammar.y"
{
EnumeratorListTokPtr ens = EnumeratorListTokPtr::dynamicCast((yyvsp[(1) - (3)]));
ens->v.splice(ens->v.end(), EnumeratorListTokPtr::dynamicCast((yyvsp[(3) - (3)]))->v);
@@ -3596,7 +3603,7 @@ yyreduce:
case 126:
/* Line 1455 of yacc.c */
-#line 1525 "../Slice/Grammar.y"
+#line 1532 "../Slice/Grammar.y"
{
;}
break;
@@ -3604,7 +3611,7 @@ yyreduce:
case 127:
/* Line 1455 of yacc.c */
-#line 1533 "../Slice/Grammar.y"
+#line 1540 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
EnumeratorListTokPtr ens = new EnumeratorListTok;
@@ -3621,7 +3628,7 @@ yyreduce:
case 128:
/* Line 1455 of yacc.c */
-#line 1545 "../Slice/Grammar.y"
+#line 1552 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (3)]));
EnumeratorListTokPtr ens = new EnumeratorListTok;
@@ -3649,7 +3656,7 @@ yyreduce:
case 129:
/* Line 1455 of yacc.c */
-#line 1568 "../Slice/Grammar.y"
+#line 1575 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
unit->error("keyword `" + ident->v + "' cannot be used as enumerator");
@@ -3661,7 +3668,7 @@ yyreduce:
case 130:
/* Line 1455 of yacc.c */
-#line 1575 "../Slice/Grammar.y"
+#line 1582 "../Slice/Grammar.y"
{
EnumeratorListTokPtr ens = new EnumeratorListTok;
(yyval) = ens; // Dummy
@@ -3671,7 +3678,7 @@ yyreduce:
case 131:
/* Line 1455 of yacc.c */
-#line 1585 "../Slice/Grammar.y"
+#line 1592 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(1) - (1)]);
;}
@@ -3680,7 +3687,7 @@ yyreduce:
case 132:
/* Line 1455 of yacc.c */
-#line 1589 "../Slice/Grammar.y"
+#line 1596 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
ContainedList cl = unit->currentContainer()->lookupContained(scoped->v);
@@ -3719,7 +3726,7 @@ yyreduce:
case 133:
/* Line 1455 of yacc.c */
-#line 1628 "../Slice/Grammar.y"
+#line 1635 "../Slice/Grammar.y"
{
BoolTokPtr out = new BoolTok;
out->v = true;
@@ -3730,7 +3737,7 @@ yyreduce:
case 134:
/* Line 1455 of yacc.c */
-#line 1634 "../Slice/Grammar.y"
+#line 1641 "../Slice/Grammar.y"
{
BoolTokPtr out = new BoolTok;
out->v = false;
@@ -3741,7 +3748,7 @@ yyreduce:
case 135:
/* Line 1455 of yacc.c */
-#line 1645 "../Slice/Grammar.y"
+#line 1652 "../Slice/Grammar.y"
{
;}
break;
@@ -3749,7 +3756,7 @@ yyreduce:
case 136:
/* Line 1455 of yacc.c */
-#line 1648 "../Slice/Grammar.y"
+#line 1655 "../Slice/Grammar.y"
{
BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)]));
OptionalDefTokPtr tsp = OptionalDefTokPtr::dynamicCast((yyvsp[(3) - (3)]));
@@ -3770,7 +3777,7 @@ yyreduce:
case 137:
/* Line 1455 of yacc.c */
-#line 1664 "../Slice/Grammar.y"
+#line 1671 "../Slice/Grammar.y"
{
BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (5)]));
OptionalDefTokPtr tsp = OptionalDefTokPtr::dynamicCast((yyvsp[(5) - (5)]));
@@ -3791,7 +3798,7 @@ yyreduce:
case 138:
/* Line 1455 of yacc.c */
-#line 1680 "../Slice/Grammar.y"
+#line 1687 "../Slice/Grammar.y"
{
BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (4)]));
TypePtr type = TypePtr::dynamicCast((yyvsp[(3) - (4)]));
@@ -3808,7 +3815,7 @@ yyreduce:
case 139:
/* Line 1455 of yacc.c */
-#line 1692 "../Slice/Grammar.y"
+#line 1699 "../Slice/Grammar.y"
{
BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (6)]));
TypePtr type = TypePtr::dynamicCast((yyvsp[(5) - (6)]));
@@ -3825,7 +3832,7 @@ yyreduce:
case 140:
/* Line 1455 of yacc.c */
-#line 1704 "../Slice/Grammar.y"
+#line 1711 "../Slice/Grammar.y"
{
BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)]));
TypePtr type = TypePtr::dynamicCast((yyvsp[(3) - (3)]));
@@ -3841,7 +3848,7 @@ yyreduce:
case 141:
/* Line 1455 of yacc.c */
-#line 1715 "../Slice/Grammar.y"
+#line 1722 "../Slice/Grammar.y"
{
BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (5)]));
TypePtr type = TypePtr::dynamicCast((yyvsp[(5) - (5)]));
@@ -3857,7 +3864,7 @@ yyreduce:
case 142:
/* Line 1455 of yacc.c */
-#line 1731 "../Slice/Grammar.y"
+#line 1738 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
;}
@@ -3866,7 +3873,7 @@ yyreduce:
case 143:
/* Line 1455 of yacc.c */
-#line 1735 "../Slice/Grammar.y"
+#line 1742 "../Slice/Grammar.y"
{
(yyval) = new ExceptionListTok;
;}
@@ -3875,7 +3882,7 @@ yyreduce:
case 144:
/* Line 1455 of yacc.c */
-#line 1744 "../Slice/Grammar.y"
+#line 1751 "../Slice/Grammar.y"
{
;}
break;
@@ -3883,7 +3890,7 @@ yyreduce:
case 145:
/* Line 1455 of yacc.c */
-#line 1747 "../Slice/Grammar.y"
+#line 1754 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
ident->v = "::" + ident->v;
@@ -3894,7 +3901,7 @@ yyreduce:
case 146:
/* Line 1455 of yacc.c */
-#line 1753 "../Slice/Grammar.y"
+#line 1760 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (3)]));
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]));
@@ -3907,7 +3914,7 @@ yyreduce:
case 147:
/* Line 1455 of yacc.c */
-#line 1766 "../Slice/Grammar.y"
+#line 1773 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindByte);
;}
@@ -3916,7 +3923,7 @@ yyreduce:
case 148:
/* Line 1455 of yacc.c */
-#line 1770 "../Slice/Grammar.y"
+#line 1777 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindBool);
;}
@@ -3925,7 +3932,7 @@ yyreduce:
case 149:
/* Line 1455 of yacc.c */
-#line 1774 "../Slice/Grammar.y"
+#line 1781 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindShort);
;}
@@ -3934,7 +3941,7 @@ yyreduce:
case 150:
/* Line 1455 of yacc.c */
-#line 1778 "../Slice/Grammar.y"
+#line 1785 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindInt);
;}
@@ -3943,7 +3950,7 @@ yyreduce:
case 151:
/* Line 1455 of yacc.c */
-#line 1782 "../Slice/Grammar.y"
+#line 1789 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindLong);
;}
@@ -3952,7 +3959,7 @@ yyreduce:
case 152:
/* Line 1455 of yacc.c */
-#line 1786 "../Slice/Grammar.y"
+#line 1793 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindFloat);
;}
@@ -3961,7 +3968,7 @@ yyreduce:
case 153:
/* Line 1455 of yacc.c */
-#line 1790 "../Slice/Grammar.y"
+#line 1797 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindDouble);
;}
@@ -3970,7 +3977,7 @@ yyreduce:
case 154:
/* Line 1455 of yacc.c */
-#line 1794 "../Slice/Grammar.y"
+#line 1801 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindString);
;}
@@ -3979,7 +3986,7 @@ yyreduce:
case 155:
/* Line 1455 of yacc.c */
-#line 1798 "../Slice/Grammar.y"
+#line 1805 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindObject);
;}
@@ -3988,7 +3995,7 @@ yyreduce:
case 156:
/* Line 1455 of yacc.c */
-#line 1802 "../Slice/Grammar.y"
+#line 1809 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindObjectProxy);
;}
@@ -3997,7 +4004,7 @@ yyreduce:
case 157:
/* Line 1455 of yacc.c */
-#line 1806 "../Slice/Grammar.y"
+#line 1813 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindLocalObject);
;}
@@ -4006,7 +4013,7 @@ yyreduce:
case 158:
/* Line 1455 of yacc.c */
-#line 1810 "../Slice/Grammar.y"
+#line 1817 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
ContainerPtr cont = unit->currentContainer();
@@ -4030,7 +4037,7 @@ yyreduce:
case 159:
/* Line 1455 of yacc.c */
-#line 1829 "../Slice/Grammar.y"
+#line 1836 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (2)]));
ContainerPtr cont = unit->currentContainer();
@@ -4071,7 +4078,7 @@ yyreduce:
case 160:
/* Line 1455 of yacc.c */
-#line 1870 "../Slice/Grammar.y"
+#line 1877 "../Slice/Grammar.y"
{
StringTokPtr str1 = StringTokPtr::dynamicCast((yyvsp[(1) - (2)]));
StringTokPtr str2 = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -4082,7 +4089,7 @@ yyreduce:
case 161:
/* Line 1455 of yacc.c */
-#line 1876 "../Slice/Grammar.y"
+#line 1883 "../Slice/Grammar.y"
{
;}
break;
@@ -4090,7 +4097,7 @@ yyreduce:
case 162:
/* Line 1455 of yacc.c */
-#line 1884 "../Slice/Grammar.y"
+#line 1891 "../Slice/Grammar.y"
{
StringTokPtr str = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]));
StringListTokPtr stringList = StringListTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -4102,7 +4109,7 @@ yyreduce:
case 163:
/* Line 1455 of yacc.c */
-#line 1891 "../Slice/Grammar.y"
+#line 1898 "../Slice/Grammar.y"
{
StringTokPtr str = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
StringListTokPtr stringList = new StringListTok;
@@ -4114,7 +4121,7 @@ yyreduce:
case 164:
/* Line 1455 of yacc.c */
-#line 1903 "../Slice/Grammar.y"
+#line 1910 "../Slice/Grammar.y"
{
BoolTokPtr local = new BoolTok;
local->v = true;
@@ -4125,7 +4132,7 @@ yyreduce:
case 165:
/* Line 1455 of yacc.c */
-#line 1909 "../Slice/Grammar.y"
+#line 1916 "../Slice/Grammar.y"
{
BoolTokPtr local = new BoolTok;
local->v = false;
@@ -4136,7 +4143,7 @@ yyreduce:
case 166:
/* Line 1455 of yacc.c */
-#line 1920 "../Slice/Grammar.y"
+#line 1927 "../Slice/Grammar.y"
{
BuiltinPtr type = unit->builtin(Builtin::KindLong);
IntegerTokPtr intVal = IntegerTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -4154,7 +4161,7 @@ yyreduce:
case 167:
/* Line 1455 of yacc.c */
-#line 1933 "../Slice/Grammar.y"
+#line 1940 "../Slice/Grammar.y"
{
BuiltinPtr type = unit->builtin(Builtin::KindDouble);
FloatingTokPtr floatVal = FloatingTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -4172,7 +4179,7 @@ yyreduce:
case 168:
/* Line 1455 of yacc.c */
-#line 1946 "../Slice/Grammar.y"
+#line 1953 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
ConstDefTokPtr def = new ConstDefTok;
@@ -4223,7 +4230,7 @@ yyreduce:
case 169:
/* Line 1455 of yacc.c */
-#line 1992 "../Slice/Grammar.y"
+#line 1999 "../Slice/Grammar.y"
{
BuiltinPtr type = unit->builtin(Builtin::KindString);
StringTokPtr literal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -4239,7 +4246,7 @@ yyreduce:
case 170:
/* Line 1455 of yacc.c */
-#line 2003 "../Slice/Grammar.y"
+#line 2010 "../Slice/Grammar.y"
{
BuiltinPtr type = unit->builtin(Builtin::KindBool);
StringTokPtr literal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -4255,7 +4262,7 @@ yyreduce:
case 171:
/* Line 1455 of yacc.c */
-#line 2014 "../Slice/Grammar.y"
+#line 2021 "../Slice/Grammar.y"
{
BuiltinPtr type = unit->builtin(Builtin::KindBool);
StringTokPtr literal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -4271,7 +4278,7 @@ yyreduce:
case 172:
/* Line 1455 of yacc.c */
-#line 2030 "../Slice/Grammar.y"
+#line 2037 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(2) - (6)]));
TypePtr const_type = TypePtr::dynamicCast((yyvsp[(3) - (6)]));
@@ -4285,7 +4292,7 @@ yyreduce:
case 173:
/* Line 1455 of yacc.c */
-#line 2039 "../Slice/Grammar.y"
+#line 2046 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(2) - (5)]));
TypePtr const_type = TypePtr::dynamicCast((yyvsp[(3) - (5)]));
@@ -4299,7 +4306,7 @@ yyreduce:
case 174:
/* Line 1455 of yacc.c */
-#line 2053 "../Slice/Grammar.y"
+#line 2060 "../Slice/Grammar.y"
{
;}
break;
@@ -4307,7 +4314,7 @@ yyreduce:
case 175:
/* Line 1455 of yacc.c */
-#line 2056 "../Slice/Grammar.y"
+#line 2063 "../Slice/Grammar.y"
{
;}
break;
@@ -4315,7 +4322,7 @@ yyreduce:
case 176:
/* Line 1455 of yacc.c */
-#line 2059 "../Slice/Grammar.y"
+#line 2066 "../Slice/Grammar.y"
{
;}
break;
@@ -4323,7 +4330,7 @@ yyreduce:
case 177:
/* Line 1455 of yacc.c */
-#line 2062 "../Slice/Grammar.y"
+#line 2069 "../Slice/Grammar.y"
{
;}
break;
@@ -4331,7 +4338,7 @@ yyreduce:
case 178:
/* Line 1455 of yacc.c */
-#line 2065 "../Slice/Grammar.y"
+#line 2072 "../Slice/Grammar.y"
{
;}
break;
@@ -4339,7 +4346,7 @@ yyreduce:
case 179:
/* Line 1455 of yacc.c */
-#line 2068 "../Slice/Grammar.y"
+#line 2075 "../Slice/Grammar.y"
{
;}
break;
@@ -4347,7 +4354,7 @@ yyreduce:
case 180:
/* Line 1455 of yacc.c */
-#line 2071 "../Slice/Grammar.y"
+#line 2078 "../Slice/Grammar.y"
{
;}
break;
@@ -4355,7 +4362,7 @@ yyreduce:
case 181:
/* Line 1455 of yacc.c */
-#line 2074 "../Slice/Grammar.y"
+#line 2081 "../Slice/Grammar.y"
{
;}
break;
@@ -4363,7 +4370,7 @@ yyreduce:
case 182:
/* Line 1455 of yacc.c */
-#line 2077 "../Slice/Grammar.y"
+#line 2084 "../Slice/Grammar.y"
{
;}
break;
@@ -4371,7 +4378,7 @@ yyreduce:
case 183:
/* Line 1455 of yacc.c */
-#line 2080 "../Slice/Grammar.y"
+#line 2087 "../Slice/Grammar.y"
{
;}
break;
@@ -4379,7 +4386,7 @@ yyreduce:
case 184:
/* Line 1455 of yacc.c */
-#line 2083 "../Slice/Grammar.y"
+#line 2090 "../Slice/Grammar.y"
{
;}
break;
@@ -4387,7 +4394,7 @@ yyreduce:
case 185:
/* Line 1455 of yacc.c */
-#line 2086 "../Slice/Grammar.y"
+#line 2093 "../Slice/Grammar.y"
{
;}
break;
@@ -4395,7 +4402,7 @@ yyreduce:
case 186:
/* Line 1455 of yacc.c */
-#line 2089 "../Slice/Grammar.y"
+#line 2096 "../Slice/Grammar.y"
{
;}
break;
@@ -4403,7 +4410,7 @@ yyreduce:
case 187:
/* Line 1455 of yacc.c */
-#line 2092 "../Slice/Grammar.y"
+#line 2099 "../Slice/Grammar.y"
{
;}
break;
@@ -4411,7 +4418,7 @@ yyreduce:
case 188:
/* Line 1455 of yacc.c */
-#line 2095 "../Slice/Grammar.y"
+#line 2102 "../Slice/Grammar.y"
{
;}
break;
@@ -4419,7 +4426,7 @@ yyreduce:
case 189:
/* Line 1455 of yacc.c */
-#line 2098 "../Slice/Grammar.y"
+#line 2105 "../Slice/Grammar.y"
{
;}
break;
@@ -4427,7 +4434,7 @@ yyreduce:
case 190:
/* Line 1455 of yacc.c */
-#line 2101 "../Slice/Grammar.y"
+#line 2108 "../Slice/Grammar.y"
{
;}
break;
@@ -4435,7 +4442,7 @@ yyreduce:
case 191:
/* Line 1455 of yacc.c */
-#line 2104 "../Slice/Grammar.y"
+#line 2111 "../Slice/Grammar.y"
{
;}
break;
@@ -4443,7 +4450,7 @@ yyreduce:
case 192:
/* Line 1455 of yacc.c */
-#line 2107 "../Slice/Grammar.y"
+#line 2114 "../Slice/Grammar.y"
{
;}
break;
@@ -4451,7 +4458,7 @@ yyreduce:
case 193:
/* Line 1455 of yacc.c */
-#line 2110 "../Slice/Grammar.y"
+#line 2117 "../Slice/Grammar.y"
{
;}
break;
@@ -4459,7 +4466,7 @@ yyreduce:
case 194:
/* Line 1455 of yacc.c */
-#line 2113 "../Slice/Grammar.y"
+#line 2120 "../Slice/Grammar.y"
{
;}
break;
@@ -4467,7 +4474,7 @@ yyreduce:
case 195:
/* Line 1455 of yacc.c */
-#line 2116 "../Slice/Grammar.y"
+#line 2123 "../Slice/Grammar.y"
{
;}
break;
@@ -4475,7 +4482,7 @@ yyreduce:
case 196:
/* Line 1455 of yacc.c */
-#line 2119 "../Slice/Grammar.y"
+#line 2126 "../Slice/Grammar.y"
{
;}
break;
@@ -4483,7 +4490,7 @@ yyreduce:
case 197:
/* Line 1455 of yacc.c */
-#line 2122 "../Slice/Grammar.y"
+#line 2129 "../Slice/Grammar.y"
{
;}
break;
@@ -4491,7 +4498,7 @@ yyreduce:
case 198:
/* Line 1455 of yacc.c */
-#line 2125 "../Slice/Grammar.y"
+#line 2132 "../Slice/Grammar.y"
{
;}
break;
@@ -4499,7 +4506,7 @@ yyreduce:
case 199:
/* Line 1455 of yacc.c */
-#line 2128 "../Slice/Grammar.y"
+#line 2135 "../Slice/Grammar.y"
{
;}
break;
@@ -4507,7 +4514,7 @@ yyreduce:
case 200:
/* Line 1455 of yacc.c */
-#line 2131 "../Slice/Grammar.y"
+#line 2138 "../Slice/Grammar.y"
{
;}
break;
@@ -4515,7 +4522,7 @@ yyreduce:
case 201:
/* Line 1455 of yacc.c */
-#line 2134 "../Slice/Grammar.y"
+#line 2141 "../Slice/Grammar.y"
{
;}
break;
@@ -4523,7 +4530,7 @@ yyreduce:
case 202:
/* Line 1455 of yacc.c */
-#line 2137 "../Slice/Grammar.y"
+#line 2144 "../Slice/Grammar.y"
{
;}
break;
@@ -4531,7 +4538,7 @@ yyreduce:
/* Line 1455 of yacc.c */
-#line 4535 "Grammar.tab.c"
+#line 4542 "Grammar.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -4743,6 +4750,6 @@ yyreturn:
/* Line 1675 of yacc.c */
-#line 2141 "../Slice/Grammar.y"
+#line 2148 "../Slice/Grammar.y"
diff --git a/cpp/src/Slice/Grammar.y b/cpp/src/Slice/Grammar.y
index c2a377966bb..a4c059f9005 100644
--- a/cpp/src/Slice/Grammar.y
+++ b/cpp/src/Slice/Grammar.y
@@ -22,6 +22,13 @@
# pragma warning( disable : 4065 )
#endif
+//
+// Avoid old style cast warnings in generated grammar
+//
+#ifdef __GNUC__
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
+
using namespace std;
using namespace Slice;
diff --git a/cpp/src/Slice/MD5I.cpp b/cpp/src/Slice/MD5I.cpp
index 175401d7006..c74241e8491 100644
--- a/cpp/src/Slice/MD5I.cpp
+++ b/cpp/src/Slice/MD5I.cpp
@@ -54,6 +54,10 @@
#include <Slice/MD5I.h>
#include <string.h>
+#ifdef __GNUC__
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
+
#undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */
#ifdef ARCH_IS_BIG_ENDIAN
# define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1)
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp
index 21f8ccd2f9c..c403de42ad5 100644
--- a/cpp/src/Slice/PythonUtil.cpp
+++ b/cpp/src/Slice/PythonUtil.cpp
@@ -2318,7 +2318,7 @@ Slice::Python::generate(const UnitPtr& un, bool all, bool checksum, const vector
str.fill('0');
for(vector<unsigned char>::const_iterator q = p->second.begin(); q != p->second.end(); ++q)
{
- str << (int)(*q);
+ str << static_cast<int>(*q);
}
out << str.str() << "\"";
}
diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp
index 0fbef458392..61b28212f0b 100644
--- a/cpp/src/Slice/RubyUtil.cpp
+++ b/cpp/src/Slice/RubyUtil.cpp
@@ -1669,7 +1669,7 @@ Slice::Ruby::generate(const UnitPtr& un, bool all, bool checksum, const vector<s
str.fill('0');
for(vector<unsigned char>::const_iterator q = p->second.begin(); q != p->second.end(); ++q)
{
- str << (int)(*q);
+ str << static_cast<int>(*q);
}
out << str.str() << "\"";
}
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 7b195708399..0c7372b7060 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -563,7 +563,7 @@ Slice::Gen::generate(const UnitPtr& p)
str.fill('0');
for(vector<unsigned char>::const_iterator r = q->second.begin(); r != q->second.end(); ++r)
{
- str << (int)(*r);
+ str << static_cast<int>(*r);
}
C << str.str() << "\",";
}
diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp
index 126798683a7..00cbb07c378 100644
--- a/cpp/src/slice2cpp/Main.cpp
+++ b/cpp/src/slice2cpp/Main.cpp
@@ -110,7 +110,7 @@ compile(int argc, char* argv[])
vector<string> args;
try
{
- args = opts.parse(argc, (const char**)argv);
+ args = opts.parse(argc, const_cast<const char**>(argv));
}
catch(const IceUtilInternal::BadOptException& e)
{
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index 5863bb403fc..f51b5a0aa1c 100644
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -2788,7 +2788,7 @@ Slice::Gen::generateChecksums(const UnitPtr& u)
str.fill('0');
for(vector<unsigned char>::const_iterator q = p->second.begin(); q != p->second.end(); ++q)
{
- str << (int)(*q);
+ str << static_cast<int>(*q);
}
_out << str.str() << "\");";
}
diff --git a/cpp/src/slice2cs/Main.cpp b/cpp/src/slice2cs/Main.cpp
index 2daf35e928d..1491f28bc18 100644
--- a/cpp/src/slice2cs/Main.cpp
+++ b/cpp/src/slice2cs/Main.cpp
@@ -103,7 +103,7 @@ compile(int argc, char* argv[])
vector<string> args;
try
{
- args = opts.parse(argc, (const char**)argv);
+ args = opts.parse(argc, const_cast<const char**>(argv));
}
catch(const IceUtilInternal::BadOptException& e)
{
diff --git a/cpp/src/slice2freeze/Main.cpp b/cpp/src/slice2freeze/Main.cpp
index 6b07ca47c86..23d2c19fddb 100644
--- a/cpp/src/slice2freeze/Main.cpp
+++ b/cpp/src/slice2freeze/Main.cpp
@@ -1443,7 +1443,7 @@ compile(int argc, char* argv[])
vector<string> args;
try
{
- args = opts.parse(argc, (const char**)argv);
+ args = opts.parse(argc, const_cast<const char**>(argv));
}
catch(const IceUtilInternal::BadOptException& e)
{
diff --git a/cpp/src/slice2freezej/Main.cpp b/cpp/src/slice2freezej/Main.cpp
index a81cd47c0f2..83d21db861b 100644
--- a/cpp/src/slice2freezej/Main.cpp
+++ b/cpp/src/slice2freezej/Main.cpp
@@ -1466,7 +1466,7 @@ compile(int argc, char* argv[])
vector<string> args;
try
{
- args = opts.parse(argc, (const char**)argv);
+ args = opts.parse(argc, const_cast<const char**>(argv));
}
catch(const IceUtilInternal::BadOptException& e)
{
diff --git a/cpp/src/slice2html/Main.cpp b/cpp/src/slice2html/Main.cpp
index a2908f593ca..73832c31896 100644
--- a/cpp/src/slice2html/Main.cpp
+++ b/cpp/src/slice2html/Main.cpp
@@ -111,7 +111,7 @@ compile(int argc, char* argv[])
vector<string> args;
try
{
- args = opts.parse(argc, (const char**)argv);
+ args = opts.parse(argc, const_cast<const char**>(argv));
}
catch(const IceUtilInternal::BadOptException& e)
{
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index 8eaccb5650e..261a01a90db 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -2417,7 +2417,7 @@ Slice::Gen::writeChecksumClass(const string& checksumClass, const string& dir, c
str.fill('0');
for(vector<unsigned char>::const_iterator q = p->second.begin(); q != p->second.end(); ++q)
{
- str << (int)(*q);
+ str << static_cast<int>(*q);
}
out << str.str() << "\");";
}
diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp
index fffbf834946..96784e97d5f 100644
--- a/cpp/src/slice2java/Main.cpp
+++ b/cpp/src/slice2java/Main.cpp
@@ -110,7 +110,7 @@ compile(int argc, char* argv[])
vector<string>args;
try
{
- args = opts.parse(argc, (const char**)argv);
+ args = opts.parse(argc, const_cast<const char**>(argv));
}
catch(const IceUtilInternal::BadOptException& e)
{
diff --git a/cpp/src/slice2js/Main.cpp b/cpp/src/slice2js/Main.cpp
index 4690c7400c2..d57fcf5e95a 100644
--- a/cpp/src/slice2js/Main.cpp
+++ b/cpp/src/slice2js/Main.cpp
@@ -95,7 +95,7 @@ compile(int argc, char* argv[])
vector<string> args;
try
{
- args = opts.parse(argc, (const char**)argv);
+ args = opts.parse(argc, const_cast<const char**>(argv));
}
catch(const IceUtilInternal::BadOptException& e)
{
diff --git a/cpp/src/slice2php/Main.cpp b/cpp/src/slice2php/Main.cpp
index f65118bf1e7..94ea8f090e9 100644
--- a/cpp/src/slice2php/Main.cpp
+++ b/cpp/src/slice2php/Main.cpp
@@ -1501,7 +1501,7 @@ generate(const UnitPtr& un, bool all, bool checksum, bool ns, const vector<strin
str.fill('0');
for(vector<unsigned char>::const_iterator q = p->second.begin(); q != p->second.end(); ++q)
{
- str << (int)(*q);
+ str << static_cast<int>(*q);
}
out << str.str() << "\";";
}
@@ -1615,7 +1615,7 @@ compile(int argc, char* argv[])
vector<string> args;
try
{
- args = opts.parse(argc, (const char**)argv);
+ args = opts.parse(argc, const_cast<const char**>(argv));
}
catch(const IceUtilInternal::BadOptException& e)
{
diff --git a/cpp/src/slice2py/Main.cpp b/cpp/src/slice2py/Main.cpp
index 5d8fb681bce..58ea03237c5 100644
--- a/cpp/src/slice2py/Main.cpp
+++ b/cpp/src/slice2py/Main.cpp
@@ -433,7 +433,7 @@ compile(int argc, char* argv[])
vector<string> args;
try
{
- args = opts.parse(argc, (const char**)argv);
+ args = opts.parse(argc, const_cast<const char**>(argv));
}
catch(const IceUtilInternal::BadOptException& e)
{
diff --git a/cpp/src/slice2rb/Main.cpp b/cpp/src/slice2rb/Main.cpp
index 83f2da8a9c0..1c84252cb4e 100644
--- a/cpp/src/slice2rb/Main.cpp
+++ b/cpp/src/slice2rb/Main.cpp
@@ -112,7 +112,7 @@ compile(int argc, char* argv[])
vector<string> args;
try
{
- args = opts.parse(argc, (const char**)argv);
+ args = opts.parse(argc, const_cast<const char**>(argv));
}
catch(const IceUtilInternal::BadOptException& e)
{