00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #define YYBISON 1
00038
00039
00040 #define YYSKELETON_NAME "yacc.c"
00041
00042
00043 #define YYPURE 1
00044
00045
00046 #define YYLSP_NEEDED 0
00047
00048
00049
00050
00051 #ifndef YYTOKENTYPE
00052 # define YYTOKENTYPE
00053
00054
00055 enum yytokentype {
00056 TAG = 258,
00057 SPACE = 259,
00058 QUOTESTR = 260,
00059 CDATA = 261,
00060 MESSAGEBLOCK = 262,
00061 COMMENT = 263
00062 };
00063 #endif
00064 #define TAG 258
00065 #define SPACE 259
00066 #define QUOTESTR 260
00067 #define CDATA 261
00068 #define MESSAGEBLOCK 262
00069 #define COMMENT 263
00070
00071
00072
00073
00074
00075 #line 25 "parsemessage_parser.yy"
00076
00077 #define yyparse VOS::msgparse
00078 #define yylex msglex
00079 #define yyerror msgerror
00080 #define yylval msglval
00081 #define yychar msgchar
00082 #define yydebug msgdebug
00083 #define yynerrs msgnerrs
00084
00085 #define YYSTYPE char*
00086
00087 #include <vos/vosdefs.hh>
00088 #include <vos/parsemessage_parser.h>
00089 #include <vos/messageblock.hh>
00090 #include <vos/message.hh>
00091
00092 #define YYERROR_VERBOSE
00093 #define YYPARSE_PARAM extra
00094 #define YYLEX_PARAM extra
00095
00096 #undef __GNUC_MINOR__
00097
00098
00099
00100 #ifndef YYDEBUG
00101 # define YYDEBUG 0
00102 #endif
00103
00104
00105 #ifdef YYERROR_VERBOSE
00106 # undef YYERROR_VERBOSE
00107 # define YYERROR_VERBOSE 1
00108 #else
00109 # define YYERROR_VERBOSE 0
00110 #endif
00111
00112 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
00113 typedef int YYSTYPE;
00114 # define yystype YYSTYPE
00115 # define YYSTYPE_IS_DECLARED 1
00116 # define YYSTYPE_IS_TRIVIAL 1
00117 #endif
00118
00119
00120
00121
00122
00123
00124
00125 #line 126 "parsemessage_parser.cc"
00126
00127 #if ! defined (yyoverflow) || YYERROR_VERBOSE
00128
00129
00130
00131 # if YYSTACK_USE_ALLOCA
00132 # define YYSTACK_ALLOC alloca
00133 # else
00134 # ifndef YYSTACK_USE_ALLOCA
00135 # if defined (alloca) || defined (_ALLOCA_H)
00136 # define YYSTACK_ALLOC alloca
00137 # else
00138 # ifdef __GNUC__
00139 # define YYSTACK_ALLOC __builtin_alloca
00140 # endif
00141 # endif
00142 # endif
00143 # endif
00144
00145 # ifdef YYSTACK_ALLOC
00146
00147 # define YYSTACK_FREE(Ptr) do { ; } while (0)
00148 # else
00149 # if defined (__STDC__) || defined (__cplusplus)
00150 # include <stdlib.h>
00151 # define YYSIZE_T size_t
00152 # endif
00153 # define YYSTACK_ALLOC malloc
00154 # define YYSTACK_FREE free
00155 # endif
00156 #endif
00157
00158
00159 #if (! defined (yyoverflow) \
00160 && (! defined (__cplusplus) \
00161 || (YYSTYPE_IS_TRIVIAL)))
00162
00163
00164 union yyalloc
00165 {
00166 short yyss;
00167 YYSTYPE yyvs;
00168 };
00169
00170
00171 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
00172
00173
00174
00175 # define YYSTACK_BYTES(N) \
00176 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
00177 + YYSTACK_GAP_MAXIMUM)
00178
00179
00180
00181 # ifndef YYCOPY
00182 # if 1 < __GNUC__
00183 # define YYCOPY(To, From, Count) \
00184 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
00185 # else
00186 # define YYCOPY(To, From, Count) \
00187 do \
00188 { \
00189 register YYSIZE_T yyi; \
00190 for (yyi = 0; yyi < (Count); yyi++) \
00191 (To)[yyi] = (From)[yyi]; \
00192 } \
00193 while (0)
00194 # endif
00195 # endif
00196
00197
00198
00199
00200
00201
00202 # define YYSTACK_RELOCATE(Stack) \
00203 do \
00204 { \
00205 YYSIZE_T yynewbytes; \
00206 YYCOPY (&yyptr->Stack, Stack, yysize); \
00207 Stack = &yyptr->Stack; \
00208 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
00209 yyptr += yynewbytes / sizeof (*yyptr); \
00210 } \
00211 while (0)
00212
00213 #endif
00214
00215 #if defined (__STDC__) || defined (__cplusplus)
00216 typedef signed char yysigned_char;
00217 #else
00218 typedef short yysigned_char;
00219 #endif
00220
00221
00222 #define YYFINAL 7
00223
00224 #define YYLAST 119
00225
00226
00227 #define YYNTOKENS 14
00228
00229 #define YYNNTS 21
00230
00231 #define YYNRULES 39
00232
00233 #define YYNSTATES 115
00234
00235
00236 #define YYUNDEFTOK 2
00237 #define YYMAXUTOK 263
00238
00239 #define YYTRANSLATE(YYX) \
00240 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
00241
00242
00243 static const unsigned char yytranslate[] =
00244 {
00245 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00246 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00247 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00248 2, 2, 2, 2, 13, 2, 2, 2, 2, 2,
00249 2, 2, 2, 2, 2, 2, 2, 11, 2, 2,
00250 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00251 9, 12, 10, 2, 2, 2, 2, 2, 2, 2,
00252 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00253 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00254 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00255 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00256 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00257 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00258 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00259 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00260 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00261 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00262 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00263 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00264 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00265 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00266 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00267 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00268 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00269 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00270 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
00271 5, 6, 7, 8
00272 };
00273
00274 #if YYDEBUG
00275
00276
00277 static const unsigned char yyprhs[] =
00278 {
00279 0, 0, 3, 6, 9, 23, 35, 46, 48, 52,
00280 58, 60, 64, 70, 74, 76, 79, 85, 92, 97,
00281 99, 103, 109, 111, 114, 117, 118, 121, 124, 125,
00282 128, 131, 133, 137, 146, 150, 158, 164, 175, 177
00283 };
00284
00285
00286 static const yysigned_char yyrhs[] =
00287 {
00288 15, 0, -1, 29, 16, -1, 29, 20, -1, 9,
00289 7, 27, 17, 28, 10, 29, 19, 29, 9, 11,
00290 7, 10, -1, 9, 7, 27, 17, 28, 10, 29,
00291 9, 11, 7, 10, -1, 9, 7, 10, 29, 19,
00292 29, 9, 11, 7, 10, -1, 18, -1, 17, 27,
00293 18, -1, 3, 12, 13, 5, 13, -1, 20, -1,
00294 19, 29, 20, -1, 22, 29, 30, 29, 24, -1,
00295 22, 29, 24, -1, 23, -1, 9, 3, -1, 21,
00296 27, 25, 28, 10, -1, 21, 27, 25, 28, 11,
00297 10, -1, 9, 11, 3, 10, -1, 26, -1, 25,
00298 27, 26, -1, 3, 12, 13, 5, 13, -1, 4,
00299 -1, 8, 27, -1, 4, 27, -1, -1, 8, 28,
00300 -1, 4, 28, -1, -1, 8, 29, -1, 6, 29,
00301 -1, 31, -1, 30, 29, 31, -1, 9, 3, 10,
00302 6, 9, 11, 3, 10, -1, 32, 33, 34, -1,
00303 9, 3, 10, 9, 11, 3, 10, -1, 9, 3,
00304 28, 11, 10, -1, 9, 3, 27, 3, 12, 13,
00305 5, 13, 28, 10, -1, 6, -1, 9, 11, 3,
00306 10, -1
00307 };
00308
00309
00310 static const unsigned char yyrline[] =
00311 {
00312 0, 57, 57, 58, 61, 62, 63, 66, 67, 70,
00313 82, 83, 86, 87, 88, 91, 99, 102, 105, 110,
00314 111, 114, 139, 139, 139, 141, 141, 141, 144, 144,
00315 144, 148, 149, 152, 159, 160, 166, 172, 187, 192
00316 };
00317 #endif
00318
00319 #if YYDEBUG || YYERROR_VERBOSE
00320
00321
00322 static const char *const yytname[] =
00323 {
00324 "$end", "error", "$undefined", "TAG", "SPACE", "QUOTESTR", "CDATA",
00325 "MESSAGEBLOCK", "COMMENT", "'<'", "'>'", "'/'", "'='", "'\"'",
00326 "$accept", "start", "messageblock", "options", "option", "messages",
00327 "message", "tagstart", "begintag", "begintagonly", "endtag",
00328 "attributes", "attr", "aspace", "ospace", "cspace", "params", "param",
00329 "beginquotedparam", "quotedcdata", "endquotedparam", 0
00330 };
00331 #endif
00332
00333 # ifdef YYPRINT
00334
00335
00336 static const unsigned short yytoknum[] =
00337 {
00338 0, 256, 257, 258, 259, 260, 261, 262, 263, 60,
00339 62, 47, 61, 34
00340 };
00341 # endif
00342
00343
00344 static const unsigned char yyr1[] =
00345 {
00346 0, 14, 15, 15, 16, 16, 16, 17, 17, 18,
00347 19, 19, 20, 20, 20, 21, 22, 23, 24, 25,
00348 25, 26, 27, 27, 27, 28, 28, 28, 29, 29,
00349 29, 30, 30, 31, 31, 31, 31, 32, 33, 34
00350 };
00351
00352
00353 static const unsigned char yyr2[] =
00354 {
00355 0, 2, 2, 2, 13, 11, 10, 1, 3, 5,
00356 1, 3, 5, 3, 1, 2, 5, 6, 4, 1,
00357 3, 5, 1, 2, 2, 0, 2, 2, 0, 2,
00358 2, 1, 3, 8, 3, 7, 5, 10, 1, 4
00359 };
00360
00361
00362
00363
00364 static const unsigned char yydefact[] =
00365 {
00366 28, 28, 28, 0, 0, 30, 29, 1, 0, 2,
00367 3, 0, 28, 14, 15, 0, 22, 0, 0, 0,
00368 28, 0, 24, 23, 0, 25, 19, 0, 13, 28,
00369 31, 0, 0, 0, 25, 7, 0, 25, 25, 0,
00370 0, 25, 0, 0, 38, 0, 0, 28, 10, 0,
00371 0, 0, 0, 27, 26, 20, 16, 0, 0, 0,
00372 0, 0, 12, 32, 0, 34, 0, 0, 8, 28,
00373 0, 17, 0, 0, 0, 0, 18, 0, 0, 11,
00374 0, 0, 21, 0, 0, 0, 36, 0, 0, 9,
00375 0, 28, 0, 0, 0, 39, 0, 0, 0, 0,
00376 35, 0, 6, 0, 0, 33, 25, 5, 0, 25,
00377 25, 0, 0, 37, 4
00378 };
00379
00380
00381 static const yysigned_char yydefgoto[] =
00382 {
00383 -1, 3, 9, 34, 35, 47, 48, 11, 12, 13,
00384 28, 25, 26, 22, 53, 4, 29, 30, 31, 45,
00385 65
00386 };
00387
00388
00389
00390 #define YYPACT_NINF -21
00391 static const yysigned_char yypact[] =
00392 {
00393 44, 44, 44, 4, 42, -21, -21, -21, 3, -21,
00394 -21, 35, 44, -21, -21, 27, 35, 35, 10, 45,
00395 44, 33, -21, -21, 43, 40, -21, 5, -21, 44,
00396 -21, 47, 48, 46, 40, -21, 50, 38, 40, 10,
00397 17, 30, 53, 45, -21, 51, 56, 44, -21, 52,
00398 33, 54, 61, -21, -21, -21, -21, 57, 16, 58,
00399 59, 62, -21, -21, 60, -21, 64, 63, -21, 44,
00400 65, -21, 66, 68, 69, 67, -21, 71, 8, -21,
00401 70, 73, -21, 74, 77, 75, -21, 79, 80, -21,
00402 12, 44, 81, 82, 88, -21, 85, 89, 90, 87,
00403 -21, 91, -21, 92, 21, -21, 41, -21, 93, 41,
00404 41, 95, 96, -21, -21
00405 };
00406
00407
00408 static const yysigned_char yypgoto[] =
00409 {
00410 -21, -21, -21, -21, 26, 20, -4, -21, -21, -21,
00411 55, -21, 72, -8, -20, 0, -21, 76, -21, -21,
00412 -21
00413 };
00414
00415
00416
00417
00418
00419 #define YYTABLE_NINF -23
00420 static const yysigned_char yytable[] =
00421 {
00422 10, 5, 6, 18, 7, 40, 14, 21, 41, 23,
00423 15, 14, 19, 24, 51, 14, 42, 39, 54, 88,
00424 32, 60, 72, 97, 14, 73, 50, 56, 57, 43,
00425 23, 16, 108, 59, 37, 17, 33, 20, 38, 16,
00426 58, -22, 37, 17, 37, 109, 38, 66, 38, 110,
00427 1, 8, 2, 44, 27, 36, 61, 46, 49, 14,
00428 64, 74, 79, 52, 69, 67, 70, 71, 80, 81,
00429 75, 77, 76, 78, 87, 83, 68, 86, 82, 84,
00430 93, 85, 90, 89, 99, 92, 111, 96, 94, 95,
00431 54, 98, 100, 101, 79, 102, 103, 105, 62, 104,
00432 112, 91, 107, 0, 106, 113, 114, 0, 0, 0,
00433 0, 55, 0, 0, 0, 0, 0, 0, 0, 63
00434 };
00435
00436 static const yysigned_char yycheck[] =
00437 {
00438 4, 1, 2, 11, 0, 25, 3, 15, 3, 17,
00439 7, 3, 12, 3, 34, 3, 11, 25, 38, 11,
00440 20, 41, 6, 11, 3, 9, 34, 10, 11, 29,
00441 38, 4, 11, 41, 4, 8, 3, 10, 8, 4,
00442 10, 3, 4, 8, 4, 4, 8, 47, 8, 8,
00443 6, 9, 8, 6, 9, 12, 3, 9, 12, 3,
00444 9, 3, 66, 13, 10, 13, 5, 10, 5, 69,
00445 11, 11, 10, 9, 3, 9, 50, 10, 13, 11,
00446 3, 12, 9, 13, 3, 11, 106, 7, 13, 10,
00447 110, 91, 10, 5, 98, 10, 7, 10, 43, 9,
00448 7, 81, 10, -1, 13, 10, 10, -1, -1, -1,
00449 -1, 39, -1, -1, -1, -1, -1, -1, -1, 43
00450 };
00451
00452
00453
00454 static const unsigned char yystos[] =
00455 {
00456 0, 6, 8, 15, 29, 29, 29, 0, 9, 16,
00457 20, 21, 22, 23, 3, 7, 4, 8, 27, 29,
00458 10, 27, 27, 27, 3, 25, 26, 9, 24, 30,
00459 31, 32, 29, 3, 17, 18, 12, 4, 8, 27,
00460 28, 3, 11, 29, 6, 33, 9, 19, 20, 12,
00461 27, 28, 13, 28, 28, 26, 10, 11, 10, 27,
00462 28, 3, 24, 31, 9, 34, 29, 13, 18, 10,
00463 5, 10, 6, 9, 3, 11, 10, 11, 9, 20,
00464 5, 29, 13, 9, 11, 12, 10, 3, 11, 13,
00465 9, 19, 11, 3, 13, 10, 7, 11, 29, 3,
00466 10, 5, 10, 7, 9, 10, 13, 10, 11, 4,
00467 8, 28, 7, 10, 10
00468 };
00469
00470 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
00471 # define YYSIZE_T __SIZE_TYPE__
00472 #endif
00473 #if ! defined (YYSIZE_T) && defined (size_t)
00474 # define YYSIZE_T size_t
00475 #endif
00476 #if ! defined (YYSIZE_T)
00477 # if defined (__STDC__) || defined (__cplusplus)
00478 # include <stddef.h>
00479 # define YYSIZE_T size_t
00480 # endif
00481 #endif
00482 #if ! defined (YYSIZE_T)
00483 # define YYSIZE_T unsigned int
00484 #endif
00485
00486 #define yyerrok (yyerrstatus = 0)
00487 #define yyclearin (yychar = YYEMPTY)
00488 #define YYEMPTY (-2)
00489 #define YYEOF 0
00490
00491 #define YYACCEPT goto yyacceptlab
00492 #define YYABORT goto yyabortlab
00493 #define YYERROR goto yyerrlab1
00494
00495
00496
00497
00498
00499
00500 #define YYFAIL goto yyerrlab
00501
00502 #define YYRECOVERING() (!!yyerrstatus)
00503
00504 #define YYBACKUP(Token, Value) \
00505 do \
00506 if (yychar == YYEMPTY && yylen == 1) \
00507 { \
00508 yychar = (Token); \
00509 yylval = (Value); \
00510 yytoken = YYTRANSLATE (yychar); \
00511 YYPOPSTACK; \
00512 goto yybackup; \
00513 } \
00514 else \
00515 { \
00516 yyerror ("syntax error: cannot back up");\
00517 YYERROR; \
00518 } \
00519 while (0)
00520
00521 #define YYTERROR 1
00522 #define YYERRCODE 256
00523
00524
00525
00526
00527 #ifndef YYLLOC_DEFAULT
00528 # define YYLLOC_DEFAULT(Current, Rhs, N) \
00529 Current.first_line = Rhs[1].first_line; \
00530 Current.first_column = Rhs[1].first_column; \
00531 Current.last_line = Rhs[N].last_line; \
00532 Current.last_column = Rhs[N].last_column;
00533 #endif
00534
00535
00536
00537 #ifdef YYLEX_PARAM
00538 # define YYLEX yylex (&yylval, YYLEX_PARAM)
00539 #else
00540 # define YYLEX yylex (&yylval)
00541 #endif
00542
00543
00544 #if YYDEBUG
00545
00546 # ifndef YYFPRINTF
00547 # include <stdio.h>
00548 # define YYFPRINTF fprintf
00549 # endif
00550
00551 # define YYDPRINTF(Args) \
00552 do { \
00553 if (yydebug) \
00554 YYFPRINTF Args; \
00555 } while (0)
00556
00557 # define YYDSYMPRINT(Args) \
00558 do { \
00559 if (yydebug) \
00560 yysymprint Args; \
00561 } while (0)
00562
00563 # define YYDSYMPRINTF(Title, Token, Value, Location) \
00564 do { \
00565 if (yydebug) \
00566 { \
00567 YYFPRINTF (stderr, "%s ", Title); \
00568 yysymprint (stderr, \
00569 Token, Value); \
00570 YYFPRINTF (stderr, "\n"); \
00571 } \
00572 } while (0)
00573
00574
00575
00576
00577
00578
00579 #if defined (__STDC__) || defined (__cplusplus)
00580 static void
00581 yy_stack_print (short *bottom, short *top)
00582 #else
00583 static void
00584 yy_stack_print (bottom, top)
00585 short *bottom;
00586 short *top;
00587 #endif
00588 {
00589 YYFPRINTF (stderr, "Stack now");
00590 for (; bottom <= top; ++bottom)
00591 YYFPRINTF (stderr, " %d", *bottom);
00592 YYFPRINTF (stderr, "\n");
00593 }
00594
00595 # define YY_STACK_PRINT(Bottom, Top) \
00596 do { \
00597 if (yydebug) \
00598 yy_stack_print ((Bottom), (Top)); \
00599 } while (0)
00600
00601
00602
00603
00604
00605
00606 #if defined (__STDC__) || defined (__cplusplus)
00607 static void
00608 yy_reduce_print (int yyrule)
00609 #else
00610 static void
00611 yy_reduce_print (yyrule)
00612 int yyrule;
00613 #endif
00614 {
00615 int yyi;
00616 unsigned int yylineno = yyrline[yyrule];
00617 YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
00618 yyrule - 1, yylineno);
00619
00620 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
00621 YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
00622 YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
00623 }
00624
00625 # define YY_REDUCE_PRINT(Rule) \
00626 do { \
00627 if (yydebug) \
00628 yy_reduce_print (Rule); \
00629 } while (0)
00630
00631
00632
00633 int yydebug;
00634 #else
00635 # define YYDPRINTF(Args)
00636 # define YYDSYMPRINT(Args)
00637 # define YYDSYMPRINTF(Title, Token, Value, Location)
00638 # define YY_STACK_PRINT(Bottom, Top)
00639 # define YY_REDUCE_PRINT(Rule)
00640 #endif
00641
00642
00643
00644 #ifndef YYINITDEPTH
00645 # define YYINITDEPTH 200
00646 #endif
00647
00648
00649
00650
00651
00652
00653
00654
00655 #if YYMAXDEPTH == 0
00656 # undef YYMAXDEPTH
00657 #endif
00658
00659 #ifndef YYMAXDEPTH
00660 # define YYMAXDEPTH 10000
00661 #endif
00662
00663
00664
00665 #if YYERROR_VERBOSE
00666
00667 # ifndef yystrlen
00668 # if defined (__GLIBC__) && defined (_STRING_H)
00669 # define yystrlen strlen
00670 # else
00671
00672 static YYSIZE_T
00673 # if defined (__STDC__) || defined (__cplusplus)
00674 yystrlen (const char *yystr)
00675 # else
00676 yystrlen (yystr)
00677 const char *yystr;
00678 # endif
00679 {
00680 register const char *yys = yystr;
00681
00682 while (*yys++ != '\0')
00683 continue;
00684
00685 return yys - yystr - 1;
00686 }
00687 # endif
00688 # endif
00689
00690 # ifndef yystpcpy
00691 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
00692 # define yystpcpy stpcpy
00693 # else
00694
00695
00696 static char *
00697 # if defined (__STDC__) || defined (__cplusplus)
00698 yystpcpy (char *yydest, const char *yysrc)
00699 # else
00700 yystpcpy (yydest, yysrc)
00701 char *yydest;
00702 const char *yysrc;
00703 # endif
00704 {
00705 register char *yyd = yydest;
00706 register const char *yys = yysrc;
00707
00708 while ((*yyd++ = *yys++) != '\0')
00709 continue;
00710
00711 return yyd - 1;
00712 }
00713 # endif
00714 # endif
00715
00716 #endif
00717
00718
00719
00720 #if YYDEBUG
00721
00722
00723
00724
00725 #if defined (__STDC__) || defined (__cplusplus)
00726 static void
00727 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
00728 #else
00729 static void
00730 yysymprint (yyoutput, yytype, yyvaluep)
00731 FILE *yyoutput;
00732 int yytype;
00733 YYSTYPE *yyvaluep;
00734 #endif
00735 {
00736
00737 (void) yyvaluep;
00738
00739 if (yytype < YYNTOKENS)
00740 {
00741 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
00742 # ifdef YYPRINT
00743 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
00744 # endif
00745 }
00746 else
00747 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
00748
00749 switch (yytype)
00750 {
00751 default:
00752 break;
00753 }
00754 YYFPRINTF (yyoutput, ")");
00755 }
00756
00757 #endif
00758
00759
00760
00761
00762 #if defined (__STDC__) || defined (__cplusplus)
00763 static void
00764 yydestruct (int yytype, YYSTYPE *yyvaluep)
00765 #else
00766 static void
00767 yydestruct (yytype, yyvaluep)
00768 int yytype;
00769 YYSTYPE *yyvaluep;
00770 #endif
00771 {
00772
00773 (void) yyvaluep;
00774
00775 switch (yytype)
00776 {
00777
00778 default:
00779 break;
00780 }
00781 }
00782
00783
00784
00785
00786 #ifdef YYPARSE_PARAM
00787 # if defined (__STDC__) || defined (__cplusplus)
00788 int yyparse (void *YYPARSE_PARAM);
00789 # else
00790 int yyparse ();
00791 # endif
00792 #else
00793 #if defined (__STDC__) || defined (__cplusplus)
00794 int yyparse (void);
00795 #else
00796 int yyparse ();
00797 #endif
00798 #endif
00799
00800
00801
00802
00803
00804
00805
00806
00807
00808
00809 #ifdef YYPARSE_PARAM
00810 # if defined (__STDC__) || defined (__cplusplus)
00811 int yyparse (void *YYPARSE_PARAM)
00812 # else
00813 int yyparse (YYPARSE_PARAM)
00814 void *YYPARSE_PARAM;
00815 # endif
00816 #else
00817 #if defined (__STDC__) || defined (__cplusplus)
00818 int
00819 yyparse (void)
00820 #else
00821 int
00822 yyparse ()
00823
00824 #endif
00825 #endif
00826 {
00827
00828 int yychar;
00829
00830
00831 YYSTYPE yylval;
00832
00833
00834 int yynerrs;
00835
00836 register int yystate;
00837 register int yyn;
00838 int yyresult;
00839
00840 int yyerrstatus;
00841
00842 int yytoken = 0;
00843
00844
00845
00846
00847
00848
00849
00850
00851
00852
00853 short yyssa[YYINITDEPTH];
00854 short *yyss = yyssa;
00855 register short *yyssp;
00856
00857
00858 YYSTYPE yyvsa[YYINITDEPTH];
00859 YYSTYPE *yyvs = yyvsa;
00860 register YYSTYPE *yyvsp;
00861
00862
00863
00864 #define YYPOPSTACK (yyvsp--, yyssp--)
00865
00866 YYSIZE_T yystacksize = YYINITDEPTH;
00867
00868
00869
00870 YYSTYPE yyval;
00871
00872
00873
00874
00875 int yylen;
00876
00877 YYDPRINTF ((stderr, "Starting parse\n"));
00878
00879 yystate = 0;
00880 yyerrstatus = 0;
00881 yynerrs = 0;
00882 yychar = YYEMPTY;
00883
00884
00885
00886
00887
00888
00889 yyssp = yyss;
00890 yyvsp = yyvs;
00891
00892 goto yysetstate;
00893
00894
00895
00896
00897 yynewstate:
00898
00899
00900
00901 yyssp++;
00902
00903 yysetstate:
00904 *yyssp = yystate;
00905
00906 if (yyss + yystacksize - 1 <= yyssp)
00907 {
00908
00909 YYSIZE_T yysize = yyssp - yyss + 1;
00910
00911 #ifdef yyoverflow
00912 {
00913
00914
00915
00916 YYSTYPE *yyvs1 = yyvs;
00917 short *yyss1 = yyss;
00918
00919
00920
00921
00922
00923
00924 yyoverflow ("parser stack overflow",
00925 &yyss1, yysize * sizeof (*yyssp),
00926 &yyvs1, yysize * sizeof (*yyvsp),
00927
00928 &yystacksize);
00929
00930 yyss = yyss1;
00931 yyvs = yyvs1;
00932 }
00933 #else
00934 # ifndef YYSTACK_RELOCATE
00935 goto yyoverflowlab;
00936 # else
00937
00938 if (YYMAXDEPTH <= yystacksize)
00939 goto yyoverflowlab;
00940 yystacksize *= 2;
00941 if (YYMAXDEPTH < yystacksize)
00942 yystacksize = YYMAXDEPTH;
00943
00944 {
00945 short *yyss1 = yyss;
00946 union yyalloc *yyptr =
00947 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
00948 if (! yyptr)
00949 goto yyoverflowlab;
00950 YYSTACK_RELOCATE (yyss);
00951 YYSTACK_RELOCATE (yyvs);
00952
00953 # undef YYSTACK_RELOCATE
00954 if (yyss1 != yyssa)
00955 YYSTACK_FREE (yyss1);
00956 }
00957 # endif
00958 #endif
00959
00960 yyssp = yyss + yysize - 1;
00961 yyvsp = yyvs + yysize - 1;
00962
00963
00964 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
00965 (unsigned long int) yystacksize));
00966
00967 if (yyss + yystacksize - 1 <= yyssp)
00968 YYABORT;
00969 }
00970
00971 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
00972
00973 goto yybackup;
00974
00975
00976
00977
00978 yybackup:
00979
00980
00981
00982
00983
00984
00985
00986 yyn = yypact[yystate];
00987 if (yyn == YYPACT_NINF)
00988 goto yydefault;
00989
00990
00991
00992
00993 if (yychar == YYEMPTY)
00994 {
00995 YYDPRINTF ((stderr, "Reading a token: "));
00996 yychar = YYLEX;
00997 }
00998
00999 if (yychar <= YYEOF)
01000 {
01001 yychar = yytoken = YYEOF;
01002 YYDPRINTF ((stderr, "Now at end of input.\n"));
01003 }
01004 else
01005 {
01006 yytoken = YYTRANSLATE (yychar);
01007 YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
01008 }
01009
01010
01011
01012 yyn += yytoken;
01013 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
01014 goto yydefault;
01015 yyn = yytable[yyn];
01016 if (yyn <= 0)
01017 {
01018 if (yyn == 0 || yyn == YYTABLE_NINF)
01019 goto yyerrlab;
01020 yyn = -yyn;
01021 goto yyreduce;
01022 }
01023
01024 if (yyn == YYFINAL)
01025 YYACCEPT;
01026
01027
01028 YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
01029
01030
01031 if (yychar != YYEOF)
01032 yychar = YYEMPTY;
01033
01034 *++yyvsp = yylval;
01035
01036
01037
01038
01039 if (yyerrstatus)
01040 yyerrstatus--;
01041
01042 yystate = yyn;
01043 goto yynewstate;
01044
01045
01046
01047
01048
01049 yydefault:
01050 yyn = yydefact[yystate];
01051 if (yyn == 0)
01052 goto yyerrlab;
01053 goto yyreduce;
01054
01055
01056
01057
01058
01059 yyreduce:
01060
01061 yylen = yyr2[yyn];
01062
01063
01064
01065
01066
01067
01068
01069
01070
01071 yyval = yyvsp[1-yylen];
01072
01073
01074 YY_REDUCE_PRINT (yyn);
01075 switch (yyn)
01076 {
01077 case 2:
01078 #line 57 "parsemessage_parser.yy"
01079 { ((parse_state_t*)extra)->done=1; }
01080 break;
01081
01082 case 3:
01083 #line 58 "parsemessage_parser.yy"
01084 { ((parse_state_t*)extra)->done=1; }
01085 break;
01086
01087 case 9:
01088 #line 70 "parsemessage_parser.yy"
01089 {
01090 string astr(yyvsp[-4]);
01091 if(astr == "name") {
01092 ((parse_state_t*)extra)->m->setName(yyvsp[-1]);
01093 } else if(astr == "length") {
01094 ((parse_state_t*)extra)->expected_length = abs(atoi(yyvsp[-1]));
01095 }
01096 free(yyvsp[-4]);
01097 free(yyvsp[-1]);
01098 }
01099 break;
01100
01101 case 15:
01102 #line 91 "parsemessage_parser.yy"
01103 {
01104 pREF(VOS::Message*, m, new VOS::Message(),
01105 ((parse_state_t*)extra)->m->insertMessage(-1, m);
01106 m->setType(yyvsp[0]);
01107 );
01108 free(yyvsp[0]);
01109 }
01110 break;
01111
01112 case 18:
01113 #line 105 "parsemessage_parser.yy"
01114 {
01115 free(yyvsp[-1]);
01116 }
01117 break;
01118
01119 case 21:
01120 #line 114 "parsemessage_parser.yy"
01121 {
01122 string astr(yyvsp[-4]);
01123 if(astr == "to") {
01124 pREF(VOS::Message*, m, ((parse_state_t*)extra)->m->lastMessage(), m->setTo(yyvsp[-1]));
01125 } else if(astr == "from") {
01126 pREF(VOS::Message*, m, ((parse_state_t*)extra)->m->lastMessage(), m->setFrom(yyvsp[-1]));
01127 } else if(astr == "method") {
01128 pREF(VOS::Message*, m, ((parse_state_t*)extra)->m->lastMessage(), m->setMethod(yyvsp[-1]));
01129 } else if(astr == "nonce") {
01130 pREF(VOS::Message*, m, ((parse_state_t*)extra)->m->lastMessage(), m->setNonce(yyvsp[-1]));
01131 } else if(astr == "length") {
01132 if(((parse_state_t*)extra)->expected_length == 0)
01133 ((parse_state_t*)extra)->expected_length = abs(atoi(yyvsp[-1]));
01134 } else if(astr == "time") {
01135 float x;
01136 sscanf(yyvsp[-1], "%f", &x);
01137 pREF(VOS::Message*, m, ((parse_state_t*)extra)->m->lastMessage(), m->setTime(x));
01138 } else if(astr == "depends") {
01139 pREF(VOS::Message*, m, ((parse_state_t*)extra)->m->lastMessage(), m->setDependency(yyvsp[-1]));
01140 }
01141 free(yyvsp[-4]);
01142 free(yyvsp[-1]);
01143 }
01144 break;
01145
01146 case 30:
01147 #line 144 "parsemessage_parser.yy"
01148 {
01149 free(yyvsp[-1]);
01150 }
01151 break;
01152
01153 case 33:
01154 #line 152 "parsemessage_parser.yy"
01155 {
01156 if(strcmp(yyvsp[-6], yyvsp[-1])==0) {
01157 pREF(VOS::Message*, m, ((parse_state_t*)extra)->m->lastMessage(), m->insertField(-1, yyvsp[-6], yyvsp[-4]));
01158 }
01159 free(yyvsp[-6]);
01160 free(yyvsp[-4]);
01161 free(yyvsp[-1]);
01162 }
01163 break;
01164
01165 case 35:
01166 #line 160 "parsemessage_parser.yy"
01167 {
01168 free(yyvsp[-5]);
01169 free(yyvsp[-1]);
01170 if(strcmp(yyvsp[-5], yyvsp[-1])==0) {
01171 pREF(VOS::Message*, m, ((parse_state_t*)extra)->m->lastMessage(), m->insertField(-1, yyvsp[-5], ""));
01172 }
01173 }
01174 break;
01175
01176 case 36:
01177 #line 166 "parsemessage_parser.yy"
01178 {
01179 pREF(VOS::Message*, m, ((parse_state_t*)extra)->m->lastMessage(), m->insertField(-1, yyvsp[-3], ""));
01180 free(yyvsp[-3]);
01181 }
01182 break;
01183
01184 case 37:
01185 #line 172 "parsemessage_parser.yy"
01186 {
01187 string astr(yyvsp[-6]);
01188
01189 if(astr == "length") {
01190 pREF(VOS::Message*, m, ((parse_state_t*)extra)->m->lastMessage(),
01191 m->insertField(-1, yyvsp[-8], "");
01192 ((parse_state_t*)extra)->read_quoted = abs(atoi(yyvsp[-3]));
01193 );
01194 }
01195 free(yyvsp[-8]);
01196 free(yyvsp[-6]);
01197 free(yyvsp[-3]);
01198 }
01199 break;
01200
01201 case 38:
01202 #line 187 "parsemessage_parser.yy"
01203 {
01204 ((parse_state_t*)extra)->read_quoted = 0;
01205 }
01206 break;
01207
01208
01209 }
01210
01211
01212 #line 1213 "parsemessage_parser.cc"
01213
01214 yyvsp -= yylen;
01215 yyssp -= yylen;
01216
01217
01218 YY_STACK_PRINT (yyss, yyssp);
01219
01220 *++yyvsp = yyval;
01221
01222
01223
01224
01225
01226
01227 yyn = yyr1[yyn];
01228
01229 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
01230 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
01231 yystate = yytable[yystate];
01232 else
01233 yystate = yydefgoto[yyn - YYNTOKENS];
01234
01235 goto yynewstate;
01236
01237
01238
01239
01240
01241 yyerrlab:
01242
01243 if (!yyerrstatus)
01244 {
01245 ++yynerrs;
01246 #if YYERROR_VERBOSE
01247 yyn = yypact[yystate];
01248
01249 if (YYPACT_NINF < yyn && yyn < YYLAST)
01250 {
01251 YYSIZE_T yysize = 0;
01252 int yytype = YYTRANSLATE (yychar);
01253 char *yymsg;
01254 int yyx, yycount;
01255
01256 yycount = 0;
01257
01258
01259 for (yyx = yyn < 0 ? -yyn : 0;
01260 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
01261 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
01262 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
01263 yysize += yystrlen ("syntax error, unexpected ") + 1;
01264 yysize += yystrlen (yytname[yytype]);
01265 yymsg = (char *) YYSTACK_ALLOC (yysize);
01266 if (yymsg != 0)
01267 {
01268 char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
01269 yyp = yystpcpy (yyp, yytname[yytype]);
01270
01271 if (yycount < 5)
01272 {
01273 yycount = 0;
01274 for (yyx = yyn < 0 ? -yyn : 0;
01275 yyx < (int) (sizeof (yytname) / sizeof (char *));
01276 yyx++)
01277 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
01278 {
01279 const char *yyq = ! yycount ? ", expecting " : " or ";
01280 yyp = yystpcpy (yyp, yyq);
01281 yyp = yystpcpy (yyp, yytname[yyx]);
01282 yycount++;
01283 }
01284 }
01285 yyerror (yymsg);
01286 YYSTACK_FREE (yymsg);
01287 }
01288 else
01289 yyerror ("syntax error; also virtual memory exhausted");
01290 }
01291 else
01292 #endif
01293 yyerror ("syntax error");
01294 }
01295
01296
01297
01298 if (yyerrstatus == 3)
01299 {
01300
01301
01302
01303
01304 if (yychar == YYEOF)
01305 {
01306
01307 YYPOPSTACK;
01308
01309 while (yyss < yyssp)
01310 {
01311 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
01312 yydestruct (yystos[*yyssp], yyvsp);
01313 YYPOPSTACK;
01314 }
01315 YYABORT;
01316 }
01317
01318 YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
01319 yydestruct (yytoken, &yylval);
01320 yychar = YYEMPTY;
01321
01322 }
01323
01324
01325
01326 goto yyerrlab1;
01327
01328
01329
01330
01331
01332 yyerrlab1:
01333 yyerrstatus = 3;
01334
01335 for (;;)
01336 {
01337 yyn = yypact[yystate];
01338 if (yyn != YYPACT_NINF)
01339 {
01340 yyn += YYTERROR;
01341 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
01342 {
01343 yyn = yytable[yyn];
01344 if (0 < yyn)
01345 break;
01346 }
01347 }
01348
01349
01350 if (yyssp == yyss)
01351 YYABORT;
01352
01353 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
01354 yydestruct (yystos[yystate], yyvsp);
01355 yyvsp--;
01356 yystate = *--yyssp;
01357
01358 YY_STACK_PRINT (yyss, yyssp);
01359 }
01360
01361 if (yyn == YYFINAL)
01362 YYACCEPT;
01363
01364 YYDPRINTF ((stderr, "Shifting error token, "));
01365
01366 *++yyvsp = yylval;
01367
01368
01369 yystate = yyn;
01370 goto yynewstate;
01371
01372
01373
01374
01375
01376 yyacceptlab:
01377 yyresult = 0;
01378 goto yyreturn;
01379
01380
01381
01382
01383 yyabortlab:
01384 yyresult = 1;
01385 goto yyreturn;
01386
01387 #ifndef yyoverflow
01388
01389
01390
01391 yyoverflowlab:
01392 yyerror ("parser stack overflow");
01393 yyresult = 2;
01394
01395 #endif
01396
01397 yyreturn:
01398 #ifndef yyoverflow
01399 if (yyss != yyssa)
01400 YYSTACK_FREE (yyss);
01401 #endif
01402 return yyresult;
01403 }
01404
01405
01406