|
Boost-Commit : |
From: hartmut.kaiser_at_[hidden]
Date: 2007-10-02 13:24:22
Author: hkaiser
Date: 2007-10-02 13:24:17 EDT (Tue, 02 Oct 2007)
New Revision: 39654
URL: http://svn.boost.org/trac/boost/changeset/39654
Log:
Wave: Fixed the waveidl example
Text files modified:
trunk/libs/wave/samples/waveidl/idllexer/idl.re | 18 +
trunk/libs/wave/samples/waveidl/idllexer/idl_re.cpp | 326 ++++++++++++++++++++-------------------
trunk/libs/wave/samples/waveidl/idllexer/idl_re2c_lexer.hpp | 9
3 files changed, 183 insertions(+), 170 deletions(-)
Modified: trunk/libs/wave/samples/waveidl/idllexer/idl.re
==============================================================================
--- trunk/libs/wave/samples/waveidl/idllexer/idl.re (original)
+++ trunk/libs/wave/samples/waveidl/idllexer/idl.re 2007-10-02 13:24:17 EDT (Tue, 02 Oct 2007)
@@ -201,7 +201,8 @@
{
using namespace std; // some systems have printf in std
if (0 != s->error_proc) {
- (*s->error_proc)(s, lexing_exception::unexpected_error,
+ (*s->error_proc)(s,
+ cpplexer::lexing_exception::unexpected_error,
"Out of memory!");
}
else
@@ -477,7 +478,8 @@
{
using namespace std; // some systems have printf in std
if (0 != s->error_proc) {
- (*s->error_proc)(s, lexing_exception::generic_lexing_error,
+ (*s->error_proc)(s,
+ cpplexer::lexing_exception::generic_lexing_error,
"'\\000' in input stream");
}
else
@@ -511,7 +513,8 @@
if(cursor == s->eof)
{
if (s->error_proc)
- (*s->error_proc)(s, lexing_exception::generic_lexing_warning,
+ (*s->error_proc)(s,
+ cpplexer::lexing_exception::generic_lexing_warning,
"Unterminated comment");
else
printf("Error: Unterminated comment\n");
@@ -519,7 +522,8 @@
else
{
if (s->error_proc)
- (*s->error_proc)(s, lexing_exception::generic_lexing_error,
+ (*s->error_proc)(s,
+ cpplexer::lexing_exception::generic_lexing_error,
"'\\000' in input stream");
else
printf("Error: 0 in file");
@@ -533,7 +537,8 @@
anyctrl
{
if (s->error_proc)
- (*s->error_proc)(s, lexing_exception::generic_lexing_error,
+ (*s->error_proc)(s,
+ cpplexer::lexing_exception::generic_lexing_error,
"invalid character in input stream");
else
printf("Error: 0 in file");
@@ -559,7 +564,8 @@
if(cursor != s->eof)
{
if (s->error_proc)
- (*s->error_proc)(s, lexing_exception::generic_lexing_error,
+ (*s->error_proc)(s,
+ cpplexer::lexing_exception::generic_lexing_error,
"'\\000' in input stream");
else
printf("Error: 0 in file");
Modified: trunk/libs/wave/samples/waveidl/idllexer/idl_re.cpp
==============================================================================
--- trunk/libs/wave/samples/waveidl/idllexer/idl_re.cpp (original)
+++ trunk/libs/wave/samples/waveidl/idllexer/idl_re.cpp 2007-10-02 13:24:17 EDT (Tue, 02 Oct 2007)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.12.1 on Tue Oct 02 10:05:37 2007 */
+/* Generated by re2c 0.12.1 on Tue Oct 02 12:07:30 2007 */
#line 1 "..\\..\\idllexer\\idl.re"
/*=============================================================================
Boost.Wave: A Standard compliant C++ preprocessor library
@@ -203,7 +203,8 @@
{
using namespace std; // some systems have printf in std
if (0 != s->error_proc) {
- (*s->error_proc)(s, lexing_exception::unexpected_error,
+ (*s->error_proc)(s,
+ cpplexer::lexing_exception::unexpected_error,
"Out of memory!");
}
else
@@ -357,7 +358,7 @@
uchar *cursor = s->tok = s->cur;
-#line 377 "..\\..\\idllexer\\idl.re"
+#line 378 "..\\..\\idllexer\\idl.re"
{
@@ -430,7 +431,7 @@
68, 68, 68, 68, 68, 68, 68, 68,
};
-#line 434 "..\\..\\idllexer\\idl_re.cpp"
+#line 435 "..\\..\\idllexer\\idl_re.cpp"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -542,18 +543,18 @@
++YYCURSOR;
if((yych = *YYCURSOR) == '*') goto yy356;
if(yych == '/') goto yy354;
-#line 401 "..\\..\\idllexer\\idl.re"
+#line 402 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_DIVIDE); }
-#line 548 "..\\..\\idllexer\\idl_re.cpp"
+#line 549 "..\\..\\idllexer\\idl_re.cpp"
yy4:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if(yych == 'R') goto yy350;
goto yy202;
yy5:
-#line 424 "..\\..\\idllexer\\idl.re"
+#line 425 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_IDENTIFIER); }
-#line 557 "..\\..\\idllexer\\idl_re.cpp"
+#line 558 "..\\..\\idllexer\\idl_re.cpp"
yy6:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
@@ -561,24 +562,24 @@
goto yy202;
yy7:
++YYCURSOR;
-#line 386 "..\\..\\idllexer\\idl.re"
+#line 387 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_LEFTBRACE); }
-#line 567 "..\\..\\idllexer\\idl_re.cpp"
+#line 568 "..\\..\\idllexer\\idl_re.cpp"
yy9:
++YYCURSOR;
-#line 387 "..\\..\\idllexer\\idl.re"
+#line 388 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_RIGHTBRACE); }
-#line 572 "..\\..\\idllexer\\idl_re.cpp"
+#line 573 "..\\..\\idllexer\\idl_re.cpp"
yy11:
++YYCURSOR;
-#line 388 "..\\..\\idllexer\\idl.re"
+#line 389 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_LEFTBRACKET); }
-#line 577 "..\\..\\idllexer\\idl_re.cpp"
+#line 578 "..\\..\\idllexer\\idl_re.cpp"
yy13:
++YYCURSOR;
-#line 389 "..\\..\\idllexer\\idl.re"
+#line 390 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_RIGHTBRACKET); }
-#line 582 "..\\..\\idllexer\\idl_re.cpp"
+#line 583 "..\\..\\idllexer\\idl_re.cpp"
yy15:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
@@ -614,127 +615,127 @@
}
}
yy16:
-#line 390 "..\\..\\idllexer\\idl.re"
+#line 391 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_POUND); }
-#line 620 "..\\..\\idllexer\\idl_re.cpp"
+#line 621 "..\\..\\idllexer\\idl_re.cpp"
yy17:
++YYCURSOR;
-#line 392 "..\\..\\idllexer\\idl.re"
+#line 393 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_LEFTPAREN); }
-#line 625 "..\\..\\idllexer\\idl_re.cpp"
+#line 626 "..\\..\\idllexer\\idl_re.cpp"
yy19:
++YYCURSOR;
-#line 393 "..\\..\\idllexer\\idl.re"
+#line 394 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_RIGHTPAREN); }
-#line 630 "..\\..\\idllexer\\idl_re.cpp"
+#line 631 "..\\..\\idllexer\\idl_re.cpp"
yy21:
++YYCURSOR;
-#line 394 "..\\..\\idllexer\\idl.re"
+#line 395 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_SEMICOLON); }
-#line 635 "..\\..\\idllexer\\idl_re.cpp"
+#line 636 "..\\..\\idllexer\\idl_re.cpp"
yy23:
++YYCURSOR;
-#line 395 "..\\..\\idllexer\\idl.re"
+#line 396 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_COLON); }
-#line 640 "..\\..\\idllexer\\idl_re.cpp"
+#line 641 "..\\..\\idllexer\\idl_re.cpp"
yy25:
yyaccept = 2;
yych = *(YYMARKER = ++YYCURSOR);
if(yych == '?') goto yy341;
yy26:
-#line 396 "..\\..\\idllexer\\idl.re"
+#line 397 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_QUESTION_MARK); }
-#line 648 "..\\..\\idllexer\\idl_re.cpp"
+#line 649 "..\\..\\idllexer\\idl_re.cpp"
yy27:
++YYCURSOR;
if((yych = *YYCURSOR) <= '/') goto yy28;
if(yych <= '9') goto yy168;
yy28:
-#line 397 "..\\..\\idllexer\\idl.re"
+#line 398 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_DOT); }
-#line 656 "..\\..\\idllexer\\idl_re.cpp"
+#line 657 "..\\..\\idllexer\\idl_re.cpp"
yy29:
++YYCURSOR;
if((yych = *YYCURSOR) == '+') goto yy339;
-#line 398 "..\\..\\idllexer\\idl.re"
+#line 399 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_PLUS); }
-#line 662 "..\\..\\idllexer\\idl_re.cpp"
+#line 663 "..\\..\\idllexer\\idl_re.cpp"
yy31:
++YYCURSOR;
if((yych = *YYCURSOR) == '-') goto yy337;
-#line 399 "..\\..\\idllexer\\idl.re"
+#line 400 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_MINUS); }
-#line 668 "..\\..\\idllexer\\idl_re.cpp"
+#line 669 "..\\..\\idllexer\\idl_re.cpp"
yy33:
++YYCURSOR;
-#line 400 "..\\..\\idllexer\\idl.re"
+#line 401 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_STAR); }
-#line 673 "..\\..\\idllexer\\idl_re.cpp"
+#line 674 "..\\..\\idllexer\\idl_re.cpp"
yy35:
yyaccept = 3;
yych = *(YYMARKER = ++YYCURSOR);
if(yych == ':') goto yy238;
yy36:
-#line 402 "..\\..\\idllexer\\idl.re"
+#line 403 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_PERCENT); }
-#line 681 "..\\..\\idllexer\\idl_re.cpp"
+#line 682 "..\\..\\idllexer\\idl_re.cpp"
yy37:
++YYCURSOR;
-#line 403 "..\\..\\idllexer\\idl.re"
+#line 404 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_XOR); }
-#line 686 "..\\..\\idllexer\\idl_re.cpp"
+#line 687 "..\\..\\idllexer\\idl_re.cpp"
yy39:
++YYCURSOR;
if((yych = *YYCURSOR) == '&') goto yy236;
-#line 404 "..\\..\\idllexer\\idl.re"
+#line 405 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_AND); }
-#line 692 "..\\..\\idllexer\\idl_re.cpp"
+#line 693 "..\\..\\idllexer\\idl_re.cpp"
yy41:
++YYCURSOR;
if((yych = *YYCURSOR) == '|') goto yy234;
-#line 405 "..\\..\\idllexer\\idl.re"
+#line 406 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_OR); }
-#line 698 "..\\..\\idllexer\\idl_re.cpp"
+#line 699 "..\\..\\idllexer\\idl_re.cpp"
yy43:
++YYCURSOR;
-#line 406 "..\\..\\idllexer\\idl.re"
+#line 407 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_COMPL); }
-#line 703 "..\\..\\idllexer\\idl_re.cpp"
+#line 704 "..\\..\\idllexer\\idl_re.cpp"
yy45:
++YYCURSOR;
if((yych = *YYCURSOR) == '=') goto yy232;
-#line 407 "..\\..\\idllexer\\idl.re"
+#line 408 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_NOT); }
-#line 709 "..\\..\\idllexer\\idl_re.cpp"
+#line 710 "..\\..\\idllexer\\idl_re.cpp"
yy47:
++YYCURSOR;
if((yych = *YYCURSOR) == '=') goto yy230;
-#line 408 "..\\..\\idllexer\\idl.re"
+#line 409 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_ASSIGN); }
-#line 715 "..\\..\\idllexer\\idl_re.cpp"
+#line 716 "..\\..\\idllexer\\idl_re.cpp"
yy49:
++YYCURSOR;
if((yych = *YYCURSOR) <= ';') goto yy50;
if(yych <= '<') goto yy228;
if(yych <= '=') goto yy226;
yy50:
-#line 409 "..\\..\\idllexer\\idl.re"
+#line 410 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_LESS); }
-#line 724 "..\\..\\idllexer\\idl_re.cpp"
+#line 725 "..\\..\\idllexer\\idl_re.cpp"
yy51:
++YYCURSOR;
if((yych = *YYCURSOR) <= '<') goto yy52;
if(yych <= '=') goto yy222;
if(yych <= '>') goto yy224;
yy52:
-#line 410 "..\\..\\idllexer\\idl.re"
+#line 411 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_GREATER); }
-#line 733 "..\\..\\idllexer\\idl_re.cpp"
+#line 734 "..\\..\\idllexer\\idl_re.cpp"
yy53:
++YYCURSOR;
-#line 421 "..\\..\\idllexer\\idl.re"
+#line 422 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_COMMA); }
-#line 738 "..\\..\\idllexer\\idl_re.cpp"
+#line 739 "..\\..\\idllexer\\idl_re.cpp"
yy55:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
@@ -764,11 +765,11 @@
if(yych == 'U') goto yy193;
if(yych == 'u') goto yy192;
yy58:
-#line 490 "..\\..\\idllexer\\idl.re"
+#line 492 "..\\..\\idllexer\\idl.re"
{
BOOST_WAVE_RET(TOKEN_FROM_ID(*s->tok, UnknownTokenType));
}
-#line 772 "..\\..\\idllexer\\idl_re.cpp"
+#line 773 "..\\..\\idllexer\\idl_re.cpp"
yy59:
yyaccept = 5;
yych = *(YYMARKER = ++YYCURSOR);
@@ -810,9 +811,9 @@
}
}
yy60:
-#line 427 "..\\..\\idllexer\\idl.re"
+#line 428 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_INTLIT); }
-#line 816 "..\\..\\idllexer\\idl_re.cpp"
+#line 817 "..\\..\\idllexer\\idl_re.cpp"
yy61:
yyaccept = 5;
yych = *(YYMARKER = ++YYCURSOR);
@@ -873,31 +874,32 @@
yych = *YYCURSOR;
goto yy74;
yy65:
-#line 466 "..\\..\\idllexer\\idl.re"
+#line 467 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_SPACE); }
-#line 879 "..\\..\\idllexer\\idl_re.cpp"
+#line 880 "..\\..\\idllexer\\idl_re.cpp"
yy66:
++YYCURSOR;
yy67:
-#line 469 "..\\..\\idllexer\\idl.re"
+#line 470 "..\\..\\idllexer\\idl.re"
{
s->line++;
BOOST_WAVE_RET(T_NEWLINE);
}
-#line 888 "..\\..\\idllexer\\idl_re.cpp"
+#line 889 "..\\..\\idllexer\\idl_re.cpp"
yy68:
yych = *++YYCURSOR;
if(yych == 0x0A) goto yy72;
goto yy67;
yy69:
++YYCURSOR;
-#line 475 "..\\..\\idllexer\\idl.re"
+#line 476 "..\\..\\idllexer\\idl.re"
{
if(cursor != s->eof)
{
using namespace std; // some systems have printf in std
if (0 != s->error_proc) {
- (*s->error_proc)(s, lexing_exception::generic_lexing_error,
+ (*s->error_proc)(s,
+ cpplexer::lexing_exception::generic_lexing_error,
"'\\000' in input stream");
}
else
@@ -905,7 +907,7 @@
}
BOOST_WAVE_RET(T_EOF);
}
-#line 909 "..\\..\\idllexer\\idl_re.cpp"
+#line 911 "..\\..\\idllexer\\idl_re.cpp"
yy71:
yych = *++YYCURSOR;
goto yy58;
@@ -1044,9 +1046,9 @@
yy80:
++YYCURSOR;
yy81:
-#line 439 "..\\..\\idllexer\\idl.re"
+#line 440 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_STRINGLIT); }
-#line 1050 "..\\..\\idllexer\\idl_re.cpp"
+#line 1052 "..\\..\\idllexer\\idl_re.cpp"
yy82:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -1891,9 +1893,9 @@
yy130:
++YYCURSOR;
yy131:
-#line 436 "..\\..\\idllexer\\idl.re"
+#line 437 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_CHARLIT); }
-#line 1897 "..\\..\\idllexer\\idl_re.cpp"
+#line 1899 "..\\..\\idllexer\\idl_re.cpp"
yy132:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -2515,9 +2517,9 @@
}
yy164:
++YYCURSOR;
-#line 433 "..\\..\\idllexer\\idl.re"
+#line 434 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_FIXEDPOINTLIT); }
-#line 2521 "..\\..\\idllexer\\idl_re.cpp"
+#line 2523 "..\\..\\idllexer\\idl_re.cpp"
yy166:
yyaccept = 5;
YYMARKER = ++YYCURSOR;
@@ -2578,9 +2580,9 @@
}
}
yy170:
-#line 430 "..\\..\\idllexer\\idl.re"
+#line 431 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_FLOATLIT); }
-#line 2584 "..\\..\\idllexer\\idl_re.cpp"
+#line 2586 "..\\..\\idllexer\\idl_re.cpp"
yy171:
yych = *++YYCURSOR;
if(yych <= ',') {
@@ -3086,44 +3088,44 @@
goto yy121;
yy222:
++YYCURSOR;
-#line 416 "..\\..\\idllexer\\idl.re"
+#line 417 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_GREATEREQUAL); }
-#line 3092 "..\\..\\idllexer\\idl_re.cpp"
+#line 3094 "..\\..\\idllexer\\idl_re.cpp"
yy224:
++YYCURSOR;
-#line 412 "..\\..\\idllexer\\idl.re"
+#line 413 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_SHIFTRIGHT); }
-#line 3097 "..\\..\\idllexer\\idl_re.cpp"
+#line 3099 "..\\..\\idllexer\\idl_re.cpp"
yy226:
++YYCURSOR;
-#line 415 "..\\..\\idllexer\\idl.re"
+#line 416 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_LESSEQUAL); }
-#line 3102 "..\\..\\idllexer\\idl_re.cpp"
+#line 3104 "..\\..\\idllexer\\idl_re.cpp"
yy228:
++YYCURSOR;
-#line 411 "..\\..\\idllexer\\idl.re"
+#line 412 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_SHIFTLEFT); }
-#line 3107 "..\\..\\idllexer\\idl_re.cpp"
+#line 3109 "..\\..\\idllexer\\idl_re.cpp"
yy230:
++YYCURSOR;
-#line 413 "..\\..\\idllexer\\idl.re"
+#line 414 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_EQUAL); }
-#line 3112 "..\\..\\idllexer\\idl_re.cpp"
+#line 3114 "..\\..\\idllexer\\idl_re.cpp"
yy232:
++YYCURSOR;
-#line 414 "..\\..\\idllexer\\idl.re"
+#line 415 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_NOTEQUAL); }
-#line 3117 "..\\..\\idllexer\\idl_re.cpp"
+#line 3119 "..\\..\\idllexer\\idl_re.cpp"
yy234:
++YYCURSOR;
-#line 418 "..\\..\\idllexer\\idl.re"
+#line 419 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_OROR); }
-#line 3122 "..\\..\\idllexer\\idl_re.cpp"
+#line 3124 "..\\..\\idllexer\\idl_re.cpp"
yy236:
++YYCURSOR;
-#line 417 "..\\..\\idllexer\\idl.re"
+#line 418 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_ANDAND); }
-#line 3127 "..\\..\\idllexer\\idl_re.cpp"
+#line 3129 "..\\..\\idllexer\\idl_re.cpp"
yy238:
++YYCURSOR;
if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
@@ -3204,9 +3206,9 @@
yych = *++YYCURSOR;
if(yych != 'g') goto yy77;
++YYCURSOR;
-#line 463 "..\\..\\idllexer\\idl.re"
+#line 464 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_PP_WARNING); }
-#line 3210 "..\\..\\idllexer\\idl_re.cpp"
+#line 3212 "..\\..\\idllexer\\idl_re.cpp"
yy255:
yych = *++YYCURSOR;
if(yych != 'a') goto yy77;
@@ -3217,18 +3219,18 @@
yych = *++YYCURSOR;
if(yych != 'a') goto yy77;
++YYCURSOR;
-#line 461 "..\\..\\idllexer\\idl.re"
+#line 462 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_PP_PRAGMA); }
-#line 3223 "..\\..\\idllexer\\idl_re.cpp"
+#line 3225 "..\\..\\idllexer\\idl_re.cpp"
yy261:
yych = *++YYCURSOR;
if(yych != 'n') goto yy77;
yych = *++YYCURSOR;
if(yych != 'e') goto yy77;
++YYCURSOR;
-#line 459 "..\\..\\idllexer\\idl.re"
+#line 460 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_PP_LINE); }
-#line 3232 "..\\..\\idllexer\\idl_re.cpp"
+#line 3234 "..\\..\\idllexer\\idl_re.cpp"
yy265:
yych = *++YYCURSOR;
if(yych != 'd') goto yy77;
@@ -3237,9 +3239,9 @@
yych = *++YYCURSOR;
if(yych != 'f') goto yy77;
++YYCURSOR;
-#line 458 "..\\..\\idllexer\\idl.re"
+#line 459 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_PP_UNDEF); }
-#line 3243 "..\\..\\idllexer\\idl_re.cpp"
+#line 3245 "..\\..\\idllexer\\idl_re.cpp"
yy270:
yych = *++YYCURSOR;
if(yych != 'f') goto yy77;
@@ -3250,9 +3252,9 @@
yych = *++YYCURSOR;
if(yych != 'e') goto yy77;
++YYCURSOR;
-#line 457 "..\\..\\idllexer\\idl.re"
+#line 458 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_PP_DEFINE); }
-#line 3256 "..\\..\\idllexer\\idl_re.cpp"
+#line 3258 "..\\..\\idllexer\\idl_re.cpp"
yy276:
yych = *++YYCURSOR;
if(yych == 'r') goto yy289;
@@ -3272,41 +3274,41 @@
yych = *++YYCURSOR;
if(yych != 'f') goto yy77;
++YYCURSOR;
-#line 455 "..\\..\\idllexer\\idl.re"
+#line 456 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_PP_ELIF); }
-#line 3278 "..\\..\\idllexer\\idl_re.cpp"
+#line 3280 "..\\..\\idllexer\\idl_re.cpp"
yy283:
++YYCURSOR;
-#line 454 "..\\..\\idllexer\\idl.re"
+#line 455 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_PP_ELSE); }
-#line 3283 "..\\..\\idllexer\\idl_re.cpp"
+#line 3285 "..\\..\\idllexer\\idl_re.cpp"
yy285:
yych = *++YYCURSOR;
if(yych != 'i') goto yy77;
yych = *++YYCURSOR;
if(yych != 'f') goto yy77;
++YYCURSOR;
-#line 456 "..\\..\\idllexer\\idl.re"
+#line 457 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_PP_ENDIF); }
-#line 3292 "..\\..\\idllexer\\idl_re.cpp"
+#line 3294 "..\\..\\idllexer\\idl_re.cpp"
yy289:
yych = *++YYCURSOR;
if(yych != 'o') goto yy77;
yych = *++YYCURSOR;
if(yych != 'r') goto yy77;
++YYCURSOR;
-#line 460 "..\\..\\idllexer\\idl.re"
+#line 461 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_PP_ERROR); }
-#line 3301 "..\\..\\idllexer\\idl_re.cpp"
+#line 3303 "..\\..\\idllexer\\idl_re.cpp"
yy293:
yyaccept = 9;
yych = *(YYMARKER = ++YYCURSOR);
if(yych == 'd') goto yy321;
if(yych == 'n') goto yy322;
yy294:
-#line 451 "..\\..\\idllexer\\idl.re"
+#line 452 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_PP_IF); }
-#line 3310 "..\\..\\idllexer\\idl_re.cpp"
+#line 3312 "..\\..\\idllexer\\idl_re.cpp"
yy295:
yych = *++YYCURSOR;
if(yych != 'c') goto yy77;
@@ -3338,9 +3340,9 @@
}
}
yy302:
-#line 449 "..\\..\\idllexer\\idl.re"
+#line 450 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_PP_INCLUDE); }
-#line 3344 "..\\..\\idllexer\\idl_re.cpp"
+#line 3346 "..\\..\\idllexer\\idl_re.cpp"
yy303:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -3365,9 +3367,9 @@
}
if(yych <= '=') goto yy77;
++YYCURSOR;
-#line 443 "..\\..\\idllexer\\idl.re"
+#line 444 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_PP_HHEADER); }
-#line 3371 "..\\..\\idllexer\\idl_re.cpp"
+#line 3373 "..\\..\\idllexer\\idl_re.cpp"
yy310:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -3378,9 +3380,9 @@
}
if(yych <= '!') goto yy77;
++YYCURSOR;
-#line 446 "..\\..\\idllexer\\idl.re"
+#line 447 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_PP_QHEADER); }
-#line 3384 "..\\..\\idllexer\\idl_re.cpp"
+#line 3386 "..\\..\\idllexer\\idl_re.cpp"
yy314:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -3436,16 +3438,16 @@
yych = *++YYCURSOR;
if(yych != 'f') goto yy77;
++YYCURSOR;
-#line 453 "..\\..\\idllexer\\idl.re"
+#line 454 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_PP_IFNDEF); }
-#line 3442 "..\\..\\idllexer\\idl_re.cpp"
+#line 3444 "..\\..\\idllexer\\idl_re.cpp"
yy327:
yych = *++YYCURSOR;
if(yych != 'f') goto yy77;
++YYCURSOR;
-#line 452 "..\\..\\idllexer\\idl.re"
+#line 453 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_PP_IFDEF); }
-#line 3449 "..\\..\\idllexer\\idl_re.cpp"
+#line 3451 "..\\..\\idllexer\\idl_re.cpp"
yy330:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -3501,14 +3503,14 @@
}
yy337:
++YYCURSOR;
-#line 420 "..\\..\\idllexer\\idl.re"
+#line 421 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_MINUSMINUS); }
-#line 3507 "..\\..\\idllexer\\idl_re.cpp"
+#line 3509 "..\\..\\idllexer\\idl_re.cpp"
yy339:
++YYCURSOR;
-#line 419 "..\\..\\idllexer\\idl.re"
+#line 420 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_PLUSPLUS); }
-#line 3512 "..\\..\\idllexer\\idl_re.cpp"
+#line 3514 "..\\..\\idllexer\\idl_re.cpp"
yy341:
yych = *++YYCURSOR;
if(yych == '/') goto yy342;
@@ -3521,9 +3523,9 @@
goto yy77;
yy343:
++YYCURSOR;
-#line 391 "..\\..\\idllexer\\idl.re"
+#line 392 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_POUND_POUND); }
-#line 3527 "..\\..\\idllexer\\idl_re.cpp"
+#line 3529 "..\\..\\idllexer\\idl_re.cpp"
yy345:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
@@ -3542,9 +3544,9 @@
if(yych == '?') goto yy204;
if(yych == '\\') goto yy203;
yy349:
-#line 384 "..\\..\\idllexer\\idl.re"
+#line 385 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_FALSE); }
-#line 3548 "..\\..\\idllexer\\idl_re.cpp"
+#line 3550 "..\\..\\idllexer\\idl_re.cpp"
yy350:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
@@ -3560,28 +3562,28 @@
if(yych == '?') goto yy204;
if(yych == '\\') goto yy203;
yy353:
-#line 383 "..\\..\\idllexer\\idl.re"
+#line 384 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_TRUE); }
-#line 3566 "..\\..\\idllexer\\idl_re.cpp"
+#line 3568 "..\\..\\idllexer\\idl_re.cpp"
yy354:
++YYCURSOR;
-#line 381 "..\\..\\idllexer\\idl.re"
+#line 382 "..\\..\\idllexer\\idl.re"
{ goto cppcomment; }
-#line 3571 "..\\..\\idllexer\\idl_re.cpp"
+#line 3573 "..\\..\\idllexer\\idl_re.cpp"
yy356:
++YYCURSOR;
-#line 380 "..\\..\\idllexer\\idl.re"
+#line 381 "..\\..\\idllexer\\idl.re"
{ goto ccomment; }
-#line 3576 "..\\..\\idllexer\\idl_re.cpp"
+#line 3578 "..\\..\\idllexer\\idl_re.cpp"
}
}
-#line 493 "..\\..\\idllexer\\idl.re"
+#line 495 "..\\..\\idllexer\\idl.re"
ccomment:
{
-#line 3585 "..\\..\\idllexer\\idl_re.cpp"
+#line 3587 "..\\..\\idllexer\\idl_re.cpp"
{
YYCTYPE yych;
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
@@ -3605,20 +3607,20 @@
++YYCURSOR;
if((yych = *YYCURSOR) == '/') goto yy371;
yy361:
-#line 506 "..\\..\\idllexer\\idl.re"
+#line 508 "..\\..\\idllexer\\idl.re"
{ goto ccomment; }
-#line 3611 "..\\..\\idllexer\\idl_re.cpp"
+#line 3613 "..\\..\\idllexer\\idl_re.cpp"
yy362:
++YYCURSOR;
yy363:
-#line 499 "..\\..\\idllexer\\idl.re"
+#line 501 "..\\..\\idllexer\\idl.re"
{
/*if(cursor == s->eof) BOOST_WAVE_RET(T_EOF);*/
/*s->tok = cursor; */
s->line += count_backslash_newlines(s, cursor) +1;
goto ccomment;
}
-#line 3622 "..\\..\\idllexer\\idl_re.cpp"
+#line 3624 "..\\..\\idllexer\\idl_re.cpp"
yy364:
yych = *++YYCURSOR;
if(yych == 0x0A) goto yy370;
@@ -3628,13 +3630,14 @@
goto yy361;
yy366:
++YYCURSOR;
-#line 509 "..\\..\\idllexer\\idl.re"
+#line 511 "..\\..\\idllexer\\idl.re"
{
using namespace std; // some systems have printf in std
if(cursor == s->eof)
{
if (s->error_proc)
- (*s->error_proc)(s, lexing_exception::generic_lexing_warning,
+ (*s->error_proc)(s,
+ cpplexer::lexing_exception::generic_lexing_warning,
"Unterminated comment");
else
printf("Error: Unterminated comment\n");
@@ -3642,7 +3645,8 @@
else
{
if (s->error_proc)
- (*s->error_proc)(s, lexing_exception::generic_lexing_error,
+ (*s->error_proc)(s,
+ cpplexer::lexing_exception::generic_lexing_error,
"'\\000' in input stream");
else
printf("Error: 0 in file");
@@ -3652,35 +3656,36 @@
/* the comment is unterminated, but nevertheless its a comment */
BOOST_WAVE_RET(T_CCOMMENT);
}
-#line 3656 "..\\..\\idllexer\\idl_re.cpp"
+#line 3660 "..\\..\\idllexer\\idl_re.cpp"
yy368:
++YYCURSOR;
-#line 534 "..\\..\\idllexer\\idl.re"
+#line 538 "..\\..\\idllexer\\idl.re"
{
if (s->error_proc)
- (*s->error_proc)(s, lexing_exception::generic_lexing_error,
+ (*s->error_proc)(s,
+ cpplexer::lexing_exception::generic_lexing_error,
"invalid character in input stream");
else
printf("Error: 0 in file");
}
-#line 3667 "..\\..\\idllexer\\idl_re.cpp"
+#line 3672 "..\\..\\idllexer\\idl_re.cpp"
yy370:
yych = *++YYCURSOR;
goto yy363;
yy371:
++YYCURSOR;
-#line 497 "..\\..\\idllexer\\idl.re"
+#line 499 "..\\..\\idllexer\\idl.re"
{ BOOST_WAVE_RET(T_CCOMMENT); }
-#line 3675 "..\\..\\idllexer\\idl_re.cpp"
+#line 3680 "..\\..\\idllexer\\idl_re.cpp"
}
}
-#line 542 "..\\..\\idllexer\\idl.re"
+#line 547 "..\\..\\idllexer\\idl.re"
cppcomment:
{
-#line 3684 "..\\..\\idllexer\\idl_re.cpp"
+#line 3689 "..\\..\\idllexer\\idl_re.cpp"
{
YYCTYPE yych;
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
@@ -3699,32 +3704,33 @@
yy376:
++YYCURSOR;
yy377:
-#line 547 "..\\..\\idllexer\\idl.re"
+#line 552 "..\\..\\idllexer\\idl.re"
{
/*if(cursor == s->eof) BOOST_WAVE_RET(T_EOF); */
/*s->tok = cursor; */
s->line++;
BOOST_WAVE_RET(T_CPPCOMMENT);
}
-#line 3710 "..\\..\\idllexer\\idl_re.cpp"
+#line 3715 "..\\..\\idllexer\\idl_re.cpp"
yy378:
yych = *++YYCURSOR;
if(yych == 0x0A) goto yy383;
goto yy377;
yy379:
++YYCURSOR;
-#line 554 "..\\..\\idllexer\\idl.re"
+#line 559 "..\\..\\idllexer\\idl.re"
{ goto cppcomment; }
-#line 3719 "..\\..\\idllexer\\idl_re.cpp"
+#line 3724 "..\\..\\idllexer\\idl_re.cpp"
yy381:
++YYCURSOR;
-#line 557 "..\\..\\idllexer\\idl.re"
+#line 562 "..\\..\\idllexer\\idl.re"
{
using namespace std; // some systems have printf in std
if(cursor != s->eof)
{
if (s->error_proc)
- (*s->error_proc)(s, lexing_exception::generic_lexing_error,
+ (*s->error_proc)(s,
+ cpplexer::lexing_exception::generic_lexing_error,
"'\\000' in input stream");
else
printf("Error: 0 in file");
@@ -3734,14 +3740,14 @@
/* the comment is unterminated, but nevertheless its a comment */
BOOST_WAVE_RET(T_CPPCOMMENT);
}
-#line 3738 "..\\..\\idllexer\\idl_re.cpp"
+#line 3744 "..\\..\\idllexer\\idl_re.cpp"
yy383:
++YYCURSOR;
yych = *YYCURSOR;
goto yy377;
}
}
-#line 572 "..\\..\\idllexer\\idl.re"
+#line 578 "..\\..\\idllexer\\idl.re"
} /* end of scan */
Modified: trunk/libs/wave/samples/waveidl/idllexer/idl_re2c_lexer.hpp
==============================================================================
--- trunk/libs/wave/samples/waveidl/idllexer/idl_re2c_lexer.hpp (original)
+++ trunk/libs/wave/samples/waveidl/idllexer/idl_re2c_lexer.hpp 2007-10-02 13:24:17 EDT (Tue, 02 Oct 2007)
@@ -78,7 +78,7 @@
}
// error reporting from the re2c generated lexer
- static int report_error(scanner_t const *s, char const *, ...);
+ static int report_error(scanner_t const *s, int code, char const *, ...);
private:
static char const *tok_names[];
@@ -164,7 +164,8 @@
template <typename IteratorT, typename PositionT>
inline int
-lexer<IteratorT, PositionT>::report_error(scanner_t const *s, char const* msg, ...)
+lexer<IteratorT, PositionT>::report_error(scanner_t const *s, int errcode,
+ char const* msg, ...)
{
BOOST_ASSERT(0 != s);
BOOST_ASSERT(0 != msg);
@@ -177,8 +178,8 @@
vsprintf(buffer, msg, params);
va_end(params);
- BOOST_WAVE_LEXER_THROW(boost::wave::cpplexer::lexing_exception,
- generic_lexing_error, buffer, s->line, -1, s->file_name);
+ BOOST_WAVE_LEXER_THROW_VAR(boost::wave::cpplexer::lexing_exception,
+ errcode, buffer, s->line, -1, s->file_name);
return 0;
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk