/* A Bison parser, made from ..\..\..\src\cfg.y with Bison version 1.24 */ #define YYBISON 1 /* Identify Bison output. */ #define _LOGFILE 258 #define _LOGLEVEL 259 #define _NODELIST 260 #define _INDEXFILE 261 #define _NODELISTPATH 262 #define _ADDRESS 263 #define _SYSOPNAME 264 #define _USEOWNZONE 265 #define _FORCEINTL 266 #define _LOOPSTR 267 #define _SCANDIR 268 #define _MASK 269 #define _SMASK 270 #define _PMASK 271 #define _BODYMASK 272 #define _SBODYMASK 273 #define _PBODYMASK 274 #define _KLUDGEMASK 275 #define _SKLUDGEMASK 276 #define _PKLUDGEMASK 277 #define _ACTION 278 #define _MAXAGE 279 #define _BADMESSAGES 280 #define _NOLOGIGNORE 281 #define _AKA 282 #define _SKIPHIDDENFILES 283 #define _FILEINBOUND 284 #define _OUTBOUND 285 #define _ADDTONULLPKT 286 #define _TEMPMAIL 287 #define _TRAFFICLOG 288 #define _PASSWORD 289 #define _UTC 290 #define _ORIGIN 291 #define _TEARLINE 292 #define _INCLUDE 293 #define _APKTDIR 294 #define _CHECKPOINTS 295 #define _SETVIAALWAYS 296 #define _FRESH 297 #define _CREATEMISSINGBASE 298 #define _USENEWVIA 299 #define _SCRIPTMASK 300 #define _SSCRIPTMASK 301 #define _PSCRIPTMASK 302 #define _MAXATTACHSIZE 303 #define _SEMAPHORE 304 #define _SCRIPTFILE 305 #define _USEASO 306 #define _KILLROUTEDMESSAGE 307 #define _IGNOREBSY 308 #define _AFTERSCRIPT 309 #define _BEFORESCRIPT 310 #define _MAXNODELISTAGE 311 #define _SOFTCHECKINNODELIST 312 #define _TIMESTAMPFILE 313 #define _TRAFFICLOGTEMPLATE 314 #define _STRIPPATHINPKT 315 #define _CRLF 316 #define _SKIP 317 #define _DELETE 318 #define _EXIT 319 #define _MOVE 320 #define __EOF 321 #define _STRING 322 #define _BEFOREROUTE 323 #define _AFTERROUTE 324 #define _DIGIT_ 325 #define _RENUMBER 326 #define _UNPACK 327 #define _DAILY 328 #define _WEEKLY 329 #define _FLAG 330 #define _NEVER 331 #define _HARD 332 #define _SOFT 333 #define _ALWAYS 334 #define _ADDNOTE 335 #define _COPY 336 #define _REWRITE 337 #define _IGNORE 338 #define _DISPLAY 339 #define _DELFILE 340 #define _NEWMSG 341 #define _WRITEFILE 342 #define _APPENDTOFILE 343 #define _CALL 344 #define _ROUTE 345 #define _POLL 346 #define _DELETEATTACH 347 #define _CHANGEPATH 348 #define _MOVEATTACH 349 #define _ASCRIPT 350 #define _COPYATTACH 351 #define _SPLIT 352 #define _RECODE 353 #define _HOLD 354 #define _CRASH 355 #define _DIRECT 356 #define _NORMAL 357 #define LEXERR 358 #define YYDEBUG 0 /* #define YYERROR_VERBOSE */ #include #ifdef __WATCOMC__ #include #endif #include "msg.hpp" #include "outbound.hpp" #include "fidoaddr.h" #include "vars.hpp" #include "configure.hpp" #include "constant.hpp" #include "log.hpp" #include "aka.hpp" #include "age.hpp" #include "scandir.hpp" #include "attach.hpp" #include "badmsg.hpp" #include "passwd.hpp" #include "nodelist.hpp" #include "script.hpp" #undef YYSTYPE /* Perl also use bison? damn! */ extern int DetectError; extern int NoTokensF; extern FA cffa; extern FA cffa1; extern FA cffa2; static int brf = FALSE, arf = FALSE, renumberf = FALSE, unpackf = FALSE, freshf = FALSE; static ScanDir *wsd = NULL; static char *FileName = NULL; static char *ScriptBefore = NULL; static char *ScriptAfter = NULL; static tTimes *tt; static IndBiList *_TTimes; static MSGBASE *mbase; static Mask *msk = NULL; static int MaskMode; static int rc; static int FlagMode = 0; static Action *act = NULL; static void CheckETTime(void) { time_t tmt; if (tt->_ETime != 0 && tt->_ETime < tt->_STime) { tmt = tt->_ETime; tt->_ETime = (23*60*60)+(59*60)+59; tt->_ETime += TimeOfBeginOfDay(-1); _TTimes->AddToEnd(tt); tt = new tTimes; tt->_STime = TimeOfBeginOfDay(-1); tt->_ETime = tmt; } } static int PrepareMask(Mask &m) { ScanDir *sd; char ErrMess[128]; CHP = 23700; sd = ScanDirs.GetLast(); if (sd == NULL) { strcpy(ErrMess,"'"); strcat(ErrMess,m.MaskName()); strcat(ErrMess,":' without 'ScanDir:'"); yyerror(ErrMess); return -1; } m.sd = sd; return 0; } static void AddReadyMask(Mask &m) { ScanDir *sd; switch (PrevMask) { case 0: // first mask. case 1: // after action. LastDo = new DoList(); sd = ScanDirs.GetLast(); sd->_DoLists.AddToEnd(LastDo); PrevMask = 2; break; case 2: // after MASK. break; } LastDo->AddMask(m); } static int CheckMaskMode(char *f) { char Buff[128]; if (MaskMode != 0) { strcpy(Buff,"You can use '"); strcat(Buff,f); strcat(Buff,"' flag only in 'Mask:'."); yyerror(Buff); return -1; } return 0; } static int ctoi(char *s) { char *foo; int res = 0; res = strtoul(s, &foo, 0); if (*foo) /* parse error */ return 0; return res; } typedef union { int in; char *ch; long ln; KillModeT kmode; CheckPointsT pmode; tBadMsgMode bmode; time_t t; PKTMode pktmode; } YYSTYPE; #ifndef YYLTYPE typedef struct yyltype { int timestamp; int first_line; int first_column; int last_line; int last_column; char *text; } yyltype; #define YYLTYPE yyltype #endif #include #ifndef __cplusplus #ifndef __STDC__ #define const #endif #endif #define YYFINAL 457 #define YYFLAG -32768 #define YYNTBASE 150 #define YYTRANSLATE(x) ((unsigned)(x) <= 358 ? yytranslate[x] : 284) static const short yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 113, 2, 143, 110, 112, 148, 2, 2, 2, 111, 104, 2, 105, 106, 149, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 109, 2, 2, 2, 2, 2, 147, 115, 2, 2, 146, 120, 2, 2, 144, 2, 2, 2, 128, 2, 2, 2, 108, 2, 2, 135, 2, 145, 2, 2, 2, 2, 2, 141, 2, 142, 2, 2, 2, 114, 116, 117, 118, 119, 121, 122, 123, 124, 125, 126, 127, 129, 130, 131, 107, 132, 133, 134, 136, 137, 138, 2, 139, 140, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, 0, 1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49, 52, 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, 85, 88, 91, 94, 97, 100, 103, 106, 109, 112, 115, 118, 121, 124, 127, 130, 133, 136, 139, 142, 145, 148, 151, 154, 157, 160, 163, 166, 169, 170, 174, 176, 179, 182, 186, 189, 190, 191, 197, 200, 203, 204, 208, 211, 213, 215, 217, 220, 222, 224, 226, 229, 232, 235, 238, 241, 245, 246, 248, 251, 254, 257, 260, 263, 266, 269, 272, 275, 278, 279, 284, 287, 289, 291, 293, 296, 299, 301, 304, 307, 308, 312, 315, 316, 321, 323, 325, 326, 329, 331, 334, 337, 339, 341, 343, 344, 348, 349, 353, 354, 357, 359, 363, 367, 369, 371, 372, 377, 378, 381, 383, 387, 388, 390, 391, 395, 396, 400, 401, 405, 406, 407, 408, 409, 410, 411, 424, 426, 428, 430, 432, 434, 436, 439, 441, 442, 444, 446, 447, 450, 452, 455, 457, 458, 462, 463, 467, 469, 471, 473, 475, 477, 479, 481, 483, 485, 487, 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, 509, 511, 513, 515, 517, 519, 521, 523, 525, 528, 531, 534, 535, 540, 543, 546, 549, 550, 555, 558, 561, 564, 565, 568, 569, 570, 576, 577, 581, 583, 585, 587, 589, 591, 593, 595, 597, 599, 601, 603, 605, 607, 609, 611, 613, 615, 617, 619, 621, 623, 625, 628, 631, 634, 635, 639, 642, 645, 647, 650, 653, 654, 660, 664, 668, 673, 676, 677, 682, 684, 686, 688, 690, 691, 696, 699, 702, 705, 708, 711, 713, 716, 718, 720, 722, 724, 726, 728, 730, 732, 734, 736, 738, 742, 746, 748, 750, 756, 758 }; static const short yyrhs[] = { -1, 150, 151, 0, 248, 61, 0, 156, 61, 0, 160, 61, 0, 162, 61, 0, 31, 61, 0, 157, 61, 0, 161, 61, 0, 238, 61, 0, 239, 61, 0, 240, 61, 0, 164, 61, 0, 43, 61, 0, 183, 61, 0, 11, 61, 0, 172, 61, 0, 176, 61, 0, 166, 61, 0, 233, 61, 0, 234, 61, 0, 235, 61, 0, 170, 61, 0, 171, 61, 0, 177, 61, 0, 209, 61, 0, 211, 61, 0, 213, 61, 0, 184, 61, 0, 178, 61, 0, 179, 61, 0, 173, 61, 0, 175, 61, 0, 26, 61, 0, 180, 61, 0, 185, 61, 0, 243, 61, 0, 244, 61, 0, 245, 61, 0, 53, 61, 0, 41, 61, 0, 28, 61, 0, 57, 61, 0, 168, 61, 0, 169, 61, 0, 44, 61, 0, 10, 61, 0, 51, 61, 0, 60, 61, 0, 189, 61, 0, 181, 61, 0, 182, 61, 0, 187, 61, 0, 191, 61, 0, 155, 61, 0, 154, 61, 0, 153, 61, 0, 0, 1, 61, 152, 0, 61, 0, 50, 67, 0, 59, 67, 0, 49, 70, 67, 0, 38, 67, 0, 0, 0, 27, 158, 278, 159, 278, 0, 58, 67, 0, 39, 67, 0, 0, 8, 163, 278, 0, 40, 165, 0, 76, 0, 77, 0, 78, 0, 52, 167, 0, 79, 0, 76, 0, 75, 0, 9, 67, 0, 37, 67, 0, 3, 67, 0, 4, 70, 0, 36, 67, 0, 5, 67, 174, 0, 0, 70, 0, 7, 67, 0, 6, 67, 0, 12, 67, 0, 48, 70, 0, 56, 70, 0, 30, 67, 0, 32, 67, 0, 33, 67, 0, 29, 67, 0, 24, 70, 0, 0, 34, 67, 186, 278, 0, 25, 188, 0, 62, 0, 64, 0, 63, 0, 65, 67, 0, 35, 190, 0, 70, 0, 104, 70, 0, 105, 70, 0, 0, 13, 192, 193, 0, 195, 208, 0, 0, 67, 194, 196, 208, 0, 68, 0, 69, 0, 0, 196, 197, 0, 71, 0, 55, 67, 0, 54, 67, 0, 42, 0, 72, 0, 198, 0, 0, 73, 199, 201, 0, 0, 74, 200, 206, 0, 0, 201, 202, 0, 204, 0, 204, 105, 204, 0, 203, 106, 204, 0, 107, 0, 108, 0, 0, 70, 205, 109, 70, 0, 0, 206, 207, 0, 70, 0, 70, 105, 70, 0, 0, 261, 0, 0, 14, 210, 215, 0, 0, 15, 212, 215, 0, 0, 16, 214, 215, 0, 0, 0, 0, 0, 0, 0, 216, 222, 217, 278, 218, 222, 219, 278, 220, 223, 221, 226, 0, 67, 0, 110, 0, 111, 0, 112, 0, 67, 0, 111, 0, 225, 70, 0, 111, 0, 0, 113, 0, 111, 0, 0, 227, 228, 0, 229, 0, 228, 229, 0, 232, 0, 0, 104, 230, 232, 0, 0, 105, 231, 232, 0, 114, 0, 115, 0, 116, 0, 117, 0, 118, 0, 119, 0, 120, 0, 121, 0, 122, 0, 123, 0, 124, 0, 125, 0, 126, 0, 127, 0, 128, 0, 129, 0, 130, 0, 131, 0, 107, 0, 132, 0, 133, 0, 134, 0, 135, 0, 136, 0, 137, 0, 138, 0, 139, 0, 140, 0, 70, 0, 20, 236, 0, 21, 236, 0, 22, 236, 0, 0, 237, 223, 223, 224, 0, 17, 241, 0, 18, 241, 0, 19, 241, 0, 0, 242, 223, 224, 224, 0, 45, 246, 0, 46, 246, 0, 47, 246, 0, 0, 247, 67, 0, 0, 0, 23, 249, 252, 250, 251, 0, 0, 141, 198, 142, 0, 253, 0, 63, 0, 254, 0, 255, 0, 256, 0, 83, 0, 258, 0, 260, 0, 262, 0, 263, 0, 265, 0, 266, 0, 267, 0, 268, 0, 271, 0, 92, 0, 273, 0, 274, 0, 275, 0, 276, 0, 277, 0, 259, 0, 80, 67, 0, 65, 67, 0, 81, 67, 0, 0, 82, 257, 215, 0, 84, 67, 0, 95, 67, 0, 261, 0, 75, 67, 0, 85, 67, 0, 0, 86, 264, 67, 67, 215, 0, 87, 67, 67, 0, 88, 67, 67, 0, 89, 67, 67, 67, 0, 89, 67, 0, 0, 90, 270, 269, 278, 0, 99, 0, 100, 0, 101, 0, 102, 0, 0, 91, 270, 272, 278, 0, 93, 67, 0, 94, 67, 0, 96, 67, 0, 97, 70, 0, 98, 67, 0, 279, 0, 113, 279, 0, 282, 0, 280, 0, 111, 0, 143, 0, 144, 0, 145, 0, 146, 0, 108, 0, 147, 0, 110, 0, 112, 0, 112, 106, 70, 0, 282, 106, 281, 0, 283, 0, 148, 0, 283, 109, 283, 149, 283, 0, 70, 0, 111, 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, 171, 172, 176, 177, 182, 183, 184, 190, 191, 192, 193, 194, 195, 196, 202, 203, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 232, 233, 234, 235, 236, 237, 243, 249, 255, 261, 262, 263, 269, 275, 281, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 298, 304, 311, 318, 326, 329, 329, 330, 339, 347, 355, 356, 364, 367, 368, 369, 372, 375, 376, 377, 380, 388, 396, 404, 412, 420, 428, 429, 432, 440, 448, 456, 464, 472, 480, 488, 496, 504, 513, 522, 530, 538, 539, 540, 541, 544, 552, 553, 554, 559, 576, 590, 591, 608, 611, 612, 615, 616, 619, 628, 636, 644, 653, 666, 676, 683, 689, 696, 704, 705, 715, 719, 724, 745, 746, 749, 758, 771, 772, 780, 789, 801, 802, 807, 807, 813, 813, 819, 819, 825, 833, 837, 849, 853, 873, 877, 882, 883, 884, 885, 888, 889, 892, 899, 902, 903, 906, 907, 908, 909, 910, 913, 914, 915, 915, 916, 918, 919, 929, 930, 931, 932, 938, 944, 945, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 978, 979, 994, 1000, 1006, 1012, 1020, 1029, 1035, 1041, 1047, 1055, 1065, 1071, 1077, 1083, 1091, 1102, 1115, 1119, 1121, 1122, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1149, 1162, 1183, 1204, 1208, 1213, 1219, 1229, 1235, 1238, 1244, 1248, 1285, 1299, 1313, 1326, 1332, 1332, 1350, 1351, 1352, 1353, 1356, 1356, 1370, 1380, 1394, 1404, 1414, 1466, 1467, 1470, 1471, 1472, 1479, 1486, 1493, 1500, 1507, 1514, 1521, 1528, 1535, 1548, 1551, 1552, 1555, 1564, 1565 }; static const char * const yytname[] = { "$","error","$undefined.","_LOGFILE", "_LOGLEVEL","_NODELIST","_INDEXFILE","_NODELISTPATH","_ADDRESS","_SYSOPNAME", "_USEOWNZONE","_FORCEINTL","_LOOPSTR","_SCANDIR","_MASK","_SMASK","_PMASK","_BODYMASK", "_SBODYMASK","_PBODYMASK","_KLUDGEMASK","_SKLUDGEMASK","_PKLUDGEMASK","_ACTION", "_MAXAGE","_BADMESSAGES","_NOLOGIGNORE","_AKA","_SKIPHIDDENFILES","_FILEINBOUND", "_OUTBOUND","_ADDTONULLPKT","_TEMPMAIL","_TRAFFICLOG","_PASSWORD","_UTC","_ORIGIN", "_TEARLINE","_INCLUDE","_APKTDIR","_CHECKPOINTS","_SETVIAALWAYS","_FRESH","_CREATEMISSINGBASE", "_USENEWVIA","_SCRIPTMASK","_SSCRIPTMASK","_PSCRIPTMASK","_MAXATTACHSIZE","_SEMAPHORE", "_SCRIPTFILE","_USEASO","_KILLROUTEDMESSAGE","_IGNOREBSY","_AFTERSCRIPT","_BEFORESCRIPT", "_MAXNODELISTAGE","_SOFTCHECKINNODELIST","_TIMESTAMPFILE","_TRAFFICLOGTEMPLATE", "_STRIPPATHINPKT","_CRLF","_SKIP","_DELETE","_EXIT","_MOVE","__EOF","_STRING", "_BEFOREROUTE","_AFTERROUTE","_DIGIT_","_RENUMBER","_UNPACK","_DAILY","_WEEKLY", "_FLAG","_NEVER","_HARD","_SOFT","_ALWAYS","_ADDNOTE","_COPY","_REWRITE","_IGNORE", "_DISPLAY","_DELFILE","_NEWMSG","_WRITEFILE","_APPENDTOFILE","_CALL","_ROUTE", "_POLL","_DELETEATTACH","_CHANGEPATH","_MOVEATTACH","_ASCRIPT","_COPYATTACH", "_SPLIT","_RECODE","_HOLD","_CRASH","_DIRECT","_NORMAL","LEXERR","'+'","'-'", "'.'","'p'","'P'","':'","'$'","'*'","'%'","'!'","'a'","'A'","'b'","'c'","'d'", "'e'","'E'","'f'","'g'","'h'","'i'","'j'","'k'","'l'","'L'","'m'","'n'","'o'", "'q'","'r'","'s'","'S'","'t'","'u'","'v'","'x'","'y'","'['","']'","'#'","'H'", "'U'","'D'","'@'","'&'","'/'","Conf","ConfLine","@1","ScriptFile","TrafficLogTemplate", "Semaphore","IncludeF","Aka","@2","@3","TimeStampFile","APktDir","Address","@4", "CheckPoints","ChkPntMode","KillRoutedMessage","KillRMode","SysopName","TearLine", "LogFile","LogLevel","Origin","Nodelist","NdlZone","NodelistPath","IndexFile", "LoopStr","MaxAttachSize","MaxNodelistAge","Outbound","TempMail","TrafficLog", "FileInbound","MaxAge","Password","@5","BadMessages","BadMsgMode","Utc","UtcOffs", "ScanDir","@6","SDType","@7","BeforeAfter","AddSdParam","SdParam","STime","@8", "@9","DaySTime","DaySSTime","AnyP","Time","@10","WeekSTime","WeekSSTime","Flag", "Mask","@11","SMask","@12","PMask","@13","MParam","@14","@15","@16","@17","@18", "@19","SyName","MString","MDigit","MNot","MsgAttr","@20","MsgFAttr","FlagsMode", "@21","@22","FlagsChar","KludgeMask","SKludgeMask","PKludgeMask","KMParam","@23", "BodyMask","SBodyMask","PBodyMask","BMParam","@24","ScriptMask","SScriptMask", "PScriptMask","SCRMParam","@25","Action","@26","@27","MayBeActTime","ActionCmd", "AAddNote","AMove","ACopy","ARewrite","@28","ADisplay","AScript","AAFlag","AFlag", "ADelFile","ANewMsg","@29","AWriteFile","AAppendToFile","ACall","ARoute","@30", "RouMode","APoll","@31","AChangePath","AMoveAttach","ACopyAttach","ASplit","ARecode", "faddress","FullFtnAddr","pointaddr","PntAddr","nodeaddr","dw","" }; #endif static const short yyr1[] = { 0, 150, 150, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 152, 151, 151, 153, 154, 155, 156, 158, 159, 157, 160, 161, 163, 162, 164, 165, 165, 165, 166, 167, 167, 167, 168, 169, 170, 171, 172, 173, 174, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 186, 185, 187, 188, 188, 188, 188, 189, 190, 190, 190, 192, 191, 193, 194, 193, 195, 195, 196, 196, 197, 197, 197, 197, 197, 197, 199, 198, 200, 198, 201, 201, 202, 202, 202, 203, 203, 205, 204, 206, 206, 207, 207, 208, 208, 210, 209, 212, 211, 214, 213, 216, 217, 218, 219, 220, 221, 215, 222, 222, 222, 222, 223, 223, 224, 224, 225, 225, 226, 227, 226, 228, 228, 229, 230, 229, 231, 229, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 233, 234, 235, 237, 236, 238, 239, 240, 242, 241, 243, 244, 245, 247, 246, 249, 250, 248, 251, 251, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 253, 254, 255, 257, 256, 258, 259, 260, 261, 262, 264, 263, 265, 266, 267, 267, 269, 268, 270, 270, 270, 270, 272, 271, 273, 274, 275, 276, 277, 278, 278, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 280, 281, 281, 282, 283, 283 }; static const short yyr2[] = { 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 3, 1, 2, 2, 3, 2, 0, 0, 5, 2, 2, 0, 3, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 3, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 4, 2, 1, 1, 1, 2, 2, 1, 2, 2, 0, 3, 2, 0, 4, 1, 1, 0, 2, 1, 2, 2, 1, 1, 1, 0, 3, 0, 3, 0, 2, 1, 3, 3, 1, 1, 0, 4, 0, 2, 1, 3, 0, 1, 0, 3, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 12, 1, 1, 1, 1, 1, 1, 2, 1, 0, 1, 1, 0, 2, 1, 2, 1, 0, 3, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 0, 4, 2, 2, 2, 0, 4, 2, 2, 2, 0, 2, 0, 0, 5, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 0, 3, 2, 2, 1, 2, 2, 0, 5, 3, 3, 4, 2, 0, 4, 1, 1, 1, 1, 0, 4, 2, 2, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 5, 1, 1 }; static const short yydefact[] = { 1, 0, 0, 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, 109, 143, 145, 147, 213, 213, 213, 208, 208, 208, 220, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 218, 218, 218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 82, 83, 86, 89, 88, 0, 80, 47, 16, 90, 0, 149, 149, 149, 210, 0, 211, 212, 205, 0, 206, 207, 0, 97, 101, 103, 102, 0, 100, 34, 0, 42, 96, 93, 7, 94, 95, 98, 106, 0, 0, 105, 84, 81, 64, 69, 73, 74, 75, 72, 41, 14, 46, 215, 0, 216, 217, 91, 0, 61, 48, 79, 78, 77, 76, 40, 92, 43, 68, 62, 49, 57, 56, 55, 4, 8, 5, 9, 6, 13, 19, 44, 45, 23, 24, 17, 32, 33, 18, 25, 30, 31, 35, 51, 52, 15, 29, 36, 53, 50, 54, 26, 27, 28, 20, 21, 22, 10, 11, 12, 37, 38, 39, 3, 59, 87, 85, 294, 285, 287, 280, 288, 0, 281, 282, 283, 284, 286, 71, 276, 279, 278, 0, 112, 114, 115, 110, 141, 144, 0, 146, 148, 160, 161, 164, 0, 226, 0, 0, 0, 0, 250, 230, 0, 0, 257, 0, 0, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 221, 225, 227, 228, 229, 231, 246, 232, 254, 233, 234, 235, 236, 237, 238, 239, 241, 242, 243, 244, 245, 104, 66, 0, 107, 108, 219, 63, 0, 277, 0, 0, 116, 111, 142, 156, 157, 158, 159, 150, 163, 165, 164, 0, 164, 248, 255, 247, 249, 149, 252, 256, 0, 0, 0, 262, 265, 266, 267, 268, 263, 269, 271, 272, 253, 273, 274, 275, 223, 0, 99, 289, 295, 292, 290, 291, 0, 141, 0, 214, 162, 209, 251, 0, 259, 260, 0, 0, 0, 0, 222, 67, 0, 121, 0, 0, 118, 122, 124, 126, 117, 123, 113, 151, 149, 261, 264, 270, 0, 293, 120, 119, 128, 137, 0, 258, 224, 125, 127, 152, 135, 133, 134, 129, 0, 130, 139, 138, 0, 0, 0, 0, 0, 153, 0, 132, 131, 140, 0, 136, 154, 167, 166, 155, 0, 204, 172, 174, 194, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 168, 169, 171, 0, 0, 170, 173, 175, 0, 0 }; static const short yydefgoto[] = { 1, 59, 218, 60, 61, 62, 63, 64, 134, 341, 65, 66, 67, 109, 68, 153, 69, 168, 70, 71, 72, 73, 74, 75, 220, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 295, 87, 132, 88, 145, 89, 114, 240, 304, 241, 349, 372, 373, 384, 385, 389, 395, 396, 397, 401, 390, 399, 305, 90, 115, 91, 116, 92, 117, 242, 243, 350, 386, 400, 410, 413, 311, 248, 314, 315, 415, 416, 448, 449, 451, 452, 450, 93, 94, 95, 122, 123, 96, 97, 98, 118, 119, 99, 100, 101, 157, 158, 102, 126, 340, 362, 272, 273, 274, 275, 276, 321, 277, 278, 279, 306, 281, 282, 324, 283, 284, 285, 286, 359, 332, 287, 360, 288, 289, 290, 291, 292, 232, 233, 234, 346, 235, 236 }; static const short yypact[] = {-32768, 285, -2, -1, 1, 5, 6, 7,-32768, 8, 15, 19, 12,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768, 11, -39, 38,-32768, 39, 34, 35, 42, 37, 40, 41, -63, 43, 44, 46, 47, -49, 48, 51, 55,-32768,-32768,-32768, 36, 49, 50, 57, -57, 59, 58, 60, 62, 63, 66,-32768,-32768, 70, 98, 99, 102, 103, 104, 105, 106, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 149, 151, 153, 154, 155, 157, 158, 159, 160, 161, 163, 164, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,-32768,-32768,-32768, 198,-32768,-32768, -60,-32768, -32768,-32768,-32768, -37,-32768,-32768,-32768,-32768, -56,-32768, -32768,-32768, -56,-32768,-32768, 148,-32768,-32768,-32768,-32768, 197,-32768,-32768, -60,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768, 199, 200,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768, 204,-32768,-32768, -32768, 205,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768, -41, 9, -54,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768, 152, -4,-32768,-32768,-32768,-32768, 184,-32768, -50,-32768,-32768,-32768,-32768, -78, -56,-32768, 206, 207, 208, 209,-32768,-32768, 210, 211,-32768, 212, 213, 214, -87, -87,-32768, 215, 216, 217, 260, 269, 273,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768, -60,-32768,-32768,-32768,-32768, 277, -32768, -66, -62,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768, -78, 278, -78,-32768,-32768,-32768,-32768, -32768,-32768,-32768, 282, 283, 284, 286,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 68, -60,-32768,-32768,-32768,-32768,-32768,-32768, 111, 23, -60, -32768,-32768,-32768,-32768, 287,-32768,-32768, 288, -60, -60, -53,-32768,-32768, -62,-32768, 289, 290,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 119, -32768,-32768,-32768,-32768,-32768, -50,-32768,-32768, -61, 291, -32768,-32768,-32768,-32768,-32768, 246, 253, 254,-32768, -60, 156, 292, 292, 293,-32768, 294,-32768,-32768,-32768, -56, -32768,-32768, 249,-32768,-32768, 18,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768, 18,-32768,-32768, 54, 54,-32768,-32768,-32768, 263,-32768 }; static const short yypgoto[] = {-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768, -95,-32768,-32768, -32768,-32768,-32768, -365,-32768,-32768,-32768, 16,-32768,-32768, -32768,-32768,-32768,-32768, -114,-32768,-32768,-32768,-32768,-32768, -32768, -20, -123, -280,-32768,-32768,-32768,-32768, -81,-32768, -32768, -412,-32768,-32768,-32768, 22,-32768,-32768,-32768,-32768, 45,-32768,-32768,-32768,-32768, 24,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 242,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 107, -32768,-32768,-32768,-32768,-32768,-32768,-32768, -133, 146,-32768, -32768,-32768, -297 }; #define YYLAST 372 static const short yytable[] = { 249, 294, 244, 245, 221, 347, 348, 142, 221, 392, 221, 246, 328, 329, 330, 331, 221, 307, 165, 166, 370, 371, 167, 128, 129, 130, 131, 150, 151, 152, 237, 238, 239, 312, 351, 313, 353, 407, 408, 454, 455, 143, 144, 124, 125, 344, 393, 394, 222, 344, 223, 224, 225, 226, 222, 247, 223, 224, 225, 103, 308, 309, 310, 120, 121, 365, 104, 381, -295, 159, 160, 105, 106, 107, 108, 110, 111, 366, 367, 113, 112, 127, 345, 227, 228, 229, 230, 231, 417, 227, 228, 229, 230, 231, 368, 369, 370, 371, 252, 133, 135, 136, 137, 138, 139, 303, 161, 140, 141, 154, 146, 147, 155, 148, 149, 300, 156, 163, 164, 162, 169, 171, 418, 419, 417, 420, 316, 174, 170, 172, 173, 175, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 176, 177, 420, 342, 178, 179, 180, 181, 182, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 354, 363, 361, 195, 250, 196, 251, 197, 198, 199, 375, 200, 201, 202, 203, 204, 252, 205, 206, 378, 379, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 302, 252, 364, 388, 387, 457, 293, 406, 380, 405, 219, 296, 297, 298, 299, 317, 318, 319, 320, 322, 323, 325, 326, 327, 334, 335, 336, 456, 2, 412, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 337, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 338, 339, 53, 54, 55, 56, 57, 58, 343, 352, 355, 356, 357, 402, 358, 376, 377, 382, 383, 403, 404, 414, 398, 392, 409, 411, 374, 391, 453, 280, 0, 0, 333, 301 }; static const short yycheck[] = { 123, 134, 116, 117, 70, 302, 303, 70, 70, 70, 70, 67, 99, 100, 101, 102, 70, 67, 75, 76, 73, 74, 79, 62, 63, 64, 65, 76, 77, 78, 67, 68, 69, 111, 314, 113, 316, 402, 403, 451, 452, 104, 105, 21, 22, 111, 107, 108, 108, 111, 110, 111, 112, 113, 108, 111, 110, 111, 112, 61, 110, 111, 112, 18, 19, 42, 67, 364, 109, 45, 46, 70, 67, 67, 67, 67, 61, 54, 55, 67, 61, 70, 148, 143, 144, 145, 146, 147, 70, 143, 144, 145, 146, 147, 71, 72, 73, 74, 75, 61, 61, 67, 67, 61, 67, 109, 70, 67, 67, 61, 67, 67, 61, 67, 67, 106, 61, 67, 61, 70, 61, 61, 104, 105, 70, 107, 249, 61, 70, 67, 67, 61, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 61, 61, 107, 295, 61, 61, 61, 61, 61, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 321, 341, 141, 61, 63, 61, 65, 61, 61, 61, 350, 61, 61, 61, 61, 61, 75, 61, 61, 359, 360, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 106, 75, 149, 142, 376, 0, 67, 109, 361, 400, 70, 70, 70, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 1, 410, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 67, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 70, 67, 56, 57, 58, 59, 60, 61, 70, 70, 67, 67, 67, 106, 67, 67, 67, 67, 67, 105, 105, 111, 70, 70, 70, 70, 349, 386, 448, 126, -1, -1, 264, 226 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 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 the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ #ifndef alloca #ifdef __GNUC__ #define alloca __builtin_alloca #else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) #include #else /* not sparc */ #if defined (MSDOS) && !defined (__TURBOC__) #include #else /* not MSDOS, or __TURBOC__ */ #if defined(_AIX) #include #pragma alloca #else /* not MSDOS, __TURBOC__, or _AIX */ #ifdef __hpux #ifdef __cplusplus extern "C" { void *alloca (unsigned int); }; #else /* not __cplusplus */ void *alloca (); #endif /* not __cplusplus */ #endif /* __hpux */ #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ #endif /* not sparc. */ #endif /* not GNU C. */ #endif /* alloca not defined. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ /* Note: there must be only one dollar sign in this file. It is replaced by the list of actions, each action as one case of the switch. */ #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT return(0) #define YYABORT return(1) #define YYERROR goto yyerrlab1 /* 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. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(token, value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { yychar = (token), yylval = (value); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { yyerror ("syntax error: cannot back up"); YYERROR; } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 #ifndef YYPURE #define YYLEX yylex() #endif #ifdef YYPURE #ifdef YYLSP_NEEDED #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) #else #define YYLEX yylex(&yylval, &yylloc) #endif #else /* not YYLSP_NEEDED */ #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, YYLEX_PARAM) #else #define YYLEX yylex(&yylval) #endif #endif /* not YYLSP_NEEDED */ #endif /* If nonreentrant, generate the variables here */ #ifndef YYPURE int yychar; /* the lookahead symbol */ YYSTYPE yylval; /* the semantic value of the */ /* lookahead symbol */ #ifdef YYLSP_NEEDED YYLTYPE yylloc; /* location data for the lookahead */ /* symbol */ #endif int yynerrs; /* number of parse errors so far */ #endif /* not YYPURE */ #if YYDEBUG != 0 int yydebug = 1; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif /* YYINITDEPTH indicates the initial size of the parser's stacks */ #ifndef YYINITDEPTH #define YYINITDEPTH 200 #endif /* YYMAXDEPTH is the maximum size the stacks can grow to (effective only if the built-in stack extension method is used). */ #if YYMAXDEPTH == 0 #undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH #define YYMAXDEPTH 10000 #endif /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ int yyparse (void); #endif #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (to, from, count) char *to; char *from; int count; { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #else /* __cplusplus */ /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (char *to, char *from, int count) { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. It should actually point to an object. Grammar actions can access the variable by casting it to the proper pointer type. */ #ifdef YYPARSE_PARAM #ifdef __cplusplus #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM #define YYPARSE_PARAM_DECL #else /* not __cplusplus */ #define YYPARSE_PARAM_ARG YYPARSE_PARAM #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; #endif /* not __cplusplus */ #else /* not YYPARSE_PARAM */ #define YYPARSE_PARAM_ARG #define YYPARSE_PARAM_DECL #endif /* not YYPARSE_PARAM */ int yyparse(YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { register int yystate; register int yyn; register short *yyssp; register YYSTYPE *yyvsp; int yyerrstatus; /* number of tokens to shift before error messages enabled */ int yychar1 = 0; /* lookahead token as an internal (translated) token number */ short yyssa[YYINITDEPTH]; /* the state stack */ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ short *yyss = yyssa; /* refer to the stacks thru separate pointers */ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ #ifdef YYLSP_NEEDED YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else #define YYPOPSTACK (yyvsp--, yyssp--) #endif int yystacksize = YYINITDEPTH; #ifdef YYPURE int yychar; YYSTYPE yylval; int yynerrs; #ifdef YYLSP_NEEDED YYLTYPE yylloc; #endif #endif YYSTYPE yyval; /* the variable used to return */ /* semantic values from the action */ /* routines */ int yylen; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Starting parse\n"); #endif yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss - 1; yyvsp = yyvs; #ifdef YYLSP_NEEDED yylsp = yyls; #endif /* Push a new state, which is found in yystate . */ /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yynewstate: *++yyssp = yystate; if (yyssp >= yyss + yystacksize - 1) { /* Give user a chance to reallocate the stack */ /* Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; #ifdef YYLSP_NEEDED YYLTYPE *yyls1 = yyls; #endif /* Get the current used size of the three stacks, in elements. */ int size = yyssp - yyss + 1; #ifdef yyoverflow /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ #ifdef YYLSP_NEEDED /* This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yyls1, size * sizeof (*yylsp), &yystacksize); #else yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yystacksize); #endif yyss = yyss1; yyvs = yyvs1; #ifdef YYLSP_NEEDED yyls = yyls1; #endif #else /* no yyoverflow */ /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) { yyerror("parser stack overflow"); return 2; } yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp)); yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp)); #ifdef YYLSP_NEEDED yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp)); #endif #endif /* no yyoverflow */ yyssp = yyss + size - 1; yyvsp = yyvs + size - 1; #ifdef YYLSP_NEEDED yylsp = yyls + size - 1; #endif #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Stack size increased to %d\n", yystacksize); #endif if (yyssp >= yyss + yystacksize - 1) YYABORT; } #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Entering state %d\n", yystate); #endif goto yybackup; yybackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* yychar is either YYEMPTY or YYEOF or a valid token in external form. */ if (yychar == YYEMPTY) { #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Reading a token: "); #endif yychar = YYLEX; } /* Convert token to internal form (in yychar1) for indexing tables with */ if (yychar <= 0) /* This means end of input. */ { yychar1 = 0; yychar = YYEOF; /* Don't call YYLEX any more */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Now at end of input.\n"); #endif } else { yychar1 = YYTRANSLATE(yychar); #if YYDEBUG != 0 if (yydebug) { fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ #ifdef YYPRINT YYPRINT (stderr, yychar, yylval); #endif fprintf (stderr, ")\n"); } #endif } yyn += yychar1; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; yyn = yytable[yyn]; /* yyn is what to do for this token type in this state. Negative => reduce, -yyn is rule number. Positive => shift, yyn is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (yyn < 0) { if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); #endif /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif /* count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /* Do the default action for the current state. */ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; /* Do a reduction. yyn is the number of a rule to reduce with. */ yyreduce: yylen = yyr2[yyn]; if (yylen > 0) yyval = yyvsp[1-yylen]; /* implement default value of the action */ #if YYDEBUG != 0 if (yydebug) { int i; fprintf (stderr, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) fprintf (stderr, "%s ", yytname[yyrhs[i]]); fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif switch (yyn) { case 4: { if (SetInclude(yyvsp[-1].ch) != 0) { YYABORT; } ; break;} case 7: { if (SetAddToNullPkt() != 0) { YYABORT; } ; break;} case 14: { if (SetCreateMissingBase() != 0) { YYABORT; } ; break;} case 16: { if (SetForceINTL() != 0) { YYABORT; } ; break;} case 34: { if (SetNoLogIgnore() != 0) { YYABORT; } ; break;} case 40: { if (SetIgnoreBSY() != 0) { YYABORT; } ; break;} case 41: { if (SetSetViaAlways() != 0) { YYABORT; } ; break;} case 42: { if (SetSkipHiddenFiles() != 0) { YYABORT; } ; break;} case 43: { if (SetSoftCheckInNodelists() != 0) { YYABORT; } ; break;} case 46: { if (SetNewVia() != 0) { YYABORT; } ; break;} case 47: { if (SetUseOwnZone() != 0) { YYABORT; } ; break;} case 48: { if (SetUseASO() != 0) { YYABORT; } ; break;} case 49: { if (SetStripPathInPkt() != 0) { YYABORT; } ; break;} case 58: { YYABORT; ; break;} case 59: { DetectError = TRUE; ; break;} case 60: { avail = 0; ; break;} case 61: { if (LoadScriptFile(yyvsp[0].ch) != 0) { YYABORT; } ; break;} case 62: { if (SetTrafficLogTemplate(yyvsp[0].ch) != 0) { YYABORT; } ; break;} case 63: { if (SetSemaphoreName(yyvsp[0].ch, yyvsp[-1].ln) != 0) { YYABORT; } ; break;} case 64: { yyval.ch = yyvsp[0].ch; ; break;} case 65: { cffa.Clean(); ; break;} case 66: { cffa1 = cffa; cffa.Clean(); ; break;} case 67: { if (SetAka(cffa1, cffa) != 0) { YYABORT; } cffa.Clean(); cffa1.Clean(); ; break;} case 68: { if (SetTimeStampFile(yyvsp[0].ch) != 0) { YYABORT; } ; break;} case 69: { if (SetAPktDir(yyvsp[0].ch) != 0) { YYABORT; } ; break;} case 70: { cffa.Clean(); ; break;} case 71: { if (SetMyAddr(cffa) != 0) { YYABORT; } cffa.Clean(); ; break;} case 72: { SetCheckPoints(yyvsp[0].pmode); ; break;} case 73: { yyval.pmode = CHECKPNT_NEVER; ; break;} case 74: { yyval.pmode = CHECKPNT_HARD; ; break;} case 75: { yyval.pmode = CHECKPNT_SOFT; ; break;} case 76: { SetKillRoutedMessages(yyvsp[0].kmode); ; break;} case 77: { yyval.kmode = KILL_ALWAYS; ; break;} case 78: { yyval.kmode = KILL_NEVER; ; break;} case 79: { yyval.kmode = KILL_FLAG; ; break;} case 80: { if (SetSysopName(yyvsp[0].ch) != 0) { YYABORT; } ; break;} case 81: { if (SetTearline(yyvsp[0].ch) != 0) { YYABORT; } ; break;} case 82: { if (SetLogFile(yyvsp[0].ch) != 0) { YYABORT; } ; break;} case 83: { if (SetLogLevel(yyvsp[0].ln) != 0) { YYABORT; } ; break;} case 84: { if (SetOrigin(yyvsp[0].ch) != 0) { YYABORT; } ; break;} case 85: { if (SetNodelist(yyvsp[-1].ch,yyvsp[0].ln) != 0) { YYABORT; } ; break;} case 86: { yyval.ln = -3; ; break;} case 87: { yyval.ln = yyvsp[0].ln; ; break;} case 88: { if (SetNodelistPath(yyvsp[0].ch) != 0) { YYABORT; } ; break;} case 89: { if (SetIndexFile(yyvsp[0].ch) != 0) { YYABORT; } ; break;} case 90: { if (SetLoopStr(yyvsp[0].ch) != 0) { YYABORT; } ; break;} case 91: { if (SetMaxAttach(yyvsp[0].ln) != 0) { YYABORT; } ; break;} case 92: { if (SetMaxNodelistAge(yyvsp[0].ln) != 0) { YYABORT; } ; break;} case 93: { if (SetOutbound(yyvsp[0].ch) != 0) { YYABORT; } ; break;} case 94: { if (SetTempMail(yyvsp[0].ch) != 0) { YYABORT; } ; break;} case 95: { if (SetTrafficLog(yyvsp[0].ch) != 0) { YYABORT; } ; break;} case 96: { if (SetFileInbound(yyvsp[0].ch) != 0) { YYABORT; } ; break;} case 97: { if (SetMaxAge(yyvsp[0].ln) != 0) { YYABORT; } cffa.Clean(); ; break;} case 98: { if (strlen(yyvsp[0].ch) > 8){ yyerror("Password too long. Max password length is a 8 characters."); YYABORT; } cffa.Clean(); ; break;} case 99: { if (SetPasswd(cffa, yyvsp[-2].ch) != 0) { YYABORT; } cffa.Clean(); ; break;} case 100: { if (SetBadMode(yyvsp[0].bmode,FileName) != 0) { YYABORT; } FileName = NULL; ; break;} case 101: { yyval.bmode = SKIP; FileName = NULL;; break;} case 102: { yyval.bmode = EXIT; FileName = NULL;; break;} case 103: { yyval.bmode = REMOVE; FileName = NULL;; break;} case 104: { yyval.bmode = MOVE; FileName = yyvsp[0].ch;; break;} case 105: { if (SetUTC(yyvsp[0].ln) != 0) { YYABORT; } ; break;} case 106: { yyval.ln = yyvsp[0].ln; ; break;} case 107: { yyval.ln = yyvsp[0].ln; ; break;} case 108: { yyval.ln = -yyvsp[0].ln; ; break;} case 109: { wsd = new ScanDir(); CheckMem((char *)wsd); renumberf = FALSE; unpackf = FALSE; freshf = FALSE; arf = FALSE; brf = FALSE; _TTimes = &wsd->_Times; mbase = NULL; PrevMask = 0; ScriptBefore = NULL; ScriptAfter = NULL; FileName = NULL; ; break;} case 110: { wsd->SetBase(mbase); wsd->_Renumber = renumberf; wsd->_Unpack = unpackf; wsd->_Fresh = freshf; wsd->_FlagFile = FileName; wsd->_ScriptBefore = ScriptBefore; wsd->_ScriptAfter = ScriptAfter; ScanDirs.AddToEnd(wsd); if (brf) BeforeRoute = wsd; if (arf) AfterRoute = wsd; ; break;} case 112: { mbase = MakeBase(yyvsp[0].ch); if (mbase == NULL) { YYABORT; } if (!mbase->Set(yyvsp[0].ch,BASE_IN)) { delete mbase; mbase = NULL; yyerror("Unable to open message base."); YYABORT; } if (!mbase->CheckIn()) { delete mbase; YYABORT; } ; break;} case 114: { brf = TRUE; ; break;} case 115: { arf = TRUE; ; break;} case 118: { if (renumberf == TRUE) { yyerror("Renumber for this base already set."); YYABORT; } else { renumberf = TRUE; } ; break;} case 119: { if (ScriptWordExists(yyvsp[0].ch) == FALSE) { yyerror("Script function not found."); YYABORT; } ScriptBefore = strdup(yyvsp[0].ch); ; break;} case 120: { if (ScriptWordExists(yyvsp[0].ch) == FALSE) { yyerror("Script function not found."); YYABORT; } ScriptAfter = strdup(yyvsp[0].ch); ; break;} case 121: { if (freshf == TRUE) { yyerror("Fresh scripts for this base already set."); YYABORT; } else { freshf = TRUE; } ; break;} case 122: { if (unpackf == TRUE) { yyerror("Unpack for this base already set."); YYABORT; } else { unpackf = TRUE; } if (Outbound == NULL) { yyerror("Outbound directory not specified."); YYABORT; } ; break;} case 123: { if (TimeStampFile == NULL) { yyerror("You can't set scanning time without Timestamp File."); YYABORT; } ; break;} case 124: { tt = new tTimes; tt->_STime = TimeOfBeginOfDay(-1); tt->_ETime = 0; ; break;} case 125: { if (tt->_STime != 0) { CheckETTime(); _TTimes->AddToEnd(tt); } ; break;} case 126: { tt = new tTimes; tt->_STime = TimeOfBeginOfDay(0); tt->_ETime = 0; ; break;} case 127: { if (tt->_STime != 0) { CheckETTime(); _TTimes->AddToEnd(tt); } ; break;} case 129: { if (tt->_STime != 0) { CheckETTime(); _TTimes->AddToEnd(tt); tt = new tTimes; } ; break;} case 130: { tt->_STime = yyvsp[0].t + TimeOfBeginOfDay(-1); ; break;} case 131: { tt->_STime = yyvsp[-2].t + TimeOfBeginOfDay(-1); tt->_ETime = yyvsp[0].t + TimeOfBeginOfDay(-1) + 59; ; break;} case 132: { time_t i_time; time_t b_time; if (yyvsp[0].t == (time_t) 0) { yyerror("Time of pereodical event should be between 00:01 and 23:59"); YYABORT; } tt->_STime = TimeOfBeginOfDay(-1); b_time = tt->_STime; do { i_time = tt->_STime; CheckETTime(); _TTimes->AddToEnd(tt); tt = new tTimes; tt->_ETime = 0; tt->_STime = i_time + yyvsp[0].t; } while (tt->_STime < (b_time + (23*60*60)+(59*60)+60)); tt->_STime = 0; ; break;} case 135: { if (yyvsp[0].ln < 0 || yyvsp[0].ln > 23) { yyerror("Hour should be between 00 and 23"); YYABORT; } else { yyval.t = (time_t) (yyvsp[0].ln * 60); } ; break;} case 136: { if (yyvsp[0].ln < 0 || yyvsp[0].ln > 59 || yyvsp[-2].t == (time_t) -1) { yyval.t = (time_t)-1; yyerror("Minutes should be between 00 and 59"); YYABORT; } else { yyval.t = yyvsp[-2].t + (time_t) yyvsp[0].ln; yyval.t *= 60; } ; break;} case 138: { CheckETTime(); _TTimes->AddToEnd(tt); tt = new tTimes; ; break;} case 139: { if (yyvsp[0].ln < 0 || yyvsp[0].ln > 6) { yyerror("Day of week should be between 0 and 6"); YYABORT; } else { tt->_STime = TimeOfBeginOfDay(yyvsp[0].ln); } ; break;} case 140: { if (yyvsp[-2].ln < 0 || yyvsp[-2].ln > 6 || yyvsp[0].ln < 0 || yyvsp[0].ln > 6) { yyerror("Day of week should be between 0 and 6"); YYABORT; } else { tt->_STime = TimeOfBeginOfDay(yyvsp[-2].ln); tt->_ETime = TimeOfBeginOfDay(yyvsp[0].ln) + (23*60*60)+(59*60)+59; } ; break;} case 141: { FileName = NULL; ; break;} case 142: { FileName = strdup(yyvsp[0].ch); ; break;} case 143: { MaskMode = 0; ; break;} case 144: { msk->_Type = MASK_NORMAL; AddReadyMask(*(NormalMask *)msk); ; break;} case 145: { MaskMode = 0; ; break;} case 146: { msk->_Type = MASK_SKIP; AddReadyMask(*(NormalMask *)msk); ; break;} case 147: { MaskMode = 0; ; break;} case 148: { msk->_Type = MASK_ADD; AddReadyMask(*(NormalMask *)msk); ; break;} case 149: { msk = new NormalMask(); CheckMem((char *)msk); msk->_Type = MASK_NORMAL; if (PrepareMask(*msk) != 0) { YYABORT; } ; break;} case 150: { ((NormalMask *)msk)->_FromName = strdup(yyvsp[0].ch); cffa.Clean(); ; break;} case 151: { ((NormalMask *)msk)->_FromAddr = cffa; if (MaskMode == 0) { rc = ((NormalMask *)msk)->_FromAddr.MaskValid(); } else { rc = ((NormalMask *)msk)->_FromAddr.ActValid(); } if (!rc) { yyerror("Invalid 'From' Address."); YYABORT; } ; break;} case 152: { ((NormalMask *)msk)->_ToName = strdup(yyvsp[0].ch); cffa.Clean(); ; break;} case 153: { ((NormalMask *)msk)->_ToAddr = cffa; if (MaskMode == 0) { rc = ((NormalMask *)msk)->_ToAddr.MaskValid(); } else { rc = ((NormalMask *)msk)->_ToAddr.ActValid(); } if (!rc) { yyerror("Invalid 'To' Address."); YYABORT; } if ((((NormalMask *)msk)->_ToAddr.Zone() & (FA_LSTMASK|FA_HOLDMASK|FA_DOWNMASK|FA_PVTMASK|FA_HUBMASK)) && (!Ndl.Enabled())) { yyerror("You can't use '#','H','D','U' or 'P' mask without nodelist."); YYABORT; } if ((((NormalMask *)msk)->_ToAddr.Point() & FA_SUBMASK) && (!Ndl.Enabled())) { yyerror("You can't use '&' mask without nodelist."); YYABORT; } ; break;} case 154: { ((NormalMask *)msk)->_Subject = strdup(yyvsp[0].ch); NoTokensF = TRUE; ; break;} case 155: { NoTokensF = FALSE; ; break;} case 157: { yyval.ch = "$"; ; break;} case 158: { yyval.ch = "*"; ; break;} case 159: { yyval.ch = "%"; ; break;} case 161: { yyval.ch = "*"; ; break;} case 162: { if (yyvsp[0].ln > 65535) { yyerror("Parameter shoul be less that 65535"); YYABORT; } yyval.ln = yyvsp[-1].ln | yyvsp[0].ln; ; break;} case 163: { yyval.ln = -1; ; break;} case 164: { yyval.ln = 0; ; break;} case 165: { yyval.ln = 0x08000000; ; break;} case 167: { FlagMode = 1; ; break;} case 172: { FlagMode = 1; ; break;} case 174: { FlagMode = 2; ; break;} case 176: { ((NormalMask *)msk)->fFileAttach = (FlagMode == 2) ? 2 : 1; ; break;} case 177: { /* CheckMaxAttach size*/ if (CheckMaskMode("A") != 0) { YYABORT; } if (((NormalMask *)msk)->sd->_MaxAttachSize == 0 && MaxAttachSize == 0) { yyerror("Not one (global or local) MaxAttachSize is not defined."); YYABORT; } ((NormalMask *)msk)->fMaxAttach = (FlagMode == 2) ? 2 : 1; ; break;} case 178: { ((NormalMask *)msk)->fARQ = (FlagMode == 2) ? 2 : 1; ; break;} case 179: { ((NormalMask *)msk)->fCrash = (FlagMode == 2) ? 2 : 1; ; break;} case 180: { ((NormalMask *)msk)->fDIR = (FlagMode == 2) ? 2 : 1; ; break;} case 181: { /* Empty message */ if (CheckMaskMode("e") != 0) { YYABORT; } ((NormalMask *)msk)->fEmpty = (FlagMode == 2) ? 2 : 1; ; break;} case 182: { /* Check echomail */ if (CheckMaskMode("E") != 0) { YYABORT; } ((NormalMask *)msk)->fEchomail = (FlagMode == 2) ? 2 : 1; ; break;} case 183: { ((NormalMask *)msk)->fFileRequest = (FlagMode == 2) ? 2 : 1; ; break;} case 184: { /* Check age */ if (CheckMaskMode("g") != 0) { YYABORT; } if (((NormalMask *)msk)->sd->_MaxAge == 0 && MaxAge == 0) { yyerror("Not one (global or local) MaxAge is not defined."); YYABORT; } ((NormalMask *)msk)->fMaxAge = (FlagMode == 2) ? 2 : 1; ; break;} case 185: { ((NormalMask *)msk)->fHold = (FlagMode == 2) ? 2 : 1; ; break;} case 186: { ((NormalMask *)msk)->fTransit = (FlagMode == 2) ? 2 : 1; ; break;} case 187: { ((NormalMask *)msk)->fKFS = (FlagMode == 2) ? 2 : 1; ; break;} case 188: { ((NormalMask *)msk)->fKillSend = (FlagMode == 2) ? 2 : 1; ; break;} case 189: { ((NormalMask *)msk)->fLocal = (FlagMode == 2) ? 2 : 1; ; break;} case 190: { ((NormalMask *)msk)->fLok = (FlagMode == 2) ? 2 : 1; ; break;} case 191: { ((NormalMask *)msk)->fIMM = (FlagMode == 2) ? 2 : 1; ; break;} case 192: { ((NormalMask *)msk)->fCFM = (FlagMode == 2) ? 2 : 1; ; break;} case 193: { ((NormalMask *)msk)->fOrphan = (FlagMode == 2) ? 2 : 1; ; break;} case 194: { ((NormalMask *)msk)->fPrivate = (FlagMode == 2) ? 2 : 1; ; break;} case 195: { ((NormalMask *)msk)->fRRQ = (FlagMode == 2) ? 2 : 1; ; break;} case 196: { ((NormalMask *)msk)->fReceived = (FlagMode == 2) ? 2 : 1; ; break;} case 197: { ((NormalMask *)msk)->fSend = (FlagMode == 2) ? 2 : 1; ; break;} case 198: { ((NormalMask *)msk)->fAS = (FlagMode == 2) ? 2 : 1; ; break;} case 199: { ((NormalMask *)msk)->fTFS = (FlagMode == 2) ? 2 : 1; ; break;} case 200: { ((NormalMask *)msk)->fFURQ = (FlagMode == 2) ? 2 : 1; ; break;} case 201: { ((NormalMask *)msk)->fScanned = (FlagMode == 2) ? 2 : 1; ; break;} case 202: { /* Check existing attach */ if (CheckMaskMode("x") != 0) { YYABORT; } ((NormalMask *)msk)->fAttExists = (FlagMode == 2) ? 2 : 1; ; break;} case 203: { ((NormalMask *)msk)->fIRR = (FlagMode == 2) ? 2 : 1; ; break;} case 204: { if (CheckMaskMode("loop flag") != 0) { YYABORT; } ((NormalMask *)msk)->fLoop = (FlagMode == 2) ? 2 : 1; if (((NormalMask *)msk)->Loops != (unsigned int)-1) { yyerror("Only one loop count should be in mask."); YYABORT; } ((NormalMask *)msk)->Loops = yyvsp[0].ln; ; break;} case 205: { msk->_Type = MASK_NORMAL; AddReadyMask(*(KludgeMask *)msk); ; break;} case 206: { msk->_Type = MASK_SKIP; AddReadyMask(*(KludgeMask *)msk); ; break;} case 207: { msk->_Type = MASK_ADD; AddReadyMask(*(KludgeMask *)msk); ; break;} case 208: { msk = new KludgeMask(); CheckMem((char *)msk); msk->_Type = MASK_NORMAL; if (PrepareMask(*msk) != 0) { YYABORT; } ; break;} case 209: { ((KludgeMask *)msk)-> _KludgeName = strdup(yyvsp[-2].ch); ((KludgeMask *)msk)-> _KludgeBody = strdup(yyvsp[-1].ch); ((KludgeMask *)msk)-> _Times = yyvsp[0].ln; ; break;} case 210: { msk->_Type = MASK_NORMAL; AddReadyMask(*(BodyMask *)msk); ; break;} case 211: { msk->_Type = MASK_SKIP; AddReadyMask(*(BodyMask *)msk); ; break;} case 212: { msk->_Type = MASK_ADD; AddReadyMask(*(BodyMask *)msk); ; break;} case 213: { msk = new BodyMask(); CheckMem((char *)msk); msk->_Type = MASK_NORMAL; if (PrepareMask(*msk) != 0) { YYABORT; } ; break;} case 214: { ((BodyMask *)msk)-> _Body = strdup(yyvsp[-2].ch); ((BodyMask *)msk)-> _Lines = yyvsp[-1].ln; ((BodyMask *)msk)-> _Bytes = yyvsp[0].ln; ; break;} case 215: { msk->_Type = MASK_NORMAL; AddReadyMask(*(ScriptMask *)msk); ; break;} case 216: { msk->_Type = MASK_SKIP; AddReadyMask(*(ScriptMask *)msk); ; break;} case 217: { msk->_Type = MASK_ADD; AddReadyMask(*(ScriptMask *)msk); ; break;} case 218: { msk = new ScriptMask(); CheckMem((char *)msk); msk->_Type = MASK_NORMAL; if (PrepareMask(*msk) != 0) { YYABORT; } ; break;} case 219: { ((ScriptMask *)msk)->_ScriptName = strdup(yyvsp[0].ch); if (ScriptWordExists(yyvsp[0].ch) != TRUE) { yyerror("Subroutine not found in scripts."); YYABORT; } ; break;} case 220: { if (PrevMask == 0) { yyerror("Action without Mask."); YYABORT; } wsd = ScanDirs.GetLast(); PrevMask = 1; act = new Action(); act->sd = wsd; act->Before = BeforeRoute; act->After = AfterRoute; _TTimes = &act->_Times; ; break;} case 221: { LastDo->AddAction(*act); ; break;} case 226: { act->_Act = ACT_DELETE; ; break;} case 230: { act->_Act = ACT_IGNORE; ; break;} case 240: { act->_Act = ACT_DELETEATTACH; ; break;} case 247: { act->_Act = ACT_ADDNOTE; act->_Tpl = new Template(); if (!act->_Tpl->Set(yyvsp[0].ch)) { yyerror("Template file is not accesible."); delete act->_Tpl; act->_Tpl = NULL; YYABORT; } act->_Tpl->sd = ScanDirs.GetLast(); ; break;} case 248: { act->_Act = ACT_MOVE; act->_Base = MakeBase(yyvsp[0].ch); if (act->_Base == NULL) { YYABORT; } if (!act->_Base->Set(yyvsp[0].ch,BASE_OUT)) { yyerror("Invalid message base name."); delete act->_Base; act->_Base = NULL; YYABORT; } if (!act->_Base->CheckOut()) { delete act->_Base; act->_Base = NULL; YYABORT; } act->_Base->Rewind(); ; break;} case 249: { act->_Act = ACT_COPY; act->_Base = MakeBase(yyvsp[0].ch); if (act->_Base == NULL) { YYABORT; } if (!act->_Base->Set(yyvsp[0].ch,BASE_OUT)) { yyerror("Invalid message base name."); delete act->_Base; act->_Base = NULL; YYABORT; } if (!act->_Base->CheckOut()) { delete act->_Base; act->_Base = NULL; YYABORT; } act->_Base->Rewind(); ; break;} case 250: { MaskMode = 1; act->_Act = ACT_REWRITE; ; break;} case 251: { act->_Mask = msk; ; break;} case 252: { act->_Act = ACT_DISPLAY; act->_TplName = strdup(yyvsp[0].ch); ; break;} case 253: { act->_Act = ACT_SCRIPT; if (ScriptWordExists(yyvsp[0].ch) == FALSE) { yyerror("Script function not found."); YYABORT; } act->_TplName = strdup(yyvsp[0].ch); ; break;} case 254: { act->_Act = ACT_FLAG; act->_OutDir = strdup(yyvsp[0].ch); ; break;} case 255: { yyval.ch = yyvsp[0].ch; ; break;} case 256: { act->_Act = ACT_DELFILE; act->_OutDir = strdup(yyvsp[0].ch); ; break;} case 257: { MaskMode = 1; act->_Act = ACT_NEWMSG; ; break;} case 258: { act->_Tpl = new Template(); if (!act->_Tpl->Set(yyvsp[-2].ch)) { yyerror("Template file is not accesible."); delete act->_Tpl; act->_Tpl = NULL; delete msk; msk = NULL; YYABORT; } act->_Tpl->sd = ScanDirs.GetLast(); act->_Base = MakeBase(yyvsp[-1].ch); if (act->_Base == NULL || !act->_Base->Set(yyvsp[-1].ch,BASE_OUT)) { yyerror("Invalid message base name."); delete act->_Tpl; act->_Tpl = NULL; delete msk; msk = NULL; delete act->_Base; act->_Base = NULL; YYABORT; } if (!act->_Base->CheckOut()) { delete act->_Tpl; act->_Tpl = NULL; delete msk; msk = NULL; delete act->_Base; act->_Base = NULL; YYABORT; } act->_Base->Rewind(); act->_Mask = msk; ; break;} case 259: { act->_Act = ACT_WRITEFILE; act->_Tpl = new Template(); if (!act->_Tpl->Set(yyvsp[-1].ch)) { yyerror("Template file is not accesible."); delete act->_Tpl; act->_Tpl = NULL; YYABORT; } act->_Tpl->sd = ScanDirs.GetLast(); act->_OutDir = strdup(yyvsp[0].ch); ; break;} case 260: { act->_Act = ACT_ADDFILE; act->_Tpl = new Template(); if (!act->_Tpl->Set(yyvsp[-1].ch)) { yyerror("Template file is not accesible."); delete act->_Tpl; act->_Tpl = NULL; YYABORT; } act->_Tpl->sd = ScanDirs.GetLast(); act->_OutDir = strdup(yyvsp[0].ch); ; break;} case 261: { act->_Act = ACT_CALL; act->_Tpl = new Template(); if (!act->_Tpl->Set(yyvsp[-2].ch)) { yyerror("Template file is not accesible."); delete act->_Tpl; act->_Tpl = NULL; YYABORT; } act->_Tpl->sd = ScanDirs.GetLast(); act->_OutDir = strdup(yyvsp[-1].ch); act->_TplName = strdup(yyvsp[0].ch); ; break;} case 262: { act->_Act = ACT_CALL; act->_TplName = strdup(yyvsp[0].ch); ; break;} case 263: { cffa.Clean(); ; break;} case 264: { act->_Act = ACT_ROUTE; if (act->sd == act->Before|| act->sd == act->After) { yyerror("You can not use the Action Route in 'ScanDir: @AfterRoute|@BeforeRoute'"); YYABORT; } act->_Flav = yyvsp[-2].pktmode; act->_f = cffa; if (act->_f.Point() & FA_NOTDEF) { act->_f.Point(0); } if (!act->_f.RouValid()) { yyerror("Invalid routing address."); YYABORT; } ; break;} case 265: { yyval.pktmode = F_HOLD; ; break;} case 266: { yyval.pktmode = F_CRASH; ; break;} case 267: { yyval.pktmode = F_DIRECT; ; break;} case 268: { yyval.pktmode = F_NORMAL; ; break;} case 269: { cffa.Clean(); ; break;} case 270: { act->_Act = ACT_POLL; act->_Flav = yyvsp[-2].pktmode; act->_f = cffa; if (act->_f.Point() & FA_NOTDEF) { act->_f.Point(0); } if (!act->_f.RouValid()) { yyerror("Invalid poll address."); YYABORT; } ; break;} case 271: { act->_Act = ACT_CHANGEPATH; if (strlen(yyvsp[0].ch) > 72) { yyerror("New path too long"); YYABORT; } act->_OutDir = strdup(yyvsp[0].ch); ; break;} case 272: { act->_Act = ACT_MOVEATTACH; if (!DirExists(yyvsp[0].ch)) { yyerror("Target directory not found."); YYABORT; } if (strlen(yyvsp[0].ch) > 72) { yyerror("New path too long"); YYABORT; } act->_OutDir = strdup(yyvsp[0].ch); ; break;} case 273: { act->_Act = ACT_COPYATTACH; if (!DirExists(yyvsp[0].ch)) { yyerror("Target directory not found."); YYABORT; } act->_OutDir = strdup(yyvsp[0].ch); ; break;} case 274: { act->_Act = ACT_SPLIT; if (yyvsp[0].ln < 1 || yyvsp[0].ln > 65535) { yyerror("Parameter 'Lines' should be positive integer between 1 and 65535"); YYABORT; } act->_Lines = yyvsp[0].ln; ; break;} case 275: { FILE *fp = NULL; char buf[512],*p,*q; int in,on,count; int line = 0; act->_Act = ACT_RECODE; fp = fopen(yyvsp[0].ch,"r"); if (fp == NULL) { yyerror("Unable to open file"); YYABORT; } act->_TplName = (char *)malloc(256); CheckMem(act->_TplName); for (count = 0; count < 256; count++) act->_TplName[count] = (char) count; count = 0; line = 0; while (fgets((char*)buf,sizeof(buf),fp)) { line++; p = strtok((char*)buf," \t\n#"); q = strtok(NULL," \t\n#"); if (p != NULL && q != NULL) { in = ctoi((char *)p); if (in > 255) { sprintf(buf, "%s: Error in line %d.", yyvsp[0].ch, line); yyerror(buf); fclose(fp); free(act->_TplName); YYABORT; } on=ctoi((char *)q); if (in != 0 && on != 0) { if (count++ < 256 ) { act->_TplName[in]=on; } else { sprintf(buf,"Char map table \"%s\" is big",yyvsp[0].ch); yyerror(buf); fclose(fp); free(act->_TplName); YYABORT; } } } /* if */ } /* While */ fclose(fp); ; break;} case 277: { cffa.Zone(cffa.Zone() | FA_NOTMASK); ; break;} case 280: { cffa.Zone(FA_ANYMASK); cffa.Net(FA_ANYMASK); cffa.Node(FA_ANYMASK); cffa.Point(FA_ANYMASK); ; break;} case 281: { cffa.Zone(FA_LSTMASK); cffa.Net(FA_LSTMASK); cffa.Node(FA_LSTMASK); cffa.Point(FA_LSTMASK); ; break;} case 282: { cffa.Zone(FA_HOLDMASK); cffa.Net(FA_HOLDMASK); cffa.Node(FA_HOLDMASK); cffa.Point(FA_HOLDMASK); ; break;} case 283: { cffa.Zone(FA_HUBMASK); cffa.Net(FA_HUBMASK); cffa.Node(FA_HUBMASK); cffa.Point(FA_HUBMASK); ; break;} case 284: { cffa.Zone(FA_DOWNMASK); cffa.Net(FA_DOWNMASK); cffa.Node(FA_DOWNMASK); cffa.Point(FA_DOWNMASK); ; break;} case 285: { cffa.Zone(FA_PVTMASK); cffa.Net(FA_PVTMASK); cffa.Node(FA_PVTMASK); cffa.Point(FA_PVTMASK); ; break;} case 286: { cffa.Zone(FA_OURMASK); cffa.Net(FA_OURMASK); cffa.Node(FA_OURMASK); cffa.Point(FA_OURMASK); ; break;} case 287: { cffa.Zone(FA_FROMMASK); cffa.Net(FA_FROMMASK); cffa.Node(FA_FROMMASK); cffa.Point(FA_FROMMASK); ; break;} case 288: { cffa.Zone(FA_TOMASK); cffa.Net(FA_TOMASK); cffa.Node(FA_TOMASK); cffa.Point(FA_TOMASK); ; break;} case 289: { if (yyvsp[0].ln != 0) { yyerror("parse error"); YYABORT; } cffa.Zone(FA_TOMASK); cffa.Net(FA_TOMASK); cffa.Node(FA_TOMASK); cffa.Point(0); ; break;} case 291: { cffa.Point(yyvsp[0].ln); ; break;} case 292: { cffa.Point(FA_SUBMASK); ; break;} case 293: { cffa.Zone(yyvsp[-4].ln); cffa.Net(yyvsp[-2].ln); cffa.Node(yyvsp[0].ln); cffa.Point(0); ; break;} case 294: { yyval.ln = yyvsp[0].ln; ; break;} case 295: { yyval.ln = FA_ANYMASK; ; break;} } /* the action file gets copied in in place of this dollarsign */ yyvsp -= yylen; yyssp -= yylen; #ifdef YYLSP_NEEDED yylsp -= yylen; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif *++yyvsp = yyval; #ifdef YYLSP_NEEDED yylsp++; if (yylen == 0) { yylsp->first_line = yylloc.first_line; yylsp->first_column = yylloc.first_column; yylsp->last_line = (yylsp-1)->last_line; yylsp->last_column = (yylsp-1)->last_column; yylsp->text = 0; } else { yylsp->last_line = (yylsp+yylen-1)->last_line; yylsp->last_column = (yylsp+yylen-1)->last_column; } #endif /* Now "shift" the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTBASE] + *yyssp; if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; yyerrlab: /* here on detecting error */ if (! yyerrstatus) /* If not already recovering from an error, report this error. */ { ++yynerrs; #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; if (yyn > YYFLAG && yyn < YYLAST) { int size = 0; char *msg; int x, count; count = 0; /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) size += strlen(yytname[x]) + 15, count++; msg = (char *) malloc(size + 15); if (msg != 0) { strcpy(msg, "parse error"); if (count < 5) { count = 0; for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) { strcat(msg, count == 0 ? ", expecting `" : " or `"); strcat(msg, yytname[x]); strcat(msg, "'"); count++; } } yyerror(msg); free(msg); } else yyerror ("parse error; also virtual memory exceeded"); } else #endif /* YYERROR_VERBOSE */ yyerror("parse error"); } goto yyerrlab1; yyerrlab1: /* here on error raised explicitly by an action */ if (yyerrstatus == 3) { /* if just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input */ if (yychar == YYEOF) YYABORT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); #endif yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ yyerrstatus = 3; /* Each real token shifted decrements this */ goto yyerrhandle; yyerrdefault: /* current state does not do anything special for the error token. */ #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ if (yyn) goto yydefault; #endif yyerrpop: /* pop the current state because it cannot handle the error token */ if (yyssp == yyss) YYABORT; yyvsp--; yystate = *--yyssp; #ifdef YYLSP_NEEDED yylsp--; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "Error: state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif yyerrhandle: yyn = yypact[yystate]; if (yyn == YYFLAG) goto yyerrdefault; yyn += YYTERROR; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) goto yyerrdefault; yyn = yytable[yyn]; if (yyn < 0) { if (yyn == YYFLAG) goto yyerrpop; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting error token, "); #endif *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif yystate = yyn; goto yynewstate; }