📄 smpar.c
字号:
/* extern char *malloc(), *realloc(); */
/* file: SMPAR.C - from SMIB.Y - Parser for Concise MIB and Concise Traps
*
*/
#include <stdio.h>
#include <string.h>
#include <alloc.h> // RDR
#include "tds.h"
#include "smscdefs.h"
#include "smstdefs.h"
#include "smsydefs.h"
#include "smic.h"
MIBSYM *pMod;
MIBSYM *pOid;
MIBSYM *pSeq;
MIBSYM *pTc;
MIBSYM *pTr;
MIBSYM *pComp;
MIBSYN syn;
BOOL fNoStrSav;
#define YYSTATIC
typedef union {
NUMVAL numval;
STRVAL strval;
SYMVAL symval;
KWVAL kwval;
} YYSTYPE;
# define dirADDOPT 257
# define dirALIASMODULE 258
# define dirALIASSYMBOL 259
# define dirHELP 260
# define dirINCLUDE 261
# define dirPOPOPT 262
# define dirPRINTOPT 263
# define dirPUSHOPT 264
# define dirREMOVEOPT 265
# define kwACCESS 266
# define kwBEGIN 267
# define kwCOUNTER 268
# define kwDEFINITIONS 269
# define kwDEFVAL 270
# define kwDEPRECATED 271
# define kwDESCRIPTION 272
# define kwEND 273
# define kwENTERPRISE 274
# define kwFROM 275
# define kwGAUGE 276
# define kwIDENTIFIER 277
# define kwIMPLIED 278
# define kwIMPORTS 279
# define kwINDEX 280
# define kwINTEGER 281
# define kwIPADDRESS 282
# define kwMANDATORY 283
# define kwNETWORKADDRESS 284
# define kwNOLENGTH 285
# define kwNOT_ACCESSIBLE 286
# define kwNULL 287
# define kwOBJECT 288
# define kwOBJECT_TYPE 289
# define kwOBSOLETE 290
# define kwOCTET 291
# define kwOF 292
# define kwOPAQUE 293
# define kwOPTIONAL 294
# define kwREAD_ONLY 295
# define kwREAD_WRITE 296
# define kwREFERENCE 297
# define kwSEQUENCE 298
# define kwSIZE 299
# define kwSMI 300
# define kwSTATUS 301
# define kwSTRING 302
# define kwSYNTAX 303
# define kwTIMETICKS 304
# define kwTRAP_TYPE 305
# define kwVARIABLES 306
# define kwWRITE_ONLY 307
# define chLCB 308
# define chRCB 309
# define chLPR 310
# define chRPR 311
# define chSEMI 312
# define chCOMMA 313
# define chMINUS 314
# define chDOT 315
# define chOTHER 316
# define tokDOTDOT 317
# define tokBADDOTDOT 318
# define tokIS 319
# define tokBADIS 320
# define tokBADSTR 321
# define tokNAME 322
# define tokSTRING 323
# define tokNUMBER 324
# define tokBSTR 325
# define tokHSTR 326
# define tokIP 327
#define yyclearin yychar = -1
#define yyerrok yyerrflag = 0
extern int yychar;
extern int yyerrflag;
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 150
#endif
YYSTYPE yylval, yyval;
# define YYERRCODE 256
int yyexca[] ={
-1, 0,
257, 68,
258, 68,
259, 68,
260, 68,
261, 68,
262, 68,
263, 68,
264, 68,
265, 68,
-2, 0,
-1, 1,
0, -1,
-2, 0,
-1, 2,
0, 1,
257, 68,
258, 68,
259, 68,
260, 68,
261, 68,
262, 68,
263, 68,
264, 68,
265, 68,
-2, 0,
-1, 71,
269, 96,
319, 96,
320, 96,
-2, 0,
-1, 73,
273, 86,
-2, 84,
-1, 94,
322, 125,
-2, 0,
-1, 124,
289, 223,
298, 230,
305, 238,
-2, 169,
-1, 162,
257, 159,
258, 159,
259, 159,
260, 159,
261, 159,
262, 159,
263, 159,
264, 159,
265, 159,
273, 159,
279, 159,
300, 159,
322, 159,
-2, 0,
-1, 216,
298, 228,
-2, 234,
-1, 217,
298, 229,
-2, 235,
-1, 220,
266, 215,
-2, 0,
-1, 222,
272, 243,
297, 243,
306, 243,
319, 243,
320, 243,
-2, 0,
-1, 304,
313, 391,
-2, 0,
-1, 320,
324, 376,
325, 376,
326, 376,
-2, 0,
-1, 326,
324, 376,
325, 376,
326, 376,
-2, 0,
-1, 466,
308, 317,
-2, 0,
};
# define YYNPROD 404
# define YYLAST 842
int yyact[]={
275, 559, 480, 295, 410, 401, 225, 308, 8, 396,
363, 303, 351, 276, 277, 278, 551, 546, 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, 71, 66, 67, 68, 69, 70,
165, 166, 167, 168, 169, 170, 171, 360, 172, 173,
174, 162, 175, 531, 176, 177, 178, 179, 180, 181,
182, 183, 161, 519, 184, 185, 186, 187, 188, 189,
190, 191, 521, 192, 522, 193, 194, 195, 196, 451,
197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
207, 208, 209, 216, 217, 210, 299, 211, 212, 213,
214, 215, 444, 382, 112, 359, 424, 420, 235, 429,
325, 405, 276, 277, 278, 358, 236, 240, 355, 255,
349, 229, 234, 402, 233, 327, 304, 232, 231, 140,
392, 230, 235, 238, 319, 276, 277, 278, 301, 96,
236, 240, 239, 533, 237, 350, 234, 391, 233, 321,
272, 232, 231, 224, 399, 230, 534, 238, 535, 276,
277, 278, 227, 286, 253, 235, 239, 152, 237, 380,
114, 381, 115, 236, 240, 271, 428, 504, 229, 234,
114, 233, 115, 502, 232, 231, 227, 96, 230, 281,
238, 503, 498, 501, 499, 500, 505, 235, 280, 239,
106, 237, 518, 274, 241, 236, 240, 104, 98, 279,
350, 234, 312, 233, 273, 148, 232, 231, 147, 227,
230, 398, 238, 276, 277, 278, 438, 270, 276, 277,
278, 239, 378, 237, 320, 107, 276, 277, 278, 370,
326, 130, 131, 132, 133, 134, 135, 136, 137, 138,
219, 227, 130, 131, 132, 133, 134, 135, 136, 137,
138, 102, 100, 159, 92, 385, 489, 105, 517, 483,
487, 347, 486, 488, 103, 97, 485, 144, 311, 484,
388, 335, 369, 371, 125, 108, 109, 395, 377, 379,
285, 511, 387, 272, 510, 125, 143, 374, 142, 389,
276, 277, 278, 386, 494, 383, 124, 276, 277, 278,
481, 339, 296, 297, 525, 572, 218, 124, 394, 506,
336, 337, 407, 507, 408, 509, 571, 101, 99, 376,
96, 390, 338, 415, 146, 416, 553, 251, 430, 250,
409, 365, 431, 249, 418, 243, 570, 340, 417, 569,
564, 309, 310, 423, 562, 568, 560, 561, 248, 245,
289, 290, 426, 344, 427, 150, 151, 345, 247, 313,
437, 439, 434, 314, 541, 246, 539, 540, 443, 445,
440, 544, 565, 368, 375, 366, 367, 556, 368, 244,
366, 367, 554, 552, 550, 454, 364, 543, 453, 457,
368, 459, 366, 367, 558, 462, 529, 493, 562, 515,
560, 561, 492, 414, 441, 412, 413, 473, 414, 435,
412, 413, 472, 414, 471, 412, 413, 419, 474, 470,
491, 414, 411, 412, 413, 463, 414, 461, 412, 413,
460, 458, 456, 455, 442, 436, 433, 406, 404, 373,
362, 329, 323, 318, 287, 549, 516, 545, 537, 536,
528, 512, 469, 425, 155, 532, 523, 496, 495, 490,
476, 524, 452, 527, 468, 449, 446, 530, 422, 421,
403, 393, 356, 354, 316, 305, 292, 291, 265, 154,
87, 357, 341, 331, 282, 307, 222, 262, 221, 548,
513, 283, 333, 372, 361, 328, 322, 317, 547, 542,
555, 450, 397, 343, 557, 220, 448, 74, 259, 563,
566, 526, 477, 514, 567, 284, 467, 267, 256, 139,
294, 75, 352, 466, 254, 353, 110, 223, 478, 258,
264, 330, 88, 324, 263, 268, 260, 116, 95, 342,
83, 79, 80, 78, 77, 82, 85, 81, 84, 113,
93, 3, 432, 400, 72, 348, 346, 497, 475, 465,
538, 482, 508, 479, 315, 269, 226, 306, 164, 163,
302, 298, 464, 447, 261, 288, 160, 123, 122, 121,
120, 119, 118, 117, 157, 145, 242, 94, 91, 111,
149, 86, 90, 156, 89, 73, 7, 76, 9, 6,
5, 4, 2, 1, 228, 266, 332, 293, 520, 384,
334, 128, 129, 127, 126, 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, 141, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 158, 0, 0, 0, 0, 0,
0, 153, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 252, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 257, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0,
0, 300 };
int yypact[]={
-248, -1000, -248, -1000, -1000, -1000, -1000, 278, 298, 333,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, 274, -1000, -1000, 48, -1000, -1000, -8, -1000, 46,
45, -1000, -1000, -9, -16, -1000, 6, 309, -112, 35,
296, -143, 26, -1000, 61, -1000, -1000, -1000, -1000, -64,
-1000, -67, -1000, -1000, -1000, -1000, -1000, 86, -1000, -1000,
-1000, -102, 220, -1000, 194, -1000, 24, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -186, 34, 266, 240, 231, -63,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -78, 110, -95, -1000, -1000, -118, 307,
-1000, -1000, -1000, -1000, -1000, -165, 295, 35, -1000, -1000,
-1000, 302, 330, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
281, 272, 311, -1000, -1000, -1000, 11, -56, -61, 226,
239, 288, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, 17, -1000, -119, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, 183, -1000, -1000, 81, 218,
217, 304, 33, -120, -156, 216, 229, 72, -4, 100,
215, -1000, 237, -125, 236, 327, -1000, -1000, -1000, -149,
235, 325, -1000, -1000, -1000, -1000, -1000, -1000, 225, -1000,
-1000, -1000, -1000, 241, 65, 224, -1000, -1000, -1000, -1000,
-1000, 297, 94, -1000, -96, -1000, 300, 267, -166, -1000,
-1000, -1000, -1000, -1000, 213, -132, -1000, -169, -1000, 234,
125, 23, -311, -1000, -1000, 233, 113, 16, -311, -1000,
-1000, -113, 300, 49, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -135, -152, -1000, -1000, 212, -156, -1000, 14, -1000,
-1000, 255, -62, -159, 211, -1000, -1000, -1000, 177, -173,
176, -311, -1000, -311, -1000, -1000, -1000, -1000, -1000, 108,
-1000, 161, -311, -1000, -311, -1000, -1000, 108, -1000, 156,
-177, 210, 209, 255, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -178, 193, -1000, -1000, -31, 72, -107, -1000, -1000,
69, -1000, -1000, -1000, -1000, 175, -1000, 148, 174, -48,
-311, -1000, -1000, -1000, -1000, 143, 173, -172, -311, -1000,
207, -1000, -1000, 276, 206, 252, -1000, -205, -1000, -1000,
-1000, 203, -159, -1000, -311, 172, -1000, 171, -311, 170,
-311, 169, -1000, 166, -311, 164, -1000, 303, 258, -1000,
192, -1000, -1000, -1000, 158, -1000, -1000, 153, -1000, 151,
-1000, -1000, 146, -1000, 33, 254, 322, 28, 200, -311,
141, -1000, 136, -1000, 36, 199, 198, -91, -1000, 50,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -