No empty .Rs/.Re
[netbsd-mini2440.git] / sys / external / intel-public / acpica / dist / compiler / aslcompiler.y
blob1d89f2c508a6869e4611576e06a70679a471b034
2 %{
3 /******************************************************************************
5 * Module Name: aslcompiler.y - Bison input file (ASL grammar and actions)
7 *****************************************************************************/
9 /******************************************************************************
11 * 1. Copyright Notice
13 * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp.
14 * All rights reserved.
16 * 2. License
18 * 2.1. This is your license from Intel Corp. under its intellectual property
19 * rights. You may have additional license terms from the party that provided
20 * you this software, covering your right to use that party's intellectual
21 * property rights.
23 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
24 * copy of the source code appearing in this file ("Covered Code") an
25 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
26 * base code distributed originally by Intel ("Original Intel Code") to copy,
27 * make derivatives, distribute, use and display any portion of the Covered
28 * Code in any form, with the right to sublicense such rights; and
30 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
31 * license (with the right to sublicense), under only those claims of Intel
32 * patents that are infringed by the Original Intel Code, to make, use, sell,
33 * offer to sell, and import the Covered Code and derivative works thereof
34 * solely to the minimum extent necessary to exercise the above copyright
35 * license, and in no event shall the patent license extend to any additions
36 * to or modifications of the Original Intel Code. No other license or right
37 * is granted directly or by implication, estoppel or otherwise;
39 * The above copyright and patent license is granted only if the following
40 * conditions are met:
42 * 3. Conditions
44 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
45 * Redistribution of source code of any substantial portion of the Covered
46 * Code or modification with rights to further distribute source must include
47 * the above Copyright Notice, the above License, this list of Conditions,
48 * and the following Disclaimer and Export Compliance provision. In addition,
49 * Licensee must cause all Covered Code to which Licensee contributes to
50 * contain a file documenting the changes Licensee made to create that Covered
51 * Code and the date of any change. Licensee must include in that file the
52 * documentation of any changes made by any predecessor Licensee. Licensee
53 * must include a prominent statement that the modification is derived,
54 * directly or indirectly, from Original Intel Code.
56 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
57 * Redistribution of source code of any substantial portion of the Covered
58 * Code or modification without rights to further distribute source must
59 * include the following Disclaimer and Export Compliance provision in the
60 * documentation and/or other materials provided with distribution. In
61 * addition, Licensee may not authorize further sublicense of source of any
62 * portion of the Covered Code, and must include terms to the effect that the
63 * license from Licensee to its licensee is limited to the intellectual
64 * property embodied in the software Licensee provides to its licensee, and
65 * not to intellectual property embodied in modifications its licensee may
66 * make.
68 * 3.3. Redistribution of Executable. Redistribution in executable form of any
69 * substantial portion of the Covered Code or modification must reproduce the
70 * above Copyright Notice, and the following Disclaimer and Export Compliance
71 * provision in the documentation and/or other materials provided with the
72 * distribution.
74 * 3.4. Intel retains all right, title, and interest in and to the Original
75 * Intel Code.
77 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
78 * Intel shall be used in advertising or otherwise to promote the sale, use or
79 * other dealings in products derived from or relating to the Covered Code
80 * without prior written authorization from Intel.
82 * 4. Disclaimer and Export Compliance
84 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
85 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
86 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
87 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
88 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
89 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
90 * PARTICULAR PURPOSE.
92 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
93 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
94 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
95 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
96 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
97 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
98 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
99 * LIMITED REMEDY.
101 * 4.3. Licensee shall not export, either directly or indirectly, any of this
102 * software or system incorporating such software without first obtaining any
103 * required license or other approval from the U. S. Department of Commerce or
104 * any other agency or department of the United States Government. In the
105 * event Licensee exports any such software from the United States or
106 * re-exports any such software from a foreign destination, Licensee shall
107 * ensure that the distribution and export/re-export of the software is in
108 * compliance with all laws, regulations, orders, or other restrictions of the
109 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
110 * any of its subsidiaries will export/re-export any technical data, process,
111 * software, or service, directly or indirectly, to any country for which the
112 * United States government or any agency thereof requires an export license,
113 * other governmental approval, or letter of assurance, without first obtaining
114 * such license, approval or letter.
116 *****************************************************************************/
118 #define YYDEBUG 1
119 #define YYERROR_VERBOSE 1
122 * State stack - compiler will fault if it overflows. (Default was 200)
124 #define YYINITDEPTH 600
126 #include "aslcompiler.h"
127 #include <stdio.h>
128 #include <stdlib.h>
129 #include <string.h>
130 #include "acpi.h"
131 #include "accommon.h"
133 #define _COMPONENT ACPI_COMPILER
134 ACPI_MODULE_NAME ("aslparse")
137 * Global Notes:
139 * October 2005: The following list terms have been optimized (from the
140 * original ASL grammar in the ACPI specification) to force the immediate
141 * reduction of each list item so that the parse stack use doesn't increase on
142 * each list element and possibly overflow on very large lists (>4000 items).
143 * This dramatically reduces use of the parse stack overall.
145 * ArgList, TermList, Objectlist, ByteList, DWordList, PackageList,
146 * ResourceMacroList, and FieldUnitList
151 * Next statement is important - this makes everything public so that
152 * we can access some of the parser tables from other modules
154 #define static
155 #undef alloca
156 #define alloca AslLocalAllocate
157 #define YYERROR_VERBOSE 1
159 void *
160 AslLocalAllocate (unsigned int Size);
163 * The windows version of bison defines this incorrectly as "32768" (Not negative).
164 * Using a custom (edited binary) version of bison that defines YYFLAG as YYFBAD
165 * instead (#define YYFBAD 32768), so we can define it correctly here.
167 * The problem is that if YYFLAG is positive, the extended syntax error messages
168 * are disabled.
171 #define YYFLAG -32768
178 * Declare the type of values in the grammar
181 %union {
182 UINT64 i;
183 char *s;
184 ACPI_PARSE_OBJECT *n;
188 /*! [Begin] no source code translation */
191 * These shift/reduce conflicts are expected. There should be zero
192 * reduce/reduce conflicts.
194 %expect 60
198 * Token types: These are returned by the lexer
200 * NOTE: This list MUST match the AslKeywordMapping table found
201 * in aslmap.c EXACTLY! Double check any changes!
204 %token <i> PARSEOP_ACCESSAS
205 %token <i> PARSEOP_ACCESSATTRIB_BLOCK
206 %token <i> PARSEOP_ACCESSATTRIB_BLOCK_CALL
207 %token <i> PARSEOP_ACCESSATTRIB_BYTE
208 %token <i> PARSEOP_ACCESSATTRIB_WORD_CALL
209 %token <i> PARSEOP_ACCESSATTRIB_QUICK
210 %token <i> PARSEOP_ACCESSATTRIB_SND_RCV
211 %token <i> PARSEOP_ACCESSATTRIB_WORD
212 %token <i> PARSEOP_ACCESSTYPE_ANY
213 %token <i> PARSEOP_ACCESSTYPE_BUF
214 %token <i> PARSEOP_ACCESSTYPE_BYTE
215 %token <i> PARSEOP_ACCESSTYPE_DWORD
216 %token <i> PARSEOP_ACCESSTYPE_QWORD
217 %token <i> PARSEOP_ACCESSTYPE_WORD
218 %token <i> PARSEOP_ACQUIRE
219 %token <i> PARSEOP_ADD
220 %token <i> PARSEOP_ADDRESSSPACE_FFIXEDHW
221 %token <i> PARSEOP_ADDRESSTYPE_ACPI
222 %token <i> PARSEOP_ADDRESSTYPE_MEMORY
223 %token <i> PARSEOP_ADDRESSTYPE_NVS
224 %token <i> PARSEOP_ADDRESSTYPE_RESERVED
225 %token <i> PARSEOP_ALIAS
226 %token <i> PARSEOP_AND
227 %token <i> PARSEOP_ARG0
228 %token <i> PARSEOP_ARG1
229 %token <i> PARSEOP_ARG2
230 %token <i> PARSEOP_ARG3
231 %token <i> PARSEOP_ARG4
232 %token <i> PARSEOP_ARG5
233 %token <i> PARSEOP_ARG6
234 %token <i> PARSEOP_BANKFIELD
235 %token <i> PARSEOP_BREAK
236 %token <i> PARSEOP_BREAKPOINT
237 %token <i> PARSEOP_BUFFER
238 %token <i> PARSEOP_BUSMASTERTYPE_MASTER
239 %token <i> PARSEOP_BUSMASTERTYPE_NOTMASTER
240 %token <i> PARSEOP_BYTECONST
241 %token <i> PARSEOP_CASE
242 %token <i> PARSEOP_CONCATENATE
243 %token <i> PARSEOP_CONCATENATERESTEMPLATE
244 %token <i> PARSEOP_CONDREFOF
245 %token <i> PARSEOP_CONTINUE
246 %token <i> PARSEOP_COPYOBJECT
247 %token <i> PARSEOP_CREATEBITFIELD
248 %token <i> PARSEOP_CREATEBYTEFIELD
249 %token <i> PARSEOP_CREATEDWORDFIELD
250 %token <i> PARSEOP_CREATEFIELD
251 %token <i> PARSEOP_CREATEQWORDFIELD
252 %token <i> PARSEOP_CREATEWORDFIELD
253 %token <i> PARSEOP_DATATABLEREGION
254 %token <i> PARSEOP_DEBUG
255 %token <i> PARSEOP_DECODETYPE_POS
256 %token <i> PARSEOP_DECODETYPE_SUB
257 %token <i> PARSEOP_DECREMENT
258 %token <i> PARSEOP_DEFAULT
259 %token <i> PARSEOP_DEFAULT_ARG
260 %token <i> PARSEOP_DEFINITIONBLOCK
261 %token <i> PARSEOP_DEREFOF
262 %token <i> PARSEOP_DEVICE
263 %token <i> PARSEOP_DIVIDE
264 %token <i> PARSEOP_DMA
265 %token <i> PARSEOP_DMATYPE_A
266 %token <i> PARSEOP_DMATYPE_COMPATIBILITY
267 %token <i> PARSEOP_DMATYPE_B
268 %token <i> PARSEOP_DMATYPE_F
269 %token <i> PARSEOP_DWORDCONST
270 %token <i> PARSEOP_DWORDIO
271 %token <i> PARSEOP_DWORDMEMORY
272 %token <i> PARSEOP_DWORDSPACE
273 %token <i> PARSEOP_EISAID
274 %token <i> PARSEOP_ELSE
275 %token <i> PARSEOP_ELSEIF
276 %token <i> PARSEOP_ENDDEPENDENTFN
277 %token <i> PARSEOP_ENDTAG
278 %token <i> PARSEOP_ERRORNODE
279 %token <i> PARSEOP_EVENT
280 %token <i> PARSEOP_EXTENDEDIO
281 %token <i> PARSEOP_EXTENDEDMEMORY
282 %token <i> PARSEOP_EXTENDEDSPACE
283 %token <i> PARSEOP_EXTERNAL
284 %token <i> PARSEOP_FATAL
285 %token <i> PARSEOP_FIELD
286 %token <i> PARSEOP_FINDSETLEFTBIT
287 %token <i> PARSEOP_FINDSETRIGHTBIT
288 %token <i> PARSEOP_FIXEDIO
289 %token <i> PARSEOP_FROMBCD
290 %token <i> PARSEOP_FUNCTION
291 %token <i> PARSEOP_IF
292 %token <i> PARSEOP_INCLUDE
293 %token <i> PARSEOP_INCLUDE_CSTYLE
294 %token <i> PARSEOP_INCLUDE_END
295 %token <i> PARSEOP_INCREMENT
296 %token <i> PARSEOP_INDEX
297 %token <i> PARSEOP_INDEXFIELD
298 %token <i> PARSEOP_INTEGER
299 %token <i> PARSEOP_INTERRUPT
300 %token <i> PARSEOP_INTLEVEL_ACTIVEHIGH
301 %token <i> PARSEOP_INTLEVEL_ACTIVELOW
302 %token <i> PARSEOP_INTTYPE_EDGE
303 %token <i> PARSEOP_INTTYPE_LEVEL
304 %token <i> PARSEOP_IO
305 %token <i> PARSEOP_IODECODETYPE_10
306 %token <i> PARSEOP_IODECODETYPE_16
307 %token <i> PARSEOP_IRQ
308 %token <i> PARSEOP_IRQNOFLAGS
309 %token <i> PARSEOP_LAND
310 %token <i> PARSEOP_LEQUAL
311 %token <i> PARSEOP_LGREATER
312 %token <i> PARSEOP_LGREATEREQUAL
313 %token <i> PARSEOP_LINE_CSTYLE
314 %token <i> PARSEOP_LLESS
315 %token <i> PARSEOP_LLESSEQUAL
316 %token <i> PARSEOP_LNOT
317 %token <i> PARSEOP_LNOTEQUAL
318 %token <i> PARSEOP_LOAD
319 %token <i> PARSEOP_LOADTABLE
320 %token <i> PARSEOP_LOCAL0
321 %token <i> PARSEOP_LOCAL1
322 %token <i> PARSEOP_LOCAL2
323 %token <i> PARSEOP_LOCAL3
324 %token <i> PARSEOP_LOCAL4
325 %token <i> PARSEOP_LOCAL5
326 %token <i> PARSEOP_LOCAL6
327 %token <i> PARSEOP_LOCAL7
328 %token <i> PARSEOP_LOCKRULE_LOCK
329 %token <i> PARSEOP_LOCKRULE_NOLOCK
330 %token <i> PARSEOP_LOR
331 %token <i> PARSEOP_MATCH
332 %token <i> PARSEOP_MATCHTYPE_MEQ
333 %token <i> PARSEOP_MATCHTYPE_MGE
334 %token <i> PARSEOP_MATCHTYPE_MGT
335 %token <i> PARSEOP_MATCHTYPE_MLE
336 %token <i> PARSEOP_MATCHTYPE_MLT
337 %token <i> PARSEOP_MATCHTYPE_MTR
338 %token <i> PARSEOP_MAXTYPE_FIXED
339 %token <i> PARSEOP_MAXTYPE_NOTFIXED
340 %token <i> PARSEOP_MEMORY24
341 %token <i> PARSEOP_MEMORY32
342 %token <i> PARSEOP_MEMORY32FIXED
343 %token <i> PARSEOP_MEMTYPE_CACHEABLE
344 %token <i> PARSEOP_MEMTYPE_NONCACHEABLE
345 %token <i> PARSEOP_MEMTYPE_PREFETCHABLE
346 %token <i> PARSEOP_MEMTYPE_WRITECOMBINING
347 %token <i> PARSEOP_METHOD
348 %token <i> PARSEOP_METHODCALL
349 %token <i> PARSEOP_MID
350 %token <i> PARSEOP_MINTYPE_FIXED
351 %token <i> PARSEOP_MINTYPE_NOTFIXED
352 %token <i> PARSEOP_MOD
353 %token <i> PARSEOP_MULTIPLY
354 %token <i> PARSEOP_MUTEX
355 %token <i> PARSEOP_NAME
356 %token <s> PARSEOP_NAMESEG
357 %token <s> PARSEOP_NAMESTRING
358 %token <i> PARSEOP_NAND
359 %token <i> PARSEOP_NOOP
360 %token <i> PARSEOP_NOR
361 %token <i> PARSEOP_NOT
362 %token <i> PARSEOP_NOTIFY
363 %token <i> PARSEOP_OBJECTTYPE
364 %token <i> PARSEOP_OBJECTTYPE_BFF
365 %token <i> PARSEOP_OBJECTTYPE_BUF
366 %token <i> PARSEOP_OBJECTTYPE_DDB
367 %token <i> PARSEOP_OBJECTTYPE_DEV
368 %token <i> PARSEOP_OBJECTTYPE_EVT
369 %token <i> PARSEOP_OBJECTTYPE_FLD
370 %token <i> PARSEOP_OBJECTTYPE_INT
371 %token <i> PARSEOP_OBJECTTYPE_MTH
372 %token <i> PARSEOP_OBJECTTYPE_MTX
373 %token <i> PARSEOP_OBJECTTYPE_OPR
374 %token <i> PARSEOP_OBJECTTYPE_PKG
375 %token <i> PARSEOP_OBJECTTYPE_POW
376 %token <i> PARSEOP_OBJECTTYPE_PRO
377 %token <i> PARSEOP_OBJECTTYPE_STR
378 %token <i> PARSEOP_OBJECTTYPE_THZ
379 %token <i> PARSEOP_OBJECTTYPE_UNK
380 %token <i> PARSEOP_OFFSET
381 %token <i> PARSEOP_ONE
382 %token <i> PARSEOP_ONES
383 %token <i> PARSEOP_OPERATIONREGION
384 %token <i> PARSEOP_OR
385 %token <i> PARSEOP_PACKAGE
386 %token <i> PARSEOP_PACKAGE_LENGTH
387 %token <i> PARSEOP_POWERRESOURCE
388 %token <i> PARSEOP_PROCESSOR
389 %token <i> PARSEOP_QWORDCONST
390 %token <i> PARSEOP_QWORDIO
391 %token <i> PARSEOP_QWORDMEMORY
392 %token <i> PARSEOP_QWORDSPACE
393 %token <i> PARSEOP_RANGETYPE_ENTIRE
394 %token <i> PARSEOP_RANGETYPE_ISAONLY
395 %token <i> PARSEOP_RANGETYPE_NONISAONLY
396 %token <i> PARSEOP_RAW_DATA
397 %token <i> PARSEOP_READWRITETYPE_BOTH
398 %token <i> PARSEOP_READWRITETYPE_READONLY
399 %token <i> PARSEOP_REFOF
400 %token <i> PARSEOP_REGIONSPACE_CMOS
401 %token <i> PARSEOP_REGIONSPACE_EC
402 %token <i> PARSEOP_REGIONSPACE_IO
403 %token <i> PARSEOP_REGIONSPACE_IPMI
404 %token <i> PARSEOP_REGIONSPACE_MEM
405 %token <i> PARSEOP_REGIONSPACE_PCI
406 %token <i> PARSEOP_REGIONSPACE_PCIBAR
407 %token <i> PARSEOP_REGIONSPACE_SMBUS
408 %token <i> PARSEOP_REGISTER
409 %token <i> PARSEOP_RELEASE
410 %token <i> PARSEOP_RESERVED_BYTES
411 %token <i> PARSEOP_RESET
412 %token <i> PARSEOP_RESOURCETEMPLATE
413 %token <i> PARSEOP_RESOURCETYPE_CONSUMER
414 %token <i> PARSEOP_RESOURCETYPE_PRODUCER
415 %token <i> PARSEOP_RETURN
416 %token <i> PARSEOP_REVISION
417 %token <i> PARSEOP_SCOPE
418 %token <i> PARSEOP_SERIALIZERULE_NOTSERIAL
419 %token <i> PARSEOP_SERIALIZERULE_SERIAL
420 %token <i> PARSEOP_SHARETYPE_EXCLUSIVE
421 %token <i> PARSEOP_SHARETYPE_SHARED
422 %token <i> PARSEOP_SHIFTLEFT
423 %token <i> PARSEOP_SHIFTRIGHT
424 %token <i> PARSEOP_SIGNAL
425 %token <i> PARSEOP_SIZEOF
426 %token <i> PARSEOP_SLEEP
427 %token <i> PARSEOP_STALL
428 %token <i> PARSEOP_STARTDEPENDENTFN
429 %token <i> PARSEOP_STARTDEPENDENTFN_NOPRI
430 %token <i> PARSEOP_STORE
431 %token <s> PARSEOP_STRING_LITERAL
432 %token <i> PARSEOP_SUBTRACT
433 %token <i> PARSEOP_SWITCH
434 %token <i> PARSEOP_THERMALZONE
435 %token <i> PARSEOP_TIMER
436 %token <i> PARSEOP_TOBCD
437 %token <i> PARSEOP_TOBUFFER
438 %token <i> PARSEOP_TODECIMALSTRING
439 %token <i> PARSEOP_TOHEXSTRING
440 %token <i> PARSEOP_TOINTEGER
441 %token <i> PARSEOP_TOSTRING
442 %token <i> PARSEOP_TOUUID
443 %token <i> PARSEOP_TRANSLATIONTYPE_DENSE
444 %token <i> PARSEOP_TRANSLATIONTYPE_SPARSE
445 %token <i> PARSEOP_TYPE_STATIC
446 %token <i> PARSEOP_TYPE_TRANSLATION
447 %token <i> PARSEOP_UNICODE
448 %token <i> PARSEOP_UNLOAD
449 %token <i> PARSEOP_UPDATERULE_ONES
450 %token <i> PARSEOP_UPDATERULE_PRESERVE
451 %token <i> PARSEOP_UPDATERULE_ZEROS
452 %token <i> PARSEOP_VAR_PACKAGE
453 %token <i> PARSEOP_VENDORLONG
454 %token <i> PARSEOP_VENDORSHORT
455 %token <i> PARSEOP_WAIT
456 %token <i> PARSEOP_WHILE
457 %token <i> PARSEOP_WORDBUSNUMBER
458 %token <i> PARSEOP_WORDCONST
459 %token <i> PARSEOP_WORDIO
460 %token <i> PARSEOP_WORDSPACE
461 %token <i> PARSEOP_XFERTYPE_8
462 %token <i> PARSEOP_XFERTYPE_8_16
463 %token <i> PARSEOP_XFERTYPE_16
464 %token <i> PARSEOP_XOR
465 %token <i> PARSEOP_ZERO
469 * Production names
472 %type <n> ASLCode
473 %type <n> DefinitionBlockTerm
474 %type <n> TermList
475 %type <n> Term
476 %type <n> CompilerDirective
477 %type <n> ObjectList
478 %type <n> Object
479 %type <n> DataObject
480 %type <n> BufferData
481 %type <n> PackageData
482 %type <n> IntegerData
483 %type <n> StringData
484 %type <n> NamedObject
485 %type <n> NameSpaceModifier
486 %type <n> UserTerm
487 %type <n> ArgList
488 %type <n> TermArg
489 %type <n> Target
490 %type <n> RequiredTarget
491 %type <n> SimpleTarget
492 %type <n> BufferTermData
493 %type <n> ParameterTypePackage
494 %type <n> ParameterTypePackageList
495 %type <n> ParameterTypesPackage
496 %type <n> ParameterTypesPackageList
498 %type <n> Type1Opcode
499 %type <n> Type2Opcode
500 %type <n> Type2IntegerOpcode
501 %type <n> Type2StringOpcode
502 %type <n> Type2BufferOpcode
503 %type <n> Type2BufferOrStringOpcode
504 %type <n> Type3Opcode
506 /* Obsolete %type <n> Type4Opcode */
508 %type <n> Type5Opcode
509 %type <n> Type6Opcode
511 %type <n> LineTerm
512 %type <n> IncludeTerm
513 %type <n> IncludeCStyleTerm
514 %type <n> ExternalTerm
516 %type <n> FieldUnitList
517 %type <n> FieldUnit
518 %type <n> FieldUnitEntry
520 %type <n> OffsetTerm
521 %type <n> AccessAsTerm
522 %type <n> OptionalAccessAttribTerm
525 /* Named Objects */
527 %type <n> BankFieldTerm
528 %type <n> CreateBitFieldTerm
529 %type <n> CreateByteFieldTerm
530 %type <n> CreateDWordFieldTerm
531 %type <n> CreateFieldTerm
532 %type <n> CreateQWordFieldTerm
533 %type <n> CreateWordFieldTerm
534 %type <n> DataRegionTerm
535 %type <n> DeviceTerm
536 %type <n> EventTerm
537 %type <n> FieldTerm
538 %type <n> FunctionTerm
539 %type <n> IndexFieldTerm
540 %type <n> MethodTerm
541 %type <n> MutexTerm
542 %type <n> OpRegionTerm
543 %type <n> OpRegionSpaceIdTerm
544 %type <n> PowerResTerm
545 %type <n> ProcessorTerm
546 %type <n> ThermalZoneTerm
549 /* Namespace modifiers */
551 %type <n> AliasTerm
552 %type <n> NameTerm
553 %type <n> ScopeTerm
555 /* Type 1 opcodes */
557 %type <n> BreakTerm
558 %type <n> BreakPointTerm
559 %type <n> ContinueTerm
560 %type <n> FatalTerm
561 %type <n> IfElseTerm
562 %type <n> IfTerm
563 %type <n> ElseTerm
564 %type <n> LoadTerm
565 %type <n> NoOpTerm
566 %type <n> NotifyTerm
567 %type <n> ReleaseTerm
568 %type <n> ResetTerm
569 %type <n> ReturnTerm
570 %type <n> SignalTerm
571 %type <n> SleepTerm
572 %type <n> StallTerm
573 %type <n> SwitchTerm
574 %type <n> CaseDefaultTermList
575 //%type <n> CaseTermList
576 %type <n> CaseTerm
577 %type <n> DefaultTerm
578 %type <n> UnloadTerm
579 %type <n> WhileTerm
581 /* Type 2 opcodes */
583 %type <n> AcquireTerm
584 %type <n> AddTerm
585 %type <n> AndTerm
586 %type <n> ConcatTerm
587 %type <n> ConcatResTerm
588 %type <n> CondRefOfTerm
589 %type <n> CopyObjectTerm
590 %type <n> DecTerm
591 %type <n> DerefOfTerm
592 %type <n> DivideTerm
593 %type <n> FindSetLeftBitTerm
594 %type <n> FindSetRightBitTerm
595 %type <n> FromBCDTerm
596 %type <n> IncTerm
597 %type <n> IndexTerm
598 %type <n> LAndTerm
599 %type <n> LEqualTerm
600 %type <n> LGreaterTerm
601 %type <n> LGreaterEqualTerm
602 %type <n> LLessTerm
603 %type <n> LLessEqualTerm
604 %type <n> LNotTerm
605 %type <n> LNotEqualTerm
606 %type <n> LoadTableTerm
607 %type <n> LOrTerm
608 %type <n> MatchTerm
609 %type <n> MidTerm
610 %type <n> ModTerm
611 %type <n> MultiplyTerm
612 %type <n> NAndTerm
613 %type <n> NOrTerm
614 %type <n> NotTerm
615 %type <n> ObjectTypeTerm
616 %type <n> OrTerm
617 %type <n> RefOfTerm
618 %type <n> ShiftLeftTerm
619 %type <n> ShiftRightTerm
620 %type <n> SizeOfTerm
621 %type <n> StoreTerm
622 %type <n> SubtractTerm
623 %type <n> TimerTerm
624 %type <n> ToBCDTerm
625 %type <n> ToBufferTerm
626 %type <n> ToDecimalStringTerm
627 %type <n> ToHexStringTerm
628 %type <n> ToIntegerTerm
629 %type <n> ToStringTerm
630 %type <n> WaitTerm
631 %type <n> XOrTerm
633 %type <n> OptionalTermArg
634 %type <n> OptionalReturnArg
635 %type <n> OptionalListString
638 /* Keywords */
640 %type <n> ObjectTypeKeyword
641 %type <n> AccessTypeKeyword
642 %type <n> AccessAttribKeyword
643 %type <n> LockRuleKeyword
644 %type <n> UpdateRuleKeyword
645 %type <n> RegionSpaceKeyword
646 %type <n> AddressSpaceKeyword
647 %type <n> MatchOpKeyword
648 %type <n> SerializeRuleKeyword
649 %type <n> DMATypeKeyword
650 %type <n> OptionalBusMasterKeyword
651 %type <n> XferTypeKeyword
652 %type <n> ResourceTypeKeyword
653 %type <n> MinKeyword
654 %type <n> MaxKeyword
655 %type <n> DecodeKeyword
656 %type <n> RangeTypeKeyword
657 %type <n> MemTypeKeyword
658 %type <n> OptionalReadWriteKeyword
659 %type <n> InterruptTypeKeyword
660 %type <n> InterruptLevel
661 %type <n> ShareTypeKeyword
662 %type <n> IODecodeKeyword
663 %type <n> TypeKeyword
664 %type <n> TranslationKeyword
665 %type <n> AddressKeyword
667 /* Types */
669 %type <n> SuperName
670 %type <n> ArgTerm
671 %type <n> LocalTerm
672 %type <n> DebugTerm
674 %type <n> Integer
675 %type <n> ByteConst
676 %type <n> WordConst
677 %type <n> DWordConst
678 %type <n> QWordConst
679 %type <n> String
681 %type <n> ConstTerm
682 %type <n> ByteConstExpr
683 %type <n> WordConstExpr
684 %type <n> DWordConstExpr
685 %type <n> QWordConstExpr
686 %type <n> ConstExprTerm
688 %type <n> BufferTerm
689 %type <n> ByteList
690 %type <n> DWordList
692 %type <n> PackageTerm
693 %type <n> PackageList
694 %type <n> PackageElement
696 %type <n> VarPackageLengthTerm
698 /* Macros */
700 %type <n> EISAIDTerm
701 %type <n> ResourceTemplateTerm
702 %type <n> ToUUIDTerm
703 %type <n> UnicodeTerm
704 %type <n> ResourceMacroList
705 %type <n> ResourceMacroTerm
707 %type <n> DMATerm
708 %type <n> DWordIOTerm
709 %type <n> DWordMemoryTerm
710 %type <n> DWordSpaceTerm
711 %type <n> EndDependentFnTerm
712 %type <n> ExtendedIOTerm
713 %type <n> ExtendedMemoryTerm
714 %type <n> ExtendedSpaceTerm
715 %type <n> FixedIOTerm
716 %type <n> InterruptTerm
717 %type <n> IOTerm
718 %type <n> IRQNoFlagsTerm
719 %type <n> IRQTerm
720 %type <n> Memory24Term
721 %type <n> Memory32FixedTerm
722 %type <n> Memory32Term
723 %type <n> QWordIOTerm
724 %type <n> QWordMemoryTerm
725 %type <n> QWordSpaceTerm
726 %type <n> RegisterTerm
727 %type <n> StartDependentFnTerm
728 %type <n> StartDependentFnNoPriTerm
729 %type <n> VendorLongTerm
730 %type <n> VendorShortTerm
731 %type <n> WordBusNumberTerm
732 %type <n> WordIOTerm
733 %type <n> WordSpaceTerm
735 %type <n> NameString
736 %type <n> NameSeg
739 /* Local types that help construct the AML, not in ACPI spec */
741 %type <n> IncludeEndTerm
742 %type <n> AmlPackageLengthTerm
743 %type <n> OptionalByteConstExpr
744 %type <n> OptionalDWordConstExpr
745 %type <n> OptionalQWordConstExpr
746 %type <n> OptionalSerializeRuleKeyword
747 %type <n> OptionalResourceType_First
748 %type <n> OptionalResourceType
749 %type <n> OptionalMinType
750 %type <n> OptionalMaxType
751 %type <n> OptionalMemType
752 %type <n> OptionalCount
753 %type <n> OptionalDecodeType
754 %type <n> OptionalRangeType
755 %type <n> OptionalShareType
756 %type <n> OptionalType
757 %type <n> OptionalType_Last
758 %type <n> OptionalTranslationType_Last
759 %type <n> OptionalStringData
760 %type <n> OptionalNameString
761 %type <n> OptionalNameString_First
762 %type <n> OptionalNameString_Last
763 %type <n> OptionalAddressRange
764 %type <n> OptionalObjectTypeKeyword
765 %type <n> OptionalParameterTypePackage
766 %type <n> OptionalParameterTypesPackage
767 %type <n> OptionalReference
768 %type <n> OptionalAccessSize
771 %type <n> TermArgItem
772 %type <n> NameStringItem
777 /*******************************************************************************
779 * Production rules start here
781 ******************************************************************************/
784 * ASL Names
789 * Blocks, Data, and Opcodes
792 ASLCode
793 : DefinitionBlockTerm
794 | error {YYABORT; $$ = NULL;}
797 DefinitionBlockTerm
798 : PARSEOP_DEFINITIONBLOCK '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DEFINITIONBLOCK);}
799 String ','
800 String ','
801 ByteConst ','
802 String ','
803 String ','
804 DWordConst
805 ')' {TrSetEndLineNumber ($<n>3);}
806 '{' TermList '}' {$$ = TrLinkChildren ($<n>3,7,$4,$6,$8,$10,$12,$14,$18);}
809 /* ACPI 3.0 -- allow semicolons between terms */
811 TermList
812 : {$$ = NULL;}
813 | TermList Term {$$ = TrLinkPeerNode (TrSetNodeFlags ($1, NODE_RESULT_NOT_USED),$2);}
814 | TermList ';' Term {$$ = TrLinkPeerNode (TrSetNodeFlags ($1, NODE_RESULT_NOT_USED),$3);}
817 Term
818 : Object {}
819 | Type1Opcode {}
820 | Type2Opcode {}
821 | Type2IntegerOpcode {}
822 | Type2StringOpcode {}
823 | Type2BufferOpcode {}
824 | Type2BufferOrStringOpcode {}
825 | error {$$ = AslDoError(); yyclearin;}
828 CompilerDirective
829 : IncludeTerm {}
830 | IncludeCStyleTerm {$$ = NULL;}
831 | LineTerm {$$ = NULL;}
832 | ExternalTerm {}
835 ObjectList
836 : {$$ = NULL;}
837 | ObjectList Object {$$ = TrLinkPeerNode ($1,$2);}
838 | error {$$ = AslDoError(); yyclearin;}
841 Object
842 : CompilerDirective {}
843 | NamedObject {}
844 | NameSpaceModifier {}
847 DataObject
848 : BufferData {}
849 | PackageData {}
850 | IntegerData {}
851 | StringData {}
854 BufferData
855 : Type5Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
856 | Type2BufferOrStringOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
857 | Type2BufferOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
858 | BufferTerm {}
861 PackageData
862 : PackageTerm {}
865 IntegerData
866 : Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
867 | Type3Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
868 | Integer {}
869 | ConstTerm {}
872 StringData
873 : Type2StringOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
874 | String {}
877 NamedObject
878 : BankFieldTerm {}
879 | CreateBitFieldTerm {}
880 | CreateByteFieldTerm {}
881 | CreateDWordFieldTerm {}
882 | CreateFieldTerm {}
883 | CreateQWordFieldTerm {}
884 | CreateWordFieldTerm {}
885 | DataRegionTerm {}
886 | DeviceTerm {}
887 | EventTerm {}
888 | FieldTerm {}
889 | FunctionTerm {}
890 | IndexFieldTerm {}
891 | MethodTerm {}
892 | MutexTerm {}
893 | OpRegionTerm {}
894 | PowerResTerm {}
895 | ProcessorTerm {}
896 | ThermalZoneTerm {}
899 NameSpaceModifier
900 : AliasTerm {}
901 | NameTerm {}
902 | ScopeTerm {}
905 UserTerm
906 : NameString '(' {TrUpdateNode (PARSEOP_METHODCALL, $1);}
907 ArgList ')' {$$ = TrLinkChildNode ($1,$4);}
910 ArgList
911 : {$$ = NULL;}
912 | TermArg
913 | ArgList ',' /* Allows a trailing comma at list end */
914 | ArgList ','
915 TermArg {$$ = TrLinkPeerNode ($1,$3);}
919 Removed from TermArg due to reduce/reduce conflicts
920 | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
921 | Type2StringOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
922 | Type2BufferOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
923 | Type2BufferOrStringOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
927 TermArg
928 : Type2Opcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
929 | DataObject {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
930 | NameString {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
931 | ArgTerm {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
932 | LocalTerm {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
935 Target
936 : {$$ = TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO), NODE_IS_TARGET | NODE_COMPILE_TIME_CONST);} /* Placeholder is a ZeroOp object */
937 | ',' {$$ = TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO), NODE_IS_TARGET | NODE_COMPILE_TIME_CONST);} /* Placeholder is a ZeroOp object */
938 | ',' SuperName {$$ = TrSetNodeFlags ($2, NODE_IS_TARGET);}
941 RequiredTarget
942 : ',' SuperName {$$ = TrSetNodeFlags ($2, NODE_IS_TARGET);}
945 SimpleTarget
946 : NameString {}
947 | LocalTerm {}
948 | ArgTerm {}
951 /* Rules for specifying the type of one method argument or return value */
953 ParameterTypePackage
954 : {$$ = NULL;}
955 | ObjectTypeKeyword {$$ = $1;}
956 | ParameterTypePackage ','
957 ObjectTypeKeyword {$$ = TrLinkPeerNodes (2,$1,$3);}
960 ParameterTypePackageList
961 : {$$ = NULL;}
962 | ObjectTypeKeyword {$$ = $1;}
963 | '{' ParameterTypePackage '}' {$$ = $2;}
966 OptionalParameterTypePackage
967 : {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
968 | ',' ParameterTypePackageList {$$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_DEFAULT_ARG),1,$2);}
971 /* Rules for specifying the types for method arguments */
973 ParameterTypesPackage
974 : ParameterTypePackageList {$$ = $1;}
975 | ParameterTypesPackage ','
976 ParameterTypePackageList {$$ = TrLinkPeerNodes (2,$1,$3);}
979 ParameterTypesPackageList
980 : {$$ = NULL;}
981 | ObjectTypeKeyword {$$ = $1;}
982 | '{' ParameterTypesPackage '}' {$$ = $2;}
985 OptionalParameterTypesPackage
986 : {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
987 | ',' ParameterTypesPackageList {$$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_DEFAULT_ARG),1,$2);}
991 /* Opcode types */
993 Type1Opcode
994 : BreakTerm {}
995 | BreakPointTerm {}
996 | ContinueTerm {}
997 | FatalTerm {}
998 | IfElseTerm {}
999 | LoadTerm {}
1000 | NoOpTerm {}
1001 | NotifyTerm {}
1002 | ReleaseTerm {}
1003 | ResetTerm {}
1004 | ReturnTerm {}
1005 | SignalTerm {}
1006 | SleepTerm {}
1007 | StallTerm {}
1008 | SwitchTerm {}
1009 | UnloadTerm {}
1010 | WhileTerm {}
1013 Type2Opcode
1014 : AcquireTerm {}
1015 | CondRefOfTerm {}
1016 | CopyObjectTerm {}
1017 | DerefOfTerm {}
1018 | ObjectTypeTerm {}
1019 | RefOfTerm {}
1020 | SizeOfTerm {}
1021 | StoreTerm {}
1022 | TimerTerm {}
1023 | WaitTerm {}
1024 | UserTerm {}
1028 * Type 3/4/5 opcodes
1031 Type2IntegerOpcode /* "Type3" opcodes */
1032 : AddTerm {}
1033 | AndTerm {}
1034 | DecTerm {}
1035 | DivideTerm {}
1036 | FindSetLeftBitTerm {}
1037 | FindSetRightBitTerm {}
1038 | FromBCDTerm {}
1039 | IncTerm {}
1040 | IndexTerm {}
1041 | LAndTerm {}
1042 | LEqualTerm {}
1043 | LGreaterTerm {}
1044 | LGreaterEqualTerm {}
1045 | LLessTerm {}
1046 | LLessEqualTerm {}
1047 | LNotTerm {}
1048 | LNotEqualTerm {}
1049 | LoadTableTerm {}
1050 | LOrTerm {}
1051 | MatchTerm {}
1052 | ModTerm {}
1053 | MultiplyTerm {}
1054 | NAndTerm {}
1055 | NOrTerm {}
1056 | NotTerm {}
1057 | OrTerm {}
1058 | ShiftLeftTerm {}
1059 | ShiftRightTerm {}
1060 | SubtractTerm {}
1061 | ToBCDTerm {}
1062 | ToIntegerTerm {}
1063 | XOrTerm {}
1066 Type2StringOpcode /* "Type4" Opcodes */
1067 : ToDecimalStringTerm {}
1068 | ToHexStringTerm {}
1069 | ToStringTerm {}
1072 Type2BufferOpcode /* "Type5" Opcodes */
1073 : ToBufferTerm {}
1074 | ConcatResTerm {}
1077 Type2BufferOrStringOpcode
1078 : ConcatTerm {}
1079 | MidTerm {}
1083 * A type 3 opcode evaluates to an Integer and cannot have a destination operand
1086 Type3Opcode
1087 : EISAIDTerm {}
1090 /* Obsolete
1091 Type4Opcode
1092 : ConcatTerm {}
1093 | ToDecimalStringTerm {}
1094 | ToHexStringTerm {}
1095 | MidTerm {}
1096 | ToStringTerm {}
1101 Type5Opcode
1102 : ResourceTemplateTerm {}
1103 | UnicodeTerm {}
1104 | ToUUIDTerm {}
1107 Type6Opcode
1108 : RefOfTerm {}
1109 | DerefOfTerm {}
1110 | IndexTerm {}
1111 | UserTerm {}
1114 IncludeTerm
1115 : PARSEOP_INCLUDE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INCLUDE);}
1116 String ')' {TrLinkChildren ($<n>3,1,$4);FlOpenIncludeFile ($4);}
1117 TermList
1118 IncludeEndTerm {$$ = TrLinkPeerNodes (3,$<n>3,$7,$8);}
1121 IncludeEndTerm
1122 : PARSEOP_INCLUDE_END {$$ = TrCreateLeafNode (PARSEOP_INCLUDE_END);}
1125 IncludeCStyleTerm
1126 : PARSEOP_INCLUDE_CSTYLE
1127 String {FlOpenIncludeFile ($2);}
1130 LineTerm
1131 : PARSEOP_LINE_CSTYLE
1132 Integer {FlSetLineNumber ($2);}
1135 ExternalTerm
1136 : PARSEOP_EXTERNAL '('
1137 NameString
1138 OptionalObjectTypeKeyword
1139 OptionalParameterTypePackage
1140 OptionalParameterTypesPackage
1141 ')' {$$ = TrCreateNode (PARSEOP_EXTERNAL,4,$3,$4,$5,$6);}
1142 | PARSEOP_EXTERNAL '('
1143 error ')' {$$ = AslDoError(); yyclearin;}
1147 /******* Named Objects *******************************************************/
1150 BankFieldTerm
1151 : PARSEOP_BANKFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_BANKFIELD);}
1152 NameString
1153 NameStringItem
1154 TermArgItem
1155 ',' AccessTypeKeyword
1156 ',' LockRuleKeyword
1157 ',' UpdateRuleKeyword
1158 ')' '{'
1159 FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,7,$4,$5,$6,$8,$10,$12,$15);}
1160 | PARSEOP_BANKFIELD '('
1161 error ')' '{' error '}' {$$ = AslDoError(); yyclearin;}
1164 FieldUnitList
1165 : {$$ = NULL;}
1166 | FieldUnit
1167 | FieldUnitList ',' /* Allows a trailing comma at list end */
1168 | FieldUnitList ','
1169 FieldUnit {$$ = TrLinkPeerNode ($1,$3);}
1172 FieldUnit
1173 : FieldUnitEntry {}
1174 | OffsetTerm {}
1175 | AccessAsTerm {}
1178 FieldUnitEntry
1179 : ',' AmlPackageLengthTerm {$$ = TrCreateNode (PARSEOP_RESERVED_BYTES,1,$2);}
1180 | NameSeg ','
1181 AmlPackageLengthTerm {$$ = TrLinkChildNode ($1,$3);}
1184 OffsetTerm
1185 : PARSEOP_OFFSET '('
1186 AmlPackageLengthTerm
1187 ')' {$$ = TrCreateNode (PARSEOP_OFFSET,1,$3);}
1188 | PARSEOP_OFFSET '('
1189 error ')' {$$ = AslDoError(); yyclearin;}
1192 AccessAsTerm
1193 : PARSEOP_ACCESSAS '('
1194 AccessTypeKeyword
1195 OptionalAccessAttribTerm
1196 ')' {$$ = TrCreateNode (PARSEOP_ACCESSAS,2,$3,$4);}
1197 | PARSEOP_ACCESSAS '('
1198 error ')' {$$ = AslDoError(); yyclearin;}
1201 CreateBitFieldTerm
1202 : PARSEOP_CREATEBITFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEBITFIELD);}
1203 TermArg
1204 TermArgItem
1205 NameStringItem
1206 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
1207 | PARSEOP_CREATEBITFIELD '('
1208 error ')' {$$ = AslDoError(); yyclearin;}
1211 CreateByteFieldTerm
1212 : PARSEOP_CREATEBYTEFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEBYTEFIELD);}
1213 TermArg
1214 TermArgItem
1215 NameStringItem
1216 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
1217 | PARSEOP_CREATEBYTEFIELD '('
1218 error ')' {$$ = AslDoError(); yyclearin;}
1221 CreateDWordFieldTerm
1222 : PARSEOP_CREATEDWORDFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEDWORDFIELD);}
1223 TermArg
1224 TermArgItem
1225 NameStringItem
1226 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
1227 | PARSEOP_CREATEDWORDFIELD '('
1228 error ')' {$$ = AslDoError(); yyclearin;}
1231 CreateFieldTerm
1232 : PARSEOP_CREATEFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEFIELD);}
1233 TermArg
1234 TermArgItem
1235 TermArgItem
1236 NameStringItem
1237 ')' {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,TrSetNodeFlags ($7, NODE_IS_NAME_DECLARATION));}
1238 | PARSEOP_CREATEFIELD '('
1239 error ')' {$$ = AslDoError(); yyclearin;}
1242 CreateQWordFieldTerm
1243 : PARSEOP_CREATEQWORDFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEQWORDFIELD);}
1244 TermArg
1245 TermArgItem
1246 NameStringItem
1247 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
1248 | PARSEOP_CREATEQWORDFIELD '('
1249 error ')' {$$ = AslDoError(); yyclearin;}
1252 CreateWordFieldTerm
1253 : PARSEOP_CREATEWORDFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEWORDFIELD);}
1254 TermArg
1255 TermArgItem
1256 NameStringItem
1257 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
1258 | PARSEOP_CREATEWORDFIELD '('
1259 error ')' {$$ = AslDoError(); yyclearin;}
1262 DataRegionTerm
1263 : PARSEOP_DATATABLEREGION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DATATABLEREGION);}
1264 NameString
1265 TermArgItem
1266 TermArgItem
1267 TermArgItem
1268 ')' {$$ = TrLinkChildren ($<n>3,4,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$5,$6,$7);}
1269 | PARSEOP_DATATABLEREGION '('
1270 error ')' {$$ = AslDoError(); yyclearin;}
1273 DeviceTerm
1274 : PARSEOP_DEVICE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DEVICE);}
1275 NameString
1276 ')' '{'
1277 ObjectList '}' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
1278 | PARSEOP_DEVICE '('
1279 error ')' {$$ = AslDoError(); yyclearin;}
1282 EventTerm
1283 : PARSEOP_EVENT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_EVENT);}
1284 NameString
1285 ')' {$$ = TrLinkChildren ($<n>3,1,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION));}
1286 | PARSEOP_EVENT '('
1287 error ')' {$$ = AslDoError(); yyclearin;}
1290 FieldTerm
1291 : PARSEOP_FIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FIELD);}
1292 NameString
1293 ',' AccessTypeKeyword
1294 ',' LockRuleKeyword
1295 ',' UpdateRuleKeyword
1296 ')' '{'
1297 FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,5,$4,$6,$8,$10,$13);}
1298 | PARSEOP_FIELD '('
1299 error ')' '{' error '}' {$$ = AslDoError(); yyclearin;}
1302 FunctionTerm
1303 : PARSEOP_FUNCTION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_METHOD);}
1304 NameString
1305 OptionalParameterTypePackage
1306 OptionalParameterTypesPackage
1307 ')' '{'
1308 TermList '}' {$$ = TrLinkChildren ($<n>3,7,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
1309 TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0),
1310 TrCreateLeafNode (PARSEOP_SERIALIZERULE_NOTSERIAL),
1311 TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0),$5,$6,$9);}
1312 | PARSEOP_FUNCTION '('
1313 error ')' {$$ = AslDoError(); yyclearin;}
1316 IndexFieldTerm
1317 : PARSEOP_INDEXFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INDEXFIELD);}
1318 NameString
1319 NameStringItem
1320 ',' AccessTypeKeyword
1321 ',' LockRuleKeyword
1322 ',' UpdateRuleKeyword
1323 ')' '{'
1324 FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,6,$4,$5,$7,$9,$11,$14);}
1325 | PARSEOP_INDEXFIELD '('
1326 error ')' '{' error '}' {$$ = AslDoError(); yyclearin;}
1329 MethodTerm
1330 : PARSEOP_METHOD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_METHOD);}
1331 NameString
1332 OptionalByteConstExpr {UtCheckIntegerRange ($5, 0, 7);}
1333 OptionalSerializeRuleKeyword
1334 OptionalByteConstExpr
1335 OptionalParameterTypePackage
1336 OptionalParameterTypesPackage
1337 ')' '{'
1338 TermList '}' {$$ = TrLinkChildren ($<n>3,7,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$5,$7,$8,$9,$10,$13);}
1339 | PARSEOP_METHOD '('
1340 error ')' {$$ = AslDoError(); yyclearin;}
1343 MutexTerm
1344 : PARSEOP_MUTEX '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MUTEX);}
1345 NameString
1346 ',' ByteConstExpr
1347 ')' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);}
1348 | PARSEOP_MUTEX '('
1349 error ')' {$$ = AslDoError(); yyclearin;}
1352 OpRegionTerm
1353 : PARSEOP_OPERATIONREGION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_OPERATIONREGION);}
1354 NameString
1355 ',' OpRegionSpaceIdTerm
1356 TermArgItem
1357 TermArgItem
1358 ')' {$$ = TrLinkChildren ($<n>3,4,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$7,$8);}
1359 | PARSEOP_OPERATIONREGION '('
1360 error ')' {$$ = AslDoError(); yyclearin;}
1363 OpRegionSpaceIdTerm
1364 : RegionSpaceKeyword {}
1365 | ByteConst {$$ = UtCheckIntegerRange ($1, 0x80, 0xFF);}
1368 PowerResTerm
1369 : PARSEOP_POWERRESOURCE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_POWERRESOURCE);}
1370 NameString
1371 ',' ByteConstExpr
1372 ',' WordConstExpr
1373 ')' '{'
1374 ObjectList '}' {$$ = TrLinkChildren ($<n>3,4,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$8,$11);}
1375 | PARSEOP_POWERRESOURCE '('
1376 error ')' {$$ = AslDoError(); yyclearin;}
1379 ProcessorTerm
1380 : PARSEOP_PROCESSOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_PROCESSOR);}
1381 NameString
1382 ',' ByteConstExpr
1383 OptionalDWordConstExpr
1384 OptionalByteConstExpr
1385 ')' '{'
1386 ObjectList '}' {$$ = TrLinkChildren ($<n>3,5,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$7,$8,$11);}
1387 | PARSEOP_PROCESSOR '('
1388 error ')' {$$ = AslDoError(); yyclearin;}
1391 ThermalZoneTerm
1392 : PARSEOP_THERMALZONE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_THERMALZONE);}
1393 NameString
1394 ')' '{'
1395 ObjectList '}' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
1396 | PARSEOP_THERMALZONE '('
1397 error ')' {$$ = AslDoError(); yyclearin;}
1401 /******* Namespace modifiers *************************************************/
1404 AliasTerm
1405 : PARSEOP_ALIAS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ALIAS);}
1406 NameString
1407 NameStringItem
1408 ')' {$$ = TrLinkChildren ($<n>3,2,$4,TrSetNodeFlags ($5, NODE_IS_NAME_DECLARATION));}
1409 | PARSEOP_ALIAS '('
1410 error ')' {$$ = AslDoError(); yyclearin;}
1413 NameTerm
1414 : PARSEOP_NAME '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NAME);}
1415 NameString
1416 ',' DataObject
1417 ')' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);}
1418 | PARSEOP_NAME '('
1419 error ')' {$$ = AslDoError(); yyclearin;}
1422 ScopeTerm
1423 : PARSEOP_SCOPE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SCOPE);}
1424 NameString
1425 ')' '{'
1426 ObjectList '}' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
1427 | PARSEOP_SCOPE '('
1428 error ')' {$$ = AslDoError(); yyclearin;}
1432 /******* Type 1 opcodes *******************************************************/
1435 BreakTerm
1436 : PARSEOP_BREAK {$$ = TrCreateNode (PARSEOP_BREAK, 0);}
1439 BreakPointTerm
1440 : PARSEOP_BREAKPOINT {$$ = TrCreateNode (PARSEOP_BREAKPOINT, 0);}
1443 ContinueTerm
1444 : PARSEOP_CONTINUE {$$ = TrCreateNode (PARSEOP_CONTINUE, 0);}
1447 FatalTerm
1448 : PARSEOP_FATAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FATAL);}
1449 ByteConstExpr
1450 ',' DWordConstExpr
1451 TermArgItem
1452 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);}
1453 | PARSEOP_FATAL '('
1454 error ')' {$$ = AslDoError(); yyclearin;}
1457 IfElseTerm
1458 : IfTerm ElseTerm {$$ = TrLinkPeerNode ($1,$2);}
1461 IfTerm
1462 : PARSEOP_IF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_IF);}
1463 TermArg
1464 ')' '{'
1465 TermList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
1467 | PARSEOP_IF '('
1468 error ')' {$$ = AslDoError(); yyclearin;}
1471 ElseTerm
1472 : {$$ = NULL;}
1473 | PARSEOP_ELSE '{' {$<n>$ = TrCreateLeafNode (PARSEOP_ELSE);}
1474 TermList '}' {$$ = TrLinkChildren ($<n>3,1,$4);}
1476 | PARSEOP_ELSE '{'
1477 error '}' {$$ = AslDoError(); yyclearin;}
1479 | PARSEOP_ELSE
1480 error {$$ = AslDoError(); yyclearin;}
1482 | PARSEOP_ELSEIF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ELSE);}
1483 TermArg {$<n>$ = TrCreateLeafNode (PARSEOP_IF);}
1484 ')' '{'
1485 TermList '}' {TrLinkChildren ($<n>5,2,$4,$8);}
1486 ElseTerm {TrLinkPeerNode ($<n>5,$11);}
1487 {$$ = TrLinkChildren ($<n>3,1,$<n>5);}
1489 | PARSEOP_ELSEIF '('
1490 error ')' {$$ = AslDoError(); yyclearin;}
1492 | PARSEOP_ELSEIF
1493 error {$$ = AslDoError(); yyclearin;}
1496 LoadTerm
1497 : PARSEOP_LOAD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LOAD);}
1498 NameString
1499 RequiredTarget
1500 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
1501 | PARSEOP_LOAD '('
1502 error ')' {$$ = AslDoError(); yyclearin;}
1505 NoOpTerm
1506 : PARSEOP_NOOP {$$ = TrCreateNode (PARSEOP_NOOP, 0);}
1509 NotifyTerm
1510 : PARSEOP_NOTIFY '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NOTIFY);}
1511 SuperName
1512 TermArgItem
1513 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
1514 | PARSEOP_NOTIFY '('
1515 error ')' {$$ = AslDoError(); yyclearin;}
1518 ReleaseTerm
1519 : PARSEOP_RELEASE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_RELEASE);}
1520 SuperName
1521 ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
1522 | PARSEOP_RELEASE '('
1523 error ')' {$$ = AslDoError(); yyclearin;}
1526 ResetTerm
1527 : PARSEOP_RESET '(' {$<n>$ = TrCreateLeafNode (PARSEOP_RESET);}
1528 SuperName
1529 ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
1530 | PARSEOP_RESET '('
1531 error ')' {$$ = AslDoError(); yyclearin;}
1534 ReturnTerm
1535 : PARSEOP_RETURN '(' {$<n>$ = TrCreateLeafNode (PARSEOP_RETURN);}
1536 OptionalReturnArg
1537 ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
1538 | PARSEOP_RETURN {$$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_RETURN),1,TrCreateLeafNode (PARSEOP_ZERO));}
1539 | PARSEOP_RETURN '('
1540 error ')' {$$ = AslDoError(); yyclearin;}
1543 SignalTerm
1544 : PARSEOP_SIGNAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SIGNAL);}
1545 SuperName
1546 ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
1547 | PARSEOP_SIGNAL '('
1548 error ')' {$$ = AslDoError(); yyclearin;}
1551 SleepTerm
1552 : PARSEOP_SLEEP '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SLEEP);}
1553 TermArg
1554 ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
1555 | PARSEOP_SLEEP '('
1556 error ')' {$$ = AslDoError(); yyclearin;}
1559 StallTerm
1560 : PARSEOP_STALL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_STALL);}
1561 TermArg
1562 ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
1563 | PARSEOP_STALL '('
1564 error ')' {$$ = AslDoError(); yyclearin;}
1567 SwitchTerm
1568 : PARSEOP_SWITCH '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SWITCH);}
1569 TermArg
1570 ')' '{'
1571 CaseDefaultTermList '}'
1572 {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
1573 | PARSEOP_SWITCH '('
1574 error ')' {$$ = AslDoError(); yyclearin;}
1578 * Case-Default list; allow only one Default term and unlimited Case terms
1581 CaseDefaultTermList
1582 : {$$ = NULL;}
1583 | CaseTerm {}
1584 | DefaultTerm {}
1585 | CaseDefaultTermList
1586 CaseTerm {$$ = TrLinkPeerNode ($1,$2);}
1587 | CaseDefaultTermList
1588 DefaultTerm {$$ = TrLinkPeerNode ($1,$2);}
1590 /* Original - attempts to force zero or one default term within the switch */
1593 CaseDefaultTermList
1594 : {$$ = NULL;}
1595 | CaseTermList
1596 DefaultTerm
1597 CaseTermList {$$ = TrLinkPeerNode ($1,TrLinkPeerNode ($2, $3));}
1598 | CaseTermList
1599 CaseTerm {$$ = TrLinkPeerNode ($1,$2);}
1602 CaseTermList
1603 : {$$ = NULL;}
1604 | CaseTerm {}
1605 | CaseTermList
1606 CaseTerm {$$ = TrLinkPeerNode ($1,$2);}
1610 CaseTerm
1611 : PARSEOP_CASE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CASE);}
1612 DataObject
1613 ')' '{'
1614 TermList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
1615 | PARSEOP_CASE '('
1616 error ')' {$$ = AslDoError(); yyclearin;}
1619 DefaultTerm
1620 : PARSEOP_DEFAULT '{' {$<n>$ = TrCreateLeafNode (PARSEOP_DEFAULT);}
1621 TermList '}' {$$ = TrLinkChildren ($<n>3,1,$4);}
1622 | PARSEOP_DEFAULT '{'
1623 error '}' {$$ = AslDoError(); yyclearin;}
1626 UnloadTerm
1627 : PARSEOP_UNLOAD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_UNLOAD);}
1628 SuperName
1629 ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
1630 | PARSEOP_UNLOAD '('
1631 error ')' {$$ = AslDoError(); yyclearin;}
1634 WhileTerm
1635 : PARSEOP_WHILE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WHILE);}
1636 TermArg
1637 ')' '{' TermList '}'
1638 {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
1639 | PARSEOP_WHILE '('
1640 error ')' {$$ = AslDoError(); yyclearin;}
1644 /******* Type 2 opcodes *******************************************************/
1646 AcquireTerm
1647 : PARSEOP_ACQUIRE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ACQUIRE);}
1648 SuperName
1649 ',' WordConstExpr
1650 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$6);}
1651 | PARSEOP_ACQUIRE '('
1652 error ')' {$$ = AslDoError(); yyclearin;}
1655 AddTerm
1656 : PARSEOP_ADD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ADD);}
1657 TermArg
1658 TermArgItem
1659 Target
1660 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
1661 | PARSEOP_ADD '('
1662 error ')' {$$ = AslDoError(); yyclearin;}
1665 AndTerm
1666 : PARSEOP_AND '(' {$<n>$ = TrCreateLeafNode (PARSEOP_AND);}
1667 TermArg
1668 TermArgItem
1669 Target
1670 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
1671 | PARSEOP_AND '('
1672 error ')' {$$ = AslDoError(); yyclearin;}
1675 ConcatTerm
1676 : PARSEOP_CONCATENATE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CONCATENATE);}
1677 TermArg
1678 TermArgItem
1679 Target
1680 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
1681 | PARSEOP_CONCATENATE '('
1682 error ')' {$$ = AslDoError(); yyclearin;}
1685 ConcatResTerm
1686 : PARSEOP_CONCATENATERESTEMPLATE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CONCATENATERESTEMPLATE);}
1687 TermArg
1688 TermArgItem
1689 Target
1690 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
1691 | PARSEOP_CONCATENATERESTEMPLATE '('
1692 error ')' {$$ = AslDoError(); yyclearin;}
1695 CondRefOfTerm
1696 : PARSEOP_CONDREFOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CONDREFOF);}
1697 SuperName
1698 Target
1699 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
1700 | PARSEOP_CONDREFOF '('
1701 error ')' {$$ = AslDoError(); yyclearin;}
1704 CopyObjectTerm
1705 : PARSEOP_COPYOBJECT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_COPYOBJECT);}
1706 TermArg
1707 ',' SimpleTarget
1708 ')' {$$ = TrLinkChildren ($<n>3,2,$4,TrSetNodeFlags ($6, NODE_IS_TARGET));}
1709 | PARSEOP_COPYOBJECT '('
1710 error ')' {$$ = AslDoError(); yyclearin;}
1713 DecTerm
1714 : PARSEOP_DECREMENT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DECREMENT);}
1715 SuperName
1716 ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
1717 | PARSEOP_DECREMENT '('
1718 error ')' {$$ = AslDoError(); yyclearin;}
1721 DerefOfTerm
1722 : PARSEOP_DEREFOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DEREFOF);}
1723 TermArg
1724 ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
1725 | PARSEOP_DEREFOF '('
1726 error ')' {$$ = AslDoError(); yyclearin;}
1729 DivideTerm
1730 : PARSEOP_DIVIDE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DIVIDE);}
1731 TermArg
1732 TermArgItem
1733 Target
1734 Target
1735 ')' {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,$7);}
1736 | PARSEOP_DIVIDE '('
1737 error ')' {$$ = AslDoError(); yyclearin;}
1740 FindSetLeftBitTerm
1741 : PARSEOP_FINDSETLEFTBIT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FINDSETLEFTBIT);}
1742 TermArg
1743 Target
1744 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
1745 | PARSEOP_FINDSETLEFTBIT '('
1746 error ')' {$$ = AslDoError(); yyclearin;}
1749 FindSetRightBitTerm
1750 : PARSEOP_FINDSETRIGHTBIT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FINDSETRIGHTBIT);}
1751 TermArg
1752 Target
1753 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
1754 | PARSEOP_FINDSETRIGHTBIT '('
1755 error ')' {$$ = AslDoError(); yyclearin;}
1758 FromBCDTerm
1759 : PARSEOP_FROMBCD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FROMBCD);}
1760 TermArg
1761 Target
1762 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
1763 | PARSEOP_FROMBCD '('
1764 error ')' {$$ = AslDoError(); yyclearin;}
1767 IncTerm
1768 : PARSEOP_INCREMENT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INCREMENT);}
1769 SuperName
1770 ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
1771 | PARSEOP_INCREMENT '('
1772 error ')' {$$ = AslDoError(); yyclearin;}
1775 IndexTerm
1776 : PARSEOP_INDEX '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INDEX);}
1777 TermArg
1778 TermArgItem
1779 Target
1780 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
1781 | PARSEOP_INDEX '('
1782 error ')' {$$ = AslDoError(); yyclearin;}
1785 LAndTerm
1786 : PARSEOP_LAND '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LAND);}
1787 TermArg
1788 TermArgItem
1789 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
1790 | PARSEOP_LAND '('
1791 error ')' {$$ = AslDoError(); yyclearin;}
1794 LEqualTerm
1795 : PARSEOP_LEQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LEQUAL);}
1796 TermArg
1797 TermArgItem
1798 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
1799 | PARSEOP_LEQUAL '('
1800 error ')' {$$ = AslDoError(); yyclearin;}
1803 LGreaterTerm
1804 : PARSEOP_LGREATER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);}
1805 TermArg
1806 TermArgItem
1807 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
1808 | PARSEOP_LGREATER '('
1809 error ')' {$$ = AslDoError(); yyclearin;}
1812 LGreaterEqualTerm
1813 : PARSEOP_LGREATEREQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LLESS);}
1814 TermArg
1815 TermArgItem
1816 ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1, TrLinkChildren ($<n>3,2,$4,$5));}
1817 | PARSEOP_LGREATEREQUAL '('
1818 error ')' {$$ = AslDoError(); yyclearin;}
1821 LLessTerm
1822 : PARSEOP_LLESS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LLESS);}
1823 TermArg
1824 TermArgItem
1825 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
1826 | PARSEOP_LLESS '('
1827 error ')' {$$ = AslDoError(); yyclearin;}
1830 LLessEqualTerm
1831 : PARSEOP_LLESSEQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);}
1832 TermArg
1833 TermArgItem
1834 ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1, TrLinkChildren ($<n>3,2,$4,$5));}
1835 | PARSEOP_LLESSEQUAL '('
1836 error ')' {$$ = AslDoError(); yyclearin;}
1839 LNotTerm
1840 : PARSEOP_LNOT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LNOT);}
1841 TermArg
1842 ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
1843 | PARSEOP_LNOT '('
1844 error ')' {$$ = AslDoError(); yyclearin;}
1847 LNotEqualTerm
1848 : PARSEOP_LNOTEQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LEQUAL);}
1849 TermArg
1850 TermArgItem
1851 ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1, TrLinkChildren ($<n>3,2,$4,$5));}
1852 | PARSEOP_LNOTEQUAL '('
1853 error ')' {$$ = AslDoError(); yyclearin;}
1856 LoadTableTerm
1857 : PARSEOP_LOADTABLE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LOADTABLE);}
1858 TermArg
1859 TermArgItem
1860 TermArgItem
1861 OptionalListString
1862 OptionalListString
1863 OptionalReference
1864 ')' {$$ = TrLinkChildren ($<n>3,6,$4,$5,$6,$7,$8,$9);}
1865 | PARSEOP_LOADTABLE '('
1866 error ')' {$$ = AslDoError(); yyclearin;}
1869 LOrTerm
1870 : PARSEOP_LOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LOR);}
1871 TermArg
1872 TermArgItem
1873 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
1874 | PARSEOP_LOR '('
1875 error ')' {$$ = AslDoError(); yyclearin;}
1878 MatchTerm
1879 : PARSEOP_MATCH '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MATCH);}
1880 TermArg
1881 ',' MatchOpKeyword
1882 TermArgItem
1883 ',' MatchOpKeyword
1884 TermArgItem
1885 TermArgItem
1886 ')' {$$ = TrLinkChildren ($<n>3,6,$4,$6,$7,$9,$10,$11);}
1887 | PARSEOP_MATCH '('
1888 error ')' {$$ = AslDoError(); yyclearin;}
1891 MidTerm
1892 : PARSEOP_MID '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MID);}
1893 TermArg
1894 TermArgItem
1895 TermArgItem
1896 Target
1897 ')' {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,$7);}
1898 | PARSEOP_MID '('
1899 error ')' {$$ = AslDoError(); yyclearin;}
1902 ModTerm
1903 : PARSEOP_MOD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MOD);}
1904 TermArg
1905 TermArgItem
1906 Target
1907 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
1908 | PARSEOP_MOD '('
1909 error ')' {$$ = AslDoError(); yyclearin;}
1912 MultiplyTerm
1913 : PARSEOP_MULTIPLY '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MULTIPLY);}
1914 TermArg
1915 TermArgItem
1916 Target
1917 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
1918 | PARSEOP_MULTIPLY '('
1919 error ')' {$$ = AslDoError(); yyclearin;}
1922 NAndTerm
1923 : PARSEOP_NAND '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NAND);}
1924 TermArg
1925 TermArgItem
1926 Target
1927 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
1928 | PARSEOP_NAND '('
1929 error ')' {$$ = AslDoError(); yyclearin;}
1932 NOrTerm
1933 : PARSEOP_NOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NOR);}
1934 TermArg
1935 TermArgItem
1936 Target
1937 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
1938 | PARSEOP_NOR '('
1939 error ')' {$$ = AslDoError(); yyclearin;}
1942 NotTerm
1943 : PARSEOP_NOT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NOT);}
1944 TermArg
1945 Target
1946 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
1947 | PARSEOP_NOT '('
1948 error ')' {$$ = AslDoError(); yyclearin;}
1951 ObjectTypeTerm
1952 : PARSEOP_OBJECTTYPE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE);}
1953 SuperName
1954 ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
1955 | PARSEOP_OBJECTTYPE '('
1956 error ')' {$$ = AslDoError(); yyclearin;}
1959 OrTerm
1960 : PARSEOP_OR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_OR);}
1961 TermArg
1962 TermArgItem
1963 Target
1964 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
1965 | PARSEOP_OR '('
1966 error ')' {$$ = AslDoError(); yyclearin;}
1970 * In RefOf, the node isn't really a target, but we can't keep track of it after
1971 * we've taken a pointer to it. (hard to tell if a local becomes initialized this way.)
1973 RefOfTerm
1974 : PARSEOP_REFOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_REFOF);}
1975 SuperName
1976 ')' {$$ = TrLinkChildren ($<n>3,1,TrSetNodeFlags ($4, NODE_IS_TARGET));}
1977 | PARSEOP_REFOF '('
1978 error ')' {$$ = AslDoError(); yyclearin;}
1981 ShiftLeftTerm
1982 : PARSEOP_SHIFTLEFT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);}
1983 TermArg
1984 TermArgItem
1985 Target
1986 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
1987 | PARSEOP_SHIFTLEFT '('
1988 error ')' {$$ = AslDoError(); yyclearin;}
1991 ShiftRightTerm
1992 : PARSEOP_SHIFTRIGHT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);}
1993 TermArg
1994 TermArgItem
1995 Target
1996 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
1997 | PARSEOP_SHIFTRIGHT '('
1998 error ')' {$$ = AslDoError(); yyclearin;}
2001 SizeOfTerm
2002 : PARSEOP_SIZEOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SIZEOF);}
2003 SuperName
2004 ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
2005 | PARSEOP_SIZEOF '('
2006 error ')' {$$ = AslDoError(); yyclearin;}
2009 StoreTerm
2010 : PARSEOP_STORE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_STORE);}
2011 TermArg
2012 ',' SuperName
2013 ')' {$$ = TrLinkChildren ($<n>3,2,$4,TrSetNodeFlags ($6, NODE_IS_TARGET));}
2014 | PARSEOP_STORE '('
2015 error ')' {$$ = AslDoError(); yyclearin;}
2018 SubtractTerm
2019 : PARSEOP_SUBTRACT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SUBTRACT);}
2020 TermArg
2021 TermArgItem
2022 Target
2023 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
2024 | PARSEOP_SUBTRACT '('
2025 error ')' {$$ = AslDoError(); yyclearin;}
2028 TimerTerm
2029 : PARSEOP_TIMER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TIMER);}
2030 ')' {$$ = TrLinkChildren ($<n>3,0);}
2031 | PARSEOP_TIMER {$$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_TIMER),0);}
2032 | PARSEOP_TIMER '('
2033 error ')' {$$ = AslDoError(); yyclearin;}
2036 ToBCDTerm
2037 : PARSEOP_TOBCD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOBCD);}
2038 TermArg
2039 Target
2040 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
2041 | PARSEOP_TOBCD '('
2042 error ')' {$$ = AslDoError(); yyclearin;}
2045 ToBufferTerm
2046 : PARSEOP_TOBUFFER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOBUFFER);}
2047 TermArg
2048 Target
2049 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
2050 | PARSEOP_TOBUFFER '('
2051 error ')' {$$ = AslDoError(); yyclearin;}
2054 ToDecimalStringTerm
2055 : PARSEOP_TODECIMALSTRING '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TODECIMALSTRING);}
2056 TermArg
2057 Target
2058 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
2059 | PARSEOP_TODECIMALSTRING '('
2060 error ')' {$$ = AslDoError(); yyclearin;}
2063 ToHexStringTerm
2064 : PARSEOP_TOHEXSTRING '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOHEXSTRING);}
2065 TermArg
2066 Target
2067 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
2068 | PARSEOP_TOHEXSTRING '('
2069 error ')' {$$ = AslDoError(); yyclearin;}
2072 ToIntegerTerm
2073 : PARSEOP_TOINTEGER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOINTEGER);}
2074 TermArg
2075 Target
2076 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
2077 | PARSEOP_TOINTEGER '('
2078 error ')' {$$ = AslDoError(); yyclearin;}
2081 ToStringTerm
2082 : PARSEOP_TOSTRING '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOSTRING);}
2083 TermArg
2084 OptionalCount
2085 Target
2086 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
2087 | PARSEOP_TOSTRING '('
2088 error ')' {$$ = AslDoError(); yyclearin;}
2091 ToUUIDTerm
2092 : PARSEOP_TOUUID '('
2093 StringData ')' {$$ = TrUpdateNode (PARSEOP_TOUUID, $3);}
2094 | PARSEOP_TOUUID '('
2095 error ')' {$$ = AslDoError(); yyclearin;}
2098 WaitTerm
2099 : PARSEOP_WAIT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WAIT);}
2100 SuperName
2101 TermArgItem
2102 ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
2103 | PARSEOP_WAIT '('
2104 error ')' {$$ = AslDoError(); yyclearin;}
2107 XOrTerm
2108 : PARSEOP_XOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_XOR);}
2109 TermArg
2110 TermArgItem
2111 Target
2112 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
2113 | PARSEOP_XOR '('
2114 error ')' {$$ = AslDoError(); yyclearin;}
2118 /******* Keywords *************************************************************/
2121 ObjectTypeKeyword
2122 : PARSEOP_OBJECTTYPE_UNK {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_UNK);}
2123 | PARSEOP_OBJECTTYPE_INT {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_INT);}
2124 | PARSEOP_OBJECTTYPE_STR {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_STR);}
2125 | PARSEOP_OBJECTTYPE_BUF {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_BUF);}
2126 | PARSEOP_OBJECTTYPE_PKG {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_PKG);}
2127 | PARSEOP_OBJECTTYPE_FLD {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_FLD);}
2128 | PARSEOP_OBJECTTYPE_DEV {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_DEV);}
2129 | PARSEOP_OBJECTTYPE_EVT {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_EVT);}
2130 | PARSEOP_OBJECTTYPE_MTH {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_MTH);}
2131 | PARSEOP_OBJECTTYPE_MTX {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_MTX);}
2132 | PARSEOP_OBJECTTYPE_OPR {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_OPR);}
2133 | PARSEOP_OBJECTTYPE_POW {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_POW);}
2134 | PARSEOP_OBJECTTYPE_PRO {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_PRO);}
2135 | PARSEOP_OBJECTTYPE_THZ {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_THZ);}
2136 | PARSEOP_OBJECTTYPE_BFF {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_BFF);}
2137 | PARSEOP_OBJECTTYPE_DDB {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_DDB);}
2140 AccessTypeKeyword
2141 : PARSEOP_ACCESSTYPE_ANY {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_ANY);}
2142 | PARSEOP_ACCESSTYPE_BYTE {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_BYTE);}
2143 | PARSEOP_ACCESSTYPE_WORD {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_WORD);}
2144 | PARSEOP_ACCESSTYPE_DWORD {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_DWORD);}
2145 | PARSEOP_ACCESSTYPE_QWORD {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_QWORD);}
2146 | PARSEOP_ACCESSTYPE_BUF {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_BUF);}
2149 AccessAttribKeyword
2150 : PARSEOP_ACCESSATTRIB_QUICK {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_QUICK );}
2151 | PARSEOP_ACCESSATTRIB_SND_RCV {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_SND_RCV);}
2152 | PARSEOP_ACCESSATTRIB_BYTE {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_BYTE);}
2153 | PARSEOP_ACCESSATTRIB_WORD {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_WORD);}
2154 | PARSEOP_ACCESSATTRIB_BLOCK {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_BLOCK);}
2155 | PARSEOP_ACCESSATTRIB_WORD_CALL {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_WORD_CALL);}
2156 | PARSEOP_ACCESSATTRIB_BLOCK_CALL {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_BLOCK_CALL);}
2159 LockRuleKeyword
2160 : PARSEOP_LOCKRULE_LOCK {$$ = TrCreateLeafNode (PARSEOP_LOCKRULE_LOCK);}
2161 | PARSEOP_LOCKRULE_NOLOCK {$$ = TrCreateLeafNode (PARSEOP_LOCKRULE_NOLOCK);}
2164 UpdateRuleKeyword
2165 : PARSEOP_UPDATERULE_PRESERVE {$$ = TrCreateLeafNode (PARSEOP_UPDATERULE_PRESERVE);}
2166 | PARSEOP_UPDATERULE_ONES {$$ = TrCreateLeafNode (PARSEOP_UPDATERULE_ONES);}
2167 | PARSEOP_UPDATERULE_ZEROS {$$ = TrCreateLeafNode (PARSEOP_UPDATERULE_ZEROS);}
2171 RegionSpaceKeyword
2172 : PARSEOP_REGIONSPACE_IO {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_IO);}
2173 | PARSEOP_REGIONSPACE_MEM {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_MEM);}
2174 | PARSEOP_REGIONSPACE_PCI {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_PCI);}
2175 | PARSEOP_REGIONSPACE_EC {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_EC);}
2176 | PARSEOP_REGIONSPACE_SMBUS {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_SMBUS);}
2177 | PARSEOP_REGIONSPACE_CMOS {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_CMOS);}
2178 | PARSEOP_REGIONSPACE_PCIBAR {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_PCIBAR);}
2179 | PARSEOP_REGIONSPACE_IPMI {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_IPMI);}
2182 AddressSpaceKeyword
2183 : ByteConst {$$ = UtCheckIntegerRange ($1, 0x80, 0xFF);}
2184 | RegionSpaceKeyword {}
2185 | PARSEOP_ADDRESSSPACE_FFIXEDHW {$$ = TrCreateLeafNode (PARSEOP_ADDRESSSPACE_FFIXEDHW);}
2189 SerializeRuleKeyword
2190 : PARSEOP_SERIALIZERULE_SERIAL {$$ = TrCreateLeafNode (PARSEOP_SERIALIZERULE_SERIAL);}
2191 | PARSEOP_SERIALIZERULE_NOTSERIAL {$$ = TrCreateLeafNode (PARSEOP_SERIALIZERULE_NOTSERIAL);}
2194 MatchOpKeyword
2195 : PARSEOP_MATCHTYPE_MTR {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MTR);}
2196 | PARSEOP_MATCHTYPE_MEQ {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MEQ);}
2197 | PARSEOP_MATCHTYPE_MLE {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MLE);}
2198 | PARSEOP_MATCHTYPE_MLT {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MLT);}
2199 | PARSEOP_MATCHTYPE_MGE {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MGE);}
2200 | PARSEOP_MATCHTYPE_MGT {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MGT);}
2203 DMATypeKeyword
2204 : PARSEOP_DMATYPE_A {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_A);}
2205 | PARSEOP_DMATYPE_COMPATIBILITY {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_COMPATIBILITY);}
2206 | PARSEOP_DMATYPE_B {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_B);}
2207 | PARSEOP_DMATYPE_F {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_F);}
2210 XferTypeKeyword
2211 : PARSEOP_XFERTYPE_8 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_8);}
2212 | PARSEOP_XFERTYPE_8_16 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_8_16);}
2213 | PARSEOP_XFERTYPE_16 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_16);}
2216 ResourceTypeKeyword
2217 : PARSEOP_RESOURCETYPE_CONSUMER {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);}
2218 | PARSEOP_RESOURCETYPE_PRODUCER {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_PRODUCER);}
2221 MinKeyword
2222 : PARSEOP_MINTYPE_FIXED {$$ = TrCreateLeafNode (PARSEOP_MINTYPE_FIXED);}
2223 | PARSEOP_MINTYPE_NOTFIXED {$$ = TrCreateLeafNode (PARSEOP_MINTYPE_NOTFIXED);}
2226 MaxKeyword
2227 : PARSEOP_MAXTYPE_FIXED {$$ = TrCreateLeafNode (PARSEOP_MAXTYPE_FIXED);}
2228 | PARSEOP_MAXTYPE_NOTFIXED {$$ = TrCreateLeafNode (PARSEOP_MAXTYPE_NOTFIXED);}
2231 DecodeKeyword
2232 : PARSEOP_DECODETYPE_POS {$$ = TrCreateLeafNode (PARSEOP_DECODETYPE_POS);}
2233 | PARSEOP_DECODETYPE_SUB {$$ = TrCreateLeafNode (PARSEOP_DECODETYPE_SUB);}
2236 RangeTypeKeyword
2237 : PARSEOP_RANGETYPE_ISAONLY {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_ISAONLY);}
2238 | PARSEOP_RANGETYPE_NONISAONLY {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_NONISAONLY);}
2239 | PARSEOP_RANGETYPE_ENTIRE {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_ENTIRE);}
2242 MemTypeKeyword
2243 : PARSEOP_MEMTYPE_CACHEABLE {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_CACHEABLE);}
2244 | PARSEOP_MEMTYPE_WRITECOMBINING {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_WRITECOMBINING);}
2245 | PARSEOP_MEMTYPE_PREFETCHABLE {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_PREFETCHABLE);}
2246 | PARSEOP_MEMTYPE_NONCACHEABLE {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_NONCACHEABLE);}
2249 OptionalReadWriteKeyword
2250 : {$$ = TrCreateLeafNode (PARSEOP_READWRITETYPE_BOTH);}
2251 | PARSEOP_READWRITETYPE_BOTH {$$ = TrCreateLeafNode (PARSEOP_READWRITETYPE_BOTH);}
2252 | PARSEOP_READWRITETYPE_READONLY {$$ = TrCreateLeafNode (PARSEOP_READWRITETYPE_READONLY);}
2255 InterruptTypeKeyword
2256 : PARSEOP_INTTYPE_EDGE {$$ = TrCreateLeafNode (PARSEOP_INTTYPE_EDGE);}
2257 | PARSEOP_INTTYPE_LEVEL {$$ = TrCreateLeafNode (PARSEOP_INTTYPE_LEVEL);}
2260 InterruptLevel
2261 : PARSEOP_INTLEVEL_ACTIVEHIGH {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVEHIGH);}
2262 | PARSEOP_INTLEVEL_ACTIVELOW {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVELOW);}
2265 ShareTypeKeyword
2266 : PARSEOP_SHARETYPE_SHARED {$$ = TrCreateLeafNode (PARSEOP_SHARETYPE_SHARED);}
2267 | PARSEOP_SHARETYPE_EXCLUSIVE {$$ = TrCreateLeafNode (PARSEOP_SHARETYPE_EXCLUSIVE);}
2270 IODecodeKeyword
2271 : PARSEOP_IODECODETYPE_16 {$$ = TrCreateLeafNode (PARSEOP_IODECODETYPE_16);}
2272 | PARSEOP_IODECODETYPE_10 {$$ = TrCreateLeafNode (PARSEOP_IODECODETYPE_10);}
2275 TypeKeyword
2276 : PARSEOP_TYPE_TRANSLATION {$$ = TrCreateLeafNode (PARSEOP_TYPE_TRANSLATION);}
2277 | PARSEOP_TYPE_STATIC {$$ = TrCreateLeafNode (PARSEOP_TYPE_STATIC);}
2280 TranslationKeyword
2281 : PARSEOP_TRANSLATIONTYPE_SPARSE {$$ = TrCreateLeafNode (PARSEOP_TRANSLATIONTYPE_SPARSE);}
2282 | PARSEOP_TRANSLATIONTYPE_DENSE {$$ = TrCreateLeafNode (PARSEOP_TRANSLATIONTYPE_DENSE);}
2285 AddressKeyword
2286 : PARSEOP_ADDRESSTYPE_MEMORY {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_MEMORY);}
2287 | PARSEOP_ADDRESSTYPE_RESERVED {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_RESERVED);}
2288 | PARSEOP_ADDRESSTYPE_NVS {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_NVS);}
2289 | PARSEOP_ADDRESSTYPE_ACPI {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_ACPI);}
2293 /******* Miscellaneous Types **************************************************/
2296 SuperName
2297 : NameString {}
2298 | ArgTerm {}
2299 | LocalTerm {}
2300 | DebugTerm {}
2301 | Type6Opcode {}
2302 /* | UserTerm {} */ /* Caused reduce/reduce with Type6Opcode->UserTerm */
2305 ArgTerm
2306 : PARSEOP_ARG0 {$$ = TrCreateLeafNode (PARSEOP_ARG0);}
2307 | PARSEOP_ARG1 {$$ = TrCreateLeafNode (PARSEOP_ARG1);}
2308 | PARSEOP_ARG2 {$$ = TrCreateLeafNode (PARSEOP_ARG2);}
2309 | PARSEOP_ARG3 {$$ = TrCreateLeafNode (PARSEOP_ARG3);}
2310 | PARSEOP_ARG4 {$$ = TrCreateLeafNode (PARSEOP_ARG4);}
2311 | PARSEOP_ARG5 {$$ = TrCreateLeafNode (PARSEOP_ARG5);}
2312 | PARSEOP_ARG6 {$$ = TrCreateLeafNode (PARSEOP_ARG6);}
2315 LocalTerm
2316 : PARSEOP_LOCAL0 {$$ = TrCreateLeafNode (PARSEOP_LOCAL0);}
2317 | PARSEOP_LOCAL1 {$$ = TrCreateLeafNode (PARSEOP_LOCAL1);}
2318 | PARSEOP_LOCAL2 {$$ = TrCreateLeafNode (PARSEOP_LOCAL2);}
2319 | PARSEOP_LOCAL3 {$$ = TrCreateLeafNode (PARSEOP_LOCAL3);}
2320 | PARSEOP_LOCAL4 {$$ = TrCreateLeafNode (PARSEOP_LOCAL4);}
2321 | PARSEOP_LOCAL5 {$$ = TrCreateLeafNode (PARSEOP_LOCAL5);}
2322 | PARSEOP_LOCAL6 {$$ = TrCreateLeafNode (PARSEOP_LOCAL6);}
2323 | PARSEOP_LOCAL7 {$$ = TrCreateLeafNode (PARSEOP_LOCAL7);}
2326 DebugTerm
2327 : PARSEOP_DEBUG {$$ = TrCreateLeafNode (PARSEOP_DEBUG);}
2331 ByteConst
2332 : Integer {$$ = TrUpdateNode (PARSEOP_BYTECONST, $1);}
2335 WordConst
2336 : Integer {$$ = TrUpdateNode (PARSEOP_WORDCONST, $1);}
2339 DWordConst
2340 : Integer {$$ = TrUpdateNode (PARSEOP_DWORDCONST, $1);}
2343 QWordConst
2344 : Integer {$$ = TrUpdateNode (PARSEOP_QWORDCONST, $1);}
2347 Integer
2348 : PARSEOP_INTEGER {$$ = TrCreateValuedLeafNode (PARSEOP_INTEGER, AslCompilerlval.i);}
2351 String
2352 : PARSEOP_STRING_LITERAL {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, (ACPI_NATIVE_INT) AslCompilerlval.s);}
2355 ConstTerm
2356 : ConstExprTerm {}
2357 | PARSEOP_REVISION {$$ = TrCreateLeafNode (PARSEOP_REVISION);}
2360 ByteConstExpr
2361 : Type3Opcode {$$ = TrUpdateNode (PARSEOP_BYTECONST, $1);}
2362 | Type2IntegerOpcode {$$ = TrUpdateNode (PARSEOP_BYTECONST, $1);}
2363 | ConstExprTerm {$$ = TrUpdateNode (PARSEOP_BYTECONST, $1);}
2364 | ByteConst {}
2367 WordConstExpr
2368 : Type3Opcode {$$ = TrUpdateNode (PARSEOP_WORDCONST, $1);}
2369 | Type2IntegerOpcode {$$ = TrUpdateNode (PARSEOP_WORDCONST, $1);}
2370 | ConstExprTerm {$$ = TrUpdateNode (PARSEOP_WORDCONST, $1);}
2371 | WordConst {}
2374 DWordConstExpr
2375 : Type3Opcode {$$ = TrUpdateNode (PARSEOP_DWORDCONST, $1);}
2376 | Type2IntegerOpcode {$$ = TrUpdateNode (PARSEOP_DWORDCONST, $1);}
2377 | ConstExprTerm {$$ = TrUpdateNode (PARSEOP_DWORDCONST, $1);}
2378 | DWordConst {}
2381 QWordConstExpr
2382 : Type3Opcode {$$ = TrUpdateNode (PARSEOP_QWORDCONST, $1);}
2383 | Type2IntegerOpcode {$$ = TrUpdateNode (PARSEOP_QWORDCONST, $1);}
2384 | ConstExprTerm {$$ = TrUpdateNode (PARSEOP_QWORDCONST, $1);}
2385 | QWordConst {}
2388 ConstExprTerm
2389 : PARSEOP_ZERO {$$ = TrCreateValuedLeafNode (PARSEOP_ZERO, 0);}
2390 | PARSEOP_ONE {$$ = TrCreateValuedLeafNode (PARSEOP_ONE, 1);}
2391 | PARSEOP_ONES {$$ = TrCreateValuedLeafNode (PARSEOP_ONES, ACPI_INTEGER_MAX);}
2394 /* OptionalCount must appear before ByteList or an incorrect reduction will result */
2396 OptionalCount
2397 : {$$ = TrCreateLeafNode (PARSEOP_ONES);} /* Placeholder is a OnesOp object */
2398 | ',' {$$ = TrCreateLeafNode (PARSEOP_ONES);} /* Placeholder is a OnesOp object */
2399 | ',' TermArg {$$ = $2;}
2403 BufferTerm
2404 : PARSEOP_BUFFER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_BUFFER);}
2405 OptionalTermArg
2406 ')' '{'
2407 BufferTermData '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
2408 | PARSEOP_BUFFER '('
2409 error ')' {$$ = AslDoError(); yyclearin;}
2412 BufferTermData
2413 : ByteList {}
2414 | StringData {}
2417 ByteList
2418 : {$$ = NULL;}
2419 | ByteConstExpr
2420 | ByteList ',' /* Allows a trailing comma at list end */
2421 | ByteList ','
2422 ByteConstExpr {$$ = TrLinkPeerNode ($1,$3);}
2425 DWordList
2426 : {$$ = NULL;}
2427 | DWordConstExpr
2428 | DWordList ',' /* Allows a trailing comma at list end */
2429 | DWordList ','
2430 DWordConstExpr {$$ = TrLinkPeerNode ($1,$3);}
2433 PackageTerm
2434 : PARSEOP_PACKAGE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_VAR_PACKAGE);}
2435 VarPackageLengthTerm
2436 ')' '{'
2437 PackageList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
2438 | PARSEOP_PACKAGE '('
2439 error ')' {$$ = AslDoError(); yyclearin;}
2442 VarPackageLengthTerm
2443 : {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
2444 | TermArg {$$ = $1;}
2447 PackageList
2448 : {$$ = NULL;}
2449 | PackageElement
2450 | PackageList ',' /* Allows a trailing comma at list end */
2451 | PackageList ','
2452 PackageElement {$$ = TrLinkPeerNode ($1,$3);}
2455 PackageElement
2456 : DataObject {}
2457 | NameString {}
2460 EISAIDTerm
2461 : PARSEOP_EISAID '('
2462 StringData ')' {$$ = TrUpdateNode (PARSEOP_EISAID, $3);}
2463 | PARSEOP_EISAID '('
2464 error ')' {$$ = AslDoError(); yyclearin;}
2468 /******* Resources and Memory ***********************************************/
2472 * Note: Create two default nodes to allow conversion to a Buffer AML opcode
2473 * Also, insert the EndTag at the end of the template.
2475 ResourceTemplateTerm
2476 : PARSEOP_RESOURCETEMPLATE '(' ')'
2478 ResourceMacroList '}' {$$ = TrCreateNode (PARSEOP_RESOURCETEMPLATE,4,
2479 TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
2480 TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
2482 TrCreateLeafNode (PARSEOP_ENDTAG));}
2485 UnicodeTerm
2486 : PARSEOP_UNICODE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_UNICODE);}
2487 StringData
2488 ')' {$$ = TrLinkChildren ($<n>3,2,0,$4);}
2489 | PARSEOP_UNICODE '('
2490 error ')' {$$ = AslDoError(); yyclearin;}
2493 ResourceMacroList
2494 : {$$ = NULL;}
2495 | ResourceMacroList
2496 ResourceMacroTerm {$$ = TrLinkPeerNode ($1,$2);}
2499 ResourceMacroTerm
2500 : DMATerm {}
2501 | DWordIOTerm {}
2502 | DWordMemoryTerm {}
2503 | DWordSpaceTerm {}
2504 | EndDependentFnTerm {}
2505 | ExtendedIOTerm {}
2506 | ExtendedMemoryTerm {}
2507 | ExtendedSpaceTerm {}
2508 | FixedIOTerm {}
2509 | InterruptTerm {}
2510 | IOTerm {}
2511 | IRQNoFlagsTerm {}
2512 | IRQTerm {}
2513 | Memory24Term {}
2514 | Memory32FixedTerm {}
2515 | Memory32Term {}
2516 | QWordIOTerm {}
2517 | QWordMemoryTerm {}
2518 | QWordSpaceTerm {}
2519 | RegisterTerm {}
2520 | StartDependentFnTerm {}
2521 | StartDependentFnNoPriTerm {}
2522 | VendorLongTerm {}
2523 | VendorShortTerm {}
2524 | WordBusNumberTerm {}
2525 | WordIOTerm {}
2526 | WordSpaceTerm {}
2529 DMATerm
2530 : PARSEOP_DMA '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DMA);}
2531 DMATypeKeyword
2532 OptionalBusMasterKeyword
2533 ',' XferTypeKeyword
2534 OptionalNameString_Last
2535 ')' '{'
2536 ByteList '}' {$$ = TrLinkChildren ($<n>3,5,$4,$5,$7,$8,$11);}
2537 | PARSEOP_DMA '('
2538 error ')' {$$ = AslDoError(); yyclearin;}
2541 DWordIOTerm
2542 : PARSEOP_DWORDIO '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DWORDIO);}
2543 OptionalResourceType_First
2544 OptionalMinType
2545 OptionalMaxType
2546 OptionalDecodeType
2547 OptionalRangeType
2548 ',' DWordConstExpr
2549 ',' DWordConstExpr
2550 ',' DWordConstExpr
2551 ',' DWordConstExpr
2552 ',' DWordConstExpr
2553 OptionalByteConstExpr
2554 OptionalStringData
2555 OptionalNameString
2556 OptionalType
2557 OptionalTranslationType_Last
2558 ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
2559 | PARSEOP_DWORDIO '('
2560 error ')' {$$ = AslDoError(); yyclearin;}
2563 DWordMemoryTerm
2564 : PARSEOP_DWORDMEMORY '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DWORDMEMORY);}
2565 OptionalResourceType_First
2566 OptionalDecodeType
2567 OptionalMinType
2568 OptionalMaxType
2569 OptionalMemType
2570 ',' OptionalReadWriteKeyword
2571 ',' DWordConstExpr
2572 ',' DWordConstExpr
2573 ',' DWordConstExpr
2574 ',' DWordConstExpr
2575 ',' DWordConstExpr
2576 OptionalByteConstExpr
2577 OptionalStringData
2578 OptionalNameString
2579 OptionalAddressRange
2580 OptionalType_Last
2581 ')' {$$ = TrLinkChildren ($<n>3,16,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
2582 | PARSEOP_DWORDMEMORY '('
2583 error ')' {$$ = AslDoError(); yyclearin;}
2586 DWordSpaceTerm
2587 : PARSEOP_DWORDSPACE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DWORDSPACE);}
2588 ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
2589 OptionalResourceType
2590 OptionalDecodeType
2591 OptionalMinType
2592 OptionalMaxType
2593 ',' ByteConstExpr
2594 ',' DWordConstExpr
2595 ',' DWordConstExpr
2596 ',' DWordConstExpr
2597 ',' DWordConstExpr
2598 ',' DWordConstExpr
2599 OptionalByteConstExpr
2600 OptionalStringData
2601 OptionalNameString_Last
2602 ')' {$$ = TrLinkChildren ($<n>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
2603 | PARSEOP_DWORDSPACE '('
2604 error ')' {$$ = AslDoError(); yyclearin;}
2608 EndDependentFnTerm
2609 : PARSEOP_ENDDEPENDENTFN '('
2610 ')' {$$ = TrCreateLeafNode (PARSEOP_ENDDEPENDENTFN);}
2611 | PARSEOP_ENDDEPENDENTFN '('
2612 error ')' {$$ = AslDoError(); yyclearin;}
2615 ExtendedIOTerm
2616 : PARSEOP_EXTENDEDIO '(' {$<n>$ = TrCreateLeafNode (PARSEOP_EXTENDEDIO);}
2617 OptionalResourceType_First
2618 OptionalMinType
2619 OptionalMaxType
2620 OptionalDecodeType
2621 OptionalRangeType
2622 ',' QWordConstExpr
2623 ',' QWordConstExpr
2624 ',' QWordConstExpr
2625 ',' QWordConstExpr
2626 ',' QWordConstExpr
2627 OptionalQWordConstExpr
2628 OptionalNameString
2629 OptionalType
2630 OptionalTranslationType_Last
2631 ')' {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22);}
2632 | PARSEOP_EXTENDEDIO '('
2633 error ')' {$$ = AslDoError(); yyclearin;}
2636 ExtendedMemoryTerm
2637 : PARSEOP_EXTENDEDMEMORY '(' {$<n>$ = TrCreateLeafNode (PARSEOP_EXTENDEDMEMORY);}
2638 OptionalResourceType_First
2639 OptionalDecodeType
2640 OptionalMinType
2641 OptionalMaxType
2642 OptionalMemType
2643 ',' OptionalReadWriteKeyword
2644 ',' QWordConstExpr
2645 ',' QWordConstExpr
2646 ',' QWordConstExpr
2647 ',' QWordConstExpr
2648 ',' QWordConstExpr
2649 OptionalQWordConstExpr
2650 OptionalNameString
2651 OptionalAddressRange
2652 OptionalType_Last
2653 ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24);}
2654 | PARSEOP_EXTENDEDMEMORY '('
2655 error ')' {$$ = AslDoError(); yyclearin;}
2658 ExtendedSpaceTerm
2659 : PARSEOP_EXTENDEDSPACE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_EXTENDEDSPACE);}
2660 ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
2661 OptionalResourceType
2662 OptionalDecodeType
2663 OptionalMinType
2664 OptionalMaxType
2665 ',' ByteConstExpr
2666 ',' QWordConstExpr
2667 ',' QWordConstExpr
2668 ',' QWordConstExpr
2669 ',' QWordConstExpr
2670 ',' QWordConstExpr
2671 OptionalQWordConstExpr
2672 OptionalNameString_Last
2673 ')' {$$ = TrLinkChildren ($<n>3,13,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23);}
2674 | PARSEOP_EXTENDEDSPACE '('
2675 error ')' {$$ = AslDoError(); yyclearin;}
2678 FixedIOTerm
2679 : PARSEOP_FIXEDIO '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FIXEDIO);}
2680 WordConstExpr
2681 ',' ByteConstExpr
2682 OptionalNameString_Last
2683 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);}
2684 | PARSEOP_FIXEDIO '('
2685 error ')' {$$ = AslDoError(); yyclearin;}
2688 InterruptTerm
2689 : PARSEOP_INTERRUPT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INTERRUPT);}
2690 OptionalResourceType_First
2691 ',' InterruptTypeKeyword
2692 ',' InterruptLevel
2693 OptionalShareType
2694 OptionalByteConstExpr
2695 OptionalStringData
2696 OptionalNameString_Last
2697 ')' '{'
2698 DWordList '}' {$$ = TrLinkChildren ($<n>3,8,$4,$6,$8,$9,$10,$11,$12,$15);}
2699 | PARSEOP_INTERRUPT '('
2700 error ')' {$$ = AslDoError(); yyclearin;}
2703 IOTerm
2704 : PARSEOP_IO '(' {$<n>$ = TrCreateLeafNode (PARSEOP_IO);}
2705 IODecodeKeyword
2706 ',' WordConstExpr
2707 ',' WordConstExpr
2708 ',' ByteConstExpr
2709 ',' ByteConstExpr
2710 OptionalNameString_Last
2711 ')' {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
2712 | PARSEOP_IO '('
2713 error ')' {$$ = AslDoError(); yyclearin;}
2716 IRQNoFlagsTerm
2717 : PARSEOP_IRQNOFLAGS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_IRQNOFLAGS);}
2718 OptionalNameString_First
2719 ')' '{'
2720 ByteList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
2721 | PARSEOP_IRQNOFLAGS '('
2722 error ')' {$$ = AslDoError(); yyclearin;}
2725 IRQTerm
2726 : PARSEOP_IRQ '(' {$<n>$ = TrCreateLeafNode (PARSEOP_IRQ);}
2727 InterruptTypeKeyword
2728 ',' InterruptLevel
2729 OptionalShareType
2730 OptionalNameString_Last
2731 ')' '{'
2732 ByteList '}' {$$ = TrLinkChildren ($<n>3,5,$4,$6,$7,$8,$11);}
2733 | PARSEOP_IRQ '('
2734 error ')' {$$ = AslDoError(); yyclearin;}
2737 Memory24Term
2738 : PARSEOP_MEMORY24 '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MEMORY24);}
2739 OptionalReadWriteKeyword
2740 ',' WordConstExpr
2741 ',' WordConstExpr
2742 ',' WordConstExpr
2743 ',' WordConstExpr
2744 OptionalNameString_Last
2745 ')' {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
2746 | PARSEOP_MEMORY24 '('
2747 error ')' {$$ = AslDoError(); yyclearin;}
2750 Memory32FixedTerm
2751 : PARSEOP_MEMORY32FIXED '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MEMORY32FIXED);}
2752 OptionalReadWriteKeyword
2753 ',' DWordConstExpr
2754 ',' DWordConstExpr
2755 OptionalNameString_Last
2756 ')' {$$ = TrLinkChildren ($<n>3,4,$4,$6,$8,$9);}
2757 | PARSEOP_MEMORY32FIXED '('
2758 error ')' {$$ = AslDoError(); yyclearin;}
2761 Memory32Term
2762 : PARSEOP_MEMORY32 '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MEMORY32);}
2763 OptionalReadWriteKeyword
2764 ',' DWordConstExpr
2765 ',' DWordConstExpr
2766 ',' DWordConstExpr
2767 ',' DWordConstExpr
2768 OptionalNameString_Last
2769 ')' {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
2770 | PARSEOP_MEMORY32 '('
2771 error ')' {$$ = AslDoError(); yyclearin;}
2774 QWordIOTerm
2775 : PARSEOP_QWORDIO '(' {$<n>$ = TrCreateLeafNode (PARSEOP_QWORDIO);}
2776 OptionalResourceType_First
2777 OptionalMinType
2778 OptionalMaxType
2779 OptionalDecodeType
2780 OptionalRangeType
2781 ',' QWordConstExpr
2782 ',' QWordConstExpr
2783 ',' QWordConstExpr
2784 ',' QWordConstExpr
2785 ',' QWordConstExpr
2786 OptionalByteConstExpr
2787 OptionalStringData
2788 OptionalNameString
2789 OptionalType
2790 OptionalTranslationType_Last
2791 ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
2792 | PARSEOP_QWORDIO '('
2793 error ')' {$$ = AslDoError(); yyclearin;}
2796 QWordMemoryTerm
2797 : PARSEOP_QWORDMEMORY '(' {$<n>$ = TrCreateLeafNode (PARSEOP_QWORDMEMORY);}
2798 OptionalResourceType_First
2799 OptionalDecodeType
2800 OptionalMinType
2801 OptionalMaxType
2802 OptionalMemType
2803 ',' OptionalReadWriteKeyword
2804 ',' QWordConstExpr
2805 ',' QWordConstExpr
2806 ',' QWordConstExpr
2807 ',' QWordConstExpr
2808 ',' QWordConstExpr
2809 OptionalByteConstExpr
2810 OptionalStringData
2811 OptionalNameString
2812 OptionalAddressRange
2813 OptionalType_Last
2814 ')' {$$ = TrLinkChildren ($<n>3,16,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
2815 | PARSEOP_QWORDMEMORY '('
2816 error ')' {$$ = AslDoError(); yyclearin;}
2819 QWordSpaceTerm
2820 : PARSEOP_QWORDSPACE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_QWORDSPACE);}
2821 ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
2822 OptionalResourceType
2823 OptionalDecodeType
2824 OptionalMinType
2825 OptionalMaxType
2826 ',' ByteConstExpr
2827 ',' QWordConstExpr
2828 ',' QWordConstExpr
2829 ',' QWordConstExpr
2830 ',' QWordConstExpr
2831 ',' QWordConstExpr
2832 OptionalByteConstExpr
2833 OptionalStringData
2834 OptionalNameString_Last
2835 ')' {$$ = TrLinkChildren ($<n>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
2836 | PARSEOP_QWORDSPACE '('
2837 error ')' {$$ = AslDoError(); yyclearin;}
2840 RegisterTerm
2841 : PARSEOP_REGISTER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_REGISTER);}
2842 AddressSpaceKeyword
2843 ',' ByteConstExpr
2844 ',' ByteConstExpr
2845 ',' QWordConstExpr
2846 OptionalAccessSize
2847 OptionalNameString_Last
2848 ')' {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$11,$12);}
2849 | PARSEOP_REGISTER '('
2850 error ')' {$$ = AslDoError(); yyclearin;}
2853 StartDependentFnTerm
2854 : PARSEOP_STARTDEPENDENTFN '(' {$<n>$ = TrCreateLeafNode (PARSEOP_STARTDEPENDENTFN);}
2855 ByteConstExpr
2856 ',' ByteConstExpr
2857 ')' '{'
2858 ResourceMacroList '}' {$$ = TrLinkChildren ($<n>3,3,$4,$6,$9);}
2859 | PARSEOP_STARTDEPENDENTFN '('
2860 error ')' {$$ = AslDoError(); yyclearin;}
2863 StartDependentFnNoPriTerm
2864 : PARSEOP_STARTDEPENDENTFN_NOPRI '(' {$<n>$ = TrCreateLeafNode (PARSEOP_STARTDEPENDENTFN_NOPRI);}
2865 ')' '{'
2866 ResourceMacroList '}' {$$ = TrLinkChildren ($<n>3,1,$6);}
2867 | PARSEOP_STARTDEPENDENTFN_NOPRI '('
2868 error ')' {$$ = AslDoError(); yyclearin;}
2871 VendorLongTerm
2872 : PARSEOP_VENDORLONG '(' {$<n>$ = TrCreateLeafNode (PARSEOP_VENDORLONG);}
2873 OptionalNameString_First
2874 ')' '{'
2875 ByteList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
2876 | PARSEOP_VENDORLONG '('
2877 error ')' {$$ = AslDoError(); yyclearin;}
2880 VendorShortTerm
2881 : PARSEOP_VENDORSHORT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_VENDORSHORT);}
2882 OptionalNameString_First
2883 ')' '{'
2884 ByteList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
2885 | PARSEOP_VENDORSHORT '('
2886 error ')' {$$ = AslDoError(); yyclearin;}
2889 WordBusNumberTerm
2890 : PARSEOP_WORDBUSNUMBER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WORDBUSNUMBER);}
2891 OptionalResourceType_First
2892 OptionalMinType
2893 OptionalMaxType
2894 OptionalDecodeType
2895 ',' WordConstExpr
2896 ',' WordConstExpr
2897 ',' WordConstExpr
2898 ',' WordConstExpr
2899 ',' WordConstExpr
2900 OptionalByteConstExpr
2901 OptionalStringData
2902 OptionalNameString_Last
2903 ')' {$$ = TrLinkChildren ($<n>3,12,$4,$5,$6,$7,$9,$11,$13,$15,$17,$18,$19,$20);}
2904 | PARSEOP_WORDBUSNUMBER '('
2905 error ')' {$$ = AslDoError(); yyclearin;}
2908 WordIOTerm
2909 : PARSEOP_WORDIO '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WORDIO);}
2910 OptionalResourceType_First
2911 OptionalMinType
2912 OptionalMaxType
2913 OptionalDecodeType
2914 OptionalRangeType
2915 ',' WordConstExpr
2916 ',' WordConstExpr
2917 ',' WordConstExpr
2918 ',' WordConstExpr
2919 ',' WordConstExpr
2920 OptionalByteConstExpr
2921 OptionalStringData
2922 OptionalNameString
2923 OptionalType
2924 OptionalTranslationType_Last
2925 ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
2926 | PARSEOP_WORDIO '('
2927 error ')' {$$ = AslDoError(); yyclearin;}
2930 WordSpaceTerm
2931 : PARSEOP_WORDSPACE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WORDSPACE);}
2932 ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
2933 OptionalResourceType
2934 OptionalDecodeType
2935 OptionalMinType
2936 OptionalMaxType
2937 ',' ByteConstExpr
2938 ',' WordConstExpr
2939 ',' WordConstExpr
2940 ',' WordConstExpr
2941 ',' WordConstExpr
2942 ',' WordConstExpr
2943 OptionalByteConstExpr
2944 OptionalStringData
2945 OptionalNameString_Last
2946 ')' {$$ = TrLinkChildren ($<n>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
2947 | PARSEOP_WORDSPACE '('
2948 error ')' {$$ = AslDoError(); yyclearin;}
2952 /******* Object References ***********************************************/
2954 /* Allow IO, DMA, IRQ Resource macro names to also be used as identifiers */
2956 NameString
2957 : NameSeg {}
2958 | PARSEOP_NAMESTRING {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) AslCompilerlval.s);}
2959 | PARSEOP_IO {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "IO");}
2960 | PARSEOP_DMA {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "DMA");}
2961 | PARSEOP_IRQ {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "IRQ");}
2964 NameSeg
2965 : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESEG, (ACPI_NATIVE_INT) AslCompilerlval.s);}
2969 /******* Helper rules ****************************************************/
2972 AmlPackageLengthTerm
2973 : Integer {$$ = TrUpdateNode (PARSEOP_PACKAGE_LENGTH,(ACPI_PARSE_OBJECT *) $1);}
2976 OptionalBusMasterKeyword
2977 : ',' {$$ = TrCreateLeafNode (PARSEOP_BUSMASTERTYPE_MASTER);}
2978 | ',' PARSEOP_BUSMASTERTYPE_MASTER {$$ = TrCreateLeafNode (PARSEOP_BUSMASTERTYPE_MASTER);}
2979 | ',' PARSEOP_BUSMASTERTYPE_NOTMASTER {$$ = TrCreateLeafNode (PARSEOP_BUSMASTERTYPE_NOTMASTER);}
2982 OptionalAccessAttribTerm
2983 : {$$ = NULL;}
2984 | ',' {$$ = NULL;}
2985 | ',' ByteConstExpr {$$ = $2;}
2986 | ',' AccessAttribKeyword {$$ = $2;}
2989 OptionalAccessSize
2990 : {$$ = TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0);}
2991 | ',' {$$ = TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0);}
2992 | ',' ByteConstExpr {$$ = $2;}
2995 OptionalAddressRange
2996 : {$$ = NULL;}
2997 | ',' {$$ = NULL;}
2998 | ',' AddressKeyword {$$ = $2;}
3001 OptionalByteConstExpr
3002 : {$$ = NULL;}
3003 | ',' {$$ = NULL;}
3004 | ',' ByteConstExpr {$$ = $2;}
3007 OptionalDecodeType
3008 : ',' {$$ = NULL;}
3009 | ',' DecodeKeyword {$$ = $2;}
3012 OptionalDWordConstExpr
3013 : {$$ = NULL;}
3014 | ',' {$$ = NULL;}
3015 | ',' DWordConstExpr {$$ = $2;}
3018 OptionalListString
3019 : {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */
3020 | ',' {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */
3021 | ',' TermArg {$$ = $2;}
3024 OptionalMaxType
3025 : ',' {$$ = NULL;}
3026 | ',' MaxKeyword {$$ = $2;}
3029 OptionalMemType
3030 : ',' {$$ = NULL;}
3031 | ',' MemTypeKeyword {$$ = $2;}
3034 OptionalMinType
3035 : ',' {$$ = NULL;}
3036 | ',' MinKeyword {$$ = $2;}
3039 OptionalNameString
3040 : {$$ = NULL;}
3041 | ',' {$$ = NULL;}
3042 | ',' NameString {$$ = $2;}
3045 OptionalNameString_Last
3046 : {$$ = NULL;}
3047 | ',' {$$ = NULL;}
3048 | ',' NameString {$$ = $2;}
3051 OptionalNameString_First
3052 : {$$ = TrCreateLeafNode (PARSEOP_ZERO);}
3053 | NameString {$$ = $1;}
3056 OptionalObjectTypeKeyword
3057 : {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_UNK);}
3058 | ',' ObjectTypeKeyword {$$ = $2;}
3061 OptionalQWordConstExpr
3062 : {$$ = NULL;}
3063 | ',' {$$ = NULL;}
3064 | ',' QWordConstExpr {$$ = $2;}
3067 OptionalRangeType
3068 : ',' {$$ = NULL;}
3069 | ',' RangeTypeKeyword {$$ = $2;}
3072 OptionalReference
3073 : {$$ = TrCreateLeafNode (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */
3074 | ',' {$$ = TrCreateLeafNode (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */
3075 | ',' TermArg {$$ = $2;}
3078 OptionalResourceType_First
3079 : {$$ = NULL;}
3080 | ResourceTypeKeyword {$$ = $1;}
3083 OptionalResourceType
3084 : ',' {$$ = NULL;}
3085 | ',' ResourceTypeKeyword {$$ = $2;}
3088 OptionalSerializeRuleKeyword
3089 : {$$ = NULL;}
3090 | ',' {$$ = NULL;}
3091 | ',' SerializeRuleKeyword {$$ = $2;}
3094 OptionalShareType
3095 : {$$ = NULL;}
3096 | ',' {$$ = NULL;}
3097 | ',' ShareTypeKeyword {$$ = $2;}
3100 OptionalStringData
3101 : {$$ = NULL;}
3102 | ',' {$$ = NULL;}
3103 | ',' StringData {$$ = $2;}
3106 OptionalTermArg
3107 : {$$ = NULL;}
3108 | TermArg {$$ = $1;}
3111 OptionalReturnArg
3112 : {$$ = TrCreateLeafNode (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */
3113 | TermArg {$$ = $1;}
3116 OptionalType
3117 : {$$ = NULL;}
3118 | ',' {$$ = NULL;}
3119 | ',' TypeKeyword {$$ = $2;}
3122 OptionalType_Last
3123 : {$$ = NULL;}
3124 | ',' {$$ = NULL;}
3125 | ',' TypeKeyword {$$ = $2;}
3128 OptionalTranslationType_Last
3129 : {$$ = NULL;}
3130 | ',' {$$ = NULL;}
3131 | ',' TranslationKeyword {$$ = $2;}
3135 TermArgItem
3136 : ',' TermArg {$$ = $2;}
3137 | ',' error {$$ = AslDoError (); yyclearin;}
3140 NameStringItem
3141 : ',' NameString {$$ = $2;}
3142 | ',' error {$$ = AslDoError (); yyclearin;}
3150 * Local support functions
3154 AslCompilerwrap(void)
3156 return 1;
3159 /*! [End] no source code translation !*/
3161 void *
3162 AslLocalAllocate (unsigned int Size)
3164 void *Mem;
3167 DbgPrint (ASL_PARSE_OUTPUT, "\nAslLocalAllocate: Expanding Stack to %d\n\n", Size);
3169 Mem = ACPI_ALLOCATE_ZEROED (Size);
3170 if (!Mem)
3172 AslCommonError (ASL_ERROR, ASL_MSG_MEMORY_ALLOCATION,
3173 Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
3174 Gbl_InputByteCount, Gbl_CurrentColumn,
3175 Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
3176 exit (1);
3179 return (Mem);
3182 ACPI_PARSE_OBJECT *
3183 AslDoError (void)
3187 return (TrCreateLeafNode (PARSEOP_ERRORNODE));