github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/tools/syz-trace2syz/parser/strace.go (about) 1 // Code generated by goyacc -o strace.go -p Strace -v= strace.y. DO NOT EDIT. 2 3 //line strace.y:2 4 // Copyright 2018 syzkaller project authors. All rights reserved. 5 // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 6 7 //go:build !codeanalysis 8 9 package parser 10 11 import __yyfmt__ "fmt" 12 13 //line strace.y:7 14 15 //line strace.y:13 16 type StraceSymType struct { 17 yys int 18 data string 19 val_int int64 20 val_double float64 21 val_ret_type int64 22 val_uint uint64 23 val_constant Constant 24 val_identifiers []*BufferType 25 val_buf_type *BufferType 26 val_group_type *GroupType 27 val_type IrType 28 val_types []IrType 29 val_syscall *Syscall 30 } 31 32 const STRING_LITERAL = 57346 33 const IPV6 = 57347 34 const IDENTIFIER = 57348 35 const FLAG = 57349 36 const DATETIME = 57350 37 const SIGNAL_PLUS = 57351 38 const SIGNAL_MINUS = 57352 39 const MAC = 57353 40 const INT = 57354 41 const UINT = 57355 42 const DOUBLE = 57356 43 const QUESTION = 57357 44 const ARROW = 57358 45 const OR = 57359 46 const AND = 57360 47 const LOR = 57361 48 const TIMES = 57362 49 const LAND = 57363 50 const LEQUAL = 57364 51 const ONESCOMP = 57365 52 const LSHIFT = 57366 53 const RSHIFT = 57367 54 const NOT = 57368 55 const MINUS = 57369 56 const PLUS = 57370 57 const COMMA = 57371 58 const LBRACKET = 57372 59 const RBRACKET = 57373 60 const LBRACKET_SQUARE = 57374 61 const RBRACKET_SQUARE = 57375 62 const LPAREN = 57376 63 const RPAREN = 57377 64 const EQUALS = 57378 65 const UNFINISHED = 57379 66 const RESUMED = 57380 67 const NULL = 57381 68 const EQUALAT = 57382 69 const COLON = 57383 70 const FORWARDSLASH = 57384 71 const LOWEST = 57385 72 const NOFLAG = 57386 73 const NEG = 57387 74 75 var StraceToknames = [...]string{ 76 "$end", 77 "error", 78 "$unk", 79 "STRING_LITERAL", 80 "IPV6", 81 "IDENTIFIER", 82 "FLAG", 83 "DATETIME", 84 "SIGNAL_PLUS", 85 "SIGNAL_MINUS", 86 "MAC", 87 "INT", 88 "UINT", 89 "DOUBLE", 90 "QUESTION", 91 "ARROW", 92 "OR", 93 "AND", 94 "LOR", 95 "TIMES", 96 "LAND", 97 "LEQUAL", 98 "ONESCOMP", 99 "LSHIFT", 100 "RSHIFT", 101 "NOT", 102 "MINUS", 103 "PLUS", 104 "COMMA", 105 "LBRACKET", 106 "RBRACKET", 107 "LBRACKET_SQUARE", 108 "RBRACKET_SQUARE", 109 "LPAREN", 110 "RPAREN", 111 "EQUALS", 112 "UNFINISHED", 113 "RESUMED", 114 "NULL", 115 "EQUALAT", 116 "COLON", 117 "FORWARDSLASH", 118 "LOWEST", 119 "NOFLAG", 120 "NEG", 121 } 122 var StraceStatenames = [...]string{} 123 124 const StraceEofCode = 1 125 const StraceErrCode = 2 126 const StraceInitialStackSize = 16 127 128 //line yacctab:1 129 var StraceExca = [...]int{ 130 -1, 1, 131 1, -1, 132 -2, 0, 133 } 134 135 const StracePrivate = 57344 136 137 const StraceLast = 378 138 139 var StraceAct = [...]int{ 140 141 17, 91, 59, 38, 14, 18, 26, 27, 2, 10, 142 90, 39, 26, 27, 4, 38, 6, 50, 36, 104, 143 48, 30, 57, 50, 25, 49, 24, 30, 29, 56, 144 86, 35, 34, 28, 29, 54, 55, 51, 33, 28, 145 3, 40, 64, 65, 66, 67, 88, 68, 69, 70, 146 71, 72, 73, 74, 40, 11, 49, 97, 100, 80, 147 84, 39, 105, 101, 102, 38, 37, 103, 93, 94, 148 5, 58, 45, 89, 39, 95, 96, 45, 38, 46, 149 92, 25, 36, 24, 99, 85, 114, 83, 45, 82, 150 99, 99, 108, 98, 45, 46, 47, 75, 43, 44, 151 106, 46, 47, 16, 99, 15, 99, 99, 108, 110, 152 99, 108, 99, 108, 109, 0, 111, 97, 100, 61, 153 62, 0, 81, 101, 102, 1, 97, 100, 93, 94, 154 8, 0, 101, 102, 63, 95, 96, 93, 94, 0, 155 92, 25, 0, 24, 95, 96, 113, 0, 0, 92, 156 25, 0, 24, 98, 0, 112, 0, 97, 100, 0, 157 0, 0, 98, 101, 102, 0, 97, 100, 93, 94, 158 0, 0, 101, 102, 0, 95, 96, 93, 94, 0, 159 92, 25, 7, 24, 95, 96, 107, 0, 9, 92, 160 25, 0, 24, 98, 0, 0, 20, 0, 21, 0, 161 22, 0, 98, 23, 26, 27, 0, 52, 53, 20, 162 0, 21, 0, 22, 0, 19, 23, 26, 27, 30, 163 0, 13, 25, 0, 24, 0, 29, 32, 19, 31, 164 0, 28, 30, 0, 77, 25, 78, 24, 20, 29, 165 21, 0, 22, 0, 28, 23, 26, 27, 0, 0, 166 0, 20, 0, 21, 0, 22, 0, 19, 23, 26, 167 27, 30, 0, 13, 25, 0, 24, 76, 29, 0, 168 19, 0, 0, 28, 30, 0, 13, 25, 0, 24, 169 0, 29, 12, 20, 0, 21, 28, 22, 0, 0, 170 23, 26, 27, 0, 0, 0, 20, 0, 21, 0, 171 22, 0, 19, 23, 26, 27, 30, 0, 0, 25, 172 87, 24, 0, 29, 0, 19, 0, 0, 28, 30, 173 0, 0, 25, 0, 24, 0, 29, 41, 42, 0, 174 45, 28, 0, 0, 43, 44, 0, 46, 47, 41, 175 42, 0, 45, 0, 0, 79, 43, 44, 0, 46, 176 47, 42, 0, 45, 0, 0, 0, 43, 44, 0, 177 46, 47, 61, 62, 0, 60, 0, 0, 0, 0, 178 0, 0, 0, 0, 0, 0, 0, 63, 179 } 180 var StracePact = [...]int{ 181 182 2, -1000, 36, -21, 2, -29, 20, 247, -1000, 192, 183 3, -4, -5, 292, 25, -1000, -1000, -1000, 322, -6, 184 -1000, 5, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 0, 185 0, -1000, -7, -14, 56, 350, 25, 292, 292, 292, 186 292, 0, 0, 0, 0, 0, 0, 0, -1000, -1000, 187 0, 90, 234, 205, 310, -1000, 107, 77, -1000, 53, 188 -1000, -1000, -1000, 73, 38, -1000, -37, -25, 333, 74, 189 68, 68, -1000, 57, 52, -3, -1000, 279, -1000, -1000, 190 39, -1000, -1000, 160, 33, -1000, -17, -1000, 28, 160, 191 151, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 192 -1000, -1000, -1000, 160, 292, 160, 120, -1000, -1000, 111, 193 -37, 51, -1000, -1000, -1000, 194 } 195 var StracePgo = [...]int{ 196 197 0, 125, 2, 105, 0, 5, 1, 10, 4, 103, 198 182, 199 } 200 var StraceR1 = [...]int{ 201 202 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 203 1, 1, 1, 7, 7, 6, 6, 6, 6, 6, 204 6, 6, 6, 6, 6, 6, 2, 2, 2, 10, 205 10, 10, 8, 8, 8, 8, 8, 5, 5, 5, 206 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 207 4, 4, 4, 9, 9, 9, 9, 9, 3, 3, 208 3, 3, 209 } 210 var StraceR2 = [...]int{ 211 212 0, 4, 5, 6, 5, 5, 8, 9, 6, 6, 213 10, 9, 2, 1, 2, 1, 1, 1, 1, 1, 214 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 215 3, 2, 1, 1, 1, 1, 2, 1, 1, 1, 216 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 217 3, 3, 4, 3, 3, 3, 3, 6, 1, 1, 218 1, 1, 219 } 220 var StraceChk = [...]int{ 221 222 -1000, -1, 6, 38, 12, 34, 37, -10, -1, -10, 223 38, 35, 35, 29, -8, -3, -9, -4, -5, 23, 224 4, 6, 8, 11, 32, 30, 12, 13, 39, 34, 225 27, 37, 35, 35, 36, 36, -8, 41, 40, 36, 226 16, 17, 18, 24, 25, 20, 27, 28, -4, -5, 227 23, 32, -10, -10, -5, -5, 36, 36, 15, -2, 228 15, 12, 13, 27, -8, -8, -8, -8, -5, -5, 229 -5, -5, -5, -5, -5, 7, 33, 29, 31, 35, 230 -2, 15, 12, 34, 7, 12, 33, 31, 7, 34, 231 -7, -6, 29, 17, 18, 24, 25, 6, 42, -4, 232 7, 12, 13, 34, 36, 34, -7, 35, -6, -7, 233 -8, -7, 35, 35, 35, 234 } 235 var StraceDef = [...]int{ 236 237 0, -2, 0, 29, 0, 29, 0, 0, 12, 0, 238 0, 0, 0, 0, 31, 32, 33, 34, 35, 0, 239 58, 59, 60, 61, 29, 29, 37, 38, 39, 0, 240 0, 1, 0, 0, 0, 0, 30, 0, 0, 0, 241 0, 0, 0, 0, 0, 0, 0, 0, 36, 48, 242 0, 0, 0, 0, 0, 49, 0, 0, 2, 4, 243 5, 26, 27, 0, 53, 54, 55, 56, 40, 41, 244 42, 43, 45, 46, 47, 0, 50, 0, 51, 44, 245 8, 9, 3, 0, 0, 28, 0, 52, 0, 0, 246 0, 13, 15, 16, 17, 18, 19, 20, 21, 22, 247 23, 24, 25, 0, 0, 0, 0, 6, 14, 0, 248 57, 0, 11, 7, 10, 249 } 250 var StraceTok1 = [...]int{ 251 252 1, 253 } 254 var StraceTok2 = [...]int{ 255 256 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 257 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 258 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 259 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 260 42, 43, 44, 45, 261 } 262 var StraceTok3 = [...]int{ 263 0, 264 } 265 266 var StraceErrorMessages = [...]struct { 267 state int 268 token int 269 msg string 270 }{} 271 272 //line yaccpar:1 273 274 /* parser for yacc output */ 275 276 var ( 277 StraceDebug = 0 278 StraceErrorVerbose = false 279 ) 280 281 type StraceLexer interface { 282 Lex(lval *StraceSymType) int 283 Error(s string) 284 } 285 286 type StraceParser interface { 287 Parse(StraceLexer) int 288 Lookahead() int 289 } 290 291 type StraceParserImpl struct { 292 lval StraceSymType 293 stack [StraceInitialStackSize]StraceSymType 294 char int 295 } 296 297 func (p *StraceParserImpl) Lookahead() int { 298 return p.char 299 } 300 301 func StraceNewParser() StraceParser { 302 return &StraceParserImpl{} 303 } 304 305 const StraceFlag = -1000 306 307 func StraceTokname(c int) string { 308 if c >= 1 && c-1 < len(StraceToknames) { 309 if StraceToknames[c-1] != "" { 310 return StraceToknames[c-1] 311 } 312 } 313 return __yyfmt__.Sprintf("tok-%v", c) 314 } 315 316 func StraceStatname(s int) string { 317 if s >= 0 && s < len(StraceStatenames) { 318 if StraceStatenames[s] != "" { 319 return StraceStatenames[s] 320 } 321 } 322 return __yyfmt__.Sprintf("state-%v", s) 323 } 324 325 func StraceErrorMessage(state, lookAhead int) string { 326 const TOKSTART = 4 327 328 if !StraceErrorVerbose { 329 return "syntax error" 330 } 331 332 for _, e := range StraceErrorMessages { 333 if e.state == state && e.token == lookAhead { 334 return "syntax error: " + e.msg 335 } 336 } 337 338 res := "syntax error: unexpected " + StraceTokname(lookAhead) 339 340 // To match Bison, suggest at most four expected tokens. 341 expected := make([]int, 0, 4) 342 343 // Look for shiftable tokens. 344 base := StracePact[state] 345 for tok := TOKSTART; tok-1 < len(StraceToknames); tok++ { 346 if n := base + tok; n >= 0 && n < StraceLast && StraceChk[StraceAct[n]] == tok { 347 if len(expected) == cap(expected) { 348 return res 349 } 350 expected = append(expected, tok) 351 } 352 } 353 354 if StraceDef[state] == -2 { 355 i := 0 356 for StraceExca[i] != -1 || StraceExca[i+1] != state { 357 i += 2 358 } 359 360 // Look for tokens that we accept or reduce. 361 for i += 2; StraceExca[i] >= 0; i += 2 { 362 tok := StraceExca[i] 363 if tok < TOKSTART || StraceExca[i+1] == 0 { 364 continue 365 } 366 if len(expected) == cap(expected) { 367 return res 368 } 369 expected = append(expected, tok) 370 } 371 372 // If the default action is to accept or reduce, give up. 373 if StraceExca[i+1] != 0 { 374 return res 375 } 376 } 377 378 for i, tok := range expected { 379 if i == 0 { 380 res += ", expecting " 381 } else { 382 res += " or " 383 } 384 res += StraceTokname(tok) 385 } 386 return res 387 } 388 389 func Stracelex1(lex StraceLexer, lval *StraceSymType) (char, token int) { 390 token = 0 391 char = lex.Lex(lval) 392 if char <= 0 { 393 token = StraceTok1[0] 394 goto out 395 } 396 if char < len(StraceTok1) { 397 token = StraceTok1[char] 398 goto out 399 } 400 if char >= StracePrivate { 401 if char < StracePrivate+len(StraceTok2) { 402 token = StraceTok2[char-StracePrivate] 403 goto out 404 } 405 } 406 for i := 0; i < len(StraceTok3); i += 2 { 407 token = StraceTok3[i+0] 408 if token == char { 409 token = StraceTok3[i+1] 410 goto out 411 } 412 } 413 414 out: 415 if token == 0 { 416 token = StraceTok2[1] /* unknown char */ 417 } 418 if StraceDebug >= 3 { 419 __yyfmt__.Printf("lex %s(%d)\n", StraceTokname(token), uint(char)) 420 } 421 return char, token 422 } 423 424 func StraceParse(Stracelex StraceLexer) int { 425 return StraceNewParser().Parse(Stracelex) 426 } 427 428 func (Stracercvr *StraceParserImpl) Parse(Stracelex StraceLexer) int { 429 var Stracen int 430 var StraceVAL StraceSymType 431 var StraceDollar []StraceSymType 432 _ = StraceDollar // silence set and not used 433 StraceS := Stracercvr.stack[:] 434 435 Nerrs := 0 /* number of errors */ 436 Errflag := 0 /* error recovery flag */ 437 Stracestate := 0 438 Stracercvr.char = -1 439 Stracetoken := -1 // Stracercvr.char translated into internal numbering 440 defer func() { 441 // Make sure we report no lookahead when not parsing. 442 Stracestate = -1 443 Stracercvr.char = -1 444 Stracetoken = -1 445 }() 446 Stracep := -1 447 goto Stracestack 448 449 ret0: 450 return 0 451 452 ret1: 453 return 1 454 455 Stracestack: 456 /* put a state and value onto the stack */ 457 if StraceDebug >= 4 { 458 __yyfmt__.Printf("char %v in %v\n", StraceTokname(Stracetoken), StraceStatname(Stracestate)) 459 } 460 461 Stracep++ 462 if Stracep >= len(StraceS) { 463 nyys := make([]StraceSymType, len(StraceS)*2) 464 copy(nyys, StraceS) 465 StraceS = nyys 466 } 467 StraceS[Stracep] = StraceVAL 468 StraceS[Stracep].yys = Stracestate 469 470 Stracenewstate: 471 Stracen = StracePact[Stracestate] 472 if Stracen <= StraceFlag { 473 goto Stracedefault /* simple state */ 474 } 475 if Stracercvr.char < 0 { 476 Stracercvr.char, Stracetoken = Stracelex1(Stracelex, &Stracercvr.lval) 477 } 478 Stracen += Stracetoken 479 if Stracen < 0 || Stracen >= StraceLast { 480 goto Stracedefault 481 } 482 Stracen = StraceAct[Stracen] 483 if StraceChk[Stracen] == Stracetoken { /* valid shift */ 484 Stracercvr.char = -1 485 Stracetoken = -1 486 StraceVAL = Stracercvr.lval 487 Stracestate = Stracen 488 if Errflag > 0 { 489 Errflag-- 490 } 491 goto Stracestack 492 } 493 494 Stracedefault: 495 /* default state action */ 496 Stracen = StraceDef[Stracestate] 497 if Stracen == -2 { 498 if Stracercvr.char < 0 { 499 Stracercvr.char, Stracetoken = Stracelex1(Stracelex, &Stracercvr.lval) 500 } 501 502 /* look through exception table */ 503 xi := 0 504 for { 505 if StraceExca[xi+0] == -1 && StraceExca[xi+1] == Stracestate { 506 break 507 } 508 xi += 2 509 } 510 for xi += 2; ; xi += 2 { 511 Stracen = StraceExca[xi+0] 512 if Stracen < 0 || Stracen == Stracetoken { 513 break 514 } 515 } 516 Stracen = StraceExca[xi+1] 517 if Stracen < 0 { 518 goto ret0 519 } 520 } 521 if Stracen == 0 { 522 /* error ... attempt to resume parsing */ 523 switch Errflag { 524 case 0: /* brand new error */ 525 Stracelex.Error(StraceErrorMessage(Stracestate, Stracetoken)) 526 Nerrs++ 527 if StraceDebug >= 1 { 528 __yyfmt__.Printf("%s", StraceStatname(Stracestate)) 529 __yyfmt__.Printf(" saw %s\n", StraceTokname(Stracetoken)) 530 } 531 fallthrough 532 533 case 1, 2: /* incompletely recovered error ... try again */ 534 Errflag = 3 535 536 /* find a state where "error" is a legal shift action */ 537 for Stracep >= 0 { 538 Stracen = StracePact[StraceS[Stracep].yys] + StraceErrCode 539 if Stracen >= 0 && Stracen < StraceLast { 540 Stracestate = StraceAct[Stracen] /* simulate a shift of "error" */ 541 if StraceChk[Stracestate] == StraceErrCode { 542 goto Stracestack 543 } 544 } 545 546 /* the current p has no shift on "error", pop stack */ 547 if StraceDebug >= 2 { 548 __yyfmt__.Printf("error recovery pops state %d\n", StraceS[Stracep].yys) 549 } 550 Stracep-- 551 } 552 /* there is no state on the stack with an error shift ... abort */ 553 goto ret1 554 555 case 3: /* no shift yet; clobber input char */ 556 if StraceDebug >= 2 { 557 __yyfmt__.Printf("error recovery discards %s\n", StraceTokname(Stracetoken)) 558 } 559 if Stracetoken == StraceEofCode { 560 goto ret1 561 } 562 Stracercvr.char = -1 563 Stracetoken = -1 564 goto Stracenewstate /* try again in the same state */ 565 } 566 } 567 568 /* reduction by production Stracen */ 569 if StraceDebug >= 2 { 570 __yyfmt__.Printf("reduce %v in:\n\t%v\n", Stracen, StraceStatname(Stracestate)) 571 } 572 573 Stracent := Stracen 574 Stracept := Stracep 575 _ = Stracept // guard against "declared and not used" 576 577 Stracep -= StraceR2[Stracen] 578 // Stracep is now the index of $0. Perform the default action. Iff the 579 // reduced production is ε, $1 is possibly out of range. 580 if Stracep+1 >= len(StraceS) { 581 nyys := make([]StraceSymType, len(StraceS)*2) 582 copy(nyys, StraceS) 583 StraceS = nyys 584 } 585 StraceVAL = StraceS[Stracep+1] 586 587 /* consult goto table to find next state */ 588 Stracen = StraceR1[Stracen] 589 Straceg := StracePgo[Stracen] 590 Stracej := Straceg + StraceS[Stracep].yys + 1 591 592 if Stracej >= StraceLast { 593 Stracestate = StraceAct[Straceg] 594 } else { 595 Stracestate = StraceAct[Stracej] 596 if StraceChk[Stracestate] != -Stracen { 597 Stracestate = StraceAct[Straceg] 598 } 599 } 600 // dummy call; replaced with literal code 601 switch Stracent { 602 603 case 1: 604 StraceDollar = StraceS[Stracept-4 : Stracept+1] 605 //line strace.y:63 606 { 607 StraceVAL.val_syscall = NewSyscall(-1, StraceDollar[1].data, StraceDollar[3].val_types, int64(-1), true, false) 608 Stracelex.(*Stracelexer).result = StraceVAL.val_syscall 609 } 610 case 2: 611 StraceDollar = StraceS[Stracept-5 : Stracept+1] 612 //line strace.y:66 613 { 614 StraceVAL.val_syscall = NewSyscall(-1, "tmp", nil, -1, true, true) 615 Stracelex.(*Stracelexer).result = StraceVAL.val_syscall 616 } 617 case 3: 618 StraceDollar = StraceS[Stracept-6 : Stracept+1] 619 //line strace.y:71 620 { 621 StraceVAL.val_syscall = NewSyscall(-1, StraceDollar[1].data, nil, int64(StraceDollar[6].val_int), false, false) 622 Stracelex.(*Stracelexer).result = StraceVAL.val_syscall 623 } 624 case 4: 625 StraceDollar = StraceS[Stracept-5 : Stracept+1] 626 //line strace.y:76 627 { 628 StraceVAL.val_syscall = NewSyscall(-1, "tmp", StraceDollar[2].val_types, StraceDollar[5].val_ret_type, false, true) 629 Stracelex.(*Stracelexer).result = StraceVAL.val_syscall 630 } 631 case 5: 632 StraceDollar = StraceS[Stracept-5 : Stracept+1] 633 //line strace.y:78 634 { 635 StraceVAL.val_syscall = NewSyscall(-1, "tmp", StraceDollar[2].val_types, -1, false, true) 636 Stracelex.(*Stracelexer).result = StraceVAL.val_syscall 637 } 638 case 6: 639 StraceDollar = StraceS[Stracept-8 : Stracept+1] 640 //line strace.y:80 641 { 642 StraceVAL.val_syscall = NewSyscall(-1, "tmp", StraceDollar[2].val_types, StraceDollar[5].val_ret_type, false, true) 643 Stracelex.(*Stracelexer).result = StraceVAL.val_syscall 644 } 645 case 7: 646 StraceDollar = StraceS[Stracept-9 : Stracept+1] 647 //line strace.y:83 648 { 649 StraceVAL.val_syscall = NewSyscall(-1, "tmp", StraceDollar[2].val_types, StraceDollar[5].val_ret_type, false, true) 650 Stracelex.(*Stracelexer).result = StraceVAL.val_syscall 651 } 652 case 8: 653 StraceDollar = StraceS[Stracept-6 : Stracept+1] 654 //line strace.y:85 655 { 656 StraceVAL.val_syscall = NewSyscall(-1, StraceDollar[1].data, StraceDollar[3].val_types, StraceDollar[6].val_ret_type, false, false) 657 Stracelex.(*Stracelexer).result = StraceVAL.val_syscall 658 } 659 case 9: 660 StraceDollar = StraceS[Stracept-6 : Stracept+1] 661 //line strace.y:88 662 { 663 StraceVAL.val_syscall = NewSyscall(-1, StraceDollar[1].data, StraceDollar[3].val_types, -1, false, false) 664 Stracelex.(*Stracelexer).result = StraceVAL.val_syscall 665 } 666 case 10: 667 StraceDollar = StraceS[Stracept-10 : Stracept+1] 668 //line strace.y:91 669 { 670 StraceVAL.val_syscall = NewSyscall(-1, StraceDollar[1].data, StraceDollar[3].val_types, StraceDollar[6].val_ret_type, false, false) 671 Stracelex.(*Stracelexer).result = StraceVAL.val_syscall 672 } 673 case 11: 674 StraceDollar = StraceS[Stracept-9 : Stracept+1] 675 //line strace.y:94 676 { 677 StraceVAL.val_syscall = NewSyscall(-1, StraceDollar[1].data, StraceDollar[3].val_types, StraceDollar[6].val_ret_type, false, false) 678 Stracelex.(*Stracelexer).result = StraceVAL.val_syscall 679 } 680 case 12: 681 StraceDollar = StraceS[Stracept-2 : Stracept+1] 682 //line strace.y:97 683 { 684 call := StraceDollar[2].val_syscall 685 call.Pid = StraceDollar[1].val_int 686 Stracelex.(*Stracelexer).result = call 687 } 688 case 13: 689 StraceDollar = StraceS[Stracept-1 : Stracept+1] 690 //line strace.y:100 691 { 692 StraceVAL.val_type = nil 693 } 694 case 14: 695 StraceDollar = StraceS[Stracept-2 : Stracept+1] 696 //line strace.y:101 697 { 698 StraceVAL.val_type = nil 699 } 700 case 15: 701 StraceDollar = StraceS[Stracept-1 : Stracept+1] 702 //line strace.y:104 703 { 704 StraceVAL.val_type = nil 705 } 706 case 16: 707 StraceDollar = StraceS[Stracept-1 : Stracept+1] 708 //line strace.y:105 709 { 710 StraceVAL.val_type = nil 711 } 712 case 17: 713 StraceDollar = StraceS[Stracept-1 : Stracept+1] 714 //line strace.y:106 715 { 716 StraceVAL.val_type = nil 717 } 718 case 18: 719 StraceDollar = StraceS[Stracept-1 : Stracept+1] 720 //line strace.y:107 721 { 722 StraceVAL.val_type = nil 723 } 724 case 19: 725 StraceDollar = StraceS[Stracept-1 : Stracept+1] 726 //line strace.y:108 727 { 728 StraceVAL.val_type = nil 729 } 730 case 20: 731 StraceDollar = StraceS[Stracept-1 : Stracept+1] 732 //line strace.y:109 733 { 734 StraceVAL.val_type = nil 735 } 736 case 21: 737 StraceDollar = StraceS[Stracept-1 : Stracept+1] 738 //line strace.y:110 739 { 740 StraceVAL.val_type = nil 741 } 742 case 22: 743 StraceDollar = StraceS[Stracept-1 : Stracept+1] 744 //line strace.y:111 745 { 746 StraceVAL.val_type = nil 747 } 748 case 23: 749 StraceDollar = StraceS[Stracept-1 : Stracept+1] 750 //line strace.y:112 751 { 752 StraceVAL.val_type = nil 753 } 754 case 24: 755 StraceDollar = StraceS[Stracept-1 : Stracept+1] 756 //line strace.y:113 757 { 758 StraceVAL.val_type = nil 759 } 760 case 25: 761 StraceDollar = StraceS[Stracept-1 : Stracept+1] 762 //line strace.y:114 763 { 764 StraceVAL.val_type = nil 765 } 766 case 26: 767 StraceDollar = StraceS[Stracept-1 : Stracept+1] 768 //line strace.y:117 769 { 770 StraceVAL.val_ret_type = StraceDollar[1].val_int 771 } 772 case 27: 773 StraceDollar = StraceS[Stracept-1 : Stracept+1] 774 //line strace.y:118 775 { 776 StraceVAL.val_ret_type = int64(StraceDollar[1].val_uint) 777 } 778 case 28: 779 StraceDollar = StraceS[Stracept-2 : Stracept+1] 780 //line strace.y:119 781 { 782 StraceVAL.val_ret_type = -1 * StraceDollar[2].val_int 783 } 784 case 29: 785 StraceDollar = StraceS[Stracept-0 : Stracept+1] 786 //line strace.y:122 787 { 788 StraceVAL.val_types = []IrType{} 789 } 790 case 30: 791 StraceDollar = StraceS[Stracept-3 : Stracept+1] 792 //line strace.y:123 793 { 794 StraceDollar[1].val_types = append(StraceDollar[1].val_types, StraceDollar[3].val_type) 795 StraceVAL.val_types = StraceDollar[1].val_types 796 } 797 case 31: 798 StraceDollar = StraceS[Stracept-2 : Stracept+1] 799 //line strace.y:124 800 { 801 StraceDollar[1].val_types = append(StraceDollar[1].val_types, StraceDollar[2].val_type) 802 StraceVAL.val_types = StraceDollar[1].val_types 803 } 804 case 32: 805 StraceDollar = StraceS[Stracept-1 : Stracept+1] 806 //line strace.y:127 807 { 808 StraceVAL.val_type = StraceDollar[1].val_buf_type 809 } 810 case 33: 811 StraceDollar = StraceS[Stracept-1 : Stracept+1] 812 //line strace.y:128 813 { 814 StraceVAL.val_type = StraceDollar[1].val_type 815 } 816 case 34: 817 StraceDollar = StraceS[Stracept-1 : Stracept+1] 818 //line strace.y:129 819 { 820 StraceVAL.val_type = StraceDollar[1].val_group_type 821 } 822 case 35: 823 StraceDollar = StraceS[Stracept-1 : Stracept+1] 824 //line strace.y:130 825 { 826 StraceVAL.val_type = StraceDollar[1].val_constant 827 } 828 case 36: 829 StraceDollar = StraceS[Stracept-2 : Stracept+1] 830 //line strace.y:131 831 { 832 StraceVAL.val_type = StraceDollar[2].val_group_type 833 } 834 case 37: 835 StraceDollar = StraceS[Stracept-1 : Stracept+1] 836 //line strace.y:134 837 { 838 StraceVAL.val_constant = Constant(StraceDollar[1].val_int) 839 } 840 case 38: 841 StraceDollar = StraceS[Stracept-1 : Stracept+1] 842 //line strace.y:135 843 { 844 StraceVAL.val_constant = Constant(StraceDollar[1].val_uint) 845 } 846 case 39: 847 StraceDollar = StraceS[Stracept-1 : Stracept+1] 848 //line strace.y:136 849 { 850 StraceVAL.val_constant = Constant(uint64(0)) 851 } 852 case 40: 853 StraceDollar = StraceS[Stracept-3 : Stracept+1] 854 //line strace.y:137 855 { 856 StraceVAL.val_constant = StraceDollar[1].val_constant | StraceDollar[3].val_constant 857 } 858 case 41: 859 StraceDollar = StraceS[Stracept-3 : Stracept+1] 860 //line strace.y:138 861 { 862 StraceVAL.val_constant = StraceDollar[1].val_constant & StraceDollar[3].val_constant 863 } 864 case 42: 865 StraceDollar = StraceS[Stracept-3 : Stracept+1] 866 //line strace.y:139 867 { 868 StraceVAL.val_constant = StraceDollar[1].val_constant << StraceDollar[3].val_constant 869 } 870 case 43: 871 StraceDollar = StraceS[Stracept-3 : Stracept+1] 872 //line strace.y:140 873 { 874 StraceVAL.val_constant = StraceDollar[1].val_constant >> StraceDollar[3].val_constant 875 } 876 case 44: 877 StraceDollar = StraceS[Stracept-3 : Stracept+1] 878 //line strace.y:141 879 { 880 StraceVAL.val_constant = StraceDollar[2].val_constant 881 } 882 case 45: 883 StraceDollar = StraceS[Stracept-3 : Stracept+1] 884 //line strace.y:142 885 { 886 StraceVAL.val_constant = StraceDollar[1].val_constant * StraceDollar[3].val_constant 887 } 888 case 46: 889 StraceDollar = StraceS[Stracept-3 : Stracept+1] 890 //line strace.y:143 891 { 892 StraceVAL.val_constant = StraceDollar[1].val_constant - StraceDollar[3].val_constant 893 } 894 case 47: 895 StraceDollar = StraceS[Stracept-3 : Stracept+1] 896 //line strace.y:144 897 { 898 StraceVAL.val_constant = StraceDollar[1].val_constant + StraceDollar[3].val_constant 899 } 900 case 48: 901 StraceDollar = StraceS[Stracept-2 : Stracept+1] 902 //line strace.y:145 903 { 904 StraceVAL.val_constant = ^StraceDollar[2].val_constant 905 } 906 case 49: 907 StraceDollar = StraceS[Stracept-2 : Stracept+1] 908 //line strace.y:146 909 { 910 StraceVAL.val_constant = Constant(-int64(StraceDollar[2].val_constant)) 911 } 912 case 50: 913 StraceDollar = StraceS[Stracept-3 : Stracept+1] 914 //line strace.y:149 915 { 916 StraceVAL.val_group_type = newGroupType(StraceDollar[2].val_types) 917 } 918 case 51: 919 StraceDollar = StraceS[Stracept-3 : Stracept+1] 920 //line strace.y:150 921 { 922 StraceVAL.val_group_type = newGroupType(StraceDollar[2].val_types) 923 } 924 case 52: 925 StraceDollar = StraceS[Stracept-4 : Stracept+1] 926 //line strace.y:151 927 { 928 StraceVAL.val_group_type = newGroupType(StraceDollar[2].val_types) 929 } 930 case 53: 931 StraceDollar = StraceS[Stracept-3 : Stracept+1] 932 //line strace.y:154 933 { 934 StraceVAL.val_type = StraceDollar[3].val_type 935 } 936 case 54: 937 StraceDollar = StraceS[Stracept-3 : Stracept+1] 938 //line strace.y:155 939 { 940 StraceVAL.val_type = StraceDollar[3].val_type 941 } 942 case 55: 943 StraceDollar = StraceS[Stracept-3 : Stracept+1] 944 //line strace.y:156 945 { 946 StraceVAL.val_type = StraceDollar[3].val_type 947 } 948 case 56: 949 StraceDollar = StraceS[Stracept-3 : Stracept+1] 950 //line strace.y:157 951 { 952 StraceVAL.val_type = StraceDollar[1].val_type 953 } 954 case 57: 955 StraceDollar = StraceS[Stracept-6 : Stracept+1] 956 //line strace.y:158 957 { 958 StraceVAL.val_type = StraceDollar[6].val_type 959 } 960 case 58: 961 StraceDollar = StraceS[Stracept-1 : Stracept+1] 962 //line strace.y:161 963 { 964 StraceVAL.val_buf_type = newBufferType(StraceDollar[1].data) 965 } 966 case 59: 967 StraceDollar = StraceS[Stracept-1 : Stracept+1] 968 //line strace.y:162 969 { 970 StraceVAL.val_buf_type = newBufferType(StraceDollar[1].data) 971 } 972 case 60: 973 StraceDollar = StraceS[Stracept-1 : Stracept+1] 974 //line strace.y:163 975 { 976 StraceVAL.val_buf_type = newBufferType(StraceDollar[1].data) 977 } 978 case 61: 979 StraceDollar = StraceS[Stracept-1 : Stracept+1] 980 //line strace.y:164 981 { 982 StraceVAL.val_buf_type = newBufferType(StraceDollar[1].data) 983 } 984 } 985 goto Stracestack /* stack new state and value */ 986 }