1 NoEcho(' 2 /****************************************************************************** 3 * 4 * Module Name: aslprimaries.y - Rules for primary ASL operators 5 * 6 *****************************************************************************/ 7 8 /* 9 * Copyright (C) 2000 - 2016, Intel Corp. 10 * All rights reserved. 11 * 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions 14 * are met: 15 * 1. Redistributions of source code must retain the above copyright 16 * notice, this list of conditions, and the following disclaimer, 17 * without modification. 18 * 2. Redistributions in binary form must reproduce at minimum a disclaimer 19 * substantially similar to the "NO WARRANTY" disclaimer below 20 * ("Disclaimer") and any redistribution must be conditioned upon 21 * including a substantially similar Disclaimer requirement for further 22 * binary redistribution. 23 * 3. Neither the names of the above-listed copyright holders nor the names 24 * of any contributors may be used to endorse or promote products derived 25 * from this software without specific prior written permission. 26 * 27 * Alternatively, this software may be distributed under the terms of the 28 * GNU General Public License ("GPL") version 2 as published by the Free 29 * Software Foundation. 30 * 31 * NO WARRANTY 32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 35 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 36 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 40 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 41 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 42 * POSSIBILITY OF SUCH DAMAGES. 43 */ 44 45 ') 46 47 48 /******************************************************************************* 49 * 50 * ASL Primary Terms 51 * 52 ******************************************************************************/ 53 54 AccessAsTerm 55 : PARSEOP_ACCESSAS '(' 56 AccessTypeKeyword 57 OptionalAccessAttribTerm 58 ')' {$$ = TrCreateNode (PARSEOP_ACCESSAS,2,$3,$4);} 59 | PARSEOP_ACCESSAS '(' 60 error ')' {$$ = AslDoError(); yyclearin;} 61 ; 62 63 AcquireTerm 64 : PARSEOP_ACQUIRE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ACQUIRE);} 65 SuperName 66 ',' WordConstExpr 67 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$6);} 68 | PARSEOP_ACQUIRE '(' 69 error ')' {$$ = AslDoError(); yyclearin;} 70 ; 71 72 AddTerm 73 : PARSEOP_ADD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ADD);} 74 TermArg 75 TermArgItem 76 Target 77 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);} 78 | PARSEOP_ADD '(' 79 error ')' {$$ = AslDoError(); yyclearin;} 80 ; 81 82 AliasTerm 83 : PARSEOP_ALIAS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ALIAS);} 84 NameString 85 NameStringItem 86 ')' {$$ = TrLinkChildren ($<n>3,2,$4, 87 TrSetNodeFlags ($5, NODE_IS_NAME_DECLARATION));} 88 | PARSEOP_ALIAS '(' 89 error ')' {$$ = AslDoError(); yyclearin;} 90 ; 91 92 AndTerm 93 : PARSEOP_AND '(' {$<n>$ = TrCreateLeafNode (PARSEOP_AND);} 94 TermArg 95 TermArgItem 96 Target 97 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);} 98 | PARSEOP_AND '(' 99 error ')' {$$ = AslDoError(); yyclearin;} 100 ; 101 102 ArgTerm 103 : PARSEOP_ARG0 {$$ = TrCreateLeafNode (PARSEOP_ARG0);} 104 | PARSEOP_ARG1 {$$ = TrCreateLeafNode (PARSEOP_ARG1);} 105 | PARSEOP_ARG2 {$$ = TrCreateLeafNode (PARSEOP_ARG2);} 106 | PARSEOP_ARG3 {$$ = TrCreateLeafNode (PARSEOP_ARG3);} 107 | PARSEOP_ARG4 {$$ = TrCreateLeafNode (PARSEOP_ARG4);} 108 | PARSEOP_ARG5 {$$ = TrCreateLeafNode (PARSEOP_ARG5);} 109 | PARSEOP_ARG6 {$$ = TrCreateLeafNode (PARSEOP_ARG6);} 110 ; 111 112 BankFieldTerm 113 : PARSEOP_BANKFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_BANKFIELD);} 114 NameString 115 NameStringItem 116 TermArgItem 117 ',' AccessTypeKeyword 118 ',' LockRuleKeyword 119 ',' UpdateRuleKeyword 120 ')' '{' 121 FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,7, 122 $4,$5,$6,$8,$10,$12,$15);} 123 | PARSEOP_BANKFIELD '(' 124 error ')' '{' error '}' {$$ = AslDoError(); yyclearin;} 125 ; 126 127 BreakTerm 128 : PARSEOP_BREAK {$$ = TrCreateNode (PARSEOP_BREAK, 0);} 129 ; 130 131 BreakPointTerm 132 : PARSEOP_BREAKPOINT {$$ = TrCreateNode (PARSEOP_BREAKPOINT, 0);} 133 ; 134 135 BufferTerm 136 : PARSEOP_BUFFER {$<n>$ = TrCreateLeafNode (PARSEOP_BUFFER);} 137 OptionalDataCount 138 '{' BufferTermData '}' {$$ = TrLinkChildren ($<n>2,2,$3,$5);} 139 ; 140 141 BufferTermData 142 : ByteList {} 143 | StringData {} 144 ; 145 146 CaseTerm 147 : PARSEOP_CASE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CASE);} 148 DataObject 149 ')' '{' 150 TermList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);} 151 | PARSEOP_CASE '(' 152 error ')' {$$ = AslDoError(); yyclearin;} 153 ; 154 155 ConcatTerm 156 : PARSEOP_CONCATENATE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CONCATENATE);} 157 TermArg 158 TermArgItem 159 Target 160 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);} 161 | PARSEOP_CONCATENATE '(' 162 error ')' {$$ = AslDoError(); yyclearin;} 163 ; 164 165 ConcatResTerm 166 : PARSEOP_CONCATENATERESTEMPLATE '(' {$<n>$ = TrCreateLeafNode ( 167 PARSEOP_CONCATENATERESTEMPLATE);} 168 TermArg 169 TermArgItem 170 Target 171 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);} 172 | PARSEOP_CONCATENATERESTEMPLATE '(' 173 error ')' {$$ = AslDoError(); yyclearin;} 174 ; 175 176 ConnectionTerm 177 : PARSEOP_CONNECTION '(' 178 NameString 179 ')' {$$ = TrCreateNode (PARSEOP_CONNECTION,1,$3);} 180 | PARSEOP_CONNECTION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CONNECTION);} 181 ResourceMacroTerm 182 ')' {$$ = TrLinkChildren ($<n>3, 1, 183 TrLinkChildren ( 184 TrCreateLeafNode (PARSEOP_RESOURCETEMPLATE), 3, 185 TrCreateLeafNode (PARSEOP_DEFAULT_ARG), 186 TrCreateLeafNode (PARSEOP_DEFAULT_ARG), 187 $4));} 188 | PARSEOP_CONNECTION '(' 189 error ')' {$$ = AslDoError(); yyclearin;} 190 ; 191 192 CondRefOfTerm 193 : PARSEOP_CONDREFOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CONDREFOF);} 194 SuperName 195 Target 196 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 197 | PARSEOP_CONDREFOF '(' 198 error ')' {$$ = AslDoError(); yyclearin;} 199 ; 200 201 ContinueTerm 202 : PARSEOP_CONTINUE {$$ = TrCreateNode (PARSEOP_CONTINUE, 0);} 203 ; 204 205 CopyObjectTerm 206 : PARSEOP_COPYOBJECT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_COPYOBJECT);} 207 TermArg 208 ',' SimpleTarget 209 ')' {$$ = TrLinkChildren ($<n>3,2,$4, 210 TrSetNodeFlags ($6, NODE_IS_TARGET));} 211 | PARSEOP_COPYOBJECT '(' 212 error ')' {$$ = AslDoError(); yyclearin;} 213 ; 214 215 CreateBitFieldTerm 216 : PARSEOP_CREATEBITFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEBITFIELD);} 217 TermArg 218 TermArgItem 219 NameStringItem 220 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5, 221 TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));} 222 | PARSEOP_CREATEBITFIELD '(' 223 error ')' {$$ = AslDoError(); yyclearin;} 224 ; 225 226 CreateByteFieldTerm 227 : PARSEOP_CREATEBYTEFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEBYTEFIELD);} 228 TermArg 229 TermArgItem 230 NameStringItem 231 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5, 232 TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));} 233 | PARSEOP_CREATEBYTEFIELD '(' 234 error ')' {$$ = AslDoError(); yyclearin;} 235 ; 236 237 CreateDWordFieldTerm 238 : PARSEOP_CREATEDWORDFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEDWORDFIELD);} 239 TermArg 240 TermArgItem 241 NameStringItem 242 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5, 243 TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));} 244 | PARSEOP_CREATEDWORDFIELD '(' 245 error ')' {$$ = AslDoError(); yyclearin;} 246 ; 247 248 CreateFieldTerm 249 : PARSEOP_CREATEFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEFIELD);} 250 TermArg 251 TermArgItem 252 TermArgItem 253 NameStringItem 254 ')' {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6, 255 TrSetNodeFlags ($7, NODE_IS_NAME_DECLARATION));} 256 | PARSEOP_CREATEFIELD '(' 257 error ')' {$$ = AslDoError(); yyclearin;} 258 ; 259 260 CreateQWordFieldTerm 261 : PARSEOP_CREATEQWORDFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEQWORDFIELD);} 262 TermArg 263 TermArgItem 264 NameStringItem 265 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5, 266 TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));} 267 | PARSEOP_CREATEQWORDFIELD '(' 268 error ')' {$$ = AslDoError(); yyclearin;} 269 ; 270 271 CreateWordFieldTerm 272 : PARSEOP_CREATEWORDFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEWORDFIELD);} 273 TermArg 274 TermArgItem 275 NameStringItem 276 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5, 277 TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));} 278 | PARSEOP_CREATEWORDFIELD '(' 279 error ')' {$$ = AslDoError(); yyclearin;} 280 ; 281 282 DataRegionTerm 283 : PARSEOP_DATATABLEREGION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DATATABLEREGION);} 284 NameString 285 TermArgItem 286 TermArgItem 287 TermArgItem 288 ')' {$$ = TrLinkChildren ($<n>3,4, 289 TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$5,$6,$7);} 290 | PARSEOP_DATATABLEREGION '(' 291 error ')' {$$ = AslDoError(); yyclearin;} 292 ; 293 294 DebugTerm 295 : PARSEOP_DEBUG {$$ = TrCreateLeafNode (PARSEOP_DEBUG);} 296 ; 297 298 DecTerm 299 : PARSEOP_DECREMENT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DECREMENT);} 300 SuperName 301 ')' {$$ = TrLinkChildren ($<n>3,1,$4);} 302 | PARSEOP_DECREMENT '(' 303 error ')' {$$ = AslDoError(); yyclearin;} 304 ; 305 306 DefaultTerm 307 : PARSEOP_DEFAULT '{' {$<n>$ = TrCreateLeafNode (PARSEOP_DEFAULT);} 308 TermList '}' {$$ = TrLinkChildren ($<n>3,1,$4);} 309 | PARSEOP_DEFAULT '{' 310 error '}' {$$ = AslDoError(); yyclearin;} 311 ; 312 313 DerefOfTerm 314 : PARSEOP_DEREFOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DEREFOF);} 315 TermArg 316 ')' {$$ = TrLinkChildren ($<n>3,1,$4);} 317 | PARSEOP_DEREFOF '(' 318 error ')' {$$ = AslDoError(); yyclearin;} 319 ; 320 321 DeviceTerm 322 : PARSEOP_DEVICE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DEVICE);} 323 NameString 324 ')' '{' 325 TermList '}' {$$ = TrLinkChildren ($<n>3,2, 326 TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);} 327 | PARSEOP_DEVICE '(' 328 error ')' {$$ = AslDoError(); yyclearin;} 329 ; 330 331 DivideTerm 332 : PARSEOP_DIVIDE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DIVIDE);} 333 TermArg 334 TermArgItem 335 Target 336 Target 337 ')' {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,$7);} 338 | PARSEOP_DIVIDE '(' 339 error ')' {$$ = AslDoError(); yyclearin;} 340 ; 341 342 EISAIDTerm 343 : PARSEOP_EISAID '(' 344 StringData ')' {$$ = TrUpdateNode (PARSEOP_EISAID, $3);} 345 | PARSEOP_EISAID '(' 346 error ')' {$$ = AslDoError(); yyclearin;} 347 ; 348 349 ElseIfTerm 350 : IfTerm ElseTerm {$$ = TrLinkPeerNode ($1,$2);} 351 ; 352 353 ElseTerm 354 : {$$ = NULL;} 355 | PARSEOP_ELSE '{' {$<n>$ = TrCreateLeafNode (PARSEOP_ELSE);} 356 TermList '}' {$$ = TrLinkChildren ($<n>3,1,$4);} 357 358 | PARSEOP_ELSE '{' 359 error '}' {$$ = AslDoError(); yyclearin;} 360 361 | PARSEOP_ELSE 362 error {$$ = AslDoError(); yyclearin;} 363 364 | PARSEOP_ELSEIF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ELSE);} 365 TermArg {$<n>$ = TrCreateLeafNode (PARSEOP_IF);} 366 ')' '{' 367 TermList '}' {TrLinkChildren ($<n>5,2,$4,$8);} 368 ElseTerm {TrLinkPeerNode ($<n>5,$11);} 369 {$$ = TrLinkChildren ($<n>3,1,$<n>5);} 370 371 | PARSEOP_ELSEIF '(' 372 error ')' {$$ = AslDoError(); yyclearin;} 373 374 | PARSEOP_ELSEIF 375 error {$$ = AslDoError(); yyclearin;} 376 ; 377 378 EventTerm 379 : PARSEOP_EVENT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_EVENT);} 380 NameString 381 ')' {$$ = TrLinkChildren ($<n>3,1, 382 TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION));} 383 | PARSEOP_EVENT '(' 384 error ')' {$$ = AslDoError(); yyclearin;} 385 ; 386 387 ExternalTerm 388 : PARSEOP_EXTERNAL '(' 389 NameString 390 OptionalObjectTypeKeyword 391 OptionalParameterTypePackage 392 OptionalParameterTypesPackage 393 ')' {$$ = TrCreateNode (PARSEOP_EXTERNAL,4,$3,$4,$5,$6);} 394 | PARSEOP_EXTERNAL '(' 395 error ')' {$$ = AslDoError(); yyclearin;} 396 ; 397 398 FatalTerm 399 : PARSEOP_FATAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FATAL);} 400 ByteConstExpr 401 ',' DWordConstExpr 402 TermArgItem 403 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);} 404 | PARSEOP_FATAL '(' 405 error ')' {$$ = AslDoError(); yyclearin;} 406 ; 407 408 FieldTerm 409 : PARSEOP_FIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FIELD);} 410 NameString 411 ',' AccessTypeKeyword 412 ',' LockRuleKeyword 413 ',' UpdateRuleKeyword 414 ')' '{' 415 FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,5,$4,$6,$8,$10,$13);} 416 | PARSEOP_FIELD '(' 417 error ')' '{' error '}' {$$ = AslDoError(); yyclearin;} 418 ; 419 420 FindSetLeftBitTerm 421 : PARSEOP_FINDSETLEFTBIT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FINDSETLEFTBIT);} 422 TermArg 423 Target 424 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 425 | PARSEOP_FINDSETLEFTBIT '(' 426 error ')' {$$ = AslDoError(); yyclearin;} 427 ; 428 429 FindSetRightBitTerm 430 : PARSEOP_FINDSETRIGHTBIT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FINDSETRIGHTBIT);} 431 TermArg 432 Target 433 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 434 | PARSEOP_FINDSETRIGHTBIT '(' 435 error ')' {$$ = AslDoError(); yyclearin;} 436 ; 437 438 /* Convert a For() loop to a While() loop */ 439 ForTerm 440 : PARSEOP_FOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WHILE);} 441 OptionalTermArg ',' {} 442 OptionalPredicate ',' 443 OptionalTermArg {$<n>$ = TrLinkPeerNode ($4,$<n>3); 444 TrSetParent ($9,$<n>3);} /* New parent is WHILE */ 445 ')' '{' TermList '}' {$<n>$ = TrLinkChildren ($<n>3,2,$7,$13);} 446 {$<n>$ = TrLinkPeerNode ($13,$9); 447 $$ = $<n>10;} 448 ; 449 450 OptionalPredicate 451 : {$$ = TrCreateValuedLeafNode (PARSEOP_INTEGER, 1);} 452 | TermArg {$$ = $1;} 453 ; 454 455 FprintfTerm 456 : PARSEOP_FPRINTF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FPRINTF);} 457 TermArg ',' 458 StringData 459 PrintfArgList 460 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);} 461 | PARSEOP_FPRINTF '(' 462 error ')' {$$ = AslDoError(); yyclearin;} 463 ; 464 465 FromBCDTerm 466 : PARSEOP_FROMBCD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FROMBCD);} 467 TermArg 468 Target 469 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 470 | PARSEOP_FROMBCD '(' 471 error ')' {$$ = AslDoError(); yyclearin;} 472 ; 473 474 FunctionTerm 475 : PARSEOP_FUNCTION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_METHOD);} 476 NameString 477 OptionalParameterTypePackage 478 OptionalParameterTypesPackage 479 ')' '{' 480 TermList '}' {$$ = TrLinkChildren ($<n>3,7, 481 TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION), 482 TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0), 483 TrCreateLeafNode (PARSEOP_SERIALIZERULE_NOTSERIAL), 484 TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0),$5,$6,$9);} 485 | PARSEOP_FUNCTION '(' 486 error ')' {$$ = AslDoError(); yyclearin;} 487 ; 488 489 IfTerm 490 : PARSEOP_IF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_IF);} 491 TermArg 492 ')' '{' 493 TermList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);} 494 495 | PARSEOP_IF '(' 496 error ')' {$$ = AslDoError(); yyclearin;} 497 ; 498 499 IncludeTerm 500 : PARSEOP_INCLUDE '(' 501 String ')' {$$ = TrUpdateNode (PARSEOP_INCLUDE, $3); 502 FlOpenIncludeFile ($3);} 503 ; 504 505 IncludeEndTerm 506 : PARSEOP_INCLUDE_END {$<n>$ = TrCreateLeafNode (PARSEOP_INCLUDE_END); 507 TrSetCurrentFilename ($$);} 508 ; 509 510 IncTerm 511 : PARSEOP_INCREMENT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INCREMENT);} 512 SuperName 513 ')' {$$ = TrLinkChildren ($<n>3,1,$4);} 514 | PARSEOP_INCREMENT '(' 515 error ')' {$$ = AslDoError(); yyclearin;} 516 ; 517 518 IndexFieldTerm 519 : PARSEOP_INDEXFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INDEXFIELD);} 520 NameString 521 NameStringItem 522 ',' AccessTypeKeyword 523 ',' LockRuleKeyword 524 ',' UpdateRuleKeyword 525 ')' '{' 526 FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,6,$4,$5,$7,$9,$11,$14);} 527 | PARSEOP_INDEXFIELD '(' 528 error ')' '{' error '}' {$$ = AslDoError(); yyclearin;} 529 ; 530 531 IndexTerm 532 : PARSEOP_INDEX '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INDEX);} 533 TermArg 534 TermArgItem 535 Target 536 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);} 537 | PARSEOP_INDEX '(' 538 error ')' {$$ = AslDoError(); yyclearin;} 539 ; 540 541 LAndTerm 542 : PARSEOP_LAND '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LAND);} 543 TermArg 544 TermArgItem 545 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 546 | PARSEOP_LAND '(' 547 error ')' {$$ = AslDoError(); yyclearin;} 548 ; 549 550 LEqualTerm 551 : PARSEOP_LEQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LEQUAL);} 552 TermArg 553 TermArgItem 554 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 555 | PARSEOP_LEQUAL '(' 556 error ')' {$$ = AslDoError(); yyclearin;} 557 ; 558 559 LGreaterEqualTerm 560 : PARSEOP_LGREATEREQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LLESS);} 561 TermArg 562 TermArgItem 563 ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1, 564 TrLinkChildren ($<n>3,2,$4,$5));} 565 | PARSEOP_LGREATEREQUAL '(' 566 error ')' {$$ = AslDoError(); yyclearin;} 567 ; 568 569 LGreaterTerm 570 : PARSEOP_LGREATER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);} 571 TermArg 572 TermArgItem 573 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 574 | PARSEOP_LGREATER '(' 575 error ')' {$$ = AslDoError(); yyclearin;} 576 ; 577 578 LLessEqualTerm 579 : PARSEOP_LLESSEQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);} 580 TermArg 581 TermArgItem 582 ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1, 583 TrLinkChildren ($<n>3,2,$4,$5));} 584 | PARSEOP_LLESSEQUAL '(' 585 error ')' {$$ = AslDoError(); yyclearin;} 586 ; 587 588 LLessTerm 589 : PARSEOP_LLESS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LLESS);} 590 TermArg 591 TermArgItem 592 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 593 | PARSEOP_LLESS '(' 594 error ')' {$$ = AslDoError(); yyclearin;} 595 ; 596 597 LNotEqualTerm 598 : PARSEOP_LNOTEQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LEQUAL);} 599 TermArg 600 TermArgItem 601 ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1, 602 TrLinkChildren ($<n>3,2,$4,$5));} 603 | PARSEOP_LNOTEQUAL '(' 604 error ')' {$$ = AslDoError(); yyclearin;} 605 ; 606 607 LNotTerm 608 : PARSEOP_LNOT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LNOT);} 609 TermArg 610 ')' {$$ = TrLinkChildren ($<n>3,1,$4);} 611 | PARSEOP_LNOT '(' 612 error ')' {$$ = AslDoError(); yyclearin;} 613 ; 614 615 LoadTableTerm 616 : PARSEOP_LOADTABLE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LOADTABLE);} 617 TermArg 618 TermArgItem 619 TermArgItem 620 OptionalListString 621 OptionalListString 622 OptionalReference 623 ')' {$$ = TrLinkChildren ($<n>3,6,$4,$5,$6,$7,$8,$9);} 624 | PARSEOP_LOADTABLE '(' 625 error ')' {$$ = AslDoError(); yyclearin;} 626 ; 627 628 LoadTerm 629 : PARSEOP_LOAD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LOAD);} 630 NameString 631 RequiredTarget 632 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 633 | PARSEOP_LOAD '(' 634 error ')' {$$ = AslDoError(); yyclearin;} 635 ; 636 637 LocalTerm 638 : PARSEOP_LOCAL0 {$$ = TrCreateLeafNode (PARSEOP_LOCAL0);} 639 | PARSEOP_LOCAL1 {$$ = TrCreateLeafNode (PARSEOP_LOCAL1);} 640 | PARSEOP_LOCAL2 {$$ = TrCreateLeafNode (PARSEOP_LOCAL2);} 641 | PARSEOP_LOCAL3 {$$ = TrCreateLeafNode (PARSEOP_LOCAL3);} 642 | PARSEOP_LOCAL4 {$$ = TrCreateLeafNode (PARSEOP_LOCAL4);} 643 | PARSEOP_LOCAL5 {$$ = TrCreateLeafNode (PARSEOP_LOCAL5);} 644 | PARSEOP_LOCAL6 {$$ = TrCreateLeafNode (PARSEOP_LOCAL6);} 645 | PARSEOP_LOCAL7 {$$ = TrCreateLeafNode (PARSEOP_LOCAL7);} 646 ; 647 648 LOrTerm 649 : PARSEOP_LOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LOR);} 650 TermArg 651 TermArgItem 652 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 653 | PARSEOP_LOR '(' 654 error ')' {$$ = AslDoError(); yyclearin;} 655 ; 656 657 MatchTerm 658 : PARSEOP_MATCH '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MATCH);} 659 TermArg 660 ',' MatchOpKeyword 661 TermArgItem 662 ',' MatchOpKeyword 663 TermArgItem 664 TermArgItem 665 ')' {$$ = TrLinkChildren ($<n>3,6,$4,$6,$7,$9,$10,$11);} 666 | PARSEOP_MATCH '(' 667 error ')' {$$ = AslDoError(); yyclearin;} 668 ; 669 670 MethodTerm 671 : PARSEOP_METHOD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_METHOD);} 672 NameString 673 OptionalByteConstExpr {UtCheckIntegerRange ($5, 0, 7);} 674 OptionalSerializeRuleKeyword 675 OptionalByteConstExpr 676 OptionalParameterTypePackage 677 OptionalParameterTypesPackage 678 ')' '{' 679 TermList '}' {$$ = TrLinkChildren ($<n>3,7, 680 TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION), 681 $5,$7,$8,$9,$10,$13);} 682 | PARSEOP_METHOD '(' 683 error ')' {$$ = AslDoError(); yyclearin;} 684 ; 685 686 MidTerm 687 : PARSEOP_MID '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MID);} 688 TermArg 689 TermArgItem 690 TermArgItem 691 Target 692 ')' {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,$7);} 693 | PARSEOP_MID '(' 694 error ')' {$$ = AslDoError(); yyclearin;} 695 ; 696 697 ModTerm 698 : PARSEOP_MOD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MOD);} 699 TermArg 700 TermArgItem 701 Target 702 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);} 703 | PARSEOP_MOD '(' 704 error ')' {$$ = AslDoError(); yyclearin;} 705 ; 706 707 MultiplyTerm 708 : PARSEOP_MULTIPLY '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MULTIPLY);} 709 TermArg 710 TermArgItem 711 Target 712 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);} 713 | PARSEOP_MULTIPLY '(' 714 error ')' {$$ = AslDoError(); yyclearin;} 715 ; 716 717 MutexTerm 718 : PARSEOP_MUTEX '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MUTEX);} 719 NameString 720 ',' ByteConstExpr 721 ')' {$$ = TrLinkChildren ($<n>3,2, 722 TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);} 723 | PARSEOP_MUTEX '(' 724 error ')' {$$ = AslDoError(); yyclearin;} 725 ; 726 727 NameTerm 728 : PARSEOP_NAME '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NAME);} 729 NameString 730 ',' DataObject 731 ')' {$$ = TrLinkChildren ($<n>3,2, 732 TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);} 733 | PARSEOP_NAME '(' 734 error ')' {$$ = AslDoError(); yyclearin;} 735 ; 736 737 NAndTerm 738 : PARSEOP_NAND '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NAND);} 739 TermArg 740 TermArgItem 741 Target 742 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);} 743 | PARSEOP_NAND '(' 744 error ')' {$$ = AslDoError(); yyclearin;} 745 ; 746 747 NoOpTerm 748 : PARSEOP_NOOP {$$ = TrCreateNode (PARSEOP_NOOP, 0);} 749 ; 750 751 NOrTerm 752 : PARSEOP_NOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NOR);} 753 TermArg 754 TermArgItem 755 Target 756 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);} 757 | PARSEOP_NOR '(' 758 error ')' {$$ = AslDoError(); yyclearin;} 759 ; 760 761 NotifyTerm 762 : PARSEOP_NOTIFY '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NOTIFY);} 763 SuperName 764 TermArgItem 765 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 766 | PARSEOP_NOTIFY '(' 767 error ')' {$$ = AslDoError(); yyclearin;} 768 ; 769 770 NotTerm 771 : PARSEOP_NOT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NOT);} 772 TermArg 773 Target 774 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 775 | PARSEOP_NOT '(' 776 error ')' {$$ = AslDoError(); yyclearin;} 777 ; 778 779 ObjectTypeTerm 780 : PARSEOP_OBJECTTYPE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE);} 781 ObjectTypeName 782 ')' {$$ = TrLinkChildren ($<n>3,1,$4);} 783 | PARSEOP_OBJECTTYPE '(' 784 error ')' {$$ = AslDoError(); yyclearin;} 785 ; 786 787 OffsetTerm 788 : PARSEOP_OFFSET '(' 789 AmlPackageLengthTerm 790 ')' {$$ = TrCreateNode (PARSEOP_OFFSET,1,$3);} 791 | PARSEOP_OFFSET '(' 792 error ')' {$$ = AslDoError(); yyclearin;} 793 ; 794 795 OpRegionTerm 796 : PARSEOP_OPERATIONREGION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_OPERATIONREGION);} 797 NameString 798 ',' OpRegionSpaceIdTerm 799 TermArgItem 800 TermArgItem 801 ')' {$$ = TrLinkChildren ($<n>3,4, 802 TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION), 803 $6,$7,$8);} 804 | PARSEOP_OPERATIONREGION '(' 805 error ')' {$$ = AslDoError(); yyclearin;} 806 ; 807 808 OpRegionSpaceIdTerm 809 : RegionSpaceKeyword {} 810 | ByteConst {$$ = UtCheckIntegerRange ($1, 0x80, 0xFF);} 811 ; 812 813 OrTerm 814 : PARSEOP_OR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_OR);} 815 TermArg 816 TermArgItem 817 Target 818 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);} 819 | PARSEOP_OR '(' 820 error ')' {$$ = AslDoError(); yyclearin;} 821 ; 822 823 PackageTerm 824 : PARSEOP_PACKAGE {$<n>$ = TrCreateLeafNode (PARSEOP_VAR_PACKAGE);} 825 OptionalDataCount 826 '{' PackageList '}' {$$ = TrLinkChildren ($<n>2,2,$3,$5);} 827 828 PowerResTerm 829 : PARSEOP_POWERRESOURCE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_POWERRESOURCE);} 830 NameString 831 ',' ByteConstExpr 832 ',' WordConstExpr 833 ')' '{' 834 TermList '}' {$$ = TrLinkChildren ($<n>3,4, 835 TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION), 836 $6,$8,$11);} 837 | PARSEOP_POWERRESOURCE '(' 838 error ')' {$$ = AslDoError(); yyclearin;} 839 ; 840 841 PrintfTerm 842 : PARSEOP_PRINTF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_PRINTF);} 843 StringData 844 PrintfArgList 845 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 846 | PARSEOP_PRINTF '(' 847 error ')' {$$ = AslDoError(); yyclearin;} 848 ; 849 850 PrintfArgList 851 : {$$ = NULL;} 852 | TermArg {$$ = $1;} 853 | PrintfArgList ',' 854 TermArg {$$ = TrLinkPeerNode ($1, $3);} 855 ; 856 857 ProcessorTerm 858 : PARSEOP_PROCESSOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_PROCESSOR);} 859 NameString 860 ',' ByteConstExpr 861 OptionalDWordConstExpr 862 OptionalByteConstExpr 863 ')' '{' 864 TermList '}' {$$ = TrLinkChildren ($<n>3,5, 865 TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION), 866 $6,$7,$8,$11);} 867 | PARSEOP_PROCESSOR '(' 868 error ')' {$$ = AslDoError(); yyclearin;} 869 ; 870 871 RawDataBufferTerm 872 : PARSEOP_DATABUFFER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DATABUFFER);} 873 OptionalWordConst 874 ')' '{' 875 ByteList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);} 876 | PARSEOP_DATABUFFER '(' 877 error ')' {$$ = AslDoError(); yyclearin;} 878 ; 879 880 /* 881 * In RefOf, the node isn't really a target, but we can't keep track of it after 882 * we've taken a pointer to it. (hard to tell if a local becomes initialized this way.) 883 */ 884 RefOfTerm 885 : PARSEOP_REFOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_REFOF);} 886 SuperName 887 ')' {$$ = TrLinkChildren ($<n>3,1, 888 TrSetNodeFlags ($4, NODE_IS_TARGET));} 889 | PARSEOP_REFOF '(' 890 error ')' {$$ = AslDoError(); yyclearin;} 891 ; 892 893 ReleaseTerm 894 : PARSEOP_RELEASE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_RELEASE);} 895 SuperName 896 ')' {$$ = TrLinkChildren ($<n>3,1,$4);} 897 | PARSEOP_RELEASE '(' 898 error ')' {$$ = AslDoError(); yyclearin;} 899 ; 900 901 ResetTerm 902 : PARSEOP_RESET '(' {$<n>$ = TrCreateLeafNode (PARSEOP_RESET);} 903 SuperName 904 ')' {$$ = TrLinkChildren ($<n>3,1,$4);} 905 | PARSEOP_RESET '(' 906 error ')' {$$ = AslDoError(); yyclearin;} 907 ; 908 909 ReturnTerm 910 : PARSEOP_RETURN '(' {$<n>$ = TrCreateLeafNode (PARSEOP_RETURN);} 911 OptionalReturnArg 912 ')' {$$ = TrLinkChildren ($<n>3,1,$4);} 913 | PARSEOP_RETURN {$$ = TrLinkChildren ( 914 TrCreateLeafNode (PARSEOP_RETURN),1, 915 TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO), 916 NODE_IS_NULL_RETURN));} 917 | PARSEOP_RETURN '(' 918 error ')' {$$ = AslDoError(); yyclearin;} 919 ; 920 921 ScopeTerm 922 : PARSEOP_SCOPE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SCOPE);} 923 NameString 924 ')' '{' 925 TermList '}' {$$ = TrLinkChildren ($<n>3,2, 926 TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);} 927 | PARSEOP_SCOPE '(' 928 error ')' {$$ = AslDoError(); yyclearin;} 929 ; 930 931 ShiftLeftTerm 932 : PARSEOP_SHIFTLEFT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);} 933 TermArg 934 TermArgItem 935 Target 936 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);} 937 | PARSEOP_SHIFTLEFT '(' 938 error ')' {$$ = AslDoError(); yyclearin;} 939 ; 940 941 ShiftRightTerm 942 : PARSEOP_SHIFTRIGHT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);} 943 TermArg 944 TermArgItem 945 Target 946 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);} 947 | PARSEOP_SHIFTRIGHT '(' 948 error ')' {$$ = AslDoError(); yyclearin;} 949 ; 950 951 SignalTerm 952 : PARSEOP_SIGNAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SIGNAL);} 953 SuperName 954 ')' {$$ = TrLinkChildren ($<n>3,1,$4);} 955 | PARSEOP_SIGNAL '(' 956 error ')' {$$ = AslDoError(); yyclearin;} 957 ; 958 959 SizeOfTerm 960 : PARSEOP_SIZEOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SIZEOF);} 961 SuperName 962 ')' {$$ = TrLinkChildren ($<n>3,1,$4);} 963 | PARSEOP_SIZEOF '(' 964 error ')' {$$ = AslDoError(); yyclearin;} 965 ; 966 967 SleepTerm 968 : PARSEOP_SLEEP '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SLEEP);} 969 TermArg 970 ')' {$$ = TrLinkChildren ($<n>3,1,$4);} 971 | PARSEOP_SLEEP '(' 972 error ')' {$$ = AslDoError(); yyclearin;} 973 ; 974 975 StallTerm 976 : PARSEOP_STALL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_STALL);} 977 TermArg 978 ')' {$$ = TrLinkChildren ($<n>3,1,$4);} 979 | PARSEOP_STALL '(' 980 error ')' {$$ = AslDoError(); yyclearin;} 981 ; 982 983 StoreTerm 984 : PARSEOP_STORE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_STORE);} 985 TermArg 986 ',' SuperName 987 ')' {$$ = TrLinkChildren ($<n>3,2,$4, 988 TrSetNodeFlags ($6, NODE_IS_TARGET));} 989 | PARSEOP_STORE '(' 990 error ')' {$$ = AslDoError(); yyclearin;} 991 ; 992 993 SubtractTerm 994 : PARSEOP_SUBTRACT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SUBTRACT);} 995 TermArg 996 TermArgItem 997 Target 998 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);} 999 | PARSEOP_SUBTRACT '(' 1000 error ')' {$$ = AslDoError(); yyclearin;} 1001 ; 1002 1003 SwitchTerm 1004 : PARSEOP_SWITCH '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SWITCH);} 1005 TermArg 1006 ')' '{' 1007 CaseDefaultTermList '}' 1008 {$$ = TrLinkChildren ($<n>3,2,$4,$7);} 1009 | PARSEOP_SWITCH '(' 1010 error ')' {$$ = AslDoError(); yyclearin;} 1011 ; 1012 1013 ThermalZoneTerm 1014 : PARSEOP_THERMALZONE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_THERMALZONE);} 1015 NameString 1016 ')' '{' 1017 TermList '}' {$$ = TrLinkChildren ($<n>3,2, 1018 TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);} 1019 | PARSEOP_THERMALZONE '(' 1020 error ')' {$$ = AslDoError(); yyclearin;} 1021 ; 1022 1023 TimerTerm 1024 : PARSEOP_TIMER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TIMER);} 1025 ')' {$$ = TrLinkChildren ($<n>3,0);} 1026 | PARSEOP_TIMER {$$ = TrLinkChildren ( 1027 TrCreateLeafNode (PARSEOP_TIMER),0);} 1028 | PARSEOP_TIMER '(' 1029 error ')' {$$ = AslDoError(); yyclearin;} 1030 ; 1031 1032 ToBCDTerm 1033 : PARSEOP_TOBCD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOBCD);} 1034 TermArg 1035 Target 1036 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 1037 | PARSEOP_TOBCD '(' 1038 error ')' {$$ = AslDoError(); yyclearin;} 1039 ; 1040 1041 ToBufferTerm 1042 : PARSEOP_TOBUFFER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOBUFFER);} 1043 TermArg 1044 Target 1045 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 1046 | PARSEOP_TOBUFFER '(' 1047 error ')' {$$ = AslDoError(); yyclearin;} 1048 ; 1049 1050 ToDecimalStringTerm 1051 : PARSEOP_TODECIMALSTRING '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TODECIMALSTRING);} 1052 TermArg 1053 Target 1054 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 1055 | PARSEOP_TODECIMALSTRING '(' 1056 error ')' {$$ = AslDoError(); yyclearin;} 1057 ; 1058 1059 ToHexStringTerm 1060 : PARSEOP_TOHEXSTRING '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOHEXSTRING);} 1061 TermArg 1062 Target 1063 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 1064 | PARSEOP_TOHEXSTRING '(' 1065 error ')' {$$ = AslDoError(); yyclearin;} 1066 ; 1067 1068 ToIntegerTerm 1069 : PARSEOP_TOINTEGER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOINTEGER);} 1070 TermArg 1071 Target 1072 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 1073 | PARSEOP_TOINTEGER '(' 1074 error ')' {$$ = AslDoError(); yyclearin;} 1075 ; 1076 1077 ToPLDTerm 1078 : PARSEOP_TOPLD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOPLD);} 1079 PldKeywordList 1080 ')' {$$ = TrLinkChildren ($<n>3,1,$4);} 1081 | PARSEOP_TOPLD '(' 1082 error ')' {$$ = AslDoError(); yyclearin;} 1083 ; 1084 1085 PldKeywordList 1086 : {$$ = NULL;} 1087 | PldKeyword 1088 PARSEOP_EXP_EQUALS Integer {$$ = TrLinkChildren ($1,1,$3);} 1089 | PldKeyword 1090 PARSEOP_EXP_EQUALS String {$$ = TrLinkChildren ($1,1,$3);} 1091 | PldKeywordList ',' /* Allows a trailing comma at list end */ 1092 | PldKeywordList ',' 1093 PldKeyword 1094 PARSEOP_EXP_EQUALS Integer {$$ = TrLinkPeerNode ($1,TrLinkChildren ($3,1,$5));} 1095 | PldKeywordList ',' 1096 PldKeyword 1097 PARSEOP_EXP_EQUALS String {$$ = TrLinkPeerNode ($1,TrLinkChildren ($3,1,$5));} 1098 ; 1099 1100 1101 ToStringTerm 1102 : PARSEOP_TOSTRING '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOSTRING);} 1103 TermArg 1104 OptionalCount 1105 Target 1106 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);} 1107 | PARSEOP_TOSTRING '(' 1108 error ')' {$$ = AslDoError(); yyclearin;} 1109 ; 1110 1111 ToUUIDTerm 1112 : PARSEOP_TOUUID '(' 1113 StringData ')' {$$ = TrUpdateNode (PARSEOP_TOUUID, $3);} 1114 | PARSEOP_TOUUID '(' 1115 error ')' {$$ = AslDoError(); yyclearin;} 1116 ; 1117 1118 UnicodeTerm 1119 : PARSEOP_UNICODE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_UNICODE);} 1120 StringData 1121 ')' {$$ = TrLinkChildren ($<n>3,2,0,$4);} 1122 | PARSEOP_UNICODE '(' 1123 error ')' {$$ = AslDoError(); yyclearin;} 1124 ; 1125 1126 UnloadTerm 1127 : PARSEOP_UNLOAD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_UNLOAD);} 1128 SuperName 1129 ')' {$$ = TrLinkChildren ($<n>3,1,$4);} 1130 | PARSEOP_UNLOAD '(' 1131 error ')' {$$ = AslDoError(); yyclearin;} 1132 ; 1133 1134 WaitTerm 1135 : PARSEOP_WAIT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WAIT);} 1136 SuperName 1137 TermArgItem 1138 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);} 1139 | PARSEOP_WAIT '(' 1140 error ')' {$$ = AslDoError(); yyclearin;} 1141 ; 1142 1143 XOrTerm 1144 : PARSEOP_XOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_XOR);} 1145 TermArg 1146 TermArgItem 1147 Target 1148 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);} 1149 | PARSEOP_XOR '(' 1150 error ')' {$$ = AslDoError(); yyclearin;} 1151 ; 1152 1153 WhileTerm 1154 : PARSEOP_WHILE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WHILE);} 1155 TermArg 1156 ')' '{' TermList '}' 1157 {$$ = TrLinkChildren ($<n>3,2,$4,$7);} 1158 | PARSEOP_WHILE '(' 1159 error ')' {$$ = AslDoError(); yyclearin;} 1160 ; 1161