1 2 # line 2 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 3 /* 4 * CDDL HEADER START 5 * 6 * The contents of this file are subject to the terms of the 7 * Common Development and Distribution License (the "License"). 8 * You may not use this file except in compliance with the License. 9 * 10 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 11 * or http://www.opensolaris.org/os/licensing. 12 * See the License for the specific language governing permissions 13 * and limitations under the License. 14 * 15 * When distributing Covered Code, include this CDDL HEADER in each 16 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 17 * If applicable, add the following below this CDDL HEADER, with the 18 * fields enclosed by brackets "[]" replaced with your own identifying 19 * information: Portions Copyright [yyyy] [name of copyright owner] 20 * 21 * CDDL HEADER END 22 * 23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 * 26 * escparse.y -- parser for esc 27 * 28 * this is the yacc-based parser for Eversholt. the syntax is simple 29 * and is defined by the LALR(1) grammar described by this file. there 30 * should be no shift/reduce or reduce/reduce messages when building this 31 * file. 32 * 33 * as the input is parsed, a parse tree is built by calling the 34 * tree_X() functions defined in tree.c. any syntax errors cause 35 * us to skip to the next semicolon, achieved via the "error" clause 36 * in the stmt rule below. the yacc state machine code will call 37 * yyerror() in esclex.c and that will keep count of the errors and 38 * display the filename, line number, and current input stream of tokens 39 * to help the user figure out the problem. the -Y flag to this program 40 * turns on the yacc debugging output which is quite large. you probably 41 * only need to do that if you're debugging the grammar below. 42 * 43 */ 44 45 #include <stdio.h> 46 #include <ctype.h> 47 #include <string.h> 48 #include <stdlib.h> 49 #include <unistd.h> 50 #include <time.h> 51 #include <sys/time.h> 52 #include "out.h" 53 #include "stable.h" 54 #include "literals.h" 55 #include "lut.h" 56 #include "esclex.h" 57 #include "tree.h" 58 59 60 # line 59 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 61 typedef union 62 #ifdef __cplusplus 63 YYSTYPE 64 #endif 65 { 66 struct tokstr tok; 67 struct node *np; 68 } YYSTYPE; 69 # define OR 257 70 # define AND 258 71 # define EQ 259 72 # define NE 260 73 # define LE 261 74 # define GE 262 75 # define LSHIFT 263 76 # define RSHIFT 264 77 # define DIV 265 78 # define PROP 266 79 # define MASK 267 80 # define ARROW 268 81 # define EVENT 269 82 # define ENGINE 270 83 # define ASRU 271 84 # define FRU 272 85 # define COUNT 273 86 # define CONFIG 274 87 # define ID 275 88 # define QUOTE 276 89 # define NUMBER 277 90 # define IF 278 91 # define PATHFUNC 279 92 93 #include <inttypes.h> 94 95 #ifdef __STDC__ 96 #include <stdlib.h> 97 #include <string.h> 98 #define YYCONST const 99 #else 100 #include <malloc.h> 101 #include <memory.h> 102 #define YYCONST 103 #endif 104 105 #include <values.h> 106 107 #if defined(__cplusplus) || defined(__STDC__) 108 109 #if defined(__cplusplus) && defined(__EXTERN_C__) 110 extern "C" { 111 #endif 112 #ifndef yyerror 113 #if defined(__cplusplus) 114 void yyerror(YYCONST char *); 115 #endif 116 #endif 117 #ifndef yylex 118 int yylex(void); 119 #endif 120 int yyparse(void); 121 #if defined(__cplusplus) && defined(__EXTERN_C__) 122 } 123 #endif 124 125 #endif 126 127 #define yyclearin yychar = -1 128 #define yyerrok yyerrflag = 0 129 extern int yychar; 130 extern int yyerrflag; 131 YYSTYPE yylval; 132 YYSTYPE yyval; 133 typedef int yytabelem; 134 #ifndef YYMAXDEPTH 135 #define YYMAXDEPTH 150 136 #endif 137 #if YYMAXDEPTH > 0 138 int yy_yys[YYMAXDEPTH], *yys = yy_yys; 139 YYSTYPE yy_yyv[YYMAXDEPTH], *yyv = yy_yyv; 140 #else /* user does initial allocation */ 141 int *yys; 142 YYSTYPE *yyv; 143 #endif 144 static int yymaxdepth = YYMAXDEPTH; 145 # define YYERRCODE 256 146 147 # line 464 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 148 149 static YYCONST yytabelem yyexca[] ={ 150 -1, 1, 151 0, -1, 152 -2, 0, 153 -1, 2, 154 0, 1, 155 -2, 0, 156 -1, 150, 157 58, 0, 158 -2, 63, 159 }; 160 # define YYNPROD 128 161 # define YYLAST 728 162 static YYCONST yytabelem yyact[]={ 163 164 34, 13, 18, 43, 225, 140, 194, 36, 171, 34, 165 26, 30, 43, 192, 50, 103, 36, 51, 34, 52, 166 96, 43, 13, 134, 129, 36, 204, 34, 2, 21, 167 43, 202, 117, 118, 36, 119, 120, 121, 122, 53, 168 123, 116, 114, 39, 124, 175, 210, 44, 45, 46, 169 43, 179, 178, 48, 192, 208, 95, 81, 112, 172, 170 133, 92, 91, 29, 90, 3, 94, 237, 111, 138, 171 204, 14, 66, 72, 235, 202, 201, 76, 200, 84, 172 74, 86, 75, 173, 95, 81, 147, 184, 170, 92, 173 91, 66, 90, 35, 94, 57, 55, 54, 63, 31, 174 61, 110, 35, 108, 42, 76, 217, 84, 74, 86, 175 75, 35, 207, 80, 22, 56, 13, 109, 144, 69, 176 35, 16, 19, 95, 81, 223, 73, 228, 92, 91, 177 220, 90, 95, 94, 68, 222, 145, 92, 91, 146, 178 90, 80, 94, 79, 76, 108, 84, 74, 86, 75, 179 174, 61, 106, 188, 108, 188, 188, 25, 95, 81, 180 143, 28, 183, 92, 91, 67, 90, 223, 94, 136, 181 64, 79, 220, 219, 197, 218, 209, 222, 135, 76, 182 80, 84, 105, 86, 75, 223, 61, 95, 108, 247, 183 220, 219, 92, 218, 104, 222, 95, 94, 4, 195, 184 196, 92, 91, 128, 90, 59, 94, 176, 8, 9, 185 79, 6, 7, 10, 11, 80, 12, 216, 141, 4, 186 5, 182, 102, 66, 137, 215, 224, 142, 229, 8, 187 9, 66, 6, 7, 10, 11, 236, 12, 44, 45, 188 46, 5, 38, 40, 33, 79, 41, 44, 45, 46, 189 227, 38, 40, 98, 203, 41, 44, 45, 46, 239, 190 38, 40, 33, 101, 41, 44, 45, 46, 15, 38, 191 40, 98, 185, 41, 240, 113, 77, 78, 82, 83, 192 85, 87, 88, 89, 93, 44, 45, 46, 61, 193, 193 191, 190, 63, 41, 238, 132, 50, 131, 203, 51, 194 108, 52, 49, 130, 77, 78, 82, 83, 85, 87, 195 88, 89, 93, 4, 50, 107, 101, 51, 176, 52, 196 20, 69, 57, 8, 9, 1, 6, 7, 10, 11, 197 23, 12, 95, 81, 37, 5, 68, 92, 91, 0, 198 90, 0, 94, 77, 78, 82, 83, 85, 87, 88, 199 89, 93, 60, 221, 0, 84, 0, 86, 88, 89, 200 93, 248, 17, 0, 210, 95, 81, 67, 0, 0, 201 92, 91, 0, 90, 62, 94, 0, 0, 77, 78, 202 82, 83, 85, 87, 88, 89, 93, 0, 84, 80, 203 86, 95, 81, 0, 0, 221, 92, 91, 0, 90, 204 0, 94, 95, 81, 0, 0, 214, 92, 91, 0, 205 90, 69, 94, 221, 84, 93, 86, 0, 212, 79, 206 187, 213, 80, 0, 93, 84, 68, 86, 95, 81, 207 115, 24, 27, 92, 91, 95, 90, 205, 94, 0, 208 92, 91, 0, 90, 189, 94, 189, 189, 80, 0, 209 0, 84, 79, 86, 0, 0, 95, 67, 84, 80, 210 86, 92, 91, 204, 90, 226, 94, 199, 202, 201, 211 211, 200, 186, 210, 186, 186, 0, 126, 79, 84, 212 0, 86, 198, 0, 0, 0, 125, 206, 127, 47, 213 0, 241, 242, 243, 244, 245, 246, 0, 0, 0, 214 0, 0, 0, 0, 230, 231, 232, 233, 234, 58, 215 0, 0, 0, 0, 65, 0, 0, 70, 71, 0, 216 0, 0, 0, 177, 0, 180, 181, 0, 0, 0, 217 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 218 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 219 0, 0, 77, 78, 82, 83, 85, 87, 88, 89, 220 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 222 0, 0, 0, 0, 0, 0, 78, 82, 83, 85, 223 87, 88, 89, 93, 0, 0, 0, 0, 0, 0, 224 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225 0, 0, 0, 82, 83, 85, 87, 88, 89, 93, 226 0, 0, 0, 0, 82, 83, 85, 87, 88, 89, 227 93, 32, 0, 0, 177, 0, 0, 0, 0, 0, 228 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229 82, 83, 85, 87, 88, 89, 93, 82, 83, 85, 230 87, 88, 89, 93, 0, 0, 97, 99, 100, 0, 231 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232 85, 87, 88, 89, 93, 0, 0, 0, 0, 0, 233 0, 203, 0, 0, 0, 0, 0, 0, 0, 139, 234 0, 0, 0, 0, 0, 0, 148, 149, 150, 151, 235 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 236 162, 163, 164, 165, 166, 167, 168, 169 }; 237 static YYCONST yytabelem yypact[]={ 238 239 -10000000,-10000000, 57,-10000000, 12, 228, -273, -273, -273, -273, 240 -265, -265, -264,-10000000,-10000000, -15, -256, 51, 49, -256, 241 146, 248,-10000000, 111, 44,-10000000, 74, 44, 26,-10000000, 242 -10000000, 85, 86, -255, -6, -6, -6,-10000000, 223,-10000000, 243 -10000000, 182,-10000000, -260, 154, 142, 112, 256,-10000000, 56, 244 7, -3,-10000000, -81, -234, -234, -265, -234, 144,-10000000, 245 -244, 20, -245, -273,-10000000, 110, -265, -24, -57, -265, 246 101, 59, -264, -37, -6, -6, -6, -6, -6, -6, 247 -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, 248 -6, -6, -6, -6, -6, -6,-10000000,-10000000,-10000000,-10000000, 249 47, -33, -224,-10000000, -265, -265, -273,-10000000, -256, 14, 250 -269, 14, 14,-10000000, -15,-10000000,-10000000,-10000000,-10000000,-10000000, 251 -10000000,-10000000,-10000000,-10000000,-10000000,-10000000, 25,-10000000,-10000000, 60, 252 426,-10000000,-10000000, 20, 60,-10000000,-10000000,-10000000,-10000000, 19, 253 -10000000, -7,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, 86, 121, 254 295, 328, 354, 365, 391, 398, 419, 419, 95, 95, 255 95, 95, 159, 159, 150, 150,-10000000,-10000000,-10000000,-10000000, 256 -10000000,-10000000, 429,-10000000, 377,-10000000,-10000000, 25,-10000000, 366, 257 184, 176, 65,-10000000,-10000000, 130, 51, 25,-10000000,-10000000, 258 -271,-10000000, -27, 276,-10000000,-10000000,-10000000, 2, -273,-10000000, 259 20, 20, 20, 20, 20, 33, -273,-10000000,-10000000, -58, 260 -15,-10000000,-10000000, -224, -15,-10000000,-10000000,-10000000, -27, -27, 261 -27, -27, -27, -27,-10000000,-10000000, 148,-10000000,-10000000, 54, 262 -11, -11,-10000000,-10000000,-10000000,-10000000, 54,-10000000,-10000000,-10000000, 263 320, 88, 88,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000 }; 264 static YYCONST yytabelem yypgo[]={ 265 266 0, 430, 325, 28, 65, 489, 53, 302, 87, 59, 267 83, 157, 362, 420, 39, 275, 161, 63, 272, 631, 268 334, 104, 150, 45, 29, 114, 352, 303, 43, 320 }; 269 static YYCONST yytabelem yyr1[]={ 270 271 0, 2, 3, 3, 4, 4, 4, 4, 4, 4, 272 4, 4, 4, 4, 4, 29, 29, 26, 26, 27, 273 27, 27, 27, 27, 27, 27, 27, 5, 5, 5, 274 6, 6, 6, 7, 7, 8, 8, 8, 8, 8, 275 8, 8, 18, 18, 18, 18, 18, 18, 18, 18, 276 24, 24, 25, 14, 14, 15, 15, 9, 9, 10, 277 10, 19, 19, 19, 19, 19, 19, 19, 19, 19, 278 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 279 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 280 19, 20, 20, 20, 20, 22, 22, 23, 23, 23, 281 23, 21, 21, 21, 28, 11, 11, 11, 11, 11, 282 11, 17, 12, 12, 12, 1, 1, 1, 1, 1, 283 1, 1, 1, 1, 13, 13, 16, 16 }; 284 static YYCONST yytabelem yyr2[]={ 285 286 0, 3, 1, 5, 5, 11, 15, 9, 9, 7, 287 7, 9, 9, 9, 3, 11, 11, 1, 7, 3, 288 3, 7, 7, 7, 7, 7, 7, 1, 2, 7, 289 7, 7, 7, 3, 7, 2, 5, 2, 2, 2, 290 5, 3, 7, 7, 7, 7, 7, 7, 7, 3, 291 2, 7, 7, 1, 5, 1, 7, 2, 7, 2, 292 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 293 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 294 7, 7, 7, 5, 5, 7, 2, 3, 3, 2, 295 3, 7, 9, 9, 2, 2, 7, 2, 3, 3, 296 9, 9, 9, 9, 5, 3, 7, 9, 7, 9, 297 7, 3, 7, 7, 7, 2, 2, 2, 2, 2, 298 2, 2, 2, 2, 2, 7, 2, 7 }; 299 static YYCONST yytabelem yychk[]={ 300 301 -10000000, -2, -3, -4, 256, 278, 269, 270, 266, 267, 302 271, 272, 274, 59, 59, 40, -25, -12, 275, -25, 303 -29, -24, -25, -29, -13, -11, 275, -13, -16, -17, 304 275, -10, -19, 277, 33, 126, 40, -20, 275, -28, 305 276, 279, -21, 36, 271, 272, 273, -5, -6, -7, 306 270, 273, 275, -14, 46, 45, 64, 46, -5, 59, 307 -26, 40, -26, 44, 59, -5, 47, 91, 60, 45, 308 -5, -5, 47, 41, 61, 63, 58, 257, 258, 124, 309 94, 38, 259, 260, 60, 261, 62, 262, 263, 264, 310 45, 43, 42, 265, 47, 37, 275, -19, 277, -19, 311 -19, 40, 40, 275, 40, 40, 40, 59, 44, 61, 312 45, 61, 61, -15, 123, -1, 275, 266, 267, 269, 313 270, 271, 272, 274, 278, -1, -13, -1, 59, 268, 314 -27, 277, 275, 40, 268, -25, 59, -11, 93, -19, 315 62, 275, -11, 59, 59, -17, -4, 123, -19, -19, 316 -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, 317 -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, 318 41, 41, -9, -10, -22, -23, -21, -13, 276, 275, 319 -13, -13, -25, -6, -8, -18, -12, -13, -28, -20, 320 277, 276, 40, 275, 275, -8, -8, -9, -26, 41, 321 45, 43, 42, 265, 37, -27, -26, 93, 62, -3, 322 44, 41, 41, 44, 40, 41, 41, 41, 45, 43, 323 42, 265, 47, 37, -14, 275, -18, 277, 125, -24, 324 -27, -27, -27, -27, -27, 41, -24, 125, -10, -23, 325 -9, -18, -18, -18, -18, -18, -18, 41, 41 }; 326 static YYCONST yytabelem yydef[]={ 327 328 2, -2, -2, 3, 0, 0, 0, 0, 0, 0, 329 0, 0, 0, 14, 4, 0, 27, 53, 0, 27, 330 17, 17, 50, 17, 27, 124, 105, 27, 27, 126, 331 111, 0, 59, 87, 0, 0, 0, 86, 88, 89, 332 90, 0, 94, 0, 0, 0, 0, 0, 28, 0, 333 0, 0, 33, 55, 0, 0, 0, 0, 0, 9, 334 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 335 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 336 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 337 0, 0, 0, 0, 0, 0, 60, 83, 87, 84, 338 0, 0, 0, 104, 0, 0, 0, 7, 0, 0, 339 0, 0, 0, 52, 0, 113, 115, 116, 117, 118, 340 119, 120, 121, 122, 123, 114, 54, 112, 8, 17, 341 0, 19, 20, 0, 17, 51, 11, 125, 106, 0, 342 108, 0, 110, 12, 13, 127, 5, 2, 61, 62, 343 -2, 64, 65, 66, 67, 68, 69, 70, 71, 72, 344 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 345 85, 91, 0, 57, 0, 95, 97, 98, 99, 105, 346 0, 0, 0, 29, 30, 35, 53, 37, 38, 39, 347 49, 41, 0, 105, 34, 31, 32, 0, 0, 18, 348 0, 0, 0, 0, 0, 0, 0, 107, 109, 0, 349 0, 92, 93, 0, 0, 101, 102, 103, 0, 0, 350 0, 0, 0, 0, 36, 40, 0, 49, 56, 16, 351 22, 23, 24, 25, 26, 21, 15, 6, 58, 96, 352 0, 42, 43, 44, 45, 46, 47, 48, 100 }; 353 typedef struct 354 #ifdef __cplusplus 355 yytoktype 356 #endif 357 { 358 #ifdef __cplusplus 359 const 360 #endif 361 char *t_name; int t_val; } yytoktype; 362 #ifndef YYDEBUG 363 # define YYDEBUG 1 /* allow debugging */ 364 #endif 365 366 #if YYDEBUG 367 368 yytoktype yytoks[] = 369 { 370 "=", 61, 371 "?", 63, 372 ":", 58, 373 "OR", 257, 374 "AND", 258, 375 "|", 124, 376 "^", 94, 377 "&", 38, 378 "EQ", 259, 379 "NE", 260, 380 "LE", 261, 381 "GE", 262, 382 "<", 60, 383 ">", 62, 384 "LSHIFT", 263, 385 "RSHIFT", 264, 386 "-", 45, 387 "+", 43, 388 "*", 42, 389 "%", 37, 390 "DIV", 265, 391 "/", 47, 392 "!", 33, 393 "~", 126, 394 ".", 46, 395 "PROP", 266, 396 "MASK", 267, 397 "ARROW", 268, 398 "EVENT", 269, 399 "ENGINE", 270, 400 "ASRU", 271, 401 "FRU", 272, 402 "COUNT", 273, 403 "CONFIG", 274, 404 "ID", 275, 405 "QUOTE", 276, 406 "NUMBER", 277, 407 "IF", 278, 408 "PATHFUNC", 279, 409 "-unknown-", -1 /* ends search */ 410 }; 411 412 #ifdef __cplusplus 413 const 414 #endif 415 char * yyreds[] = 416 { 417 "-no such reduction-", 418 "root : stmtlist", 419 "stmtlist : /* empty */", 420 "stmtlist : stmtlist stmt", 421 "stmt : error ';'", 422 "stmt : IF '(' expr ')' stmt", 423 "stmt : IF '(' expr ')' '{' stmtlist '}'", 424 "stmt : EVENT event nvpairlist ';'", 425 "stmt : ENGINE event nvpairlist ';'", 426 "stmt : PROP propbody ';'", 427 "stmt : MASK propbody ';'", 428 "stmt : ASRU pname nvpairlist ';'", 429 "stmt : FRU pname nvpairlist ';'", 430 "stmt : CONFIG ipname nvpairlist ';'", 431 "stmt : ';'", 432 "propbody : eventlist nork ARROW nork eventlist", 433 "propbody : propbody nork ARROW nork eventlist", 434 "nork : /* empty */", 435 "nork : '(' norkexpr ')'", 436 "norkexpr : NUMBER", 437 "norkexpr : ID", 438 "norkexpr : '(' norkexpr ')'", 439 "norkexpr : norkexpr '-' norkexpr", 440 "norkexpr : norkexpr '+' norkexpr", 441 "norkexpr : norkexpr '*' norkexpr", 442 "norkexpr : norkexpr DIV norkexpr", 443 "norkexpr : norkexpr '%' norkexpr", 444 "nvpairlist : /* empty */", 445 "nvpairlist : nvpair", 446 "nvpairlist : nvpairlist ',' nvpair", 447 "nvpair : nvname '=' nvexpr", 448 "nvpair : ENGINE '=' nvexpr", 449 "nvpair : COUNT '=' nvexpr", 450 "nvname : ID", 451 "nvname : nvname '-' ID", 452 "nvexpr : numexpr", 453 "nvexpr : ename epname", 454 "nvexpr : pname", 455 "nvexpr : globid", 456 "nvexpr : func", 457 "nvexpr : NUMBER ID", 458 "nvexpr : QUOTE", 459 "numexpr : numexpr '-' numexpr", 460 "numexpr : numexpr '+' numexpr", 461 "numexpr : numexpr '*' numexpr", 462 "numexpr : numexpr DIV numexpr", 463 "numexpr : numexpr '/' numexpr", 464 "numexpr : numexpr '%' numexpr", 465 "numexpr : '(' numexpr ')'", 466 "numexpr : NUMBER", 467 "eventlist : event", 468 "eventlist : eventlist ',' event", 469 "event : ename epname eexprlist", 470 "epname : /* empty */", 471 "epname : '@' pname", 472 "eexprlist : /* empty */", 473 "eexprlist : '{' exprlist '}'", 474 "exprlist : expr", 475 "exprlist : exprlist ',' expr", 476 "expr : cexpr", 477 "expr : NUMBER ID", 478 "cexpr : cexpr '=' cexpr", 479 "cexpr : cexpr '?' cexpr", 480 "cexpr : cexpr ':' cexpr", 481 "cexpr : cexpr OR cexpr", 482 "cexpr : cexpr AND cexpr", 483 "cexpr : cexpr '|' cexpr", 484 "cexpr : cexpr '^' cexpr", 485 "cexpr : cexpr '&' cexpr", 486 "cexpr : cexpr EQ cexpr", 487 "cexpr : cexpr NE cexpr", 488 "cexpr : cexpr '<' cexpr", 489 "cexpr : cexpr LE cexpr", 490 "cexpr : cexpr '>' cexpr", 491 "cexpr : cexpr GE cexpr", 492 "cexpr : cexpr LSHIFT cexpr", 493 "cexpr : cexpr RSHIFT cexpr", 494 "cexpr : cexpr '-' cexpr", 495 "cexpr : cexpr '+' cexpr", 496 "cexpr : cexpr '*' cexpr", 497 "cexpr : cexpr DIV cexpr", 498 "cexpr : cexpr '/' cexpr", 499 "cexpr : cexpr '%' cexpr", 500 "cexpr : '!' cexpr", 501 "cexpr : '~' cexpr", 502 "cexpr : '(' cexpr ')'", 503 "cexpr : func", 504 "cexpr : NUMBER", 505 "cexpr : ID", 506 "cexpr : globid", 507 "cexpr : QUOTE", 508 "func : ID '(' ')'", 509 "func : ID '(' exprlist ')'", 510 "func : PATHFUNC '(' parglist ')'", 511 "func : pfunc", 512 "parglist : parg", 513 "parglist : parglist ',' parg", 514 "parg : pfunc", 515 "parg : pname", 516 "parg : QUOTE", 517 "parg : ID '(' exprlist ')'", 518 "pfunc : ASRU '(' pname ')'", 519 "pfunc : FRU '(' pname ')'", 520 "pfunc : COUNT '(' event ')'", 521 "globid : '$' ID", 522 "iterid : ID", 523 "iterid : ID '[' ']'", 524 "iterid : ID '[' cexpr ']'", 525 "iterid : ID '<' '>'", 526 "iterid : ID '<' ID '>'", 527 "iterid : ID '-' iterid", 528 "iname : ID", 529 "ename : ID '.' enameid", 530 "ename : ename '.' enameid", 531 "ename : ename '-' enameid", 532 "enameid : ID", 533 "enameid : PROP", 534 "enameid : MASK", 535 "enameid : EVENT", 536 "enameid : ENGINE", 537 "enameid : ASRU", 538 "enameid : FRU", 539 "enameid : CONFIG", 540 "enameid : IF", 541 "pname : iterid", 542 "pname : pname '/' iterid", 543 "ipname : iname", 544 "ipname : ipname '/' iname", 545 }; 546 #endif /* YYDEBUG */ 547 # line 1 "/usr/share/lib/ccs/yaccpar" 548 /* 549 * CDDL HEADER START 550 * 551 * The contents of this file are subject to the terms of the 552 * Common Development and Distribution License, Version 1.0 only 553 * (the "License"). You may not use this file except in compliance 554 * with the License. 555 * 556 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 557 * or http://www.opensolaris.org/os/licensing. 558 * See the License for the specific language governing permissions 559 * and limitations under the License. 560 * 561 * When distributing Covered Code, include this CDDL HEADER in each 562 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 563 * If applicable, add the following below this CDDL HEADER, with the 564 * fields enclosed by brackets "[]" replaced with your own identifying 565 * information: Portions Copyright [yyyy] [name of copyright owner] 566 * 567 * CDDL HEADER END 568 */ 569 /* 570 * Copyright 1993 Sun Microsystems, Inc. All rights reserved. 571 * Use is subject to license terms. 572 */ 573 574 /* Copyright (c) 1988 AT&T */ 575 /* All Rights Reserved */ 576 577 #pragma ident "%Z%%M% %I% %E% SMI" 578 579 /* 580 ** Skeleton parser driver for yacc output 581 */ 582 583 /* 584 ** yacc user known macros and defines 585 */ 586 #define YYERROR goto yyerrlab 587 #define YYACCEPT return(0) 588 #define YYABORT return(1) 589 #define YYBACKUP( newtoken, newvalue )\ 590 {\ 591 if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\ 592 {\ 593 yyerror( "syntax error - cannot backup" );\ 594 goto yyerrlab;\ 595 }\ 596 yychar = newtoken;\ 597 yystate = *yyps;\ 598 yylval = newvalue;\ 599 goto yynewstate;\ 600 } 601 #define YYRECOVERING() (!!yyerrflag) 602 #define YYNEW(type) malloc(sizeof(type) * yynewmax) 603 #define YYCOPY(to, from, type) \ 604 (type *) memcpy(to, (char *) from, yymaxdepth * sizeof (type)) 605 #define YYENLARGE( from, type) \ 606 (type *) realloc((char *) from, yynewmax * sizeof(type)) 607 #ifndef YYDEBUG 608 # define YYDEBUG 1 /* make debugging available */ 609 #endif 610 611 /* 612 ** user known globals 613 */ 614 int yydebug; /* set to 1 to get debugging */ 615 616 /* 617 ** driver internal defines 618 */ 619 #define YYFLAG (-10000000) 620 621 /* 622 ** global variables used by the parser 623 */ 624 YYSTYPE *yypv; /* top of value stack */ 625 int *yyps; /* top of state stack */ 626 627 int yystate; /* current state */ 628 int yytmp; /* extra var (lasts between blocks) */ 629 630 int yynerrs; /* number of errors */ 631 int yyerrflag; /* error recovery flag */ 632 int yychar; /* current input token number */ 633 634 635 636 #ifdef YYNMBCHARS 637 #define YYLEX() yycvtok(yylex()) 638 /* 639 ** yycvtok - return a token if i is a wchar_t value that exceeds 255. 640 ** If i<255, i itself is the token. If i>255 but the neither 641 ** of the 30th or 31st bit is on, i is already a token. 642 */ 643 #if defined(__STDC__) || defined(__cplusplus) 644 int yycvtok(int i) 645 #else 646 int yycvtok(i) int i; 647 #endif 648 { 649 int first = 0; 650 int last = YYNMBCHARS - 1; 651 int mid; 652 wchar_t j; 653 654 if(i&0x60000000){/*Must convert to a token. */ 655 if( yymbchars[last].character < i ){ 656 return i;/*Giving up*/ 657 } 658 while ((last>=first)&&(first>=0)) {/*Binary search loop*/ 659 mid = (first+last)/2; 660 j = yymbchars[mid].character; 661 if( j==i ){/*Found*/ 662 return yymbchars[mid].tvalue; 663 }else if( j<i ){ 664 first = mid + 1; 665 }else{ 666 last = mid -1; 667 } 668 } 669 /*No entry in the table.*/ 670 return i;/* Giving up.*/ 671 }else{/* i is already a token. */ 672 return i; 673 } 674 } 675 #else/*!YYNMBCHARS*/ 676 #define YYLEX() yylex() 677 #endif/*!YYNMBCHARS*/ 678 679 /* 680 ** yyparse - return 0 if worked, 1 if syntax error not recovered from 681 */ 682 #if defined(__STDC__) || defined(__cplusplus) 683 int yyparse(void) 684 #else 685 int yyparse() 686 #endif 687 { 688 register YYSTYPE *yypvt = 0; /* top of value stack for $vars */ 689 690 #if defined(__cplusplus) || defined(lint) 691 /* 692 hacks to please C++ and lint - goto's inside 693 switch should never be executed 694 */ 695 static int __yaccpar_lint_hack__ = 0; 696 switch (__yaccpar_lint_hack__) 697 { 698 case 1: goto yyerrlab; 699 case 2: goto yynewstate; 700 } 701 #endif 702 703 /* 704 ** Initialize externals - yyparse may be called more than once 705 */ 706 yypv = &yyv[-1]; 707 yyps = &yys[-1]; 708 yystate = 0; 709 yytmp = 0; 710 yynerrs = 0; 711 yyerrflag = 0; 712 yychar = -1; 713 714 #if YYMAXDEPTH <= 0 715 if (yymaxdepth <= 0) 716 { 717 if ((yymaxdepth = YYEXPAND(0)) <= 0) 718 { 719 yyerror("yacc initialization error"); 720 YYABORT; 721 } 722 } 723 #endif 724 725 { 726 register YYSTYPE *yy_pv; /* top of value stack */ 727 register int *yy_ps; /* top of state stack */ 728 register int yy_state; /* current state */ 729 register int yy_n; /* internal state number info */ 730 goto yystack; /* moved from 6 lines above to here to please C++ */ 731 732 /* 733 ** get globals into registers. 734 ** branch to here only if YYBACKUP was called. 735 */ 736 yynewstate: 737 yy_pv = yypv; 738 yy_ps = yyps; 739 yy_state = yystate; 740 goto yy_newstate; 741 742 /* 743 ** get globals into registers. 744 ** either we just started, or we just finished a reduction 745 */ 746 yystack: 747 yy_pv = yypv; 748 yy_ps = yyps; 749 yy_state = yystate; 750 751 /* 752 ** top of for (;;) loop while no reductions done 753 */ 754 yy_stack: 755 /* 756 ** put a state and value onto the stacks 757 */ 758 #if YYDEBUG 759 /* 760 ** if debugging, look up token value in list of value vs. 761 ** name pairs. 0 and negative (-1) are special values. 762 ** Note: linear search is used since time is not a real 763 ** consideration while debugging. 764 */ 765 if ( yydebug ) 766 { 767 register int yy_i; 768 769 printf( "State %d, token ", yy_state ); 770 if ( yychar == 0 ) 771 printf( "end-of-file\n" ); 772 else if ( yychar < 0 ) 773 printf( "-none-\n" ); 774 else 775 { 776 for ( yy_i = 0; yytoks[yy_i].t_val >= 0; 777 yy_i++ ) 778 { 779 if ( yytoks[yy_i].t_val == yychar ) 780 break; 781 } 782 printf( "%s\n", yytoks[yy_i].t_name ); 783 } 784 } 785 #endif /* YYDEBUG */ 786 if ( ++yy_ps >= &yys[ yymaxdepth ] ) /* room on stack? */ 787 { 788 /* 789 ** reallocate and recover. Note that pointers 790 ** have to be reset, or bad things will happen 791 */ 792 long yyps_index = (yy_ps - yys); 793 long yypv_index = (yy_pv - yyv); 794 long yypvt_index = (yypvt - yyv); 795 int yynewmax; 796 #ifdef YYEXPAND 797 yynewmax = YYEXPAND(yymaxdepth); 798 #else 799 yynewmax = 2 * yymaxdepth; /* double table size */ 800 if (yymaxdepth == YYMAXDEPTH) /* first time growth */ 801 { 802 char *newyys = (char *)YYNEW(int); 803 char *newyyv = (char *)YYNEW(YYSTYPE); 804 if (newyys != 0 && newyyv != 0) 805 { 806 yys = YYCOPY(newyys, yys, int); 807 yyv = YYCOPY(newyyv, yyv, YYSTYPE); 808 } 809 else 810 yynewmax = 0; /* failed */ 811 } 812 else /* not first time */ 813 { 814 yys = YYENLARGE(yys, int); 815 yyv = YYENLARGE(yyv, YYSTYPE); 816 if (yys == 0 || yyv == 0) 817 yynewmax = 0; /* failed */ 818 } 819 #endif 820 if (yynewmax <= yymaxdepth) /* tables not expanded */ 821 { 822 yyerror( "yacc stack overflow" ); 823 YYABORT; 824 } 825 yymaxdepth = yynewmax; 826 827 yy_ps = yys + yyps_index; 828 yy_pv = yyv + yypv_index; 829 yypvt = yyv + yypvt_index; 830 } 831 *yy_ps = yy_state; 832 *++yy_pv = yyval; 833 834 /* 835 ** we have a new state - find out what to do 836 */ 837 yy_newstate: 838 if ( ( yy_n = yypact[ yy_state ] ) <= YYFLAG ) 839 goto yydefault; /* simple state */ 840 #if YYDEBUG 841 /* 842 ** if debugging, need to mark whether new token grabbed 843 */ 844 yytmp = yychar < 0; 845 #endif 846 if ( ( yychar < 0 ) && ( ( yychar = YYLEX() ) < 0 ) ) 847 yychar = 0; /* reached EOF */ 848 #if YYDEBUG 849 if ( yydebug && yytmp ) 850 { 851 register int yy_i; 852 853 printf( "Received token " ); 854 if ( yychar == 0 ) 855 printf( "end-of-file\n" ); 856 else if ( yychar < 0 ) 857 printf( "-none-\n" ); 858 else 859 { 860 for ( yy_i = 0; yytoks[yy_i].t_val >= 0; 861 yy_i++ ) 862 { 863 if ( yytoks[yy_i].t_val == yychar ) 864 break; 865 } 866 printf( "%s\n", yytoks[yy_i].t_name ); 867 } 868 } 869 #endif /* YYDEBUG */ 870 if ( ( ( yy_n += yychar ) < 0 ) || ( yy_n >= YYLAST ) ) 871 goto yydefault; 872 if ( yychk[ yy_n = yyact[ yy_n ] ] == yychar ) /*valid shift*/ 873 { 874 yychar = -1; 875 yyval = yylval; 876 yy_state = yy_n; 877 if ( yyerrflag > 0 ) 878 yyerrflag--; 879 goto yy_stack; 880 } 881 882 yydefault: 883 if ( ( yy_n = yydef[ yy_state ] ) == -2 ) 884 { 885 #if YYDEBUG 886 yytmp = yychar < 0; 887 #endif 888 if ( ( yychar < 0 ) && ( ( yychar = YYLEX() ) < 0 ) ) 889 yychar = 0; /* reached EOF */ 890 #if YYDEBUG 891 if ( yydebug && yytmp ) 892 { 893 register int yy_i; 894 895 printf( "Received token " ); 896 if ( yychar == 0 ) 897 printf( "end-of-file\n" ); 898 else if ( yychar < 0 ) 899 printf( "-none-\n" ); 900 else 901 { 902 for ( yy_i = 0; 903 yytoks[yy_i].t_val >= 0; 904 yy_i++ ) 905 { 906 if ( yytoks[yy_i].t_val 907 == yychar ) 908 { 909 break; 910 } 911 } 912 printf( "%s\n", yytoks[yy_i].t_name ); 913 } 914 } 915 #endif /* YYDEBUG */ 916 /* 917 ** look through exception table 918 */ 919 { 920 register YYCONST int *yyxi = yyexca; 921 922 while ( ( *yyxi != -1 ) || 923 ( yyxi[1] != yy_state ) ) 924 { 925 yyxi += 2; 926 } 927 while ( ( *(yyxi += 2) >= 0 ) && 928 ( *yyxi != yychar ) ) 929 ; 930 if ( ( yy_n = yyxi[1] ) < 0 ) 931 YYACCEPT; 932 } 933 } 934 935 /* 936 ** check for syntax error 937 */ 938 if ( yy_n == 0 ) /* have an error */ 939 { 940 /* no worry about speed here! */ 941 switch ( yyerrflag ) 942 { 943 case 0: /* new error */ 944 yyerror( "syntax error" ); 945 goto skip_init; 946 yyerrlab: 947 /* 948 ** get globals into registers. 949 ** we have a user generated syntax type error 950 */ 951 yy_pv = yypv; 952 yy_ps = yyps; 953 yy_state = yystate; 954 skip_init: 955 yynerrs++; 956 /* FALLTHRU */ 957 case 1: 958 case 2: /* incompletely recovered error */ 959 /* try again... */ 960 yyerrflag = 3; 961 /* 962 ** find state where "error" is a legal 963 ** shift action 964 */ 965 while ( yy_ps >= yys ) 966 { 967 yy_n = yypact[ *yy_ps ] + YYERRCODE; 968 if ( yy_n >= 0 && yy_n < YYLAST && 969 yychk[yyact[yy_n]] == YYERRCODE) { 970 /* 971 ** simulate shift of "error" 972 */ 973 yy_state = yyact[ yy_n ]; 974 goto yy_stack; 975 } 976 /* 977 ** current state has no shift on 978 ** "error", pop stack 979 */ 980 #if YYDEBUG 981 # define _POP_ "Error recovery pops state %d, uncovers state %d\n" 982 if ( yydebug ) 983 printf( _POP_, *yy_ps, 984 yy_ps[-1] ); 985 # undef _POP_ 986 #endif 987 yy_ps--; 988 yy_pv--; 989 } 990 /* 991 ** there is no state on stack with "error" as 992 ** a valid shift. give up. 993 */ 994 YYABORT; 995 case 3: /* no shift yet; eat a token */ 996 #if YYDEBUG 997 /* 998 ** if debugging, look up token in list of 999 ** pairs. 0 and negative shouldn't occur, 1000 ** but since timing doesn't matter when 1001 ** debugging, it doesn't hurt to leave the 1002 ** tests here. 1003 */ 1004 if ( yydebug ) 1005 { 1006 register int yy_i; 1007 1008 printf( "Error recovery discards " ); 1009 if ( yychar == 0 ) 1010 printf( "token end-of-file\n" ); 1011 else if ( yychar < 0 ) 1012 printf( "token -none-\n" ); 1013 else 1014 { 1015 for ( yy_i = 0; 1016 yytoks[yy_i].t_val >= 0; 1017 yy_i++ ) 1018 { 1019 if ( yytoks[yy_i].t_val 1020 == yychar ) 1021 { 1022 break; 1023 } 1024 } 1025 printf( "token %s\n", 1026 yytoks[yy_i].t_name ); 1027 } 1028 } 1029 #endif /* YYDEBUG */ 1030 if ( yychar == 0 ) /* reached EOF. quit */ 1031 YYABORT; 1032 yychar = -1; 1033 goto yy_newstate; 1034 } 1035 }/* end if ( yy_n == 0 ) */ 1036 /* 1037 ** reduction by production yy_n 1038 ** put stack tops, etc. so things right after switch 1039 */ 1040 #if YYDEBUG 1041 /* 1042 ** if debugging, print the string that is the user's 1043 ** specification of the reduction which is just about 1044 ** to be done. 1045 */ 1046 if ( yydebug ) 1047 printf( "Reduce by (%d) \"%s\"\n", 1048 yy_n, yyreds[ yy_n ] ); 1049 #endif 1050 yytmp = yy_n; /* value to switch over */ 1051 yypvt = yy_pv; /* $vars top of value stack */ 1052 /* 1053 ** Look in goto table for next state 1054 ** Sorry about using yy_state here as temporary 1055 ** register variable, but why not, if it works... 1056 ** If yyr2[ yy_n ] doesn't have the low order bit 1057 ** set, then there is no action to be done for 1058 ** this reduction. So, no saving & unsaving of 1059 ** registers done. The only difference between the 1060 ** code just after the if and the body of the if is 1061 ** the goto yy_stack in the body. This way the test 1062 ** can be made before the choice of what to do is needed. 1063 */ 1064 { 1065 /* length of production doubled with extra bit */ 1066 register int yy_len = yyr2[ yy_n ]; 1067 1068 if ( !( yy_len & 01 ) ) 1069 { 1070 yy_len >>= 1; 1071 yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */ 1072 yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] + 1073 *( yy_ps -= yy_len ) + 1; 1074 if ( yy_state >= YYLAST || 1075 yychk[ yy_state = 1076 yyact[ yy_state ] ] != -yy_n ) 1077 { 1078 yy_state = yyact[ yypgo[ yy_n ] ]; 1079 } 1080 goto yy_stack; 1081 } 1082 yy_len >>= 1; 1083 yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */ 1084 yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] + 1085 *( yy_ps -= yy_len ) + 1; 1086 if ( yy_state >= YYLAST || 1087 yychk[ yy_state = yyact[ yy_state ] ] != -yy_n ) 1088 { 1089 yy_state = yyact[ yypgo[ yy_n ] ]; 1090 } 1091 } 1092 /* save until reenter driver code */ 1093 yystate = yy_state; 1094 yyps = yy_ps; 1095 yypv = yy_pv; 1096 } 1097 /* 1098 ** code supplied by user is placed in this switch 1099 */ 1100 switch( yytmp ) 1101 { 1102 1103 case 1: 1104 # line 96 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1105 { (void)tree_root(yypvt[-0].np); } break; 1106 case 2: 1107 # line 100 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1108 { yyval.np = NULL; } break; 1109 case 3: 1110 # line 102 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1111 { yyval.np = tree_expr(T_LIST, yypvt[-1].np, yypvt[-0].np); } break; 1112 case 4: 1113 # line 106 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1114 { yyval.np = tree_nothing(); } break; 1115 case 5: 1116 # line 108 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1117 { yyval.np = yypvt[-0].np; } break; 1118 case 6: 1119 # line 110 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1120 { yyval.np = yypvt[-1].np; } break; 1121 case 7: 1122 # line 112 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1123 { yyval.np = tree_decl(T_EVENT, yypvt[-2].np, yypvt[-1].np, yypvt[-3].tok.file, yypvt[-3].tok.line); } break; 1124 case 8: 1125 # line 114 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1126 { yyval.np = tree_decl(T_ENGINE, yypvt[-2].np, yypvt[-1].np, yypvt[-3].tok.file, yypvt[-3].tok.line); } break; 1127 case 9: 1128 # line 116 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1129 { 1130 yyval.np = tree_stmt(T_PROP, yypvt[-1].np, yypvt[-2].tok.file, yypvt[-2].tok.line); 1131 } break; 1132 case 10: 1133 # line 120 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1134 { 1135 yyval.np = tree_stmt(T_MASK, yypvt[-1].np, yypvt[-2].tok.file, yypvt[-2].tok.line); 1136 } break; 1137 case 11: 1138 # line 124 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1139 { 1140 yyval.np = tree_decl(T_ASRU, yypvt[-2].np, yypvt[-1].np, yypvt[-3].tok.file, yypvt[-3].tok.line); 1141 } break; 1142 case 12: 1143 # line 128 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1144 { 1145 yyval.np = tree_decl(T_FRU, yypvt[-2].np, yypvt[-1].np, yypvt[-3].tok.file, yypvt[-3].tok.line); 1146 } break; 1147 case 13: 1148 # line 132 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1149 { 1150 yyval.np = tree_decl(T_CONFIG, yypvt[-2].np, yypvt[-1].np, yypvt[-3].tok.file, yypvt[-3].tok.line); 1151 } break; 1152 case 14: 1153 # line 136 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1154 { yyval.np = tree_nothing(); } break; 1155 case 15: 1156 # line 140 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1157 { 1158 yyval.np = tree_arrow(yypvt[-4].np, yypvt[-3].np, yypvt[-1].np, yypvt[-0].np); 1159 } break; 1160 case 16: 1161 # line 144 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1162 { 1163 yyval.np = tree_arrow(yypvt[-4].np, yypvt[-3].np, yypvt[-1].np, yypvt[-0].np); 1164 } break; 1165 case 17: 1166 # line 150 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1167 { yyval.np = NULL; } break; 1168 case 18: 1169 # line 152 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1170 { yyval.np = yypvt[-1].np; } break; 1171 case 19: 1172 # line 156 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1173 { yyval.np = tree_num(yypvt[-0].tok.s, yypvt[-0].tok.file, yypvt[-0].tok.line); } break; 1174 case 20: 1175 # line 159 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1176 { yyval.np = tree_name(yypvt[-0].tok.s, IT_NONE, yypvt[-0].tok.file, yypvt[-0].tok.line); } break; 1177 case 21: 1178 # line 161 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1179 { yyval.np = yypvt[-1].np; } break; 1180 case 22: 1181 # line 163 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1182 { yyval.np = tree_expr(T_SUB, yypvt[-2].np, yypvt[-0].np); } break; 1183 case 23: 1184 # line 165 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1185 { yyval.np = tree_expr(T_ADD, yypvt[-2].np, yypvt[-0].np); } break; 1186 case 24: 1187 # line 167 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1188 { yyval.np = tree_expr(T_MUL, yypvt[-2].np, yypvt[-0].np); } break; 1189 case 25: 1190 # line 169 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1191 { yyval.np = tree_expr(T_DIV, yypvt[-2].np, yypvt[-0].np); } break; 1192 case 26: 1193 # line 171 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1194 { yyval.np = tree_expr(T_MOD, yypvt[-2].np, yypvt[-0].np); } break; 1195 case 27: 1196 # line 175 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1197 { yyval.np = NULL; } break; 1198 case 29: 1199 # line 178 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1200 { yyval.np = tree_expr(T_LIST, yypvt[-2].np, yypvt[-0].np); } break; 1201 case 30: 1202 # line 182 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1203 { yyval.np = tree_expr(T_NVPAIR, yypvt[-2].np, yypvt[-0].np); } break; 1204 case 31: 1205 # line 185 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1206 { 1207 yyval.np = tree_expr(T_NVPAIR, 1208 tree_name(yypvt[-2].tok.s, IT_NONE, yypvt[-2].tok.file, yypvt[-2].tok.line), yypvt[-0].np); 1209 } break; 1210 case 32: 1211 # line 191 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1212 { 1213 yyval.np = tree_expr(T_NVPAIR, 1214 tree_name(yypvt[-2].tok.s, IT_NONE, yypvt[-2].tok.file, yypvt[-2].tok.line), yypvt[-0].np); 1215 } break; 1216 case 33: 1217 # line 198 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1218 { yyval.np = tree_name(yypvt[-0].tok.s, IT_NONE, yypvt[-0].tok.file, yypvt[-0].tok.line); } break; 1219 case 34: 1220 # line 200 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1221 { 1222 /* hack to allow dashes in property names */ 1223 yyval.np = tree_name_repairdash(yypvt[-2].np, yypvt[-0].tok.s); 1224 } break; 1225 case 36: 1226 # line 209 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1227 { yyval.np = tree_event(yypvt[-1].np, yypvt[-0].np, NULL); } break; 1228 case 40: 1229 # line 218 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1230 { yyval.np = tree_timeval(yypvt[-1].tok.s, yypvt[-0].tok.s, yypvt[-1].tok.file, yypvt[-1].tok.line); } break; 1231 case 41: 1232 # line 220 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1233 { yyval.np = tree_quote(yypvt[-0].tok.s, yypvt[-0].tok.file, yypvt[-0].tok.line); } break; 1234 case 42: 1235 # line 225 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1236 { yyval.np = tree_expr(T_SUB, yypvt[-2].np, yypvt[-0].np); } break; 1237 case 43: 1238 # line 227 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1239 { yyval.np = tree_expr(T_ADD, yypvt[-2].np, yypvt[-0].np); } break; 1240 case 44: 1241 # line 229 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1242 { yyval.np = tree_expr(T_MUL, yypvt[-2].np, yypvt[-0].np); } break; 1243 case 45: 1244 # line 231 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1245 { yyval.np = tree_expr(T_DIV, yypvt[-2].np, yypvt[-0].np); } break; 1246 case 46: 1247 # line 233 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1248 { yyval.np = tree_expr(T_DIV, yypvt[-2].np, yypvt[-0].np); } break; 1249 case 47: 1250 # line 235 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1251 { yyval.np = tree_expr(T_MOD, yypvt[-2].np, yypvt[-0].np); } break; 1252 case 48: 1253 # line 237 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1254 { yyval.np = yypvt[-1].np; } break; 1255 case 49: 1256 # line 239 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1257 { yyval.np = tree_num(yypvt[-0].tok.s, yypvt[-0].tok.file, yypvt[-0].tok.line); } break; 1258 case 51: 1259 # line 244 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1260 { yyval.np = tree_expr(T_LIST, yypvt[-2].np, yypvt[-0].np); } break; 1261 case 52: 1262 # line 248 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1263 { yyval.np = tree_event(yypvt[-2].np, yypvt[-1].np, yypvt[-0].np); } break; 1264 case 53: 1265 # line 252 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1266 { yyval.np = NULL; } break; 1267 case 54: 1268 # line 254 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1269 { yyval.np = yypvt[-0].np; } break; 1270 case 55: 1271 # line 258 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1272 { yyval.np = NULL; } break; 1273 case 56: 1274 # line 260 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1275 { yyval.np = yypvt[-1].np; } break; 1276 case 58: 1277 # line 265 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1278 { yyval.np = tree_expr(T_LIST, yypvt[-2].np, yypvt[-0].np); } break; 1279 case 60: 1280 # line 278 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1281 { yyval.np = tree_timeval(yypvt[-1].tok.s, yypvt[-0].tok.s, yypvt[-1].tok.file, yypvt[-1].tok.line); } break; 1282 case 61: 1283 # line 282 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1284 { yyval.np = tree_expr(T_ASSIGN, yypvt[-2].np, yypvt[-0].np); } break; 1285 case 62: 1286 # line 284 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1287 { yyval.np = tree_expr(T_CONDIF, yypvt[-2].np, yypvt[-0].np); } break; 1288 case 63: 1289 # line 286 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1290 { yyval.np = tree_expr(T_CONDELSE, yypvt[-2].np, yypvt[-0].np); } break; 1291 case 64: 1292 # line 288 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1293 { yyval.np = tree_expr(T_OR, yypvt[-2].np, yypvt[-0].np); } break; 1294 case 65: 1295 # line 290 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1296 { yyval.np = tree_expr(T_AND, yypvt[-2].np, yypvt[-0].np); } break; 1297 case 66: 1298 # line 292 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1299 { yyval.np = tree_expr(T_BITOR, yypvt[-2].np, yypvt[-0].np); } break; 1300 case 67: 1301 # line 294 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1302 { yyval.np = tree_expr(T_BITXOR, yypvt[-2].np, yypvt[-0].np); } break; 1303 case 68: 1304 # line 296 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1305 { yyval.np = tree_expr(T_BITAND, yypvt[-2].np, yypvt[-0].np); } break; 1306 case 69: 1307 # line 298 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1308 { yyval.np = tree_expr(T_EQ, yypvt[-2].np, yypvt[-0].np); } break; 1309 case 70: 1310 # line 300 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1311 { yyval.np = tree_expr(T_NE, yypvt[-2].np, yypvt[-0].np); } break; 1312 case 71: 1313 # line 302 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1314 { yyval.np = tree_expr(T_LT, yypvt[-2].np, yypvt[-0].np); } break; 1315 case 72: 1316 # line 304 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1317 { yyval.np = tree_expr(T_LE, yypvt[-2].np, yypvt[-0].np); } break; 1318 case 73: 1319 # line 306 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1320 { yyval.np = tree_expr(T_GT, yypvt[-2].np, yypvt[-0].np); } break; 1321 case 74: 1322 # line 308 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1323 { yyval.np = tree_expr(T_GE, yypvt[-2].np, yypvt[-0].np); } break; 1324 case 75: 1325 # line 310 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1326 { yyval.np = tree_expr(T_LSHIFT, yypvt[-2].np, yypvt[-0].np); } break; 1327 case 76: 1328 # line 312 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1329 { yyval.np = tree_expr(T_RSHIFT, yypvt[-2].np, yypvt[-0].np); } break; 1330 case 77: 1331 # line 314 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1332 { yyval.np = tree_expr(T_SUB, yypvt[-2].np, yypvt[-0].np); } break; 1333 case 78: 1334 # line 316 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1335 { yyval.np = tree_expr(T_ADD, yypvt[-2].np, yypvt[-0].np); } break; 1336 case 79: 1337 # line 318 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1338 { yyval.np = tree_expr(T_MUL, yypvt[-2].np, yypvt[-0].np); } break; 1339 case 80: 1340 # line 320 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1341 { yyval.np = tree_expr(T_DIV, yypvt[-2].np, yypvt[-0].np); } break; 1342 case 81: 1343 # line 322 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1344 { yyval.np = tree_expr(T_DIV, yypvt[-2].np, yypvt[-0].np); } break; 1345 case 82: 1346 # line 324 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1347 { yyval.np = tree_expr(T_MOD, yypvt[-2].np, yypvt[-0].np); } break; 1348 case 83: 1349 # line 326 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1350 { yyval.np = tree_expr(T_NOT, yypvt[-0].np, NULL); } break; 1351 case 84: 1352 # line 328 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1353 { yyval.np = tree_expr(T_BITNOT, yypvt[-0].np, NULL); } break; 1354 case 85: 1355 # line 330 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1356 { yyval.np = yypvt[-1].np; } break; 1357 case 87: 1358 # line 333 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1359 { yyval.np = tree_num(yypvt[-0].tok.s, yypvt[-0].tok.file, yypvt[-0].tok.line); } break; 1360 case 88: 1361 # line 335 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1362 { 1363 /* iteration variable */ 1364 yyval.np = tree_name(yypvt[-0].tok.s, IT_NONE, yypvt[-0].tok.file, yypvt[-0].tok.line); 1365 } break; 1366 case 90: 1367 # line 341 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1368 { yyval.np = tree_quote(yypvt[-0].tok.s, yypvt[-0].tok.file, yypvt[-0].tok.line); } break; 1369 case 91: 1370 # line 345 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1371 { yyval.np = tree_func(yypvt[-2].tok.s, NULL, yypvt[-2].tok.file, yypvt[-2].tok.line); } break; 1372 case 92: 1373 # line 347 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1374 { yyval.np = tree_func(yypvt[-3].tok.s, yypvt[-1].np, yypvt[-3].tok.file, yypvt[-3].tok.line); } break; 1375 case 93: 1376 # line 349 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1377 { yyval.np = tree_func(yypvt[-3].tok.s, yypvt[-1].np, yypvt[-3].tok.file, yypvt[-3].tok.line); } break; 1378 case 96: 1379 # line 355 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1380 { yyval.np = tree_expr(T_LIST, yypvt[-2].np, yypvt[-0].np); } break; 1381 case 98: 1382 # line 360 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1383 { yyval.np = tree_pname(yypvt[-0].np); } break; 1384 case 99: 1385 # line 362 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1386 { yyval.np = tree_quote(yypvt[-0].tok.s, yypvt[-0].tok.file, yypvt[-0].tok.line); } break; 1387 case 100: 1388 # line 364 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1389 { yyval.np = tree_func(yypvt[-3].tok.s, yypvt[-1].np, yypvt[-3].tok.file, yypvt[-3].tok.line); } break; 1390 case 101: 1391 # line 372 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1392 { yyval.np = tree_func(yypvt[-3].tok.s, tree_pname(yypvt[-1].np), yypvt[-3].tok.file, yypvt[-3].tok.line); } break; 1393 case 102: 1394 # line 374 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1395 { yyval.np = tree_func(yypvt[-3].tok.s, tree_pname(yypvt[-1].np), yypvt[-3].tok.file, yypvt[-3].tok.line); } break; 1396 case 103: 1397 # line 376 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1398 { yyval.np = tree_func(yypvt[-3].tok.s, yypvt[-1].np, yypvt[-3].tok.file, yypvt[-3].tok.line); } break; 1399 case 104: 1400 # line 380 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1401 { yyval.np = tree_globid(yypvt[-0].tok.s, yypvt[-0].tok.file, yypvt[-0].tok.line); } break; 1402 case 105: 1403 # line 384 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1404 { yyval.np = tree_name(yypvt[-0].tok.s, IT_VERTICAL, yypvt[-0].tok.file, yypvt[-0].tok.line); } break; 1405 case 106: 1406 # line 386 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1407 { yyval.np = tree_name(yypvt[-2].tok.s, IT_VERTICAL, yypvt[-2].tok.file, yypvt[-2].tok.line); } break; 1408 case 107: 1409 # line 388 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1410 { 1411 yyval.np = tree_name_iterator( 1412 tree_name(yypvt[-3].tok.s, IT_VERTICAL, yypvt[-3].tok.file, yypvt[-3].tok.line), yypvt[-1].np); 1413 } break; 1414 case 108: 1415 # line 393 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1416 { yyval.np = tree_name(yypvt[-2].tok.s, IT_HORIZONTAL, yypvt[-2].tok.file, yypvt[-2].tok.line); } break; 1417 case 109: 1418 # line 395 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1419 { 1420 yyval.np = tree_name_iterator( 1421 tree_name(yypvt[-3].tok.s, IT_HORIZONTAL, yypvt[-3].tok.file, yypvt[-3].tok.line), 1422 tree_name(yypvt[-1].tok.s, IT_NONE, yypvt[-1].tok.file, yypvt[-1].tok.line)); 1423 } break; 1424 case 110: 1425 # line 401 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1426 { 1427 /* hack to allow dashes in path name components */ 1428 yyval.np = tree_name_repairdash2(yypvt[-2].tok.s, yypvt[-0].np); 1429 } break; 1430 case 111: 1431 # line 409 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1432 { yyval.np = tree_iname(yypvt[-0].tok.s, yypvt[-0].tok.file, yypvt[-0].tok.line); } break; 1433 case 112: 1434 # line 414 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1435 { 1436 yyval.np = tree_name_append( 1437 tree_name(yypvt[-2].tok.s, IT_ENAME, yypvt[-2].tok.file, yypvt[-2].tok.line), 1438 tree_name(yypvt[-0].tok.s, IT_NONE, yypvt[-0].tok.file, yypvt[-0].tok.line)); 1439 } break; 1440 case 113: 1441 # line 420 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1442 { 1443 yyval.np = tree_name_append(yypvt[-2].np, 1444 tree_name(yypvt[-0].tok.s, IT_NONE, yypvt[-0].tok.file, yypvt[-0].tok.line)); 1445 } break; 1446 case 114: 1447 # line 425 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1448 { 1449 /* 1450 * hack to allow dashes in class names. when we 1451 * detect the dash here, we know we're in a class 1452 * name because the left recursion of this rule 1453 * means we've already matched at least: 1454 * ID '.' ID 1455 * so the ename here has an incomplete final 1456 * component (because the lexer stopped at the 1457 * dash). so we repair that final component here. 1458 */ 1459 yyval.np = tree_name_repairdash(yypvt[-2].np, yypvt[-0].tok.s); 1460 } break; 1461 case 125: 1462 # line 455 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1463 { yyval.np = tree_name_append(yypvt[-2].np, yypvt[-0].np); } break; 1464 case 127: 1465 # line 461 "/home/git3/dehawe/titanic_53/usr/src/cmd/fm/eversholt/common/escparse.y" 1466 { yyval.np = tree_name_append(yypvt[-2].np, yypvt[-0].np); } break; 1467 # line 556 "/usr/share/lib/ccs/yaccpar" 1468 } 1469 goto yystack; /* reset registers in driver code */ 1470 } 1471 1472