summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2012-08-08 15:49:02 +0200
committerBenoit Foucher <benoit@zeroc.com>2012-08-08 15:49:02 +0200
commit5bee6b7dd838a7b8b84a1b41251579a05e6aa8ec (patch)
tree71f7dd2a1096dab81bd8ddb4e17d5ac42f38c65d /cpp/src
parentFixes (diff)
parentFixed python & ruby compilation error caused by OutputStream::format removal (diff)
downloadice-5bee6b7dd838a7b8b84a1b41251579a05e6aa8ec.tar.bz2
ice-5bee6b7dd838a7b8b84a1b41251579a05e6aa8ec.tar.xz
ice-5bee6b7dd838a7b8b84a1b41251579a05e6aa8ec.zip
Merge remote-tracking branch 'origin/encoding11' into mx
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Freeze/IndexI.cpp22
-rw-r--r--cpp/src/Freeze/MapI.cpp21
-rw-r--r--cpp/src/FreezeScript/Grammar.cpp110
-rw-r--r--cpp/src/FreezeScript/Grammar.h7
-rw-r--r--cpp/src/FreezeScript/Makefile.mak1
-rw-r--r--cpp/src/FreezeScript/Scanner.cpp1596
-rw-r--r--cpp/src/FreezeScript/Scanner.l13
-rwxr-xr-xcpp/src/Ice/BasicStream.cpp2
-rw-r--r--cpp/src/Ice/IncomingAsync.cpp2
-rw-r--r--cpp/src/Ice/Object.cpp4
-rw-r--r--cpp/src/IceGrid/Makefile.mak1
-rw-r--r--cpp/src/IceGrid/Scanner.cpp1459
-rw-r--r--cpp/src/IceGrid/Scanner.l13
-rw-r--r--cpp/src/IceStorm/Makefile.mak1
-rw-r--r--cpp/src/IceStorm/Scanner.cpp66
-rw-r--r--cpp/src/IceStorm/Scanner.l13
-rw-r--r--cpp/src/Slice/Grammar.cpp408
-rw-r--r--cpp/src/Slice/Grammar.h7
-rw-r--r--cpp/src/Slice/JavaUtil.cpp12
-rw-r--r--cpp/src/Slice/Makefile.mak1
-rw-r--r--cpp/src/Slice/Scanner.cpp85
-rw-r--r--cpp/src/Slice/Scanner.l8
-rw-r--r--cpp/src/slice2java/Gen.cpp12
23 files changed, 2264 insertions, 1600 deletions
diff --git a/cpp/src/Freeze/IndexI.cpp b/cpp/src/Freeze/IndexI.cpp
index 6323c052373..f0910bb2452 100644
--- a/cpp/src/Freeze/IndexI.cpp
+++ b/cpp/src/Freeze/IndexI.cpp
@@ -43,13 +43,23 @@ Freeze::IndexI::untypedFindFirst(const Key& bytes, Int firstN) const
Dbt dbKey;
initializeInDbt(bytes, dbKey);
+#if (DB_VERSION_MAJOR <= 4) || (DB_VERSION_MAJOR == 5 && DB_VERSION_MINOR <= 1)
//
// When we have a custom-comparison function, Berkeley DB returns
// the key on-disk (when it finds one). We disable this behavior:
// (ref Oracle SR 5925672.992)
//
dbKey.set_flags(DB_DBT_USERMEM | DB_DBT_PARTIAL);
-
+#else
+ //
+ // In DB > 5.1 we can not set DB_DBT_PARTIAL in the key Dbt,
+ // when using DB_SET, we must resize the Dbt key param to hold enought
+ // space or Dbc::get fails with DB_BUFFER_SMALL.
+ //
+ dbKey.set_flags(DB_DBT_USERMEM);
+ dbKey.set_ulen(static_cast<u_int32_t>(bytes.size()));
+#endif
+
Key pkey(1024);
Dbt pdbKey;
initializeOutDbt(pkey, pdbKey);
@@ -201,12 +211,22 @@ Freeze::IndexI::untypedCount(const Key& bytes) const
Dbt dbKey;
initializeInDbt(bytes, dbKey);
+#if (DB_VERSION_MAJOR <= 4) || (DB_VERSION_MAJOR == 5 && DB_VERSION_MINOR <= 1)
//
// When we have a custom-comparison function, Berkeley DB returns
// the key on-disk (when it finds one). We disable this behavior:
// (ref Oracle SR 5925672.992)
//
dbKey.set_flags(DB_DBT_USERMEM | DB_DBT_PARTIAL);
+#else
+ //
+ // In DB > 5.1 we can not set DB_DBT_PARTIAL in the key Dbt,
+ // when using DB_SET, we must resize the Dbt key param to hold enought
+ // space or Dbc::get fails with DB_BUFFER_SMALL.
+ //
+ dbKey.set_flags(DB_DBT_USERMEM);
+ dbKey.set_ulen(static_cast<u_int32_t>(bytes.size()));
+#endif
Dbt dbValue;
dbValue.set_flags(DB_DBT_USERMEM | DB_DBT_PARTIAL);
diff --git a/cpp/src/Freeze/MapI.cpp b/cpp/src/Freeze/MapI.cpp
index 782736c701c..a419f5ad447 100644
--- a/cpp/src/Freeze/MapI.cpp
+++ b/cpp/src/Freeze/MapI.cpp
@@ -438,13 +438,22 @@ Freeze::IteratorHelperI::find(const Key& key) const
{
Dbt dbKey;
initializeInDbt(key, dbKey);
+#if (DB_VERSION_MAJOR <= 4) || (DB_VERSION_MAJOR == 5 && DB_VERSION_MINOR <= 1)
//
// When we have a custom-comparison function, Berkeley DB returns
// the key on-disk (when it finds one). We disable this behavior:
// (ref Oracle SR 5925672.992)
//
dbKey.set_flags(DB_DBT_USERMEM | DB_DBT_PARTIAL);
-
+#else
+ //
+ // In DB > 5.1 we can not set DB_DBT_PARTIAL in the key Dbt,
+ // when using DB_SET, we must resize the Dbt key param to hold enought
+ // space or Dbc::get fails with DB_BUFFER_SMALL.
+ //
+ dbKey.set_flags(DB_DBT_USERMEM);
+ dbKey.set_ulen(static_cast<u_int32_t>(key.size()));
+#endif
//
// Keep 0 length since we're not interested in the data
//
@@ -1763,12 +1772,22 @@ Freeze::MapIndexI::untypedCount(const Key& k, const ConnectionIPtr& connection)
{
Dbt dbKey;
initializeInDbt(k, dbKey);
+#if (DB_VERSION_MAJOR <= 4)
//
// When we have a custom-comparison function, Berkeley DB returns
// the key on-disk (when it finds one). We disable this behavior:
// (ref Oracle SR 5925672.992)
//
dbKey.set_flags(DB_DBT_USERMEM | DB_DBT_PARTIAL);
+#else
+ //
+ // In DB 5.x we can not set DB_DBT_PARTIAL in the key Dbt,
+ // when using DB_SET, we must resize the Dbt key param to hold enought
+ // space or Dbc::get fails with DB_BUFFER_SMALL.
+ //
+ dbKey.set_flags(DB_DBT_USERMEM);
+ dbKey.set_ulen(static_cast<u_int32_t>(k.size()));
+#endif
Dbt dbValue;
diff --git a/cpp/src/FreezeScript/Grammar.cpp b/cpp/src/FreezeScript/Grammar.cpp
index 8e47febf5d7..c435a0ad234 100644
--- a/cpp/src/FreezeScript/Grammar.cpp
+++ b/cpp/src/FreezeScript/Grammar.cpp
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -46,7 +45,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -120,7 +119,7 @@ freeze_script_error(const char* s)
/* Line 189 of yacc.c */
-#line 124 "Grammar.tab.c"
+#line 123 "Grammar.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -191,7 +190,7 @@ typedef int YYSTYPE;
/* Line 264 of yacc.c */
-#line 195 "Grammar.tab.c"
+#line 194 "Grammar.tab.c"
#ifdef short
# undef short
@@ -241,7 +240,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -646,9 +645,18 @@ static const yytype_uint8 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -705,7 +713,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -1443,7 +1451,7 @@ yyreduce:
{
case 2:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 85 "../FreezeScript/Grammar.y"
{
parseResult = (yyvsp[(1) - (1)]);
@@ -1452,7 +1460,7 @@ yyreduce:
case 3:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 94 "../FreezeScript/Grammar.y"
{
(yyval) = (yyvsp[(1) - (1)]);
@@ -1461,7 +1469,7 @@ yyreduce:
case 4:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 103 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpLess, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1470,7 +1478,7 @@ yyreduce:
case 5:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 107 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpGreater, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1479,7 +1487,7 @@ yyreduce:
case 6:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 111 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpLessEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1488,7 +1496,7 @@ yyreduce:
case 7:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 115 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpGrEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1497,7 +1505,7 @@ yyreduce:
case 8:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 119 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1506,7 +1514,7 @@ yyreduce:
case 9:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 123 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpNotEq, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1515,7 +1523,7 @@ yyreduce:
case 10:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 127 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpOr, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1524,7 +1532,7 @@ yyreduce:
case 11:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 131 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpAnd, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1533,7 +1541,7 @@ yyreduce:
case 12:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 135 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpMul, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1542,7 +1550,7 @@ yyreduce:
case 13:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 139 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpDiv, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1551,7 +1559,7 @@ yyreduce:
case 14:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 143 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpMod, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1560,7 +1568,7 @@ yyreduce:
case 15:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 147 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpAdd, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1569,7 +1577,7 @@ yyreduce:
case 16:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 151 "../FreezeScript/Grammar.y"
{
(yyval) = new BinaryNode(BinOpSub, parseDataFactory, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
@@ -1578,7 +1586,7 @@ yyreduce:
case 17:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 155 "../FreezeScript/Grammar.y"
{
(yyval) = (yyvsp[(1) - (1)]);
@@ -1587,7 +1595,7 @@ yyreduce:
case 18:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 164 "../FreezeScript/Grammar.y"
{
(yyval) = (yyvsp[(2) - (3)]);
@@ -1596,7 +1604,7 @@ yyreduce:
case 19:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 168 "../FreezeScript/Grammar.y"
{
(yyval) = new UnaryNode(UnaryOpNeg, parseDataFactory, (yyvsp[(2) - (2)]));
@@ -1605,7 +1613,7 @@ yyreduce:
case 20:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 172 "../FreezeScript/Grammar.y"
{
(yyval) = new UnaryNode(UnaryOpNot, parseDataFactory, (yyvsp[(2) - (2)]));
@@ -1614,7 +1622,7 @@ yyreduce:
case 21:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 176 "../FreezeScript/Grammar.y"
{
IntegerTokPtr intVal = IntegerTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -1625,7 +1633,7 @@ yyreduce:
case 22:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 182 "../FreezeScript/Grammar.y"
{
FloatingTokPtr floatVal = FloatingTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -1636,7 +1644,7 @@ yyreduce:
case 23:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 188 "../FreezeScript/Grammar.y"
{
StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -1647,7 +1655,7 @@ yyreduce:
case 24:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 194 "../FreezeScript/Grammar.y"
{
(yyval) = new DataNode(parseDataFactory->createBoolean(true, true));
@@ -1656,7 +1664,7 @@ yyreduce:
case 25:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 198 "../FreezeScript/Grammar.y"
{
(yyval) = new DataNode(parseDataFactory->createBoolean(false, true));
@@ -1665,7 +1673,7 @@ yyreduce:
case 26:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 202 "../FreezeScript/Grammar.y"
{
(yyval) = new DataNode(parseDataFactory->createNil(true));
@@ -1674,7 +1682,7 @@ yyreduce:
case 27:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 206 "../FreezeScript/Grammar.y"
{
(yyval) = (yyvsp[(1) - (1)]);
@@ -1683,7 +1691,7 @@ yyreduce:
case 28:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 210 "../FreezeScript/Grammar.y"
{
EntityNodePtr entity = EntityNodePtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -1697,7 +1705,7 @@ yyreduce:
case 29:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 219 "../FreezeScript/Grammar.y"
{
(yyval) = (yyvsp[(1) - (1)]);
@@ -1706,7 +1714,7 @@ yyreduce:
case 30:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 223 "../FreezeScript/Grammar.y"
{
StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -1717,7 +1725,7 @@ yyreduce:
case 31:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 234 "../FreezeScript/Grammar.y"
{
EntityNodePtr entity = EntityNodePtr::dynamicCast((yyvsp[(1) - (4)]));
@@ -1729,7 +1737,7 @@ yyreduce:
case 32:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 241 "../FreezeScript/Grammar.y"
{
StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]));
@@ -1743,7 +1751,7 @@ yyreduce:
case 33:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 250 "../FreezeScript/Grammar.y"
{
StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -1754,7 +1762,7 @@ yyreduce:
case 34:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 261 "../FreezeScript/Grammar.y"
{
StringTokPtr func = StringTokPtr::dynamicCast((yyvsp[(1) - (4)]));
@@ -1767,7 +1775,7 @@ yyreduce:
case 35:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 274 "../FreezeScript/Grammar.y"
{
NodeListTokPtr l = NodeListTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -1779,7 +1787,7 @@ yyreduce:
case 36:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 281 "../FreezeScript/Grammar.y"
{
NodeListTokPtr result = new NodeListTok;
@@ -1790,7 +1798,7 @@ yyreduce:
case 37:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 287 "../FreezeScript/Grammar.y"
{
(yyval) = new NodeListTok;
@@ -1799,7 +1807,7 @@ yyreduce:
case 38:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 296 "../FreezeScript/Grammar.y"
{
StringTokPtr stringVal = StringTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -1813,7 +1821,7 @@ yyreduce:
case 39:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 305 "../FreezeScript/Grammar.y"
{
StringTokPtr idVal = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -1826,8 +1834,8 @@ yyreduce:
-/* Line 1455 of yacc.c */
-#line 1831 "Grammar.tab.c"
+/* Line 1464 of yacc.c */
+#line 1839 "Grammar.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2038,7 +2046,7 @@ yyreturn:
-/* Line 1675 of yacc.c */
+/* Line 1684 of yacc.c */
#line 314 "../FreezeScript/Grammar.y"
diff --git a/cpp/src/FreezeScript/Grammar.h b/cpp/src/FreezeScript/Grammar.h
index ae561a72f12..de0df9778b2 100644
--- a/cpp/src/FreezeScript/Grammar.h
+++ b/cpp/src/FreezeScript/Grammar.h
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton interface for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/cpp/src/FreezeScript/Makefile.mak b/cpp/src/FreezeScript/Makefile.mak
index e59b635ad1d..94c3fb12016 100644
--- a/cpp/src/FreezeScript/Makefile.mak
+++ b/cpp/src/FreezeScript/Makefile.mak
@@ -71,6 +71,7 @@ Scanner.cpp : Scanner.l
flex Scanner.l
del /q $@
echo #include "IceUtil/Config.h" > Scanner.cpp
+ echo #include "stdint.h" >> Scanner.cpp
type lex.yy.c >> Scanner.cpp
del /q lex.yy.c
diff --git a/cpp/src/FreezeScript/Scanner.cpp b/cpp/src/FreezeScript/Scanner.cpp
index 10a9f1ff8ff..f5cdbaf7f81 100644
--- a/cpp/src/FreezeScript/Scanner.cpp
+++ b/cpp/src/FreezeScript/Scanner.cpp
@@ -1,9 +1,15 @@
#include <IceUtil/Config.h>
+#include <stdint.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_scan_buffer freeze_script__scan_buffer
-#define yy_scan_string freeze_script__scan_string
-#define yy_scan_bytes freeze_script__scan_bytes
#define yy_flex_debug freeze_script__flex_debug
#define yy_init_buffer freeze_script__init_buffer
#define yy_flush_buffer freeze_script__flush_buffer
@@ -12,75 +18,118 @@
#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
-
-#line 19 "lex.yy.c"
-/* A lexical scanner generated by flex */
-
-/* Scanner skeleton version:
- * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
- */
+#define 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 <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+/* end standard C headers. */
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
+/* 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;
-#ifdef __cplusplus
+/* 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
-#include <stdlib.h>
+#endif /* ! C99 */
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
+#endif /* ! FLEXINT_H */
+
+#ifdef __cplusplus
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
-#if __STDC__
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
-#define YY_USE_PROTOS
#define YY_USE_CONST
-#endif /* __STDC__ */
+#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */
-#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
-#include <io.h>
-#include <stdlib.h>
-#define YY_USE_CONST
-#define YY_USE_PROTOS
-#endif
-
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
-
-#ifdef YY_USE_PROTOS
-#define YY_PROTO(proto) proto
-#else
-#define YY_PROTO(proto) ()
-#endif
-
/* Returned upon end-of-file. */
#define YY_NULL 0
@@ -95,71 +144,78 @@
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
-#define BEGIN yy_start = 1 + 2 *
+#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 YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
+#define YY_NEW_FILE freeze_script_restart(freeze_script_in )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#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 int yyleng;
-extern FILE *yyin, *yyout;
+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
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator). This
- * avoids problems with code like:
- *
- * if ( condition_holds )
- * yyless( 5 );
- * else
- * do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
+ #define 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 yytext. */ \
- *yy_cp = yy_hold_char; \
+ /* 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 + n - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ (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 )
-
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-typedef unsigned int yy_size_t;
+#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;
@@ -196,12 +252,16 @@ struct yy_buffer_state
*/
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
@@ -211,102 +271,138 @@ struct yy_buffer_state
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
- * (via yyrestart()), so that the user can continue scanning by
- * just pointing yyin at a new input file.
+ * (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 */
-static YY_BUFFER_STATE yy_current_buffer = 0;
+/* 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_current_buffer
+#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 yytext is formed. */
+/* 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 yyleng;
+int freeze_script_leng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 1; /* whether we need to initialize */
+static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin. A bit of a hack ...
+/* 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 yyrestart YY_PROTO(( FILE *input_file ));
+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 );
-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
-void yy_load_buffer_state YY_PROTO(( void ));
-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+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 );
-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+#define YY_FLUSH_BUFFER freeze_script__flush_buffer(YY_CURRENT_BUFFER )
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
-static void yy_flex_free YY_PROTO(( void * ));
+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 );
-#define yy_new_buffer yy_create_buffer
+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 ) \
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
- yy_current_buffer->yy_is_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 ) \
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
- yy_current_buffer->yy_at_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->yy_at_bol)
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+/* Begin user sect3 */
-#define yywrap() 1
+#define freeze_script_wrap(n) 1
#define YY_SKIP_YYWRAP
+
typedef unsigned char YY_CHAR;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+
+FILE *freeze_script_in = (FILE *) 0, *freeze_script_out = (FILE *) 0;
+
typedef int yy_state_type;
-extern char *yytext;
-#define yytext_ptr yytext
-static yy_state_type yy_get_previous_state YY_PROTO(( void ));
-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
-static int yy_get_next_buffer YY_PROTO(( void ));
-static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+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 yytext.
+ * corresponding action - sets up freeze_script_text.
*/
#define YY_DO_BEFORE_ACTION \
- yytext_ptr = yy_bp; \
- yyleng = (int) (yy_cp - yy_bp); \
- yy_hold_char = *yy_cp; \
+ (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;
+ (yy_c_buf_p) = yy_cp;
#define YY_NUM_RULES 26
#define YY_END_OF_BUFFER 27
-static yyconst short int yy_accept[51] =
+/* 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,
@@ -315,7 +411,7 @@ static yyconst short int yy_accept[51] =
12, 3, 0, 7, 0, 7, 6, 0, 7, 0
} ;
-static yyconst int yy_ec[256] =
+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,
@@ -347,14 +443,14 @@ static yyconst int yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst int yy_meta[30] =
+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 short int yy_base[55] =
+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,
@@ -364,7 +460,7 @@ static yyconst short int yy_base[55] =
92, 96, 97, 100
} ;
-static yyconst short int yy_def[55] =
+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,
@@ -374,7 +470,7 @@ static yyconst short int yy_def[55] =
50, 50, 50, 50
} ;
-static yyconst short int yy_nxt[134] =
+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,
@@ -393,7 +489,7 @@ static yyconst short int yy_nxt[134] =
50, 50, 50
} ;
-static yyconst short int yy_chk[134] =
+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,
@@ -415,6 +511,9 @@ static yyconst short int yy_chk[134] =
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.
*/
@@ -422,9 +521,8 @@ static char *yy_last_accepting_cpos;
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
+char *freeze_script_text;
#line 1 "Scanner.l"
-#define INITIAL 0
#line 2 "Scanner.l"
// **********************************************************************
@@ -447,12 +545,25 @@ char *yytext;
#if defined(_MSC_VER) && defined(ICE_64)
//
+// '=' : conversion from 'size_t' to 'int', possible loss of data
+// The result of fread() is a size_t and gets inserted into an int
+//
+# pragma warning( 4 : 4267 )
+//
// 'initializing' : conversion from '__int64' to 'int', possible loss of data
// Puts a pointer-difference into an int
//
# pragma warning( 4 : 4244 )
#endif
+#ifdef _MSC_VER
+# ifdef freeze_script_wrap
+# undef freeze_script_wrap
+# define freeze_script_wrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
using namespace std;
using namespace FreezeScript;
@@ -471,8 +582,52 @@ StringTokPtr parseString(char);
#define YY_USER_INIT initScanner();
#define YY_INPUT(buf, result, max_size) { result = getInput(buf, max_size); }
-#define YY_NEVER_INTERACTIVE 1
-#line 475 "lex.yy.c"
+#line 584 "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.
@@ -480,79 +635,48 @@ StringTokPtr parseString(char);
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
+extern "C" int freeze_script_wrap (void );
#else
-extern int yywrap YY_PROTO(( void ));
-#endif
+extern int freeze_script_wrap (void );
#endif
-
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif
+ static void yyunput (int c,char *buf_ptr );
+
#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+static int yy_flex_strlen (yyconst char * );
#endif
#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
-#else
-static int input YY_PROTO(( void ));
-#endif
-#endif
-
-#if YY_STACK_USED
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
-static int *yy_start_stack = 0;
-#ifndef YY_NO_PUSH_STATE
-static void yy_push_state YY_PROTO(( int new_state ));
-#endif
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state YY_PROTO(( void ));
-#endif
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
-#endif
+#ifdef __cplusplus
+static int yyinput (void );
#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
+static int input (void );
#endif
-#ifdef YY_MALLOC_DECL
-YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines. This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
-
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#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,
@@ -560,21 +684,35 @@ YY_MALLOC_DECL
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
- if ( yy_current_buffer->yy_is_interactive ) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
- int c = '*', n; \
+ int c = '*'; \
+ size_t n; \
for ( n = 0; n < max_size && \
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ (c = getc( freeze_script_in )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
- if ( c == EOF && ferror( yyin ) ) \
+ if ( c == EOF && ferror( freeze_script_in ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
- else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
- && ferror( yyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" );
+ 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();" -
@@ -595,14 +733,20 @@ YY_MALLOC_DECL
#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 int yylex YY_PROTO(( void ))
-#endif
+#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 yytext and yyleng
+/* Code executed at the beginning of each rule, after freeze_script_text and freeze_script_leng
* have been set up.
*/
#ifndef YY_USER_ACTION
@@ -617,62 +761,66 @@ YY_MALLOC_DECL
#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 = NULL, *yy_bp = NULL;
+ register char *yy_cp, *yy_bp;
register int yy_act;
-
-#line 60 "Scanner.l"
+
+#line 73 "Scanner.l"
-#line 629 "lex.yy.c"
+#line 774 "lex.yy.c"
- if ( yy_init )
+ if ( !(yy_init) )
{
- yy_init = 0;
+ (yy_init) = 1;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
- if ( ! yy_start )
- yy_start = 1; /* first start state */
+ if ( ! (yy_start) )
+ (yy_start) = 1; /* first start state */
- if ( ! yyin )
- yyin = stdin;
+ if ( ! freeze_script_in )
+ freeze_script_in = stdin;
- if ( ! yyout )
- yyout = stdout;
+ if ( ! freeze_script_out )
+ freeze_script_out = stdout;
- if ( ! yy_current_buffer )
- yy_current_buffer =
- yy_create_buffer( yyin, YY_BUF_SIZE );
+ if ( ! YY_CURRENT_BUFFER ) {
+ freeze_script_ensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ freeze_script__create_buffer(freeze_script_in,YY_BUF_SIZE );
+ }
- yy_load_buffer_state();
+ freeze_script__load_buffer_state( );
}
while ( 1 ) /* loops until end-of-file is reached */
{
- yy_cp = yy_c_buf_p;
+ yy_cp = (yy_c_buf_p);
- /* Support of yytext. */
- *yy_cp = yy_hold_char;
+ /* 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_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;
+ (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 )
{
@@ -683,35 +831,29 @@ yy_match:
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
- while ( yy_base[yy_current_state] != 104 );
+ 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];
- if ( yy_act == 0 )
- { /* have to back up */
- yy_cp = yy_last_accepting_cpos;
- yy_current_state = yy_last_accepting_state;
- yy_act = yy_accept[yy_current_state];
- }
YY_DO_BEFORE_ACTION;
-
do_action: /* This label is used only to access EOF actions. */
-
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
- *yy_cp = yy_hold_char;
- yy_cp = yy_last_accepting_cpos;
- yy_current_state = yy_last_accepting_state;
+ *yy_cp = (yy_hold_char);
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
goto yy_find_action;
case 1:
YY_RULE_SETUP
-#line 62 "Scanner.l"
+#line 75 "Scanner.l"
{
// C++-style comment
int c;
@@ -728,7 +870,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 76 "Scanner.l"
+#line 89 "Scanner.l"
{
// C-style comment
while(true)
@@ -760,17 +902,17 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 105 "Scanner.l"
+#line 118 "Scanner.l"
{
StringTokPtr ident = new StringTok;
- ident->v = yytext;
+ ident->v = freeze_script_text;
*yylvalp = ident;
return checkKeyword(ident->v);
}
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 112 "Scanner.l"
+#line 125 "Scanner.l"
{
StringTokPtr str = parseString('"');
*yylvalp = str;
@@ -779,7 +921,7 @@ YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 118 "Scanner.l"
+#line 131 "Scanner.l"
{
StringTokPtr str = parseString('\'');
*yylvalp = str;
@@ -788,15 +930,15 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 124 "Scanner.l"
+#line 137 "Scanner.l"
{
IntegerTokPtr itp = new IntegerTok;
*yylvalp = itp;
- if(!IceUtilInternal::stringToInt64(string(yytext), itp->v))
+ if(!IceUtilInternal::stringToInt64(string(freeze_script_text), itp->v))
{
assert(itp->v != 0);
string msg = "integer constant `";
- msg += yytext;
+ msg += freeze_script_text;
msg += "' out of range";
parseErrorReporter->expressionSyntaxError(msg);
}
@@ -805,12 +947,12 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 138 "Scanner.l"
+#line 151 "Scanner.l"
{
errno = 0;
FloatingTokPtr ftp = new FloatingTok;
*yylvalp = ftp;
- string literal(yytext);
+ string literal(freeze_script_text);
char lastChar = literal[literal.size() - 1];
if(lastChar == 'f' || lastChar == 'F')
{
@@ -820,14 +962,14 @@ YY_RULE_SETUP
if((ftp->v == HUGE_VAL || ftp->v == -HUGE_VAL) && errno == ERANGE)
{
string msg = "floating-point constant `";
- msg += yytext;
+ msg += freeze_script_text;
msg += "' too large (overflow)";
parseErrorReporter->expressionSyntaxError(msg);
}
else if(ftp->v == 0 && errno == ERANGE)
{
string msg = "floating-point constant `";
- msg += yytext;
+ msg += freeze_script_text;
msg += "' too small (underflow)";
parseErrorReporter->expressionSyntaxError(msg);
}
@@ -835,12 +977,13 @@ YY_RULE_SETUP
}
YY_BREAK
case 8:
+/* rule 8 can match eol */
YY_RULE_SETUP
-#line 166 "Scanner.l"
+#line 179 "Scanner.l"
{
// Igore white-space
- if(yytext[0] == '\n')
+ if(freeze_script_text[0] == '\n')
{
parseLine++;
}
@@ -848,123 +991,123 @@ YY_RULE_SETUP
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 175 "Scanner.l"
+#line 188 "Scanner.l"
return TOK_LESS_THAN;
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 176 "Scanner.l"
+#line 189 "Scanner.l"
return TOK_GREATER_THAN;
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 177 "Scanner.l"
+#line 190 "Scanner.l"
return TOK_LESS_EQUAL;
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 178 "Scanner.l"
+#line 191 "Scanner.l"
return TOK_GREATER_EQUAL;
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 179 "Scanner.l"
+#line 192 "Scanner.l"
return TOK_EQUAL;
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 180 "Scanner.l"
+#line 193 "Scanner.l"
return TOK_NEQ;
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 181 "Scanner.l"
+#line 194 "Scanner.l"
return TOK_ADD;
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 182 "Scanner.l"
+#line 195 "Scanner.l"
return TOK_SUB;
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 183 "Scanner.l"
+#line 196 "Scanner.l"
return TOK_MUL;
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 184 "Scanner.l"
+#line 197 "Scanner.l"
return TOK_DIV;
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 185 "Scanner.l"
+#line 198 "Scanner.l"
return TOK_MOD;
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 186 "Scanner.l"
+#line 199 "Scanner.l"
return TOK_LPAREN;
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 187 "Scanner.l"
+#line 200 "Scanner.l"
return TOK_RPAREN;
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 188 "Scanner.l"
+#line 201 "Scanner.l"
return TOK_LBRACKET;
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 189 "Scanner.l"
+#line 202 "Scanner.l"
return TOK_RBRACKET;
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 190 "Scanner.l"
+#line 203 "Scanner.l"
return TOK_SCOPE_DELIMITER;
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 192 "Scanner.l"
+#line 205 "Scanner.l"
{
- return yytext[0];
+ return freeze_script_text[0];
}
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 196 "Scanner.l"
+#line 209 "Scanner.l"
ECHO;
YY_BREAK
-#line 941 "lex.yy.c"
+#line 1083 "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;
+ 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_cp = (yy_hold_char);
YY_RESTORE_YY_MORE_OFFSET
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+ 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 yyin at a new source and called
- * yylex(). If so, then we have to assure
- * consistency between yy_current_buffer and our
+ * 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->yy_n_chars;
- yy_current_buffer->yy_input_file = yyin;
- yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+ (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
@@ -974,13 +1117,13 @@ case YY_STATE_EOF(INITIAL):
* end-of-buffer state). Contrast this with the test
* in input().
*/
- if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ 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_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state();
+ yy_current_state = yy_get_previous_state( );
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
@@ -993,41 +1136,42 @@ case YY_STATE_EOF(INITIAL):
yy_next_state = yy_try_NUL_trans( yy_current_state );
- yy_bp = yytext_ptr + YY_MORE_ADJ;
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
- yy_cp = ++yy_c_buf_p;
+ yy_cp = ++(yy_c_buf_p);
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
- yy_cp = yy_c_buf_p;
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
goto yy_find_action;
}
}
- else switch ( yy_get_next_buffer() )
+ else switch ( yy_get_next_buffer( ) )
{
case EOB_ACT_END_OF_FILE:
{
- yy_did_buffer_switch_on_eof = 0;
+ (yy_did_buffer_switch_on_eof) = 0;
- if ( yywrap() )
+ if ( freeze_script_wrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
- * yytext, we can now 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_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
@@ -1035,30 +1179,30 @@ case YY_STATE_EOF(INITIAL):
else
{
- if ( ! yy_did_buffer_switch_on_eof )
+ 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_c_buf_p) =
+ (yytext_ptr) + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state();
+ yy_current_state = yy_get_previous_state( );
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
- yy_c_buf_p =
- &yy_current_buffer->yy_ch_buf[yy_n_chars];
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
- yy_current_state = yy_get_previous_state();
+ yy_current_state = yy_get_previous_state( );
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
goto yy_find_action;
}
break;
@@ -1069,8 +1213,7 @@ case YY_STATE_EOF(INITIAL):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
- } /* end of yylex */
-
+} /* end of freeze_script_lex */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -1079,21 +1222,20 @@ case YY_STATE_EOF(INITIAL):
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
-
-static int yy_get_next_buffer()
- {
- register char *dest = yy_current_buffer->yy_ch_buf;
- register char *source = yytext_ptr;
+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->yy_ch_buf[yy_n_chars + 1] )
+ 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->yy_fill_buffer == 0 )
+ 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 )
+ 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.
@@ -1113,34 +1255,30 @@ static int yy_get_next_buffer()
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ 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->yy_n_chars = yy_n_chars = 0;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
else
{
- int num_to_read =
- yy_current_buffer->yy_buf_size - number_to_move - 1;
+ 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. */
-#ifdef YY_USES_REJECT
- YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = yy_current_buffer;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
int yy_c_buf_p_offset =
- (int) (yy_c_buf_p - b->yy_ch_buf);
+ (int) ((yy_c_buf_p) - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
@@ -1153,8 +1291,7 @@ static int yy_get_next_buffer()
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yy_flex_realloc( (void *) b->yy_ch_buf,
- b->yy_buf_size + 2 );
+ freeze_script_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
@@ -1164,35 +1301,35 @@ static int yy_get_next_buffer()
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
- yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+ (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
- num_to_read = yy_current_buffer->yy_buf_size -
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
number_to_move - 1;
-#endif
+
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
- YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
- yy_n_chars, num_to_read );
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), (size_t) num_to_read );
- yy_current_buffer->yy_n_chars = yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
- if ( yy_n_chars == 0 )
+ if ( (yy_n_chars) == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- yyrestart( yyin );
+ freeze_script_restart(freeze_script_in );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
- yy_current_buffer->yy_buffer_status =
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
@@ -1200,32 +1337,39 @@ static int yy_get_next_buffer()
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- yy_n_chars += number_to_move;
- yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
- yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+ 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()" );
+ }
- yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+ (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;
- return ret_val;
- }
+ (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()
- {
+ 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);
- yy_current_state = yy_start;
-
- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+ 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;
+ (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 )
{
@@ -1237,30 +1381,23 @@ static yy_state_type yy_get_previous_state()
}
return yy_current_state;
- }
-
+}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
-
-#ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
-#else
-static yy_state_type yy_try_NUL_trans( yy_current_state )
-yy_state_type yy_current_state;
-#endif
- {
+ 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 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;
+ (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 )
{
@@ -1272,81 +1409,73 @@ yy_state_type yy_current_state;
yy_is_jam = (yy_current_state == 50);
return yy_is_jam ? 0 : yy_current_state;
- }
-
+}
-#ifndef YY_NO_UNPUT
-#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
-#else
-static void yyunput( c, yy_bp )
-int c;
-register char *yy_bp;
-#endif
- {
- register char *yy_cp = yy_c_buf_p;
+ static void yyunput (int c, register char * yy_bp )
+{
+ register char *yy_cp;
+
+ yy_cp = (yy_c_buf_p);
- /* undo effects of setting up yytext */
- *yy_cp = yy_hold_char;
+ /* undo effects of setting up freeze_script_text */
+ *yy_cp = (yy_hold_char);
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ 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->yy_ch_buf[
- yy_current_buffer->yy_buf_size + 2];
+ 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->yy_ch_buf[number_to_move];
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
- while ( source > yy_current_buffer->yy_ch_buf )
+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
- yy_current_buffer->yy_n_chars =
- yy_n_chars = yy_current_buffer->yy_buf_size;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ 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;
- }
-#endif /* ifndef YY_NO_UNPUT */
-
+ (yytext_ptr) = yy_bp;
+ (yy_hold_char) = *yy_cp;
+ (yy_c_buf_p) = yy_cp;
+}
#ifndef YY_NO_INPUT
#ifdef __cplusplus
-static int yyinput()
+ static int yyinput (void)
#else
-static int input()
+ static int input (void)
#endif
- {
- int c;
- *yy_c_buf_p = yy_hold_char;
+{
+ int c;
+
+ *(yy_c_buf_p) = (yy_hold_char);
- if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
- if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ 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';
+ *(yy_c_buf_p) = '\0';
else
{ /* need more input */
- int offset = yy_c_buf_p - yytext_ptr;
- ++yy_c_buf_p;
+ int offset = (yy_c_buf_p) - (yytext_ptr);
+ ++(yy_c_buf_p);
- switch ( yy_get_next_buffer() )
+ switch ( yy_get_next_buffer( ) )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
@@ -1360,16 +1489,16 @@ static int input()
*/
/* Reset buffer status. */
- yyrestart( yyin );
+ freeze_script_restart(freeze_script_in );
- /* fall through */
+ /*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap() )
+ if ( freeze_script_wrap( ) )
return EOF;
- if ( ! yy_did_buffer_switch_on_eof )
+ if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
@@ -1379,167 +1508,165 @@ static int input()
}
case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p = yytext_ptr + offset;
+ (yy_c_buf_p) = (yytext_ptr) + offset;
break;
}
}
}
- c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
- *yy_c_buf_p = '\0'; /* preserve yytext */
- yy_hold_char = *++yy_c_buf_p;
-
+ 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 /* YY_NO_INPUT */
-
-#ifdef YY_USE_PROTOS
-void yyrestart( FILE *input_file )
-#else
-void yyrestart( input_file )
-FILE *input_file;
-#endif
- {
- if ( ! yy_current_buffer )
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+}
+#endif /* ifndef YY_NO_INPUT */
- yy_init_buffer( yy_current_buffer, input_file );
- yy_load_buffer_state();
+/** 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( );
+}
-#ifdef YY_USE_PROTOS
-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-#else
-void yy_switch_to_buffer( new_buffer )
-YY_BUFFER_STATE new_buffer;
-#endif
- {
- if ( yy_current_buffer == new_buffer )
+/** 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 )
+ if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
- *yy_c_buf_p = yy_hold_char;
- yy_current_buffer->yy_buf_pos = yy_c_buf_p;
- yy_current_buffer->yy_n_chars = yy_n_chars;
+ *(yy_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 = new_buffer;
- yy_load_buffer_state();
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+ freeze_script__load_buffer_state( );
/* We don't actually know whether we did this switch during
- * EOF (yywrap()) processing, but the only time this flag
- * is looked at is after yywrap() is called, so it's safe
+ * 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;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_load_buffer_state( void )
-#else
-void yy_load_buffer_state()
-#endif
- {
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
- yyin = yy_current_buffer->yy_input_file;
- yy_hold_char = *yy_c_buf_p;
- }
+ (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);
+}
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
-#else
-YY_BUFFER_STATE yy_create_buffer( file, size )
-FILE *file;
-int size;
-#endif
- {
+/** 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) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+
+ b = (YY_BUFFER_STATE) freeze_script_alloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ 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 *) yy_flex_alloc( b->yy_buf_size + 2 );
+ 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 yy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in freeze_script__create_buffer()" );
b->yy_is_our_buffer = 1;
- yy_init_buffer( b, file );
+ freeze_script__init_buffer(b,file );
return b;
- }
-
+}
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
- {
+/** 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 )
- yy_current_buffer = (YY_BUFFER_STATE) 0;
+ 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 )
- yy_flex_free( (void *) b->yy_ch_buf );
-
- yy_flex_free( (void *) b );
- }
+ 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 )
-#ifdef YY_USE_PROTOS
-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
-#else
-void yy_init_buffer( b, file )
-YY_BUFFER_STATE b;
-FILE *file;
-#endif
-
-
- {
- yy_flush_buffer( b );
+{
+ int oerrno = errno;
+
+ freeze_script__flush_buffer(b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
-#if YY_ALWAYS_INTERACTIVE
- b->yy_is_interactive = 1;
-#else
-#if YY_NEVER_INTERACTIVE
- b->yy_is_interactive = 0;
-#else
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-#endif
-#endif
- }
-
+ /* 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;
+ }
-#ifdef YY_USE_PROTOS
-void yy_flush_buffer( YY_BUFFER_STATE b )
-#else
-void yy_flush_buffer( b )
-YY_BUFFER_STATE b;
-#endif
+ b->yy_is_interactive = 0;
+
+ errno = oerrno;
+}
- {
- if ( ! b )
+/** 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;
@@ -1556,31 +1683,127 @@ YY_BUFFER_STATE b;
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
- if ( b == yy_current_buffer )
- yy_load_buffer_state();
+ 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;
+ }
-#ifndef YY_NO_SCAN_BUFFER
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
-#else
-YY_BUFFER_STATE yy_scan_buffer( base, size )
-char *base;
-yy_size_t size;
-#endif
- {
- YY_BUFFER_STATE b;
+ if ((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) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) freeze_script_alloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+ 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;
@@ -1592,58 +1815,53 @@ yy_size_t size;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- yy_switch_to_buffer( b );
+ freeze_script__switch_to_buffer(b );
return b;
- }
-#endif
-
-
-#ifndef YY_NO_SCAN_STRING
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
-#else
-YY_BUFFER_STATE yy_scan_string( yy_str )
-yyconst char *yy_str;
-#endif
- {
- int len;
- for ( len = 0; yy_str[len]; ++len )
- ;
-
- return yy_scan_bytes( yy_str, len );
- }
-#endif
+}
+/** 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) );
+}
-#ifndef YY_NO_SCAN_BYTES
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
-#else
-YY_BUFFER_STATE yy_scan_bytes( bytes, len )
-yyconst char *bytes;
-int len;
-#endif
- {
+/** 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 yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ *
+ * @return the newly allocated buffer state object.
+ */
+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 = len + 2;
- buf = (char *) yy_flex_alloc( n );
+ n = _yybytes_len + 2;
+ buf = (char *) freeze_script_alloc(n );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in freeze_script__scan_bytes()" );
- for ( i = 0; i < len; ++i )
- buf[i] = bytes[i];
+ for ( i = 0; i < _yybytes_len; ++i )
+ buf[i] = yybytes[i];
- buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = yy_scan_buffer( buf, n );
+ b = freeze_script__scan_buffer(buf,n );
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+ 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.
@@ -1651,148 +1869,196 @@ int len;
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 );
+}
-#ifndef YY_NO_PUSH_STATE
-#ifdef YY_USE_PROTOS
-static void yy_push_state( int new_state )
-#else
-static void yy_push_state( new_state )
-int new_state;
-#endif
- {
- if ( yy_start_stack_ptr >= yy_start_stack_depth )
- {
- yy_size_t new_size;
+/* Redefine yyless() so it works in section 3 code. */
- yy_start_stack_depth += YY_START_STACK_INCR;
- new_size = yy_start_stack_depth * sizeof( int );
+#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 )
- if ( ! yy_start_stack )
- yy_start_stack = (int *) yy_flex_alloc( new_size );
+/* Accessor methods (get/set functions) to struct members. */
- else
- yy_start_stack = (int *) yy_flex_realloc(
- (void *) yy_start_stack, new_size );
+/** Get the current line number.
+ *
+ */
+int freeze_script_get_lineno (void)
+{
+
+ return freeze_script_lineno;
+}
- if ( ! yy_start_stack )
- YY_FATAL_ERROR(
- "out of memory expanding start-condition stack" );
- }
+/** Get the input stream.
+ *
+ */
+FILE *freeze_script_get_in (void)
+{
+ return freeze_script_in;
+}
- yy_start_stack[yy_start_stack_ptr++] = YY_START;
+/** Get the output stream.
+ *
+ */
+FILE *freeze_script_get_out (void)
+{
+ return freeze_script_out;
+}
- BEGIN(new_state);
- }
-#endif
+/** Get the length of the current token.
+ *
+ */
+int freeze_script_get_leng (void)
+{
+ return freeze_script_leng;
+}
+/** Get the current token.
+ *
+ */
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state()
- {
- if ( --yy_start_stack_ptr < 0 )
- YY_FATAL_ERROR( "start-condition stack underflow" );
+char *freeze_script_get_text (void)
+{
+ return freeze_script_text;
+}
- BEGIN(yy_start_stack[yy_start_stack_ptr]);
- }
-#endif
+/** 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 ;
+}
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
- {
- return yy_start_stack[yy_start_stack_ptr - 1];
- }
-#endif
+void freeze_script_set_out (FILE * out_str )
+{
+ freeze_script_out = out_str ;
+}
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
+int freeze_script_get_debug (void)
+{
+ return freeze_script__flex_debug;
+}
+
+void freeze_script_set_debug (int bdebug )
+{
+ freeze_script__flex_debug = bdebug ;
+}
-#ifdef YY_USE_PROTOS
-static void yy_fatal_error( yyconst char msg[] )
+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
-static void yy_fatal_error( msg )
-char msg[];
+ freeze_script_in = (FILE *) 0;
+ freeze_script_out = (FILE *) 0;
#endif
- {
- (void) fprintf( stderr, "%s\n", msg );
- exit( YY_EXIT_FAILURE );
- }
+ /* 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();
+ }
-/* Redefine yyless() so it works in section 3 code. */
+ /* Destroy the stack itself. */
+ freeze_script_free((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
-#undef yyless
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- yytext[yyleng] = yy_hold_char; \
- yy_c_buf_p = yytext + n; \
- yy_hold_char = *yy_c_buf_p; \
- *yy_c_buf_p = '\0'; \
- yyleng = n; \
- } \
- while ( 0 )
+ /* 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. */
+/*
+ * Internal utility routines.
+ */
#ifndef yytext_ptr
-#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
-#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
-yyconst char *s2;
-int n;
-#endif
- {
+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
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
- {
+static int yy_flex_strlen (yyconst char * s )
+{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
- }
+}
#endif
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( yy_size_t size )
-#else
-static void *yy_flex_alloc( size )
-yy_size_t size;
-#endif
- {
+void *freeze_script_alloc (yy_size_t size )
+{
return (void *) malloc( size );
- }
+}
-#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, yy_size_t size )
-#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-yy_size_t size;
-#endif
- {
+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
@@ -1801,26 +2067,17 @@ yy_size_t size;
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
- }
+}
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
- {
- free( ptr );
- }
+void freeze_script_free (void * ptr )
+{
+ free( (char *) ptr ); /* see freeze_script_realloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
+
+#line 209 "Scanner.l"
-#if YY_MAIN
-int main()
- {
- yylex();
- return 0;
- }
-#endif
-#line 196 "Scanner.l"
namespace FreezeScript
@@ -1998,3 +2255,4 @@ parseString(char start)
}
} // End of namespace FreezeScript
+
diff --git a/cpp/src/FreezeScript/Scanner.l b/cpp/src/FreezeScript/Scanner.l
index 94c1764c33a..81974e656b5 100644
--- a/cpp/src/FreezeScript/Scanner.l
+++ b/cpp/src/FreezeScript/Scanner.l
@@ -20,12 +20,25 @@
#if defined(_MSC_VER) && defined(ICE_64)
//
+// '=' : conversion from 'size_t' to 'int', possible loss of data
+// The result of fread() is a size_t and gets inserted into an int
+//
+# pragma warning( 4 : 4267 )
+//
// 'initializing' : conversion from '__int64' to 'int', possible loss of data
// Puts a pointer-difference into an int
//
# pragma warning( 4 : 4244 )
#endif
+#ifdef _MSC_VER
+# ifdef freeze_script_wrap
+# undef freeze_script_wrap
+# define freeze_script_wrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
using namespace std;
using namespace FreezeScript;
diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp
index ce7c37fa025..199ef69d639 100755
--- a/cpp/src/Ice/BasicStream.cpp
+++ b/cpp/src/Ice/BasicStream.cpp
@@ -1738,7 +1738,7 @@ IceInternal::BasicStream::initReadEncaps()
if(!_currentReadEncaps) // Lazy initialization.
{
_currentReadEncaps = &_preAllocatedReadEncaps;
- _currentReadEncaps->sz = b.size();
+ _currentReadEncaps->sz = static_cast<Ice::Int>(b.size());
}
if(!_currentReadEncaps->decoder) // Lazy initialization.
diff --git a/cpp/src/Ice/IncomingAsync.cpp b/cpp/src/Ice/IncomingAsync.cpp
index 4f2564be30e..e9f8c628e00 100644
--- a/cpp/src/Ice/IncomingAsync.cpp
+++ b/cpp/src/Ice/IncomingAsync.cpp
@@ -308,7 +308,7 @@ IceAsync::Ice::AMD_Object_ice_invoke::ice_response(bool ok, const vector<Byte>&
}
else
{
- __writeParamEncaps(&outEncaps[0], outEncaps.size(), ok);
+ __writeParamEncaps(&outEncaps[0], static_cast< ::Ice::Int>(outEncaps.size()), ok);
}
}
catch(const LocalException& ex)
diff --git a/cpp/src/Ice/Object.cpp b/cpp/src/Ice/Object.cpp
index 7d6461e2565..879f486b78b 100644
--- a/cpp/src/Ice/Object.cpp
+++ b/cpp/src/Ice/Object.cpp
@@ -318,7 +318,7 @@ Ice::Blobject::__dispatch(Incoming& in, const Current& current)
}
else
{
- in.__writeParamEncaps(&outEncaps[0], outEncaps.size(), ok);
+ in.__writeParamEncaps(&outEncaps[0], static_cast<Ice::Int>(outEncaps.size()), ok);
}
if(ok)
{
@@ -345,7 +345,7 @@ Ice::BlobjectArray::__dispatch(Incoming& in, const Current& current)
}
else
{
- in.__writeParamEncaps(&outEncaps[0], outEncaps.size(), ok);
+ in.__writeParamEncaps(&outEncaps[0], static_cast<Ice::Int>(outEncaps.size()), ok);
}
if(ok)
{
diff --git a/cpp/src/IceGrid/Makefile.mak b/cpp/src/IceGrid/Makefile.mak
index 26bae83f7cc..d77b5f2059f 100644
--- a/cpp/src/IceGrid/Makefile.mak
+++ b/cpp/src/IceGrid/Makefile.mak
@@ -130,6 +130,7 @@ Scanner.cpp : Scanner.l
flex Scanner.l
del /q $@
echo #include "IceUtil/Config.h" > Scanner.cpp
+ echo #include "stdint.h" >> Scanner.cpp
type lex.yy.c >> Scanner.cpp
del /q lex.yy.c
diff --git a/cpp/src/IceGrid/Scanner.cpp b/cpp/src/IceGrid/Scanner.cpp
index cfac731929f..3c7df338064 100644
--- a/cpp/src/IceGrid/Scanner.cpp
+++ b/cpp/src/IceGrid/Scanner.cpp
@@ -1,68 +1,115 @@
#include <IceUtil/Config.h>
-/* A lexical scanner generated by flex*/
+#include <stdint.h>
-/* Scanner skeleton version:
- * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
- */
+#line 3 "lex.yy.c"
+
+#define YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
#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 <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+/* end standard C headers. */
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
+/* 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;
-#ifdef __cplusplus
+/* 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
-#include <stdlib.h>
+#endif /* ! C99 */
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
+#endif /* ! FLEXINT_H */
+
+#ifdef __cplusplus
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
-#if __STDC__
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
-#define YY_USE_PROTOS
#define YY_USE_CONST
-#endif /* __STDC__ */
+#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */
-#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
-#include <io.h>
-#include <stdlib.h>
-#define YY_USE_CONST
-#define YY_USE_PROTOS
-#endif
-
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
-
-#ifdef YY_USE_PROTOS
-#define YY_PROTO(proto) proto
-#else
-#define YY_PROTO(proto) ()
-#endif
-
/* Returned upon end-of-file. */
#define YY_NULL 0
@@ -77,80 +124,78 @@
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
-#define BEGIN yy_start = 1 + 2 *
+#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 YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
+#define YY_NEW_FILE yyrestart(yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
+#endif
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#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 yyleng;
+
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator). This
- * avoids problems with code like:
- *
- * if ( condition_holds )
- * yyless( 5 );
- * else
- * do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
+ #define 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 yytext. */ \
- *yy_cp = yy_hold_char; \
+ 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 + n - YY_MORE_ADJ; \
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-#define unput(c) yyunput( c, yytext_ptr )
+#define unput(c) yyunput( c, (yytext_ptr) )
-/* Some routines like yy_flex_realloc() are emitted as static but are
- not called by all lexers. This generates warnings in some compilers,
- notably GCC. Arrange to suppress these. */
-#ifdef __GNUC__
-#define YY_MAY_BE_UNUSED __attribute__((unused))
-#else
-#define YY_MAY_BE_UNUSED
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
#endif
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-typedef unsigned int yy_size_t;
-
-
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
{
FILE *yy_input_file;
@@ -187,12 +232,16 @@ struct yy_buffer_state
*/
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
@@ -206,28 +255,38 @@ struct yy_buffer_state
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
+
};
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-static YY_BUFFER_STATE yy_current_buffer = 0;
+/* 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_current_buffer
+#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 yytext is formed. */
static char yy_hold_char;
-
static int yy_n_chars; /* number of characters read into yy_ch_buf */
-
-
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 1; /* whether we need to initialize */
+static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow yywrap()'s to do buffer switches
@@ -235,75 +294,101 @@ static int yy_start = 0; /* start state number */
*/
static int yy_did_buffer_switch_on_eof;
-void yyrestart YY_PROTO(( FILE *input_file ));
+void yyrestart (FILE *input_file );
+void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
+void yy_delete_buffer (YY_BUFFER_STATE b );
+void yy_flush_buffer (YY_BUFFER_STATE b );
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state (void );
-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
-void yy_load_buffer_state YY_PROTO(( void ));
-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+static void yyensure_buffer_stack (void );
+static void yy_load_buffer_state (void );
+static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED;
-static void yy_flex_free YY_PROTO(( void * ));
+YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
+YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
+
+void *yyalloc (yy_size_t );
+void *yyrealloc (void *,yy_size_t );
+void yyfree (void * );
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
- if ( ! yy_current_buffer ) \
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
- yy_current_buffer->yy_is_interactive = is_interactive; \
+ if ( ! YY_CURRENT_BUFFER ){ \
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer(yyin,YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
- if ( ! yy_current_buffer ) \
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
- yy_current_buffer->yy_at_bol = at_bol; \
+ if ( ! YY_CURRENT_BUFFER ){\
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer(yyin,YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+/* Begin user sect3 */
-#define yywrap() 1
+#define yywrap(n) 1
#define YY_SKIP_YYWRAP
+
typedef unsigned char YY_CHAR;
+
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+
typedef int yy_state_type;
+
+extern int yylineno;
+
+int yylineno = 1;
+
extern char *yytext;
#define yytext_ptr yytext
-static yy_state_type yy_get_previous_state YY_PROTO(( void ));
-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
-static int yy_get_next_buffer YY_PROTO(( void ));
-static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+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 yytext.
*/
#define YY_DO_BEFORE_ACTION \
- yytext_ptr = yy_bp; \
- yyleng = (int) (yy_cp - yy_bp); \
- yy_hold_char = *yy_cp; \
+ (yytext_ptr) = yy_bp; \
+ yyleng = (size_t) (yy_cp - yy_bp); \
+ (yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
- yy_c_buf_p = yy_cp;
+ (yy_c_buf_p) = yy_cp;
#define YY_NUM_RULES 8
#define YY_END_OF_BUFFER 9
-static yyconst short int yy_accept[19] =
+/* 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[19] =
{ 0,
3, 3, 9, 7, 3, 4, 5, 6, 7, 4,
7, 3, 0, 2, 1, 0, 3, 0
} ;
-static yyconst int yy_ec[256] =
+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,
@@ -335,24 +420,24 @@ static yyconst int yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst int yy_meta[10] =
+static yyconst flex_int32_t yy_meta[10] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1
} ;
-static yyconst short int yy_base[19] =
+static yyconst flex_int16_t yy_base[19] =
{ 0,
0, 0, 11, 22, 8, 22, 22, 22, 12, 22,
18, 0, 0, 22, 22, 0, 22, 22
} ;
-static yyconst short int yy_def[19] =
+static yyconst flex_int16_t yy_def[19] =
{ 0,
18, 1, 18, 18, 18, 18, 18, 18, 18, 18,
18, 5, 11, 18, 18, 11, 18, 0
} ;
-static yyconst short int yy_nxt[32] =
+static yyconst flex_int16_t yy_nxt[32] =
{ 0,
4, 5, 6, 7, 8, 4, 9, 10, 11, 12,
18, 18, 18, 18, 18, 18, 13, 14, 15, 16,
@@ -360,7 +445,7 @@ static yyconst short int yy_nxt[32] =
18
} ;
-static yyconst short int yy_chk[32] =
+static yyconst flex_int16_t yy_chk[32] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 5,
3, 0, 0, 0, 0, 0, 5, 9, 9, 11,
@@ -371,6 +456,9 @@ static yyconst short int yy_chk[32] =
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
+extern int yy_flex_debug;
+int yy_flex_debug = 0;
+
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
@@ -380,7 +468,6 @@ static char *yy_last_accepting_cpos;
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "Scanner.l"
-#define INITIAL 0
#line 2 "Scanner.l"
// **********************************************************************
@@ -398,6 +485,11 @@ char *yytext;
#if defined(_MSC_VER) && defined(ICE_64)
//
+// '=' : conversion from 'size_t' to 'int', possible loss of data
+// The result of fread() is a size_t and gets inserted into an int
+//
+# pragma warning( 4 : 4267 )
+//
// 'initializing' : conversion from '__int64' to 'int', possible loss of data
// Puts a pointer-difference into an int
//
@@ -408,6 +500,14 @@ using namespace std;
using namespace Ice;
using namespace IceGrid;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
namespace IceGrid
@@ -423,8 +523,52 @@ std::string parseSingleQuotedString();
}
#define YY_USER_INIT initScanner();
-#define YY_ALWAYS_INTERACTIVE 1
-#line 427 "lex.yy.c"
+#line 525 "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 yylex_destroy (void );
+
+int yyget_debug (void );
+
+void yyset_debug (int debug_flag );
+
+YY_EXTRA_TYPE yyget_extra (void );
+
+void yyset_extra (YY_EXTRA_TYPE user_defined );
+
+FILE *yyget_in (void );
+
+void yyset_in (FILE * in_str );
+
+FILE *yyget_out (void );
+
+void yyset_out (FILE * out_str );
+
+int yyget_leng (void );
+
+char *yyget_text (void );
+
+int yyget_lineno (void );
+
+void yyset_lineno (int line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -432,79 +576,48 @@ std::string parseSingleQuotedString();
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
+extern "C" int yywrap (void );
#else
-extern int yywrap YY_PROTO(( void ));
-#endif
+extern int yywrap (void );
#endif
-
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif
+ static void yyunput (int c,char *buf_ptr );
+
#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+static int yy_flex_strlen (yyconst char * );
#endif
#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
-#else
-static int input YY_PROTO(( void ));
-#endif
-#endif
-
-#if YY_STACK_USED
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
-static int *yy_start_stack = 0;
-#ifndef YY_NO_PUSH_STATE
-static void yy_push_state YY_PROTO(( int new_state ));
-#endif
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state YY_PROTO(( void ));
-#endif
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
-#endif
+#ifdef __cplusplus
+static int yyinput (void );
#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
+static int input (void );
#endif
-#ifdef YY_MALLOC_DECL
-YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines. This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
-
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -512,9 +625,10 @@ YY_MALLOC_DECL
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
- if ( yy_current_buffer->yy_is_interactive ) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
- int c = '*', n; \
+ int c = '*'; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -524,9 +638,22 @@ YY_MALLOC_DECL
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
- else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
- && ferror( yyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" );
+ else \
+ { \
+ errno=0; \
+ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
+ { \
+ if( errno != EINTR) \
+ { \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ break; \
+ } \
+ errno=0; \
+ clearerr(yyin); \
+ } \
+ }\
+\
+
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
@@ -547,12 +674,18 @@ YY_MALLOC_DECL
#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 int yylex YY_PROTO(( void ))
-#endif
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
@@ -569,27 +702,29 @@ YY_MALLOC_DECL
#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 = NULL, *yy_bp = NULL;
+ register char *yy_cp, *yy_bp;
register int yy_act;
+
+#line 65 "Scanner.l"
-#line 52 "Scanner.l"
+#line 715 "lex.yy.c"
-#line 581 "lex.yy.c"
-
- if ( yy_init )
+ if ( !(yy_init) )
{
- yy_init = 0;
+ (yy_init) = 1;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
- if ( ! yy_start )
- yy_start = 1; /* first start state */
+ if ( ! (yy_start) )
+ (yy_start) = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
@@ -597,34 +732,36 @@ YY_DECL
if ( ! yyout )
yyout = stdout;
- if ( ! yy_current_buffer )
- yy_current_buffer =
- yy_create_buffer( yyin, YY_BUF_SIZE );
+ if ( ! YY_CURRENT_BUFFER ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer(yyin,YY_BUF_SIZE );
+ }
- yy_load_buffer_state();
+ yy_load_buffer_state( );
}
while ( 1 ) /* loops until end-of-file is reached */
{
- yy_cp = yy_c_buf_p;
+ yy_cp = (yy_c_buf_p);
/* Support of yytext. */
- *yy_cp = yy_hold_char;
+ *yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
- yy_current_state = yy_start;
+ yy_current_state = (yy_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;
+ (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 )
{
@@ -641,29 +778,27 @@ yy_find_action:
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
- yy_cp = yy_last_accepting_cpos;
- yy_current_state = yy_last_accepting_state;
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
yy_act = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
-
do_action: /* This label is used only to access EOF actions. */
-
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
- *yy_cp = yy_hold_char;
- yy_cp = yy_last_accepting_cpos;
- yy_current_state = yy_last_accepting_state;
+ *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 54 "Scanner.l"
+#line 67 "Scanner.l"
{
// C++-style comment
int c;
@@ -676,7 +811,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 64 "Scanner.l"
+#line 77 "Scanner.l"
{
// C-style comment
while(true)
@@ -703,8 +838,9 @@ YY_RULE_SETUP
}
YY_BREAK
case 3:
+/* rule 3 can match eol */
YY_RULE_SETUP
-#line 89 "Scanner.l"
+#line 102 "Scanner.l"
{
size_t len = strlen(yytext);
for(size_t i = 0; i < len; ++i)
@@ -717,15 +853,16 @@ YY_RULE_SETUP
}
YY_BREAK
case 4:
+/* rule 4 can match eol */
YY_RULE_SETUP
-#line 100 "Scanner.l"
+#line 113 "Scanner.l"
{
return ';';
}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 104 "Scanner.l"
+#line 117 "Scanner.l"
{
// "..."-type strings
string s = parseDoubleQuotedString();
@@ -736,7 +873,7 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 112 "Scanner.l"
+#line 125 "Scanner.l"
{
// '...'-type strings
string s;
@@ -764,7 +901,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 137 "Scanner.l"
+#line 150 "Scanner.l"
{
// Simple strings
string s;
@@ -803,36 +940,36 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 173 "Scanner.l"
+#line 186 "Scanner.l"
ECHO;
YY_BREAK
-#line 809 "lex.yy.c"
+#line 945 "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;
+ 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_cp = (yy_hold_char);
YY_RESTORE_YY_MORE_OFFSET
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+ 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 yyin at a new source and called
* yylex(). If so, then we have to assure
- * consistency between yy_current_buffer and our
+ * consistency between YY_CURRENT_BUFFER and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yy_current_buffer->yy_input_file = yyin;
- yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
@@ -842,13 +979,13 @@ case YY_STATE_EOF(INITIAL):
* end-of-buffer state). Contrast this with the test
* in input().
*/
- if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ 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_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state();
+ yy_current_state = yy_get_previous_state( );
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
@@ -861,30 +998,30 @@ case YY_STATE_EOF(INITIAL):
yy_next_state = yy_try_NUL_trans( yy_current_state );
- yy_bp = yytext_ptr + YY_MORE_ADJ;
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
- yy_cp = ++yy_c_buf_p;
+ yy_cp = ++(yy_c_buf_p);
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
- yy_cp = yy_c_buf_p;
+ yy_cp = (yy_c_buf_p);
goto yy_find_action;
}
}
- else switch ( yy_get_next_buffer() )
+ else switch ( yy_get_next_buffer( ) )
{
case EOB_ACT_END_OF_FILE:
{
- yy_did_buffer_switch_on_eof = 0;
+ (yy_did_buffer_switch_on_eof) = 0;
- if ( yywrap() )
+ if ( yywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
@@ -895,7 +1032,7 @@ case YY_STATE_EOF(INITIAL):
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
@@ -903,30 +1040,30 @@ case YY_STATE_EOF(INITIAL):
else
{
- if ( ! yy_did_buffer_switch_on_eof )
+ 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_c_buf_p) =
+ (yytext_ptr) + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state();
+ yy_current_state = yy_get_previous_state( );
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
- yy_c_buf_p =
- &yy_current_buffer->yy_ch_buf[yy_n_chars];
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
- yy_current_state = yy_get_previous_state();
+ yy_current_state = yy_get_previous_state( );
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
goto yy_find_action;
}
break;
@@ -937,8 +1074,7 @@ case YY_STATE_EOF(INITIAL):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
- } /* end of yylex */
-
+} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -947,21 +1083,20 @@ case YY_STATE_EOF(INITIAL):
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
-
-static int yy_get_next_buffer()
- {
- register char *dest = yy_current_buffer->yy_ch_buf;
- register char *source = yytext_ptr;
+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->yy_ch_buf[yy_n_chars + 1] )
+ 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->yy_fill_buffer == 0 )
+ 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 )
+ 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.
@@ -981,34 +1116,30 @@ static int yy_get_next_buffer()
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ 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->yy_n_chars = yy_n_chars = 0;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
else
{
- int num_to_read =
- yy_current_buffer->yy_buf_size - number_to_move - 1;
+ 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. */
-#ifdef YY_USES_REJECT
- YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = yy_current_buffer;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
int yy_c_buf_p_offset =
- (int) (yy_c_buf_p - b->yy_ch_buf);
+ (int) ((yy_c_buf_p) - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
@@ -1021,8 +1152,7 @@ static int yy_get_next_buffer()
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yy_flex_realloc( (void *) b->yy_ch_buf,
- b->yy_buf_size + 2 );
+ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
@@ -1032,35 +1162,35 @@ static int yy_get_next_buffer()
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
- yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+ (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
- num_to_read = yy_current_buffer->yy_buf_size -
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
number_to_move - 1;
-#endif
+
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
- YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
- yy_n_chars, num_to_read );
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), (size_t) num_to_read );
- yy_current_buffer->yy_n_chars = yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
- if ( yy_n_chars == 0 )
+ if ( (yy_n_chars) == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- yyrestart( yyin );
+ yyrestart(yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
- yy_current_buffer->yy_buffer_status =
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
@@ -1068,32 +1198,39 @@ static int yy_get_next_buffer()
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- yy_n_chars += number_to_move;
- yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
- yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+ 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 *) yyrealloc((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()" );
+ }
- yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+ (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;
- return ret_val;
- }
+ (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()
- {
+ 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);
- yy_current_state = yy_start;
-
- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+ 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;
+ (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 )
{
@@ -1105,30 +1242,23 @@ static yy_state_type yy_get_previous_state()
}
return yy_current_state;
- }
-
+}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
-
-#ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
-#else
-static yy_state_type yy_try_NUL_trans( yy_current_state )
-yy_state_type yy_current_state;
-#endif
- {
+ 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 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;
+ (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 )
{
@@ -1140,81 +1270,73 @@ yy_state_type yy_current_state;
yy_is_jam = (yy_current_state == 18);
return yy_is_jam ? 0 : yy_current_state;
- }
-
+}
-#ifndef YY_NO_UNPUT
-#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
-#else
-static void yyunput( c, yy_bp )
-int c;
-register char *yy_bp;
-#endif
- {
- register char *yy_cp = yy_c_buf_p;
+ static void yyunput (int c, register char * yy_bp )
+{
+ register char *yy_cp;
+
+ yy_cp = (yy_c_buf_p);
/* undo effects of setting up yytext */
- *yy_cp = yy_hold_char;
+ *yy_cp = (yy_hold_char);
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ 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->yy_ch_buf[
- yy_current_buffer->yy_buf_size + 2];
+ 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->yy_ch_buf[number_to_move];
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
- while ( source > yy_current_buffer->yy_ch_buf )
+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
- yy_current_buffer->yy_n_chars =
- yy_n_chars = yy_current_buffer->yy_buf_size;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ 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;
- }
-#endif /* ifndef YY_NO_UNPUT */
-
+ (yytext_ptr) = yy_bp;
+ (yy_hold_char) = *yy_cp;
+ (yy_c_buf_p) = yy_cp;
+}
#ifndef YY_NO_INPUT
#ifdef __cplusplus
-static int yyinput()
+ static int yyinput (void)
#else
-static int input()
+ static int input (void)
#endif
- {
- int c;
- *yy_c_buf_p = yy_hold_char;
+{
+ int c;
+
+ *(yy_c_buf_p) = (yy_hold_char);
- if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
- if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ 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';
+ *(yy_c_buf_p) = '\0';
else
{ /* need more input */
- int offset = yy_c_buf_p - yytext_ptr;
- ++yy_c_buf_p;
+ int offset = (yy_c_buf_p) - (yytext_ptr);
+ ++(yy_c_buf_p);
- switch ( yy_get_next_buffer() )
+ switch ( yy_get_next_buffer( ) )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
@@ -1228,16 +1350,16 @@ static int input()
*/
/* Reset buffer status. */
- yyrestart( yyin );
+ yyrestart(yyin );
- /* fall through */
+ /*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap() )
+ if ( yywrap( ) )
return EOF;
- if ( ! yy_did_buffer_switch_on_eof )
+ if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
@@ -1247,90 +1369,92 @@ static int input()
}
case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p = yytext_ptr + offset;
+ (yy_c_buf_p) = (yytext_ptr) + offset;
break;
}
}
}
- c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
- *yy_c_buf_p = '\0'; /* preserve yytext */
- yy_hold_char = *++yy_c_buf_p;
-
+ c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
+ (yy_hold_char) = *++(yy_c_buf_p);
return c;
- }
-#endif /* YY_NO_INPUT */
-
-#ifdef YY_USE_PROTOS
-void yyrestart( FILE *input_file )
-#else
-void yyrestart( input_file )
-FILE *input_file;
-#endif
- {
- if ( ! yy_current_buffer )
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+}
+#endif /* ifndef YY_NO_INPUT */
- yy_init_buffer( yy_current_buffer, input_file );
- yy_load_buffer_state();
+/** 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 yyrestart (FILE * input_file )
+{
+
+ if ( ! YY_CURRENT_BUFFER ){
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer(yyin,YY_BUF_SIZE );
}
+ yy_init_buffer(YY_CURRENT_BUFFER,input_file );
+ yy_load_buffer_state( );
+}
-#ifdef YY_USE_PROTOS
-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-#else
-void yy_switch_to_buffer( new_buffer )
-YY_BUFFER_STATE new_buffer;
-#endif
- {
- if ( yy_current_buffer == new_buffer )
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ *
+ */
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+{
+
+ /* TODO. We should be able to replace this entire function body
+ * with
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
+ */
+ yyensure_buffer_stack ();
+ if ( YY_CURRENT_BUFFER == new_buffer )
return;
- if ( yy_current_buffer )
+ if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
- *yy_c_buf_p = yy_hold_char;
- yy_current_buffer->yy_buf_pos = yy_c_buf_p;
- yy_current_buffer->yy_n_chars = yy_n_chars;
+ *(yy_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 = new_buffer;
- yy_load_buffer_state();
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+ yy_load_buffer_state( );
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
- yy_did_buffer_switch_on_eof = 1;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_load_buffer_state( void )
-#else
-void yy_load_buffer_state()
-#endif
- {
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
- yyin = yy_current_buffer->yy_input_file;
- yy_hold_char = *yy_c_buf_p;
- }
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+static void yy_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;
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ (yy_hold_char) = *(yy_c_buf_p);
+}
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
-#else
-YY_BUFFER_STATE yy_create_buffer( file, size )
-FILE *file;
-int size;
-#endif
- {
+/** 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 yy_create_buffer (FILE * file, int size )
+{
YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
@@ -1339,75 +1463,71 @@ int size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- yy_init_buffer( b, file );
+ yy_init_buffer(b,file );
return b;
- }
-
+}
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
- {
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ *
+ */
+ void yy_delete_buffer (YY_BUFFER_STATE b )
+{
+
if ( ! b )
return;
- if ( b == yy_current_buffer )
- yy_current_buffer = (YY_BUFFER_STATE) 0;
+ 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 )
- yy_flex_free( (void *) b->yy_ch_buf );
-
- yy_flex_free( (void *) b );
- }
-
+ yyfree((void *) b->yy_ch_buf );
+ yyfree((void *) b );
+}
-#ifdef YY_USE_PROTOS
-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
-#else
-void yy_init_buffer( b, file )
-YY_BUFFER_STATE b;
-FILE *file;
-#endif
-
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a yyrestart() or at EOF.
+ */
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
- {
- yy_flush_buffer( b );
+{
+ int oerrno = errno;
+
+ yy_flush_buffer(b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
-#if YY_ALWAYS_INTERACTIVE
- b->yy_is_interactive = 1;
-#else
-#if YY_NEVER_INTERACTIVE
- b->yy_is_interactive = 0;
-#else
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-#endif
-#endif
- }
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() 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 = 1;
-#ifdef YY_USE_PROTOS
-void yy_flush_buffer( YY_BUFFER_STATE b )
-#else
-void yy_flush_buffer( b )
-YY_BUFFER_STATE b;
-#endif
+ errno = oerrno;
+}
- {
- if ( ! b )
+/** 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 yy_flush_buffer (YY_BUFFER_STATE b )
+{
+ if ( ! b )
return;
b->yy_n_chars = 0;
@@ -1424,29 +1544,125 @@ YY_BUFFER_STATE b;
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
- if ( b == yy_current_buffer )
- yy_load_buffer_state();
+ if ( b == YY_CURRENT_BUFFER )
+ yy_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 yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+ if (new_buffer == NULL)
+ return;
+
+ yyensure_buffer_stack();
+
+ /* This block is copied from yy_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 yy_switch_to_buffer. */
+ yy_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 yypop_buffer_state (void)
+{
+ if (!YY_CURRENT_BUFFER)
+ return;
+
+ yy_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ if ((yy_buffer_stack_top) > 0)
+ --(yy_buffer_stack_top);
+
+ if (YY_CURRENT_BUFFER) {
+ yy_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 yyensure_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**)yyalloc
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_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;
+ }
-#ifndef YY_NO_SCAN_BUFFER
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
-#else
-YY_BUFFER_STATE yy_scan_buffer( base, size )
-char *base;
-yy_size_t size;
-#endif
- {
- YY_BUFFER_STATE b;
+ if ((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**)yyrealloc
+ ((yy_buffer_stack),
+ num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_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 yy_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) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
@@ -1460,56 +1676,51 @@ yy_size_t size;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- yy_switch_to_buffer( b );
+ yy_switch_to_buffer(b );
return b;
- }
-#endif
-
-
-#ifndef YY_NO_SCAN_STRING
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
-#else
-YY_BUFFER_STATE yy_scan_string( yy_str )
-yyconst char *yy_str;
-#endif
- {
- int len;
- for ( len = 0; yy_str[len]; ++len )
- ;
-
- return yy_scan_bytes( yy_str, len );
- }
-#endif
+}
+/** Setup the input buffer state to scan a string. The next call to yylex() 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
+ * yy_scan_bytes() instead.
+ */
+YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
+{
+
+ return yy_scan_bytes(yystr,strlen(yystr) );
+}
-#ifndef YY_NO_SCAN_BYTES
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
-#else
-YY_BUFFER_STATE yy_scan_bytes( bytes, len )
-yyconst char *bytes;
-int len;
-#endif
- {
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+ * scan from a @e copy of @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_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 = len + 2;
- buf = (char *) yy_flex_alloc( n );
+ n = _yybytes_len + 2;
+ buf = (char *) yyalloc(n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
- for ( i = 0; i < len; ++i )
- buf[i] = bytes[i];
+ for ( i = 0; i < _yybytes_len; ++i )
+ buf[i] = yybytes[i];
- buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = yy_scan_buffer( buf, n );
+ b = yy_scan_buffer(buf,n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
@@ -1519,148 +1730,196 @@ int len;
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. */
-#ifndef YY_NO_PUSH_STATE
-#ifdef YY_USE_PROTOS
-static void yy_push_state( int new_state )
-#else
-static void yy_push_state( new_state )
-int new_state;
-#endif
- {
- if ( yy_start_stack_ptr >= yy_start_stack_depth )
- {
- yy_size_t new_size;
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ yytext[yyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ (yy_hold_char) = *(yy_c_buf_p); \
+ *(yy_c_buf_p) = '\0'; \
+ yyleng = yyless_macro_arg; \
+ } \
+ while ( 0 )
- yy_start_stack_depth += YY_START_STACK_INCR;
- new_size = yy_start_stack_depth * sizeof( int );
+/* Accessor methods (get/set functions) to struct members. */
- if ( ! yy_start_stack )
- yy_start_stack = (int *) yy_flex_alloc( new_size );
+/** Get the current line number.
+ *
+ */
+int yyget_lineno (void)
+{
+
+ return yylineno;
+}
- else
- yy_start_stack = (int *) yy_flex_realloc(
- (void *) yy_start_stack, new_size );
+/** Get the input stream.
+ *
+ */
+FILE *yyget_in (void)
+{
+ return yyin;
+}
- if ( ! yy_start_stack )
- YY_FATAL_ERROR(
- "out of memory expanding start-condition stack" );
- }
+/** Get the output stream.
+ *
+ */
+FILE *yyget_out (void)
+{
+ return yyout;
+}
- yy_start_stack[yy_start_stack_ptr++] = YY_START;
+/** Get the length of the current token.
+ *
+ */
+int yyget_leng (void)
+{
+ return yyleng;
+}
- BEGIN(new_state);
- }
-#endif
+/** Get the current token.
+ *
+ */
+char *yyget_text (void)
+{
+ return yytext;
+}
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state()
- {
- if ( --yy_start_stack_ptr < 0 )
- YY_FATAL_ERROR( "start-condition stack underflow" );
+/** Set the current line number.
+ * @param line_number
+ *
+ */
+void yyset_lineno (int line_number )
+{
+
+ yylineno = line_number;
+}
- BEGIN(yy_start_stack[yy_start_stack_ptr]);
- }
-#endif
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ *
+ * @see yy_switch_to_buffer
+ */
+void yyset_in (FILE * in_str )
+{
+ yyin = in_str ;
+}
+void yyset_out (FILE * out_str )
+{
+ yyout = out_str ;
+}
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
- {
- return yy_start_stack[yy_start_stack_ptr - 1];
- }
-#endif
+int yyget_debug (void)
+{
+ return yy_flex_debug;
+}
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
+void yyset_debug (int bdebug )
+{
+ yy_flex_debug = bdebug ;
+}
-#ifdef YY_USE_PROTOS
-static void yy_fatal_error( yyconst char msg[] )
+static int yy_init_globals (void)
+{
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from yylex_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
+ yyin = stdin;
+ yyout = stdout;
#else
-static void yy_fatal_error( msg )
-char msg[];
+ yyin = (FILE *) 0;
+ yyout = (FILE *) 0;
#endif
- {
- (void) fprintf( stderr, "%s\n", msg );
- exit( YY_EXIT_FAILURE );
- }
+ /* For future reference: Set errno on error, since we are called by
+ * yylex_init()
+ */
+ return 0;
+}
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void)
+{
+
+ /* Pop the buffer stack, destroying each element. */
+ while(YY_CURRENT_BUFFER){
+ yy_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ yypop_buffer_state();
+ }
-/* Redefine yyless() so it works in section 3 code. */
+ /* Destroy the stack itself. */
+ yyfree((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
-#undef yyless
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- yytext[yyleng] = yy_hold_char; \
- yy_c_buf_p = yytext + n; \
- yy_hold_char = *yy_c_buf_p; \
- *yy_c_buf_p = '\0'; \
- yyleng = n; \
- } \
- while ( 0 )
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * yylex() is called, initialization will occur. */
+ yy_init_globals( );
+ return 0;
+}
-/* Internal utility routines. */
+/*
+ * Internal utility routines.
+ */
#ifndef yytext_ptr
-#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
-#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
-yyconst char *s2;
-int n;
-#endif
- {
+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
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
- {
+static int yy_flex_strlen (yyconst char * s )
+{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
- }
+}
#endif
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( yy_size_t size )
-#else
-static void *yy_flex_alloc( size )
-yy_size_t size;
-#endif
- {
+void *yyalloc (yy_size_t size )
+{
return (void *) malloc( size );
- }
+}
-#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, yy_size_t size )
-#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-yy_size_t size;
-#endif
- {
+void *yyrealloc (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
@@ -1669,26 +1928,17 @@ yy_size_t size;
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
- }
+}
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
- {
- free( ptr );
- }
+void yyfree (void * ptr )
+{
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
+
+#line 186 "Scanner.l"
-#if YY_MAIN
-int main()
- {
- yylex();
- return 0;
- }
-#endif
-#line 173 "Scanner.l"
namespace IceGrid {
@@ -1840,3 +2090,4 @@ parseSingleQuotedString()
}
}
+
diff --git a/cpp/src/IceGrid/Scanner.l b/cpp/src/IceGrid/Scanner.l
index c58b7adb9a5..200b4f7598d 100644
--- a/cpp/src/IceGrid/Scanner.l
+++ b/cpp/src/IceGrid/Scanner.l
@@ -15,6 +15,11 @@
#if defined(_MSC_VER) && defined(ICE_64)
//
+// '=' : conversion from 'size_t' to 'int', possible loss of data
+// The result of fread() is a size_t and gets inserted into an int
+//
+# pragma warning( 4 : 4267 )
+//
// 'initializing' : conversion from '__int64' to 'int', possible loss of data
// Puts a pointer-difference into an int
//
@@ -25,6 +30,14 @@ using namespace std;
using namespace Ice;
using namespace IceGrid;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
namespace IceGrid
diff --git a/cpp/src/IceStorm/Makefile.mak b/cpp/src/IceStorm/Makefile.mak
index 481c365c8d3..c82dbab04a6 100644
--- a/cpp/src/IceStorm/Makefile.mak
+++ b/cpp/src/IceStorm/Makefile.mak
@@ -86,6 +86,7 @@ Scanner.cpp: Scanner.l
flex Scanner.l
del /q $@
echo #include "IceUtil/Config.h" > Scanner.cpp
+ echo #include "stdint.h" >> Scanner.cpp
type lex.yy.c >> Scanner.cpp
del /q lex.yy.c
diff --git a/cpp/src/IceStorm/Scanner.cpp b/cpp/src/IceStorm/Scanner.cpp
index 1d404d8273e..c1aaeef67a2 100644
--- a/cpp/src/IceStorm/Scanner.cpp
+++ b/cpp/src/IceStorm/Scanner.cpp
@@ -1,4 +1,5 @@
#include <IceUtil/Config.h>
+#include <stdint.h>
#line 3 "lex.yy.c"
@@ -54,7 +55,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -85,6 +85,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -141,7 +143,15 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -475,6 +485,11 @@ char *yytext;
#if defined(_MSC_VER) && defined(ICE_64)
//
+// '=' : conversion from 'size_t' to 'int', possible loss of data
+// The result of fread() is a size_t and gets inserted into an int
+//
+# pragma warning( 4 : 4267 )
+//
// 'initializing' : conversion from '__int64' to 'int', possible loss of data
// Puts a pointer-difference into an int
//
@@ -485,6 +500,14 @@ using namespace std;
using namespace Ice;
using namespace IceStorm;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
namespace IceStorm
@@ -498,7 +521,7 @@ void initScanner();
}
#define YY_USER_INIT initScanner();
-#line 501 "lex.yy.c"
+#line 523 "lex.yy.c"
#define INITIAL 0
@@ -579,7 +602,12 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -598,7 +626,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -680,10 +708,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 50 "Scanner.l"
+#line 63 "Scanner.l"
-#line 686 "lex.yy.c"
+#line 713 "lex.yy.c"
if ( !(yy_init) )
{
@@ -768,7 +796,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 52 "Scanner.l"
+#line 65 "Scanner.l"
{
// C++-style comment
int c;
@@ -781,7 +809,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 62 "Scanner.l"
+#line 75 "Scanner.l"
{
// C-style comment
while(true)
@@ -810,7 +838,7 @@ YY_RULE_SETUP
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
-#line 87 "Scanner.l"
+#line 100 "Scanner.l"
{
size_t len = strlen(yytext);
for(size_t i = 0; i < len; ++i)
@@ -825,14 +853,14 @@ YY_RULE_SETUP
case 4:
/* rule 4 can match eol */
YY_RULE_SETUP
-#line 98 "Scanner.l"
+#line 111 "Scanner.l"
{
return ';';
}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 102 "Scanner.l"
+#line 115 "Scanner.l"
{
// "..."-type strings
string s;
@@ -909,7 +937,7 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 176 "Scanner.l"
+#line 189 "Scanner.l"
{
// '...'-type strings
string s;
@@ -937,7 +965,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 201 "Scanner.l"
+#line 214 "Scanner.l"
{
// Simple strings
string s;
@@ -967,10 +995,10 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 228 "Scanner.l"
+#line 241 "Scanner.l"
ECHO;
YY_BREAK
-#line 973 "lex.yy.c"
+#line 1000 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1048,7 +1076,7 @@ case YY_STATE_EOF(INITIAL):
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( yywrap(0) )
+ if ( yywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
@@ -1383,7 +1411,7 @@ static int yy_get_next_buffer (void)
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap(0) )
+ if ( yywrap( ) )
return EOF;
if ( ! (yy_did_buffer_switch_on_eof) )
@@ -1724,8 +1752,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
@@ -1964,7 +1992,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 228 "Scanner.l"
+#line 241 "Scanner.l"
diff --git a/cpp/src/IceStorm/Scanner.l b/cpp/src/IceStorm/Scanner.l
index 0df69a9f1fb..4051c044020 100644
--- a/cpp/src/IceStorm/Scanner.l
+++ b/cpp/src/IceStorm/Scanner.l
@@ -15,6 +15,11 @@
#if defined(_MSC_VER) && defined(ICE_64)
//
+// '=' : conversion from 'size_t' to 'int', possible loss of data
+// The result of fread() is a size_t and gets inserted into an int
+//
+# pragma warning( 4 : 4267 )
+//
// 'initializing' : conversion from '__int64' to 'int', possible loss of data
// Puts a pointer-difference into an int
//
@@ -25,6 +30,14 @@ using namespace std;
using namespace Ice;
using namespace IceStorm;
+#ifdef _MSC_VER
+# ifdef yywrap
+# undef yywrap
+# define yywrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
namespace IceStorm
diff --git a/cpp/src/Slice/Grammar.cpp b/cpp/src/Slice/Grammar.cpp
index 5f241254f07..842a30745e7 100644
--- a/cpp/src/Slice/Grammar.cpp
+++ b/cpp/src/Slice/Grammar.cpp
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -46,7 +45,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -123,7 +122,7 @@ slice_error(const char* s)
/* Line 189 of yacc.c */
-#line 127 "Grammar.tab.c"
+#line 126 "Grammar.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -209,7 +208,7 @@ typedef int YYSTYPE;
/* Line 264 of yacc.c */
-#line 213 "Grammar.tab.c"
+#line 212 "Grammar.tab.c"
#ifdef short
# undef short
@@ -259,7 +258,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -1026,9 +1025,18 @@ static const yytype_uint8 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -1085,7 +1093,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -1823,7 +1831,7 @@ yyreduce:
{
case 2:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 108 "../Slice/Grammar.y"
{
;}
@@ -1831,7 +1839,7 @@ yyreduce:
case 3:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 116 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (3)]);
@@ -1840,7 +1848,7 @@ yyreduce:
case 4:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 125 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (3)]);
@@ -1849,7 +1857,7 @@ yyreduce:
case 5:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 129 "../Slice/Grammar.y"
{
(yyval) = new StringListTok;
@@ -1858,7 +1866,7 @@ yyreduce:
case 6:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 138 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -1871,7 +1879,7 @@ yyreduce:
case 8:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 147 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -1885,7 +1893,7 @@ yyreduce:
case 10:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 157 "../Slice/Grammar.y"
{
yyerrok;
@@ -1894,7 +1902,7 @@ yyreduce:
case 12:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 162 "../Slice/Grammar.y"
{
unit->error("`;' missing after definition");
@@ -1903,7 +1911,7 @@ yyreduce:
case 13:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 166 "../Slice/Grammar.y"
{
;}
@@ -1911,7 +1919,7 @@ yyreduce:
case 14:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 174 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ModulePtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -1920,7 +1928,7 @@ yyreduce:
case 15:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 178 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ClassDeclPtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -1929,7 +1937,7 @@ yyreduce:
case 16:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 182 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ClassDefPtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -1938,7 +1946,7 @@ yyreduce:
case 17:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 186 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ClassDeclPtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -1947,7 +1955,7 @@ yyreduce:
case 18:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 190 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ClassDefPtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -1956,7 +1964,7 @@ yyreduce:
case 19:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 194 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0);
@@ -1965,7 +1973,7 @@ yyreduce:
case 20:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 198 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ExceptionPtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -1974,7 +1982,7 @@ yyreduce:
case 21:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 202 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0);
@@ -1983,7 +1991,7 @@ yyreduce:
case 22:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 206 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || StructPtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -1992,7 +2000,7 @@ yyreduce:
case 23:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 210 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || SequencePtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -2001,7 +2009,7 @@ yyreduce:
case 24:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 214 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || DictionaryPtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -2010,7 +2018,7 @@ yyreduce:
case 25:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 218 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || EnumPtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -2019,7 +2027,7 @@ yyreduce:
case 26:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 222 "../Slice/Grammar.y"
{
assert((yyvsp[(1) - (1)]) == 0 || ConstPtr::dynamicCast((yyvsp[(1) - (1)])));
@@ -2028,7 +2036,7 @@ yyreduce:
case 27:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 231 "../Slice/Grammar.y"
{
unit->setSeenDefinition();
@@ -2050,7 +2058,7 @@ yyreduce:
case 28:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 248 "../Slice/Grammar.y"
{
if((yyvsp[(3) - (6)]))
@@ -2067,7 +2075,7 @@ yyreduce:
case 29:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 265 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -2076,7 +2084,7 @@ yyreduce:
case 30:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 269 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -2087,7 +2095,7 @@ yyreduce:
case 31:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 280 "../Slice/Grammar.y"
{
unit->error("exceptions cannot be forward declared");
@@ -2097,7 +2105,7 @@ yyreduce:
case 32:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 290 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -2116,7 +2124,7 @@ yyreduce:
case 33:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 304 "../Slice/Grammar.y"
{
if((yyvsp[(4) - (7)]))
@@ -2129,7 +2137,7 @@ yyreduce:
case 34:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 317 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -2142,7 +2150,7 @@ yyreduce:
case 35:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 325 "../Slice/Grammar.y"
{
(yyval) = 0;
@@ -2151,7 +2159,7 @@ yyreduce:
case 36:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 334 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)]));
@@ -2165,7 +2173,7 @@ yyreduce:
case 37:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 343 "../Slice/Grammar.y"
{
;}
@@ -2173,7 +2181,7 @@ yyreduce:
case 38:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 346 "../Slice/Grammar.y"
{
unit->error("`;' missing after definition");
@@ -2182,7 +2190,7 @@ yyreduce:
case 39:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 350 "../Slice/Grammar.y"
{
;}
@@ -2190,7 +2198,7 @@ yyreduce:
case 40:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 358 "../Slice/Grammar.y"
{
TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -2203,7 +2211,7 @@ yyreduce:
case 41:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 371 "../Slice/Grammar.y"
{
IntegerTokPtr i = IntegerTokPtr::dynamicCast((yyvsp[(2) - (3)]));
@@ -2228,7 +2236,7 @@ yyreduce:
case 42:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 391 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (3)]));
@@ -2303,7 +2311,7 @@ yyreduce:
case 43:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 461 "../Slice/Grammar.y"
{
unit->error("missing tag for optional");
@@ -2316,7 +2324,7 @@ yyreduce:
case 44:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 469 "../Slice/Grammar.y"
{
unit->error("missing tag for optional");
@@ -2329,7 +2337,7 @@ yyreduce:
case 45:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 482 "../Slice/Grammar.y"
{
OptionalDefTokPtr m = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -2342,7 +2350,7 @@ yyreduce:
case 46:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 490 "../Slice/Grammar.y"
{
TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -2357,7 +2365,7 @@ yyreduce:
case 48:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 511 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -2366,7 +2374,7 @@ yyreduce:
case 49:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 515 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -2377,7 +2385,7 @@ yyreduce:
case 50:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 526 "../Slice/Grammar.y"
{
unit->error("structs cannot be forward declared");
@@ -2387,7 +2395,7 @@ yyreduce:
case 51:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 536 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -2405,7 +2413,7 @@ yyreduce:
case 52:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 549 "../Slice/Grammar.y"
{
if((yyvsp[(3) - (6)]))
@@ -2428,7 +2436,7 @@ yyreduce:
case 53:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 572 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)]));
@@ -2442,7 +2450,7 @@ yyreduce:
case 54:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 581 "../Slice/Grammar.y"
{
;}
@@ -2450,7 +2458,7 @@ yyreduce:
case 55:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 584 "../Slice/Grammar.y"
{
unit->error("`;' missing after definition");
@@ -2459,7 +2467,7 @@ yyreduce:
case 56:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 588 "../Slice/Grammar.y"
{
;}
@@ -2467,7 +2475,7 @@ yyreduce:
case 58:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 602 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -2476,7 +2484,7 @@ yyreduce:
case 59:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 606 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -2487,7 +2495,7 @@ yyreduce:
case 60:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 617 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -2500,7 +2508,7 @@ yyreduce:
case 61:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 630 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (4)]));
@@ -2528,7 +2536,7 @@ yyreduce:
case 62:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 653 "../Slice/Grammar.y"
{
if((yyvsp[(5) - (8)]))
@@ -2545,7 +2553,7 @@ yyreduce:
case 63:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 670 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -2584,7 +2592,7 @@ yyreduce:
case 64:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 704 "../Slice/Grammar.y"
{
(yyval) = 0;
@@ -2593,7 +2601,7 @@ yyreduce:
case 65:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 713 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -2602,7 +2610,7 @@ yyreduce:
case 66:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 717 "../Slice/Grammar.y"
{
(yyval) = new ClassListTok;
@@ -2611,7 +2619,7 @@ yyreduce:
case 67:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 726 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)]));
@@ -2625,7 +2633,7 @@ yyreduce:
case 68:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 735 "../Slice/Grammar.y"
{
;}
@@ -2633,7 +2641,7 @@ yyreduce:
case 69:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 738 "../Slice/Grammar.y"
{
unit->error("`;' missing after definition");
@@ -2642,7 +2650,7 @@ yyreduce:
case 70:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 742 "../Slice/Grammar.y"
{
;}
@@ -2650,7 +2658,7 @@ yyreduce:
case 71:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 750 "../Slice/Grammar.y"
{
OptionalDefTokPtr def = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -2677,7 +2685,7 @@ yyreduce:
case 72:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 772 "../Slice/Grammar.y"
{
OptionalDefTokPtr def = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -2709,7 +2717,7 @@ yyreduce:
case 73:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 799 "../Slice/Grammar.y"
{
TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -2736,7 +2744,7 @@ yyreduce:
case 74:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 821 "../Slice/Grammar.y"
{
TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -2762,7 +2770,7 @@ yyreduce:
case 75:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 847 "../Slice/Grammar.y"
{
TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -2776,7 +2784,7 @@ yyreduce:
case 76:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 856 "../Slice/Grammar.y"
{
TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -2792,7 +2800,7 @@ yyreduce:
case 77:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 867 "../Slice/Grammar.y"
{
TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -2806,7 +2814,7 @@ yyreduce:
case 78:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 876 "../Slice/Grammar.y"
{
TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(2) - (4)]));
@@ -2820,7 +2828,7 @@ yyreduce:
case 79:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 885 "../Slice/Grammar.y"
{
TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -2835,7 +2843,7 @@ yyreduce:
case 80:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 895 "../Slice/Grammar.y"
{
TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -2849,7 +2857,7 @@ yyreduce:
case 81:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 909 "../Slice/Grammar.y"
{
OptionalDefTokPtr m = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -2860,7 +2868,7 @@ yyreduce:
case 82:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 915 "../Slice/Grammar.y"
{
OptionalDefTokPtr m = new OptionalDefTok();
@@ -2873,7 +2881,7 @@ yyreduce:
case 83:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 923 "../Slice/Grammar.y"
{
OptionalDefTokPtr m = new OptionalDefTok;
@@ -2885,7 +2893,7 @@ yyreduce:
case 84:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 935 "../Slice/Grammar.y"
{
OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -2914,7 +2922,7 @@ yyreduce:
case 85:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 959 "../Slice/Grammar.y"
{
OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(2) - (3)]));
@@ -2944,7 +2952,7 @@ yyreduce:
case 86:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 984 "../Slice/Grammar.y"
{
OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -2973,7 +2981,7 @@ yyreduce:
case 87:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1008 "../Slice/Grammar.y"
{
OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(2) - (3)]));
@@ -3003,7 +3011,7 @@ yyreduce:
case 88:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1038 "../Slice/Grammar.y"
{
if((yyvsp[(1) - (3)]))
@@ -3020,7 +3028,7 @@ yyreduce:
case 89:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1050 "../Slice/Grammar.y"
{
OperationPtr op = OperationPtr::dynamicCast((yyvsp[(4) - (5)]));
@@ -3035,7 +3043,7 @@ yyreduce:
case 90:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1060 "../Slice/Grammar.y"
{
if((yyvsp[(1) - (3)]))
@@ -3048,7 +3056,7 @@ yyreduce:
case 91:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1068 "../Slice/Grammar.y"
{
OperationPtr op = OperationPtr::dynamicCast((yyvsp[(4) - (5)]));
@@ -3063,7 +3071,7 @@ yyreduce:
case 94:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1090 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -3072,7 +3080,7 @@ yyreduce:
case 95:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1094 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -3083,7 +3091,7 @@ yyreduce:
case 96:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1105 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -3097,7 +3105,7 @@ yyreduce:
case 97:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1119 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -3120,7 +3128,7 @@ yyreduce:
case 98:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1137 "../Slice/Grammar.y"
{
if((yyvsp[(4) - (7)]))
@@ -3137,7 +3145,7 @@ yyreduce:
case 99:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1154 "../Slice/Grammar.y"
{
ClassListTokPtr intfs = ClassListTokPtr::dynamicCast((yyvsp[(3) - (3)]));
@@ -3177,7 +3185,7 @@ yyreduce:
case 100:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1189 "../Slice/Grammar.y"
{
ClassListTokPtr intfs = new ClassListTok;
@@ -3217,7 +3225,7 @@ yyreduce:
case 101:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1224 "../Slice/Grammar.y"
{
unit->error("illegal inheritance from type Object");
@@ -3227,7 +3235,7 @@ yyreduce:
case 102:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1234 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -3236,7 +3244,7 @@ yyreduce:
case 103:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1238 "../Slice/Grammar.y"
{
(yyval) = new ClassListTok;
@@ -3245,7 +3253,7 @@ yyreduce:
case 104:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1247 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)]));
@@ -3259,7 +3267,7 @@ yyreduce:
case 105:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1256 "../Slice/Grammar.y"
{
;}
@@ -3267,7 +3275,7 @@ yyreduce:
case 106:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1259 "../Slice/Grammar.y"
{
unit->error("`;' missing after definition");
@@ -3276,7 +3284,7 @@ yyreduce:
case 107:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1263 "../Slice/Grammar.y"
{
;}
@@ -3284,7 +3292,7 @@ yyreduce:
case 109:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1277 "../Slice/Grammar.y"
{
ExceptionPtr exception = ExceptionPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -3296,7 +3304,7 @@ yyreduce:
case 110:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1284 "../Slice/Grammar.y"
{
ExceptionPtr exception = ExceptionPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -3308,7 +3316,7 @@ yyreduce:
case 111:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1296 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -3325,7 +3333,7 @@ yyreduce:
case 112:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1308 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -3336,7 +3344,7 @@ yyreduce:
case 113:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1319 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (7)]));
@@ -3350,7 +3358,7 @@ yyreduce:
case 114:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1328 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (7)]));
@@ -3365,7 +3373,7 @@ yyreduce:
case 115:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1343 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (10)]));
@@ -3381,7 +3389,7 @@ yyreduce:
case 116:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1354 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (10)]));
@@ -3398,7 +3406,7 @@ yyreduce:
case 117:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1371 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -3407,7 +3415,7 @@ yyreduce:
case 118:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1375 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -3418,7 +3426,7 @@ yyreduce:
case 119:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1386 "../Slice/Grammar.y"
{
BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -3432,7 +3440,7 @@ yyreduce:
case 120:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1395 "../Slice/Grammar.y"
{
EnumPtr en = EnumPtr::dynamicCast((yyvsp[(3) - (6)]));
@@ -3451,7 +3459,7 @@ yyreduce:
case 121:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1410 "../Slice/Grammar.y"
{
unit->error("missing enumeration name");
@@ -3466,7 +3474,7 @@ yyreduce:
case 122:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1425 "../Slice/Grammar.y"
{
EnumeratorListTokPtr ens = EnumeratorListTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -3477,7 +3485,7 @@ yyreduce:
case 123:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1431 "../Slice/Grammar.y"
{
;}
@@ -3485,7 +3493,7 @@ yyreduce:
case 124:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1439 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -3502,7 +3510,7 @@ yyreduce:
case 125:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1451 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -3514,7 +3522,7 @@ yyreduce:
case 126:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1458 "../Slice/Grammar.y"
{
EnumeratorListTokPtr ens = new EnumeratorListTok;
@@ -3524,7 +3532,7 @@ yyreduce:
case 127:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1468 "../Slice/Grammar.y"
{
BoolTokPtr out = new BoolTok;
@@ -3535,7 +3543,7 @@ yyreduce:
case 128:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1474 "../Slice/Grammar.y"
{
BoolTokPtr out = new BoolTok;
@@ -3546,7 +3554,7 @@ yyreduce:
case 129:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1485 "../Slice/Grammar.y"
{
;}
@@ -3554,7 +3562,7 @@ yyreduce:
case 130:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1488 "../Slice/Grammar.y"
{
BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -3575,7 +3583,7 @@ yyreduce:
case 131:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1504 "../Slice/Grammar.y"
{
BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (5)]));
@@ -3596,7 +3604,7 @@ yyreduce:
case 132:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1520 "../Slice/Grammar.y"
{
BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (4)]));
@@ -3613,7 +3621,7 @@ yyreduce:
case 133:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1532 "../Slice/Grammar.y"
{
BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (6)]));
@@ -3630,7 +3638,7 @@ yyreduce:
case 134:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1544 "../Slice/Grammar.y"
{
BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -3646,7 +3654,7 @@ yyreduce:
case 135:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1555 "../Slice/Grammar.y"
{
BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (5)]));
@@ -3662,7 +3670,7 @@ yyreduce:
case 136:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1571 "../Slice/Grammar.y"
{
(yyval) = (yyvsp[(2) - (2)]);
@@ -3671,7 +3679,7 @@ yyreduce:
case 137:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1575 "../Slice/Grammar.y"
{
(yyval) = new ExceptionListTok;
@@ -3680,7 +3688,7 @@ yyreduce:
case 138:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1584 "../Slice/Grammar.y"
{
;}
@@ -3688,7 +3696,7 @@ yyreduce:
case 139:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1587 "../Slice/Grammar.y"
{
StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]));
@@ -3699,7 +3707,7 @@ yyreduce:
case 140:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1593 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (3)]));
@@ -3712,7 +3720,7 @@ yyreduce:
case 141:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1606 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindByte);
@@ -3721,7 +3729,7 @@ yyreduce:
case 142:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1610 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindBool);
@@ -3730,7 +3738,7 @@ yyreduce:
case 143:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1614 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindShort);
@@ -3739,7 +3747,7 @@ yyreduce:
case 144:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1618 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindInt);
@@ -3748,7 +3756,7 @@ yyreduce:
case 145:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1622 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindLong);
@@ -3757,7 +3765,7 @@ yyreduce:
case 146:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1626 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindFloat);
@@ -3766,7 +3774,7 @@ yyreduce:
case 147:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1630 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindDouble);
@@ -3775,7 +3783,7 @@ yyreduce:
case 148:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1634 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindString);
@@ -3784,7 +3792,7 @@ yyreduce:
case 149:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1638 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindObject);
@@ -3793,7 +3801,7 @@ yyreduce:
case 150:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1642 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindObjectProxy);
@@ -3802,7 +3810,7 @@ yyreduce:
case 151:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1646 "../Slice/Grammar.y"
{
(yyval) = unit->builtin(Builtin::KindLocalObject);
@@ -3811,7 +3819,7 @@ yyreduce:
case 152:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1650 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -3835,7 +3843,7 @@ yyreduce:
case 153:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1669 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -3876,7 +3884,7 @@ yyreduce:
case 154:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1710 "../Slice/Grammar.y"
{
StringTokPtr str1 = StringTokPtr::dynamicCast((yyvsp[(1) - (2)]));
@@ -3887,7 +3895,7 @@ yyreduce:
case 155:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1716 "../Slice/Grammar.y"
{
;}
@@ -3895,7 +3903,7 @@ yyreduce:
case 156:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1724 "../Slice/Grammar.y"
{
StringTokPtr str = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]));
@@ -3907,7 +3915,7 @@ yyreduce:
case 157:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1731 "../Slice/Grammar.y"
{
StringTokPtr str = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -3919,7 +3927,7 @@ yyreduce:
case 158:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1743 "../Slice/Grammar.y"
{
BoolTokPtr local = new BoolTok;
@@ -3930,7 +3938,7 @@ yyreduce:
case 159:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1749 "../Slice/Grammar.y"
{
BoolTokPtr local = new BoolTok;
@@ -3941,7 +3949,7 @@ yyreduce:
case 160:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1760 "../Slice/Grammar.y"
{
BuiltinPtr type = unit->builtin(Builtin::KindLong);
@@ -3959,7 +3967,7 @@ yyreduce:
case 161:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1773 "../Slice/Grammar.y"
{
BuiltinPtr type = unit->builtin(Builtin::KindDouble);
@@ -3977,7 +3985,7 @@ yyreduce:
case 162:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1786 "../Slice/Grammar.y"
{
StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]));
@@ -4028,7 +4036,7 @@ yyreduce:
case 163:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1832 "../Slice/Grammar.y"
{
BuiltinPtr type = unit->builtin(Builtin::KindString);
@@ -4044,7 +4052,7 @@ yyreduce:
case 164:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1843 "../Slice/Grammar.y"
{
BuiltinPtr type = unit->builtin(Builtin::KindBool);
@@ -4060,7 +4068,7 @@ yyreduce:
case 165:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1854 "../Slice/Grammar.y"
{
BuiltinPtr type = unit->builtin(Builtin::KindBool);
@@ -4076,7 +4084,7 @@ yyreduce:
case 166:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1870 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(2) - (6)]));
@@ -4090,7 +4098,7 @@ yyreduce:
case 167:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1879 "../Slice/Grammar.y"
{
StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(2) - (5)]));
@@ -4104,7 +4112,7 @@ yyreduce:
case 168:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1893 "../Slice/Grammar.y"
{
;}
@@ -4112,7 +4120,7 @@ yyreduce:
case 169:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1896 "../Slice/Grammar.y"
{
;}
@@ -4120,7 +4128,7 @@ yyreduce:
case 170:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1899 "../Slice/Grammar.y"
{
;}
@@ -4128,7 +4136,7 @@ yyreduce:
case 171:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1902 "../Slice/Grammar.y"
{
;}
@@ -4136,7 +4144,7 @@ yyreduce:
case 172:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1905 "../Slice/Grammar.y"
{
;}
@@ -4144,7 +4152,7 @@ yyreduce:
case 173:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1908 "../Slice/Grammar.y"
{
;}
@@ -4152,7 +4160,7 @@ yyreduce:
case 174:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1911 "../Slice/Grammar.y"
{
;}
@@ -4160,7 +4168,7 @@ yyreduce:
case 175:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1914 "../Slice/Grammar.y"
{
;}
@@ -4168,7 +4176,7 @@ yyreduce:
case 176:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1917 "../Slice/Grammar.y"
{
;}
@@ -4176,7 +4184,7 @@ yyreduce:
case 177:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1920 "../Slice/Grammar.y"
{
;}
@@ -4184,7 +4192,7 @@ yyreduce:
case 178:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1923 "../Slice/Grammar.y"
{
;}
@@ -4192,7 +4200,7 @@ yyreduce:
case 179:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1926 "../Slice/Grammar.y"
{
;}
@@ -4200,7 +4208,7 @@ yyreduce:
case 180:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1929 "../Slice/Grammar.y"
{
;}
@@ -4208,7 +4216,7 @@ yyreduce:
case 181:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1932 "../Slice/Grammar.y"
{
;}
@@ -4216,7 +4224,7 @@ yyreduce:
case 182:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1935 "../Slice/Grammar.y"
{
;}
@@ -4224,7 +4232,7 @@ yyreduce:
case 183:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1938 "../Slice/Grammar.y"
{
;}
@@ -4232,7 +4240,7 @@ yyreduce:
case 184:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1941 "../Slice/Grammar.y"
{
;}
@@ -4240,7 +4248,7 @@ yyreduce:
case 185:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1944 "../Slice/Grammar.y"
{
;}
@@ -4248,7 +4256,7 @@ yyreduce:
case 186:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1947 "../Slice/Grammar.y"
{
;}
@@ -4256,7 +4264,7 @@ yyreduce:
case 187:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1950 "../Slice/Grammar.y"
{
;}
@@ -4264,7 +4272,7 @@ yyreduce:
case 188:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1953 "../Slice/Grammar.y"
{
;}
@@ -4272,7 +4280,7 @@ yyreduce:
case 189:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1956 "../Slice/Grammar.y"
{
;}
@@ -4280,7 +4288,7 @@ yyreduce:
case 190:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1959 "../Slice/Grammar.y"
{
;}
@@ -4288,7 +4296,7 @@ yyreduce:
case 191:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1962 "../Slice/Grammar.y"
{
;}
@@ -4296,7 +4304,7 @@ yyreduce:
case 192:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1965 "../Slice/Grammar.y"
{
;}
@@ -4304,7 +4312,7 @@ yyreduce:
case 193:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1968 "../Slice/Grammar.y"
{
;}
@@ -4312,7 +4320,7 @@ yyreduce:
case 194:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1971 "../Slice/Grammar.y"
{
;}
@@ -4320,7 +4328,7 @@ yyreduce:
case 195:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1974 "../Slice/Grammar.y"
{
;}
@@ -4328,7 +4336,7 @@ yyreduce:
case 196:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1977 "../Slice/Grammar.y"
{
;}
@@ -4336,8 +4344,8 @@ yyreduce:
-/* Line 1455 of yacc.c */
-#line 4341 "Grammar.tab.c"
+/* Line 1464 of yacc.c */
+#line 4349 "Grammar.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -4548,7 +4556,7 @@ yyreturn:
-/* Line 1675 of yacc.c */
+/* Line 1684 of yacc.c */
#line 1981 "../Slice/Grammar.y"
diff --git a/cpp/src/Slice/Grammar.h b/cpp/src/Slice/Grammar.h
index 0ee3d141315..4bae650f0c4 100644
--- a/cpp/src/Slice/Grammar.h
+++ b/cpp/src/Slice/Grammar.h
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton interface for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp
index 781b020c0c8..45f10b1a004 100644
--- a/cpp/src/Slice/JavaUtil.cpp
+++ b/cpp/src/Slice/JavaUtil.cpp
@@ -1547,7 +1547,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out,
}
else
{
- const int wireSize = keyType->minWireSize() + valueType->minWireSize();
+ const size_t wireSize = keyType->minWireSize() + valueType->minWireSize();
string tmpName;
if(optionalParam && optionalMapping)
{
@@ -1726,7 +1726,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out,
(elemBuiltin->kind() != Builtin::KindByte && elemBuiltin->kind() != Builtin::KindBool))
{
out << nl << "final int __optSize = " << tmpName << " == null ? 0 : " << tmpName << ".size();";
- const int wireSize = elemType->minWireSize();
+ const size_t wireSize = elemType->minWireSize();
if(wireSize > 1)
{
@@ -1773,7 +1773,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out,
elemBuiltin->kind() != Builtin::KindBool))
{
out << nl << "final int __optSize = " << tmpName << " == null ? 0 : " << tmpName << ".length;";
- const int wireSize = elemType->minWireSize();
+ const size_t wireSize = elemType->minWireSize();
if(wireSize > 1)
{
@@ -2795,7 +2795,7 @@ Slice::JavaGenerator::writeStreamMarshalUnmarshalCode(Output& out,
}
else
{
- const int wireSize = keyType->minWireSize() + valueType->minWireSize();
+ const size_t wireSize = keyType->minWireSize() + valueType->minWireSize();
out << nl << "final int __optSize = " << v << " == null ? 0 : " << v << ".size();";
out << nl << stream << ".writeSize(__optSize > 254 ? __optSize * " << wireSize
<< " + 5 : __optSize * " << wireSize << " + 1);";
@@ -2854,7 +2854,7 @@ Slice::JavaGenerator::writeStreamMarshalUnmarshalCode(Output& out,
(elemBuiltin->kind() != Builtin::KindByte && elemBuiltin->kind() != Builtin::KindBool))
{
out << nl << "final int __optSize = " << v << " == null ? 0 : " << v << ".size();";
- const int wireSize = elemType->minWireSize();
+ const size_t wireSize = elemType->minWireSize();
if(wireSize > 1)
{
@@ -2889,7 +2889,7 @@ Slice::JavaGenerator::writeStreamMarshalUnmarshalCode(Output& out,
elemBuiltin->kind() != Builtin::KindBool))
{
out << nl << "final int __optSize = " << v << " == null ? 0 : " << v << ".length;";
- const int wireSize = elemType->minWireSize();
+ const size_t wireSize = elemType->minWireSize();
if(wireSize > 1)
{
diff --git a/cpp/src/Slice/Makefile.mak b/cpp/src/Slice/Makefile.mak
index 1f5e27bff0e..4ebe8c06c6d 100644
--- a/cpp/src/Slice/Makefile.mak
+++ b/cpp/src/Slice/Makefile.mak
@@ -72,6 +72,7 @@ Scanner.cpp : Scanner.l
flex Scanner.l
del /q $@
echo #include "IceUtil/Config.h" > Scanner.cpp
+ echo #include "stdint.h" >> Scanner.cpp
type lex.yy.c >> Scanner.cpp
del /q lex.yy.c
diff --git a/cpp/src/Slice/Scanner.cpp b/cpp/src/Slice/Scanner.cpp
index 40aafc1f528..f18e3165c68 100644
--- a/cpp/src/Slice/Scanner.cpp
+++ b/cpp/src/Slice/Scanner.cpp
@@ -1,4 +1,5 @@
#include <IceUtil/Config.h>
+#include <stdint.h>
#line 2 "lex.yy.c"
#line 4 "lex.yy.c"
@@ -74,7 +75,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -105,6 +105,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -161,7 +163,15 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -574,6 +584,14 @@ char *slice_text;
# pragma warning( 4 : 4244 )
#endif
+#ifdef _MSC_VER
+# ifdef slice_wrap
+# undef slice_wrap
+# define slice_wrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
using namespace std;
using namespace Slice;
@@ -595,7 +613,7 @@ int checkKeyword(string&);
-#line 598 "lex.yy.c"
+#line 615 "lex.yy.c"
#define INITIAL 0
#define BOMSCAN 1
@@ -678,7 +696,12 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -697,7 +720,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( slice_in )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -782,10 +805,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 67 "Scanner.l"
+#line 75 "Scanner.l"
-#line 788 "lex.yy.c"
+#line 810 "lex.yy.c"
if ( !(yy_init) )
{
@@ -870,7 +893,7 @@ case 1:
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up slice_text again */
YY_RULE_SETUP
-#line 69 "Scanner.l"
+#line 77 "Scanner.l"
{
if(unit->scanPosition(slice_text))
{
@@ -884,7 +907,7 @@ case 2:
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up slice_text again */
YY_RULE_SETUP
-#line 76 "Scanner.l"
+#line 84 "Scanner.l"
{
if(unit->scanPosition(slice_text))
{
@@ -897,7 +920,7 @@ case 3:
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up slice_text again */
YY_RULE_SETUP
-#line 83 "Scanner.l"
+#line 91 "Scanner.l"
{
if(unit->scanPosition(slice_text))
{
@@ -911,7 +934,7 @@ case 4:
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up slice_text again */
YY_RULE_SETUP
-#line 90 "Scanner.l"
+#line 98 "Scanner.l"
{
if(unit->scanPosition(slice_text))
{
@@ -921,7 +944,7 @@ YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 97 "Scanner.l"
+#line 105 "Scanner.l"
{
// C++-style comment
BEGIN(MAINSCAN);
@@ -939,7 +962,7 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 112 "Scanner.l"
+#line 120 "Scanner.l"
{
// C-style comment
BEGIN(MAINSCAN);
@@ -983,7 +1006,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 153 "Scanner.l"
+#line 161 "Scanner.l"
{
BEGIN(MAINSCAN);
return ICE_SCOPE_DELIMITER;
@@ -991,7 +1014,7 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 158 "Scanner.l"
+#line 166 "Scanner.l"
{
BEGIN(MAINSCAN);
return ICE_METADATA_OPEN;
@@ -999,7 +1022,7 @@ YY_RULE_SETUP
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 163 "Scanner.l"
+#line 171 "Scanner.l"
{
BEGIN(MAINSCAN);
return ICE_METADATA_CLOSE;
@@ -1007,7 +1030,7 @@ YY_RULE_SETUP
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 168 "Scanner.l"
+#line 176 "Scanner.l"
{
BEGIN(MAINSCAN);
return ICE_GLOBAL_METADATA_OPEN;
@@ -1015,7 +1038,7 @@ YY_RULE_SETUP
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 173 "Scanner.l"
+#line 181 "Scanner.l"
{
BEGIN(MAINSCAN);
return ICE_GLOBAL_METADATA_CLOSE;
@@ -1024,7 +1047,7 @@ YY_RULE_SETUP
case 12:
/* rule 12 can match eol */
YY_RULE_SETUP
-#line 178 "Scanner.l"
+#line 186 "Scanner.l"
{
BEGIN(MAINSCAN);
StringTokPtr ident = new StringTok;
@@ -1052,7 +1075,7 @@ YY_RULE_SETUP
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 203 "Scanner.l"
+#line 211 "Scanner.l"
{
BEGIN(MAINSCAN);
StringTokPtr ident = new StringTok;
@@ -1063,7 +1086,7 @@ YY_RULE_SETUP
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 211 "Scanner.l"
+#line 219 "Scanner.l"
{
BEGIN(MAINSCAN);
StringTokPtr str = new StringTok;
@@ -1227,7 +1250,7 @@ YY_RULE_SETUP
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 372 "Scanner.l"
+#line 380 "Scanner.l"
{
BEGIN(MAINSCAN);
IntegerTokPtr itp = new IntegerTok;
@@ -1246,7 +1269,7 @@ YY_RULE_SETUP
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 388 "Scanner.l"
+#line 396 "Scanner.l"
{
BEGIN(MAINSCAN);
errno = 0;
@@ -1280,7 +1303,7 @@ YY_RULE_SETUP
case 17:
/* rule 17 can match eol */
YY_RULE_SETUP
-#line 418 "Scanner.l"
+#line 426 "Scanner.l"
{
// Ignore white-space
@@ -1296,7 +1319,7 @@ YY_RULE_SETUP
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 431 "Scanner.l"
+#line 439 "Scanner.l"
{
// Ignore UTF-8 BOM, rule only active when parsing start of file.
@@ -1305,7 +1328,7 @@ YY_RULE_SETUP
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 437 "Scanner.l"
+#line 445 "Scanner.l"
{
BEGIN(MAINSCAN);
if(slice_text[0] < 32 || slice_text[0] > 126)
@@ -1324,10 +1347,10 @@ YY_RULE_SETUP
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 453 "Scanner.l"
+#line 461 "Scanner.l"
ECHO;
YY_BREAK
-#line 1330 "lex.yy.c"
+#line 1352 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(BOMSCAN):
case YY_STATE_EOF(MAINSCAN):
@@ -1408,7 +1431,7 @@ case YY_STATE_EOF(MAINSCAN):
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( slice_wrap(0) )
+ if ( slice_wrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
@@ -1744,7 +1767,7 @@ static int yy_get_next_buffer (void)
case EOB_ACT_END_OF_FILE:
{
- if ( slice_wrap(0) )
+ if ( slice_wrap( ) )
return EOF;
if ( ! (yy_did_buffer_switch_on_eof) )
@@ -2087,8 +2110,8 @@ YY_BUFFER_STATE slice__scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to slice_lex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
@@ -2327,7 +2350,7 @@ void slice_free (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 453 "Scanner.l"
+#line 461 "Scanner.l"
diff --git a/cpp/src/Slice/Scanner.l b/cpp/src/Slice/Scanner.l
index f9a5df88a42..2363abeb847 100644
--- a/cpp/src/Slice/Scanner.l
+++ b/cpp/src/Slice/Scanner.l
@@ -29,6 +29,14 @@
# pragma warning( 4 : 4244 )
#endif
+#ifdef _MSC_VER
+# ifdef slice_wrap
+# undef slice_wrap
+# define slice_wrap() 1
+# endif
+# define YY_NO_UNISTD_H
+#endif
+
using namespace std;
using namespace Slice;
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index b15dc0d5f5a..472acac73f7 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -636,7 +636,7 @@ Slice::JavaVisitor::writeStreamMarshalDataMember(Output& out, const string& pack
{
if(!member->optional())
{
- writeStreamMarshalUnmarshalCode(out, package, member->type(), OptionalNone, 0, fixKwd(member->name()), true,
+ writeStreamMarshalUnmarshalCode(out, package, member->type(), false, 0, fixKwd(member->name()), true,
iter, false, member->getMetaData());
}
else
@@ -644,8 +644,8 @@ Slice::JavaVisitor::writeStreamMarshalDataMember(Output& out, const string& pack
out << nl << "if(__has_" << member->name() << " && __outS.writeOptional(" << member->tag() << ", "
<< getOptionalType(member->type()) << "))";
out << sb;
- writeStreamMarshalUnmarshalCode(out, package, member->type(), OptionalMember, member->tag(),
- fixKwd(member->name()), true, iter, false, member->getMetaData());
+ writeStreamMarshalUnmarshalCode(out, package, member->type(), true, member->tag(), fixKwd(member->name()),
+ true, iter, false, member->getMetaData());
out << eb;
}
}
@@ -668,7 +668,7 @@ Slice::JavaVisitor::writeStreamUnmarshalDataMember(Output& out, const string& pa
if(!member->optional())
{
- writeStreamMarshalUnmarshalCode(out, package, member->type(), OptionalNone, 0, fixKwd(member->name()), false,
+ writeStreamMarshalUnmarshalCode(out, package, member->type(), false, 0, fixKwd(member->name()), false,
iter, false, member->getMetaData(), patchParams);
}
else
@@ -676,8 +676,8 @@ Slice::JavaVisitor::writeStreamUnmarshalDataMember(Output& out, const string& pa
out << nl << "if(__has_" << member->name() << " = __inS.readOptional(" << member->tag() << ", "
<< getOptionalType(member->type()) << "))";
out << sb;
- writeStreamMarshalUnmarshalCode(out, package, member->type(), OptionalMember, member->tag(),
- fixKwd(member->name()), false, iter, false, member->getMetaData(), patchParams);
+ writeStreamMarshalUnmarshalCode(out, package, member->type(), true, member->tag(), fixKwd(member->name()),
+ false, iter, false, member->getMetaData(), patchParams);
out << eb;
}
}