summaryrefslogtreecommitdiff
path: root/cpp/demo/Manual/evictor_filesystem/Scanner.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2015-01-30 09:29:42 -0330
committerDwayne Boone <dwayne@zeroc.com>2015-01-30 09:29:42 -0330
commit0a2a4d818fb5c276e6ba008c29b591683d5025bd (patch)
treebef463540bcd1ba853b75c8f265845251e819fd6 /cpp/demo/Manual/evictor_filesystem/Scanner.cpp
parentFixed (ICE-6276) - Add support for JavaScript source maps (diff)
downloadice-0a2a4d818fb5c276e6ba008c29b591683d5025bd.tar.bz2
ice-0a2a4d818fb5c276e6ba008c29b591683d5025bd.tar.xz
ice-0a2a4d818fb5c276e6ba008c29b591683d5025bd.zip
ICE-5814 allow demos to be built with /W4 on Windows
Diffstat (limited to 'cpp/demo/Manual/evictor_filesystem/Scanner.cpp')
-rw-r--r--cpp/demo/Manual/evictor_filesystem/Scanner.cpp76
1 files changed, 41 insertions, 35 deletions
diff --git a/cpp/demo/Manual/evictor_filesystem/Scanner.cpp b/cpp/demo/Manual/evictor_filesystem/Scanner.cpp
index bf3f8d1f56d..dd7b3732602 100644
--- a/cpp/demo/Manual/evictor_filesystem/Scanner.cpp
+++ b/cpp/demo/Manual/evictor_filesystem/Scanner.cpp
@@ -500,17 +500,23 @@ char *yytext;
#include <Parser.h>
#include <Grammar.h>
-#if defined(_MSC_VER) && defined(ICE_64)
+#if defined(_MSC_VER)
+#if 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 )
+# pragma warning( disable : 4267)
//
// 'initializing' : conversion from '__int64' to 'int', possible loss of data
// Puts a pointer-difference into an int
//
-# pragma warning( 4 : 4244 )
+# pragma warning( disable : 4244)
+#endif
+//
+// conditional expression is constant
+//
+# pragma warning( disable : 4127)
#endif
using namespace std;
@@ -535,7 +541,7 @@ using namespace std;
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
-#line 538 "lex.yy.c"
+#line 544 "lex.yy.c"
#define INITIAL 0
@@ -624,7 +630,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#define ECHO fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -635,7 +641,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ int n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -717,10 +723,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 58 "Scanner.l"
+#line 64 "Scanner.l"
-#line 723 "lex.yy.c"
+#line 729 "lex.yy.c"
if ( !(yy_init) )
{
@@ -805,7 +811,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 60 "Scanner.l"
+#line 66 "Scanner.l"
{
// C++-style comment
int c;
@@ -818,7 +824,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 70 "Scanner.l"
+#line 76 "Scanner.l"
{
// C-style comment
while(true)
@@ -846,77 +852,77 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 95 "Scanner.l"
+#line 101 "Scanner.l"
{
return TOK_HELP;
}
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 99 "Scanner.l"
+#line 105 "Scanner.l"
{
return TOK_EXIT;
}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 103 "Scanner.l"
+#line 109 "Scanner.l"
{
return TOK_LIST;
}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 107 "Scanner.l"
+#line 113 "Scanner.l"
{
return TOK_LIST_RECURSIVE;
}
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 111 "Scanner.l"
+#line 117 "Scanner.l"
{
return TOK_CREATE_FILE;
}
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 115 "Scanner.l"
+#line 121 "Scanner.l"
{
return TOK_CREATE_DIR;
}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 119 "Scanner.l"
+#line 125 "Scanner.l"
{
return TOK_PWD;
}
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 123 "Scanner.l"
+#line 129 "Scanner.l"
{
return TOK_CD;
}
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 127 "Scanner.l"
+#line 133 "Scanner.l"
{
return TOK_CAT;
}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 131 "Scanner.l"
+#line 137 "Scanner.l"
{
return TOK_WRITE;
}
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 135 "Scanner.l"
+#line 141 "Scanner.l"
{
return TOK_RM;
}
@@ -924,7 +930,7 @@ YY_RULE_SETUP
case 14:
/* rule 14 can match eol */
YY_RULE_SETUP
-#line 139 "Scanner.l"
+#line 145 "Scanner.l"
{
size_t len = strlen(yytext);
for(size_t i = 0; i < len; ++i)
@@ -939,14 +945,14 @@ YY_RULE_SETUP
case 15:
/* rule 15 can match eol */
YY_RULE_SETUP
-#line 150 "Scanner.l"
+#line 156 "Scanner.l"
{
return ';';
}
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 154 "Scanner.l"
+#line 160 "Scanner.l"
{
// "..."-type strings
string s;
@@ -973,13 +979,13 @@ YY_RULE_SETUP
s += next;
break;
}
-
+
case 'n':
{
s += '\n';
break;
}
-
+
case 'r':
{
s += '\r';
@@ -991,19 +997,19 @@ YY_RULE_SETUP
s += '\t';
break;
}
-
+
case 'v':
{
s += '\v';
break;
}
-
+
case 'f':
{
s += '\f';
break;
}
-
+
default:
{
s += c;
@@ -1023,7 +1029,7 @@ YY_RULE_SETUP
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 228 "Scanner.l"
+#line 234 "Scanner.l"
{
// '...'-type strings
string s;
@@ -1051,7 +1057,7 @@ YY_RULE_SETUP
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 253 "Scanner.l"
+#line 259 "Scanner.l"
{
// Simple strings
string s;
@@ -1068,7 +1074,7 @@ YY_RULE_SETUP
unput(c);
break;
}
-
+
s += c;
}
yylvalp->clear();
@@ -1078,10 +1084,10 @@ YY_RULE_SETUP
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 277 "Scanner.l"
+#line 283 "Scanner.l"
ECHO;
YY_BREAK
-#line 1084 "lex.yy.c"
+#line 1090 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -2075,7 +2081,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 277 "Scanner.l"
+#line 283 "Scanner.l"