3 /******************************************************************************
5 * Module Name: aslcompiler.y - Bison input file (ASL grammar and actions)
7 *****************************************************************************/
9 /******************************************************************************
13 * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp.
14 * All rights reserved.
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
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
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
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
74 * 3.4. Intel retains all right, title, and interest in and to the Original
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
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
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 *****************************************************************************/
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"
131 #include "accommon.h"
133 #define _COMPONENT ACPI_COMPILER
134 ACPI_MODULE_NAME
("aslparse")
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
156 #define alloca AslLocalAllocate
157 #define YYERROR_VERBOSE 1
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
171 #define YYFLAG -32768
178 * Declare the type of values in the grammar
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.
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
473 %type
<n
> DefinitionBlockTerm
476 %type
<n
> CompilerDirective
481 %type
<n
> PackageData
482 %type
<n
> IntegerData
484 %type
<n
> NamedObject
485 %type
<n
> NameSpaceModifier
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
512 %type
<n
> IncludeTerm
513 %type
<n
> IncludeCStyleTerm
514 %type
<n
> ExternalTerm
516 %type
<n
> FieldUnitList
518 %type
<n
> FieldUnitEntry
521 %type
<n
> AccessAsTerm
522 %type
<n
> OptionalAccessAttribTerm
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
538 %type
<n
> FunctionTerm
539 %type
<n
> IndexFieldTerm
542 %type
<n
> OpRegionTerm
543 %type
<n
> OpRegionSpaceIdTerm
544 %type
<n
> PowerResTerm
545 %type
<n
> ProcessorTerm
546 %type
<n
> ThermalZoneTerm
549 /* Namespace modifiers */
558 %type
<n
> BreakPointTerm
559 %type
<n
> ContinueTerm
567 %type
<n
> ReleaseTerm
574 %type
<n
> CaseDefaultTermList
575 //%type <n> CaseTermList
577 %type
<n
> DefaultTerm
583 %type
<n
> AcquireTerm
587 %type
<n
> ConcatResTerm
588 %type
<n
> CondRefOfTerm
589 %type
<n
> CopyObjectTerm
591 %type
<n
> DerefOfTerm
593 %type
<n
> FindSetLeftBitTerm
594 %type
<n
> FindSetRightBitTerm
595 %type
<n
> FromBCDTerm
600 %type
<n
> LGreaterTerm
601 %type
<n
> LGreaterEqualTerm
603 %type
<n
> LLessEqualTerm
605 %type
<n
> LNotEqualTerm
606 %type
<n
> LoadTableTerm
611 %type
<n
> MultiplyTerm
615 %type
<n
> ObjectTypeTerm
618 %type
<n
> ShiftLeftTerm
619 %type
<n
> ShiftRightTerm
622 %type
<n
> SubtractTerm
625 %type
<n
> ToBufferTerm
626 %type
<n
> ToDecimalStringTerm
627 %type
<n
> ToHexStringTerm
628 %type
<n
> ToIntegerTerm
629 %type
<n
> ToStringTerm
633 %type
<n
> OptionalTermArg
634 %type
<n
> OptionalReturnArg
635 %type
<n
> OptionalListString
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
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
682 %type
<n
> ByteConstExpr
683 %type
<n
> WordConstExpr
684 %type
<n
> DWordConstExpr
685 %type
<n
> QWordConstExpr
686 %type
<n
> ConstExprTerm
692 %type
<n
> PackageTerm
693 %type
<n
> PackageList
694 %type
<n
> PackageElement
696 %type
<n
> VarPackageLengthTerm
701 %type
<n
> ResourceTemplateTerm
703 %type
<n
> UnicodeTerm
704 %type
<n
> ResourceMacroList
705 %type
<n
> ResourceMacroTerm
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
718 %type
<n
> IRQNoFlagsTerm
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
733 %type
<n
> WordSpaceTerm
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 ******************************************************************************/
789 * Blocks, Data, and Opcodes
793 : DefinitionBlockTerm
794 |
error {YYABORT; $$
= NULL
;}
798 : PARSEOP_DEFINITIONBLOCK
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DEFINITIONBLOCK
);}
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 */
813 | TermList Term
{$$
= TrLinkPeerNode
(TrSetNodeFlags
($1, NODE_RESULT_NOT_USED
),$2);}
814 | TermList
';' Term
{$$
= TrLinkPeerNode
(TrSetNodeFlags
($1, NODE_RESULT_NOT_USED
),$3);}
821 | Type2IntegerOpcode
{}
822 | Type2StringOpcode
{}
823 | Type2BufferOpcode
{}
824 | Type2BufferOrStringOpcode
{}
825 |
error {$$
= AslDoError
(); yyclearin;}
830 | IncludeCStyleTerm
{$$
= NULL
;}
831 | LineTerm
{$$
= NULL
;}
837 | ObjectList Object
{$$
= TrLinkPeerNode
($1,$2);}
838 |
error {$$
= AslDoError
(); yyclearin;}
842 : CompilerDirective
{}
844 | NameSpaceModifier
{}
855 : Type5Opcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
);}
856 | Type2BufferOrStringOpcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
);}
857 | Type2BufferOpcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
);}
866 : Type2IntegerOpcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
);}
867 | Type3Opcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
);}
873 : Type2StringOpcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
);}
879 | CreateBitFieldTerm
{}
880 | CreateByteFieldTerm
{}
881 | CreateDWordFieldTerm
{}
883 | CreateQWordFieldTerm
{}
884 | CreateWordFieldTerm
{}
906 : NameString
'(' {TrUpdateNode
(PARSEOP_METHODCALL
, $1);}
907 ArgList
')' {$$
= TrLinkChildNode
($1,$4);}
913 | ArgList
',' /* Allows a trailing comma at list end */
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);}
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
);}
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
);}
942 : ',' SuperName
{$$
= TrSetNodeFlags
($2, NODE_IS_TARGET
);}
951 /* Rules for specifying the type of one method argument or return value */
955 | ObjectTypeKeyword
{$$
= $1;}
956 | ParameterTypePackage
','
957 ObjectTypeKeyword
{$$
= TrLinkPeerNodes
(2,$1,$3);}
960 ParameterTypePackageList
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
981 | ObjectTypeKeyword
{$$
= $1;}
982 |
'{' ParameterTypesPackage
'}' {$$
= $2;}
985 OptionalParameterTypesPackage
986 : {$$
= TrCreateLeafNode
(PARSEOP_DEFAULT_ARG
);}
987 |
',' ParameterTypesPackageList
{$$
= TrLinkChildren
(TrCreateLeafNode
(PARSEOP_DEFAULT_ARG
),1,$2);}
1028 * Type 3/4/5 opcodes
1031 Type2IntegerOpcode
/* "Type3" opcodes */
1036 | FindSetLeftBitTerm
{}
1037 | FindSetRightBitTerm
{}
1044 | LGreaterEqualTerm
{}
1066 Type2StringOpcode
/* "Type4" Opcodes */
1067 : ToDecimalStringTerm
{}
1068 | ToHexStringTerm
{}
1072 Type2BufferOpcode
/* "Type5" Opcodes */
1077 Type2BufferOrStringOpcode
1083 * A type 3 opcode evaluates to an Integer and cannot have a destination operand
1093 | ToDecimalStringTerm {}
1094 | ToHexStringTerm {}
1102 : ResourceTemplateTerm
{}
1115 : PARSEOP_INCLUDE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_INCLUDE
);}
1116 String
')' {TrLinkChildren
($
<n
>3,1,$4);FlOpenIncludeFile
($4);}
1118 IncludeEndTerm
{$$
= TrLinkPeerNodes
(3,$
<n
>3,$7,$8);}
1122 : PARSEOP_INCLUDE_END
{$$
= TrCreateLeafNode
(PARSEOP_INCLUDE_END
);}
1126 : PARSEOP_INCLUDE_CSTYLE
1127 String
{FlOpenIncludeFile
($2);}
1131 : PARSEOP_LINE_CSTYLE
1132 Integer
{FlSetLineNumber
($2);}
1136 : PARSEOP_EXTERNAL
'('
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 *******************************************************/
1151 : PARSEOP_BANKFIELD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_BANKFIELD
);}
1155 ',' AccessTypeKeyword
1157 ',' UpdateRuleKeyword
1159 FieldUnitList
'}' {$$
= TrLinkChildren
($
<n
>3,7,$4,$5,$6,$8,$10,$12,$15);}
1160 | PARSEOP_BANKFIELD
'('
1161 error ')' '{' error '}' {$$
= AslDoError
(); yyclearin;}
1167 | FieldUnitList
',' /* Allows a trailing comma at list end */
1169 FieldUnit
{$$
= TrLinkPeerNode
($1,$3);}
1179 : ',' AmlPackageLengthTerm
{$$
= TrCreateNode
(PARSEOP_RESERVED_BYTES
,1,$2);}
1181 AmlPackageLengthTerm
{$$
= TrLinkChildNode
($1,$3);}
1185 : PARSEOP_OFFSET
'('
1186 AmlPackageLengthTerm
1187 ')' {$$
= TrCreateNode
(PARSEOP_OFFSET
,1,$3);}
1188 | PARSEOP_OFFSET
'('
1189 error ')' {$$
= AslDoError
(); yyclearin;}
1193 : PARSEOP_ACCESSAS
'('
1195 OptionalAccessAttribTerm
1196 ')' {$$
= TrCreateNode
(PARSEOP_ACCESSAS
,2,$3,$4);}
1197 | PARSEOP_ACCESSAS
'('
1198 error ')' {$$
= AslDoError
(); yyclearin;}
1202 : PARSEOP_CREATEBITFIELD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CREATEBITFIELD
);}
1206 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,TrSetNodeFlags
($6, NODE_IS_NAME_DECLARATION
));}
1207 | PARSEOP_CREATEBITFIELD
'('
1208 error ')' {$$
= AslDoError
(); yyclearin;}
1212 : PARSEOP_CREATEBYTEFIELD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CREATEBYTEFIELD
);}
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
);}
1226 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,TrSetNodeFlags
($6, NODE_IS_NAME_DECLARATION
));}
1227 | PARSEOP_CREATEDWORDFIELD
'('
1228 error ')' {$$
= AslDoError
(); yyclearin;}
1232 : PARSEOP_CREATEFIELD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CREATEFIELD
);}
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
);}
1247 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,TrSetNodeFlags
($6, NODE_IS_NAME_DECLARATION
));}
1248 | PARSEOP_CREATEQWORDFIELD
'('
1249 error ')' {$$
= AslDoError
(); yyclearin;}
1253 : PARSEOP_CREATEWORDFIELD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CREATEWORDFIELD
);}
1257 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,TrSetNodeFlags
($6, NODE_IS_NAME_DECLARATION
));}
1258 | PARSEOP_CREATEWORDFIELD
'('
1259 error ')' {$$
= AslDoError
(); yyclearin;}
1263 : PARSEOP_DATATABLEREGION
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DATATABLEREGION
);}
1268 ')' {$$
= TrLinkChildren
($
<n
>3,4,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$5,$6,$7);}
1269 | PARSEOP_DATATABLEREGION
'('
1270 error ')' {$$
= AslDoError
(); yyclearin;}
1274 : PARSEOP_DEVICE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DEVICE
);}
1277 ObjectList
'}' {$$
= TrLinkChildren
($
<n
>3,2,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$7);}
1278 | PARSEOP_DEVICE
'('
1279 error ')' {$$
= AslDoError
(); yyclearin;}
1283 : PARSEOP_EVENT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_EVENT
);}
1285 ')' {$$
= TrLinkChildren
($
<n
>3,1,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
));}
1287 error ')' {$$
= AslDoError
(); yyclearin;}
1291 : PARSEOP_FIELD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_FIELD
);}
1293 ',' AccessTypeKeyword
1295 ',' UpdateRuleKeyword
1297 FieldUnitList
'}' {$$
= TrLinkChildren
($
<n
>3,5,$4,$6,$8,$10,$13);}
1299 error ')' '{' error '}' {$$
= AslDoError
(); yyclearin;}
1303 : PARSEOP_FUNCTION
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_METHOD
);}
1305 OptionalParameterTypePackage
1306 OptionalParameterTypesPackage
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;}
1317 : PARSEOP_INDEXFIELD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_INDEXFIELD
);}
1320 ',' AccessTypeKeyword
1322 ',' UpdateRuleKeyword
1324 FieldUnitList
'}' {$$
= TrLinkChildren
($
<n
>3,6,$4,$5,$7,$9,$11,$14);}
1325 | PARSEOP_INDEXFIELD
'('
1326 error ')' '{' error '}' {$$
= AslDoError
(); yyclearin;}
1330 : PARSEOP_METHOD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_METHOD
);}
1332 OptionalByteConstExpr
{UtCheckIntegerRange
($5, 0, 7);}
1333 OptionalSerializeRuleKeyword
1334 OptionalByteConstExpr
1335 OptionalParameterTypePackage
1336 OptionalParameterTypesPackage
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;}
1344 : PARSEOP_MUTEX
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_MUTEX
);}
1347 ')' {$$
= TrLinkChildren
($
<n
>3,2,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$6);}
1349 error ')' {$$
= AslDoError
(); yyclearin;}
1353 : PARSEOP_OPERATIONREGION
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_OPERATIONREGION
);}
1355 ',' OpRegionSpaceIdTerm
1358 ')' {$$
= TrLinkChildren
($
<n
>3,4,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$6,$7,$8);}
1359 | PARSEOP_OPERATIONREGION
'('
1360 error ')' {$$
= AslDoError
(); yyclearin;}
1364 : RegionSpaceKeyword
{}
1365 | ByteConst
{$$
= UtCheckIntegerRange
($1, 0x80, 0xFF);}
1369 : PARSEOP_POWERRESOURCE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_POWERRESOURCE
);}
1374 ObjectList
'}' {$$
= TrLinkChildren
($
<n
>3,4,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$6,$8,$11);}
1375 | PARSEOP_POWERRESOURCE
'('
1376 error ')' {$$
= AslDoError
(); yyclearin;}
1380 : PARSEOP_PROCESSOR
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_PROCESSOR
);}
1383 OptionalDWordConstExpr
1384 OptionalByteConstExpr
1386 ObjectList
'}' {$$
= TrLinkChildren
($
<n
>3,5,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$6,$7,$8,$11);}
1387 | PARSEOP_PROCESSOR
'('
1388 error ')' {$$
= AslDoError
(); yyclearin;}
1392 : PARSEOP_THERMALZONE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_THERMALZONE
);}
1395 ObjectList
'}' {$$
= TrLinkChildren
($
<n
>3,2,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$7);}
1396 | PARSEOP_THERMALZONE
'('
1397 error ')' {$$
= AslDoError
(); yyclearin;}
1401 /******* Namespace modifiers *************************************************/
1405 : PARSEOP_ALIAS
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_ALIAS
);}
1408 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,TrSetNodeFlags
($5, NODE_IS_NAME_DECLARATION
));}
1410 error ')' {$$
= AslDoError
(); yyclearin;}
1414 : PARSEOP_NAME
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_NAME
);}
1417 ')' {$$
= TrLinkChildren
($
<n
>3,2,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$6);}
1419 error ')' {$$
= AslDoError
(); yyclearin;}
1423 : PARSEOP_SCOPE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_SCOPE
);}
1426 ObjectList
'}' {$$
= TrLinkChildren
($
<n
>3,2,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$7);}
1428 error ')' {$$
= AslDoError
(); yyclearin;}
1432 /******* Type 1 opcodes *******************************************************/
1436 : PARSEOP_BREAK
{$$
= TrCreateNode
(PARSEOP_BREAK
, 0);}
1440 : PARSEOP_BREAKPOINT
{$$
= TrCreateNode
(PARSEOP_BREAKPOINT
, 0);}
1444 : PARSEOP_CONTINUE
{$$
= TrCreateNode
(PARSEOP_CONTINUE
, 0);}
1448 : PARSEOP_FATAL
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_FATAL
);}
1452 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$6,$7);}
1454 error ')' {$$
= AslDoError
(); yyclearin;}
1458 : IfTerm ElseTerm
{$$
= TrLinkPeerNode
($1,$2);}
1462 : PARSEOP_IF
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_IF
);}
1465 TermList
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
1468 error ')' {$$
= AslDoError
(); yyclearin;}
1473 | PARSEOP_ELSE
'{' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_ELSE
);}
1474 TermList
'}' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1477 error '}' {$$
= AslDoError
(); yyclearin;}
1480 error {$$
= AslDoError
(); yyclearin;}
1482 | PARSEOP_ELSEIF
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_ELSE
);}
1483 TermArg
{$
<n
>$
= TrCreateLeafNode
(PARSEOP_IF
);}
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;}
1493 error {$$
= AslDoError
(); yyclearin;}
1497 : PARSEOP_LOAD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LOAD
);}
1500 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1502 error ')' {$$
= AslDoError
(); yyclearin;}
1506 : PARSEOP_NOOP
{$$
= TrCreateNode
(PARSEOP_NOOP
, 0);}
1510 : PARSEOP_NOTIFY
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_NOTIFY
);}
1513 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1514 | PARSEOP_NOTIFY
'('
1515 error ')' {$$
= AslDoError
(); yyclearin;}
1519 : PARSEOP_RELEASE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_RELEASE
);}
1521 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1522 | PARSEOP_RELEASE
'('
1523 error ')' {$$
= AslDoError
(); yyclearin;}
1527 : PARSEOP_RESET
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_RESET
);}
1529 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1531 error ')' {$$
= AslDoError
(); yyclearin;}
1535 : PARSEOP_RETURN
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_RETURN
);}
1537 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1538 | PARSEOP_RETURN
{$$
= TrLinkChildren
(TrCreateLeafNode
(PARSEOP_RETURN
),1,TrCreateLeafNode
(PARSEOP_ZERO
));}
1539 | PARSEOP_RETURN
'('
1540 error ')' {$$
= AslDoError
(); yyclearin;}
1544 : PARSEOP_SIGNAL
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_SIGNAL
);}
1546 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1547 | PARSEOP_SIGNAL
'('
1548 error ')' {$$
= AslDoError
(); yyclearin;}
1552 : PARSEOP_SLEEP
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_SLEEP
);}
1554 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1556 error ')' {$$
= AslDoError
(); yyclearin;}
1560 : PARSEOP_STALL
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_STALL
);}
1562 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1564 error ')' {$$
= AslDoError
(); yyclearin;}
1568 : PARSEOP_SWITCH
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_SWITCH
);}
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
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 */
1597 CaseTermList {$$ = TrLinkPeerNode ($1,TrLinkPeerNode ($2, $3));}
1599 CaseTerm {$$ = TrLinkPeerNode ($1,$2);}
1606 CaseTerm {$$ = TrLinkPeerNode ($1,$2);}
1611 : PARSEOP_CASE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CASE
);}
1614 TermList
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
1616 error ')' {$$
= AslDoError
(); yyclearin;}
1620 : PARSEOP_DEFAULT
'{' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DEFAULT
);}
1621 TermList
'}' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1622 | PARSEOP_DEFAULT
'{'
1623 error '}' {$$
= AslDoError
(); yyclearin;}
1627 : PARSEOP_UNLOAD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_UNLOAD
);}
1629 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1630 | PARSEOP_UNLOAD
'('
1631 error ')' {$$
= AslDoError
(); yyclearin;}
1635 : PARSEOP_WHILE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_WHILE
);}
1637 ')' '{' TermList
'}'
1638 {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
1640 error ')' {$$
= AslDoError
(); yyclearin;}
1644 /******* Type 2 opcodes *******************************************************/
1647 : PARSEOP_ACQUIRE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_ACQUIRE
);}
1650 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$6);}
1651 | PARSEOP_ACQUIRE
'('
1652 error ')' {$$
= AslDoError
(); yyclearin;}
1656 : PARSEOP_ADD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_ADD
);}
1660 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1662 error ')' {$$
= AslDoError
(); yyclearin;}
1666 : PARSEOP_AND
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_AND
);}
1670 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1672 error ')' {$$
= AslDoError
(); yyclearin;}
1676 : PARSEOP_CONCATENATE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CONCATENATE
);}
1680 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1681 | PARSEOP_CONCATENATE
'('
1682 error ')' {$$
= AslDoError
(); yyclearin;}
1686 : PARSEOP_CONCATENATERESTEMPLATE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CONCATENATERESTEMPLATE
);}
1690 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1691 | PARSEOP_CONCATENATERESTEMPLATE
'('
1692 error ')' {$$
= AslDoError
(); yyclearin;}
1696 : PARSEOP_CONDREFOF
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CONDREFOF
);}
1699 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1700 | PARSEOP_CONDREFOF
'('
1701 error ')' {$$
= AslDoError
(); yyclearin;}
1705 : PARSEOP_COPYOBJECT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_COPYOBJECT
);}
1708 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,TrSetNodeFlags
($6, NODE_IS_TARGET
));}
1709 | PARSEOP_COPYOBJECT
'('
1710 error ')' {$$
= AslDoError
(); yyclearin;}
1714 : PARSEOP_DECREMENT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DECREMENT
);}
1716 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1717 | PARSEOP_DECREMENT
'('
1718 error ')' {$$
= AslDoError
(); yyclearin;}
1722 : PARSEOP_DEREFOF
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DEREFOF
);}
1724 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1725 | PARSEOP_DEREFOF
'('
1726 error ')' {$$
= AslDoError
(); yyclearin;}
1730 : PARSEOP_DIVIDE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DIVIDE
);}
1735 ')' {$$
= TrLinkChildren
($
<n
>3,4,$4,$5,$6,$7);}
1736 | PARSEOP_DIVIDE
'('
1737 error ')' {$$
= AslDoError
(); yyclearin;}
1741 : PARSEOP_FINDSETLEFTBIT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_FINDSETLEFTBIT
);}
1744 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1745 | PARSEOP_FINDSETLEFTBIT
'('
1746 error ')' {$$
= AslDoError
(); yyclearin;}
1750 : PARSEOP_FINDSETRIGHTBIT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_FINDSETRIGHTBIT
);}
1753 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1754 | PARSEOP_FINDSETRIGHTBIT
'('
1755 error ')' {$$
= AslDoError
(); yyclearin;}
1759 : PARSEOP_FROMBCD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_FROMBCD
);}
1762 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1763 | PARSEOP_FROMBCD
'('
1764 error ')' {$$
= AslDoError
(); yyclearin;}
1768 : PARSEOP_INCREMENT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_INCREMENT
);}
1770 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1771 | PARSEOP_INCREMENT
'('
1772 error ')' {$$
= AslDoError
(); yyclearin;}
1776 : PARSEOP_INDEX
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_INDEX
);}
1780 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1782 error ')' {$$
= AslDoError
(); yyclearin;}
1786 : PARSEOP_LAND
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LAND
);}
1789 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1791 error ')' {$$
= AslDoError
(); yyclearin;}
1795 : PARSEOP_LEQUAL
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LEQUAL
);}
1798 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1799 | PARSEOP_LEQUAL
'('
1800 error ')' {$$
= AslDoError
(); yyclearin;}
1804 : PARSEOP_LGREATER
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LGREATER
);}
1807 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1808 | PARSEOP_LGREATER
'('
1809 error ')' {$$
= AslDoError
(); yyclearin;}
1813 : PARSEOP_LGREATEREQUAL
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LLESS
);}
1816 ')' {$$
= TrCreateNode
(PARSEOP_LNOT
, 1, TrLinkChildren
($
<n
>3,2,$4,$5));}
1817 | PARSEOP_LGREATEREQUAL
'('
1818 error ')' {$$
= AslDoError
(); yyclearin;}
1822 : PARSEOP_LLESS
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LLESS
);}
1825 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1827 error ')' {$$
= AslDoError
(); yyclearin;}
1831 : PARSEOP_LLESSEQUAL
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LGREATER
);}
1834 ')' {$$
= TrCreateNode
(PARSEOP_LNOT
, 1, TrLinkChildren
($
<n
>3,2,$4,$5));}
1835 | PARSEOP_LLESSEQUAL
'('
1836 error ')' {$$
= AslDoError
(); yyclearin;}
1840 : PARSEOP_LNOT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LNOT
);}
1842 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1844 error ')' {$$
= AslDoError
(); yyclearin;}
1848 : PARSEOP_LNOTEQUAL
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LEQUAL
);}
1851 ')' {$$
= TrCreateNode
(PARSEOP_LNOT
, 1, TrLinkChildren
($
<n
>3,2,$4,$5));}
1852 | PARSEOP_LNOTEQUAL
'('
1853 error ')' {$$
= AslDoError
(); yyclearin;}
1857 : PARSEOP_LOADTABLE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LOADTABLE
);}
1864 ')' {$$
= TrLinkChildren
($
<n
>3,6,$4,$5,$6,$7,$8,$9);}
1865 | PARSEOP_LOADTABLE
'('
1866 error ')' {$$
= AslDoError
(); yyclearin;}
1870 : PARSEOP_LOR
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LOR
);}
1873 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1875 error ')' {$$
= AslDoError
(); yyclearin;}
1879 : PARSEOP_MATCH
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_MATCH
);}
1886 ')' {$$
= TrLinkChildren
($
<n
>3,6,$4,$6,$7,$9,$10,$11);}
1888 error ')' {$$
= AslDoError
(); yyclearin;}
1892 : PARSEOP_MID
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_MID
);}
1897 ')' {$$
= TrLinkChildren
($
<n
>3,4,$4,$5,$6,$7);}
1899 error ')' {$$
= AslDoError
(); yyclearin;}
1903 : PARSEOP_MOD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_MOD
);}
1907 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1909 error ')' {$$
= AslDoError
(); yyclearin;}
1913 : PARSEOP_MULTIPLY
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_MULTIPLY
);}
1917 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1918 | PARSEOP_MULTIPLY
'('
1919 error ')' {$$
= AslDoError
(); yyclearin;}
1923 : PARSEOP_NAND
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_NAND
);}
1927 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1929 error ')' {$$
= AslDoError
(); yyclearin;}
1933 : PARSEOP_NOR
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_NOR
);}
1937 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1939 error ')' {$$
= AslDoError
(); yyclearin;}
1943 : PARSEOP_NOT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_NOT
);}
1946 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1948 error ')' {$$
= AslDoError
(); yyclearin;}
1952 : PARSEOP_OBJECTTYPE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE
);}
1954 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1955 | PARSEOP_OBJECTTYPE
'('
1956 error ')' {$$
= AslDoError
(); yyclearin;}
1960 : PARSEOP_OR
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_OR
);}
1964 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
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.)
1974 : PARSEOP_REFOF
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_REFOF
);}
1976 ')' {$$
= TrLinkChildren
($
<n
>3,1,TrSetNodeFlags
($4, NODE_IS_TARGET
));}
1978 error ')' {$$
= AslDoError
(); yyclearin;}
1982 : PARSEOP_SHIFTLEFT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_SHIFTLEFT
);}
1986 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1987 | PARSEOP_SHIFTLEFT
'('
1988 error ')' {$$
= AslDoError
(); yyclearin;}
1992 : PARSEOP_SHIFTRIGHT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_SHIFTRIGHT
);}
1996 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1997 | PARSEOP_SHIFTRIGHT
'('
1998 error ')' {$$
= AslDoError
(); yyclearin;}
2002 : PARSEOP_SIZEOF
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_SIZEOF
);}
2004 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
2005 | PARSEOP_SIZEOF
'('
2006 error ')' {$$
= AslDoError
(); yyclearin;}
2010 : PARSEOP_STORE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_STORE
);}
2013 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,TrSetNodeFlags
($6, NODE_IS_TARGET
));}
2015 error ')' {$$
= AslDoError
(); yyclearin;}
2019 : PARSEOP_SUBTRACT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_SUBTRACT
);}
2023 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
2024 | PARSEOP_SUBTRACT
'('
2025 error ')' {$$
= AslDoError
(); yyclearin;}
2029 : PARSEOP_TIMER
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_TIMER
);}
2030 ')' {$$
= TrLinkChildren
($
<n
>3,0);}
2031 | PARSEOP_TIMER
{$$
= TrLinkChildren
(TrCreateLeafNode
(PARSEOP_TIMER
),0);}
2033 error ')' {$$
= AslDoError
(); yyclearin;}
2037 : PARSEOP_TOBCD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_TOBCD
);}
2040 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
2042 error ')' {$$
= AslDoError
(); yyclearin;}
2046 : PARSEOP_TOBUFFER
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_TOBUFFER
);}
2049 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
2050 | PARSEOP_TOBUFFER
'('
2051 error ')' {$$
= AslDoError
(); yyclearin;}
2055 : PARSEOP_TODECIMALSTRING
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_TODECIMALSTRING
);}
2058 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
2059 | PARSEOP_TODECIMALSTRING
'('
2060 error ')' {$$
= AslDoError
(); yyclearin;}
2064 : PARSEOP_TOHEXSTRING
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_TOHEXSTRING
);}
2067 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
2068 | PARSEOP_TOHEXSTRING
'('
2069 error ')' {$$
= AslDoError
(); yyclearin;}
2073 : PARSEOP_TOINTEGER
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_TOINTEGER
);}
2076 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
2077 | PARSEOP_TOINTEGER
'('
2078 error ')' {$$
= AslDoError
(); yyclearin;}
2082 : PARSEOP_TOSTRING
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_TOSTRING
);}
2086 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
2087 | PARSEOP_TOSTRING
'('
2088 error ')' {$$
= AslDoError
(); yyclearin;}
2092 : PARSEOP_TOUUID
'('
2093 StringData
')' {$$
= TrUpdateNode
(PARSEOP_TOUUID
, $3);}
2094 | PARSEOP_TOUUID
'('
2095 error ')' {$$
= AslDoError
(); yyclearin;}
2099 : PARSEOP_WAIT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_WAIT
);}
2102 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
2104 error ')' {$$
= AslDoError
(); yyclearin;}
2108 : PARSEOP_XOR
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_XOR
);}
2112 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
2114 error ')' {$$
= AslDoError
(); yyclearin;}
2118 /******* Keywords *************************************************************/
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
);}
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
);}
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
);}
2160 : PARSEOP_LOCKRULE_LOCK
{$$
= TrCreateLeafNode
(PARSEOP_LOCKRULE_LOCK
);}
2161 | PARSEOP_LOCKRULE_NOLOCK
{$$
= TrCreateLeafNode
(PARSEOP_LOCKRULE_NOLOCK
);}
2165 : PARSEOP_UPDATERULE_PRESERVE
{$$
= TrCreateLeafNode
(PARSEOP_UPDATERULE_PRESERVE
);}
2166 | PARSEOP_UPDATERULE_ONES
{$$
= TrCreateLeafNode
(PARSEOP_UPDATERULE_ONES
);}
2167 | PARSEOP_UPDATERULE_ZEROS
{$$
= TrCreateLeafNode
(PARSEOP_UPDATERULE_ZEROS
);}
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
);}
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
);}
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
);}
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
);}
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
);}
2217 : PARSEOP_RESOURCETYPE_CONSUMER
{$$
= TrCreateLeafNode
(PARSEOP_RESOURCETYPE_CONSUMER
);}
2218 | PARSEOP_RESOURCETYPE_PRODUCER
{$$
= TrCreateLeafNode
(PARSEOP_RESOURCETYPE_PRODUCER
);}
2222 : PARSEOP_MINTYPE_FIXED
{$$
= TrCreateLeafNode
(PARSEOP_MINTYPE_FIXED
);}
2223 | PARSEOP_MINTYPE_NOTFIXED
{$$
= TrCreateLeafNode
(PARSEOP_MINTYPE_NOTFIXED
);}
2227 : PARSEOP_MAXTYPE_FIXED
{$$
= TrCreateLeafNode
(PARSEOP_MAXTYPE_FIXED
);}
2228 | PARSEOP_MAXTYPE_NOTFIXED
{$$
= TrCreateLeafNode
(PARSEOP_MAXTYPE_NOTFIXED
);}
2232 : PARSEOP_DECODETYPE_POS
{$$
= TrCreateLeafNode
(PARSEOP_DECODETYPE_POS
);}
2233 | PARSEOP_DECODETYPE_SUB
{$$
= TrCreateLeafNode
(PARSEOP_DECODETYPE_SUB
);}
2237 : PARSEOP_RANGETYPE_ISAONLY
{$$
= TrCreateLeafNode
(PARSEOP_RANGETYPE_ISAONLY
);}
2238 | PARSEOP_RANGETYPE_NONISAONLY
{$$
= TrCreateLeafNode
(PARSEOP_RANGETYPE_NONISAONLY
);}
2239 | PARSEOP_RANGETYPE_ENTIRE
{$$
= TrCreateLeafNode
(PARSEOP_RANGETYPE_ENTIRE
);}
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
);}
2261 : PARSEOP_INTLEVEL_ACTIVEHIGH
{$$
= TrCreateLeafNode
(PARSEOP_INTLEVEL_ACTIVEHIGH
);}
2262 | PARSEOP_INTLEVEL_ACTIVELOW
{$$
= TrCreateLeafNode
(PARSEOP_INTLEVEL_ACTIVELOW
);}
2266 : PARSEOP_SHARETYPE_SHARED
{$$
= TrCreateLeafNode
(PARSEOP_SHARETYPE_SHARED
);}
2267 | PARSEOP_SHARETYPE_EXCLUSIVE
{$$
= TrCreateLeafNode
(PARSEOP_SHARETYPE_EXCLUSIVE
);}
2271 : PARSEOP_IODECODETYPE_16
{$$
= TrCreateLeafNode
(PARSEOP_IODECODETYPE_16
);}
2272 | PARSEOP_IODECODETYPE_10
{$$
= TrCreateLeafNode
(PARSEOP_IODECODETYPE_10
);}
2276 : PARSEOP_TYPE_TRANSLATION
{$$
= TrCreateLeafNode
(PARSEOP_TYPE_TRANSLATION
);}
2277 | PARSEOP_TYPE_STATIC
{$$
= TrCreateLeafNode
(PARSEOP_TYPE_STATIC
);}
2281 : PARSEOP_TRANSLATIONTYPE_SPARSE
{$$
= TrCreateLeafNode
(PARSEOP_TRANSLATIONTYPE_SPARSE
);}
2282 | PARSEOP_TRANSLATIONTYPE_DENSE
{$$
= TrCreateLeafNode
(PARSEOP_TRANSLATIONTYPE_DENSE
);}
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 **************************************************/
2302 /* | UserTerm {} */ /* Caused reduce/reduce with Type6Opcode->UserTerm */
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
);}
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
);}
2327 : PARSEOP_DEBUG
{$$
= TrCreateLeafNode
(PARSEOP_DEBUG
);}
2332 : Integer
{$$
= TrUpdateNode
(PARSEOP_BYTECONST
, $1);}
2336 : Integer
{$$
= TrUpdateNode
(PARSEOP_WORDCONST
, $1);}
2340 : Integer
{$$
= TrUpdateNode
(PARSEOP_DWORDCONST
, $1);}
2344 : Integer
{$$
= TrUpdateNode
(PARSEOP_QWORDCONST
, $1);}
2348 : PARSEOP_INTEGER
{$$
= TrCreateValuedLeafNode
(PARSEOP_INTEGER
, AslCompilerlval.i
);}
2352 : PARSEOP_STRING_LITERAL
{$$
= TrCreateValuedLeafNode
(PARSEOP_STRING_LITERAL
, (ACPI_NATIVE_INT
) AslCompilerlval.s
);}
2357 | PARSEOP_REVISION
{$$
= TrCreateLeafNode
(PARSEOP_REVISION
);}
2361 : Type3Opcode
{$$
= TrUpdateNode
(PARSEOP_BYTECONST
, $1);}
2362 | Type2IntegerOpcode
{$$
= TrUpdateNode
(PARSEOP_BYTECONST
, $1);}
2363 | ConstExprTerm
{$$
= TrUpdateNode
(PARSEOP_BYTECONST
, $1);}
2368 : Type3Opcode
{$$
= TrUpdateNode
(PARSEOP_WORDCONST
, $1);}
2369 | Type2IntegerOpcode
{$$
= TrUpdateNode
(PARSEOP_WORDCONST
, $1);}
2370 | ConstExprTerm
{$$
= TrUpdateNode
(PARSEOP_WORDCONST
, $1);}
2375 : Type3Opcode
{$$
= TrUpdateNode
(PARSEOP_DWORDCONST
, $1);}
2376 | Type2IntegerOpcode
{$$
= TrUpdateNode
(PARSEOP_DWORDCONST
, $1);}
2377 | ConstExprTerm
{$$
= TrUpdateNode
(PARSEOP_DWORDCONST
, $1);}
2382 : Type3Opcode
{$$
= TrUpdateNode
(PARSEOP_QWORDCONST
, $1);}
2383 | Type2IntegerOpcode
{$$
= TrUpdateNode
(PARSEOP_QWORDCONST
, $1);}
2384 | ConstExprTerm
{$$
= TrUpdateNode
(PARSEOP_QWORDCONST
, $1);}
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 */
2397 : {$$
= TrCreateLeafNode
(PARSEOP_ONES
);} /* Placeholder is a OnesOp object */
2398 |
',' {$$
= TrCreateLeafNode
(PARSEOP_ONES
);} /* Placeholder is a OnesOp object */
2399 |
',' TermArg
{$$
= $2;}
2404 : PARSEOP_BUFFER
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_BUFFER
);}
2407 BufferTermData
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
2408 | PARSEOP_BUFFER
'('
2409 error ')' {$$
= AslDoError
(); yyclearin;}
2420 | ByteList
',' /* Allows a trailing comma at list end */
2422 ByteConstExpr
{$$
= TrLinkPeerNode
($1,$3);}
2428 | DWordList
',' /* Allows a trailing comma at list end */
2430 DWordConstExpr
{$$
= TrLinkPeerNode
($1,$3);}
2434 : PARSEOP_PACKAGE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_VAR_PACKAGE
);}
2435 VarPackageLengthTerm
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;}
2450 | PackageList
',' /* Allows a trailing comma at list end */
2452 PackageElement
{$$
= TrLinkPeerNode
($1,$3);}
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
));}
2486 : PARSEOP_UNICODE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_UNICODE
);}
2488 ')' {$$
= TrLinkChildren
($
<n
>3,2,0,$4);}
2489 | PARSEOP_UNICODE
'('
2490 error ')' {$$
= AslDoError
(); yyclearin;}
2496 ResourceMacroTerm
{$$
= TrLinkPeerNode
($1,$2);}
2502 | DWordMemoryTerm
{}
2504 | EndDependentFnTerm
{}
2506 | ExtendedMemoryTerm
{}
2507 | ExtendedSpaceTerm
{}
2514 | Memory32FixedTerm
{}
2517 | QWordMemoryTerm
{}
2520 | StartDependentFnTerm
{}
2521 | StartDependentFnNoPriTerm
{}
2523 | VendorShortTerm
{}
2524 | WordBusNumberTerm
{}
2530 : PARSEOP_DMA
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DMA
);}
2532 OptionalBusMasterKeyword
2534 OptionalNameString_Last
2536 ByteList
'}' {$$
= TrLinkChildren
($
<n
>3,5,$4,$5,$7,$8,$11);}
2538 error ')' {$$
= AslDoError
(); yyclearin;}
2542 : PARSEOP_DWORDIO
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DWORDIO
);}
2543 OptionalResourceType_First
2553 OptionalByteConstExpr
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;}
2564 : PARSEOP_DWORDMEMORY
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DWORDMEMORY
);}
2565 OptionalResourceType_First
2570 ',' OptionalReadWriteKeyword
2576 OptionalByteConstExpr
2579 OptionalAddressRange
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;}
2587 : PARSEOP_DWORDSPACE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DWORDSPACE
);}
2588 ByteConstExpr
{UtCheckIntegerRange
($4, 0xC0, 0xFF);}
2589 OptionalResourceType
2599 OptionalByteConstExpr
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;}
2609 : PARSEOP_ENDDEPENDENTFN
'('
2610 ')' {$$
= TrCreateLeafNode
(PARSEOP_ENDDEPENDENTFN
);}
2611 | PARSEOP_ENDDEPENDENTFN
'('
2612 error ')' {$$
= AslDoError
(); yyclearin;}
2616 : PARSEOP_EXTENDEDIO
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_EXTENDEDIO
);}
2617 OptionalResourceType_First
2627 OptionalQWordConstExpr
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;}
2637 : PARSEOP_EXTENDEDMEMORY
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_EXTENDEDMEMORY
);}
2638 OptionalResourceType_First
2643 ',' OptionalReadWriteKeyword
2649 OptionalQWordConstExpr
2651 OptionalAddressRange
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;}
2659 : PARSEOP_EXTENDEDSPACE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_EXTENDEDSPACE
);}
2660 ByteConstExpr
{UtCheckIntegerRange
($4, 0xC0, 0xFF);}
2661 OptionalResourceType
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;}
2679 : PARSEOP_FIXEDIO
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_FIXEDIO
);}
2682 OptionalNameString_Last
2683 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$6,$7);}
2684 | PARSEOP_FIXEDIO
'('
2685 error ')' {$$
= AslDoError
(); yyclearin;}
2689 : PARSEOP_INTERRUPT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_INTERRUPT
);}
2690 OptionalResourceType_First
2691 ',' InterruptTypeKeyword
2694 OptionalByteConstExpr
2696 OptionalNameString_Last
2698 DWordList
'}' {$$
= TrLinkChildren
($
<n
>3,8,$4,$6,$8,$9,$10,$11,$12,$15);}
2699 | PARSEOP_INTERRUPT
'('
2700 error ')' {$$
= AslDoError
(); yyclearin;}
2704 : PARSEOP_IO
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_IO
);}
2710 OptionalNameString_Last
2711 ')' {$$
= TrLinkChildren
($
<n
>3,6,$4,$6,$8,$10,$12,$13);}
2713 error ')' {$$
= AslDoError
(); yyclearin;}
2717 : PARSEOP_IRQNOFLAGS
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_IRQNOFLAGS
);}
2718 OptionalNameString_First
2720 ByteList
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
2721 | PARSEOP_IRQNOFLAGS
'('
2722 error ')' {$$
= AslDoError
(); yyclearin;}
2726 : PARSEOP_IRQ
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_IRQ
);}
2727 InterruptTypeKeyword
2730 OptionalNameString_Last
2732 ByteList
'}' {$$
= TrLinkChildren
($
<n
>3,5,$4,$6,$7,$8,$11);}
2734 error ')' {$$
= AslDoError
(); yyclearin;}
2738 : PARSEOP_MEMORY24
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_MEMORY24
);}
2739 OptionalReadWriteKeyword
2744 OptionalNameString_Last
2745 ')' {$$
= TrLinkChildren
($
<n
>3,6,$4,$6,$8,$10,$12,$13);}
2746 | PARSEOP_MEMORY24
'('
2747 error ')' {$$
= AslDoError
(); yyclearin;}
2751 : PARSEOP_MEMORY32FIXED
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_MEMORY32FIXED
);}
2752 OptionalReadWriteKeyword
2755 OptionalNameString_Last
2756 ')' {$$
= TrLinkChildren
($
<n
>3,4,$4,$6,$8,$9);}
2757 | PARSEOP_MEMORY32FIXED
'('
2758 error ')' {$$
= AslDoError
(); yyclearin;}
2762 : PARSEOP_MEMORY32
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_MEMORY32
);}
2763 OptionalReadWriteKeyword
2768 OptionalNameString_Last
2769 ')' {$$
= TrLinkChildren
($
<n
>3,6,$4,$6,$8,$10,$12,$13);}
2770 | PARSEOP_MEMORY32
'('
2771 error ')' {$$
= AslDoError
(); yyclearin;}
2775 : PARSEOP_QWORDIO
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_QWORDIO
);}
2776 OptionalResourceType_First
2786 OptionalByteConstExpr
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;}
2797 : PARSEOP_QWORDMEMORY
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_QWORDMEMORY
);}
2798 OptionalResourceType_First
2803 ',' OptionalReadWriteKeyword
2809 OptionalByteConstExpr
2812 OptionalAddressRange
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;}
2820 : PARSEOP_QWORDSPACE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_QWORDSPACE
);}
2821 ByteConstExpr
{UtCheckIntegerRange
($4, 0xC0, 0xFF);}
2822 OptionalResourceType
2832 OptionalByteConstExpr
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;}
2841 : PARSEOP_REGISTER
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_REGISTER
);}
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
);}
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
);}
2866 ResourceMacroList
'}' {$$
= TrLinkChildren
($
<n
>3,1,$6);}
2867 | PARSEOP_STARTDEPENDENTFN_NOPRI
'('
2868 error ')' {$$
= AslDoError
(); yyclearin;}
2872 : PARSEOP_VENDORLONG
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_VENDORLONG
);}
2873 OptionalNameString_First
2875 ByteList
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
2876 | PARSEOP_VENDORLONG
'('
2877 error ')' {$$
= AslDoError
(); yyclearin;}
2881 : PARSEOP_VENDORSHORT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_VENDORSHORT
);}
2882 OptionalNameString_First
2884 ByteList
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
2885 | PARSEOP_VENDORSHORT
'('
2886 error ')' {$$
= AslDoError
(); yyclearin;}
2890 : PARSEOP_WORDBUSNUMBER
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_WORDBUSNUMBER
);}
2891 OptionalResourceType_First
2900 OptionalByteConstExpr
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;}
2909 : PARSEOP_WORDIO
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_WORDIO
);}
2910 OptionalResourceType_First
2920 OptionalByteConstExpr
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;}
2931 : PARSEOP_WORDSPACE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_WORDSPACE
);}
2932 ByteConstExpr
{UtCheckIntegerRange
($4, 0xC0, 0xFF);}
2933 OptionalResourceType
2943 OptionalByteConstExpr
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 */
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");}
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
2985 |
',' ByteConstExpr
{$$
= $2;}
2986 |
',' AccessAttribKeyword
{$$
= $2;}
2990 : {$$
= TrCreateValuedLeafNode
(PARSEOP_BYTECONST
, 0);}
2991 |
',' {$$
= TrCreateValuedLeafNode
(PARSEOP_BYTECONST
, 0);}
2992 |
',' ByteConstExpr
{$$
= $2;}
2995 OptionalAddressRange
2998 |
',' AddressKeyword
{$$
= $2;}
3001 OptionalByteConstExpr
3004 |
',' ByteConstExpr
{$$
= $2;}
3009 |
',' DecodeKeyword
{$$
= $2;}
3012 OptionalDWordConstExpr
3015 |
',' DWordConstExpr
{$$
= $2;}
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;}
3026 |
',' MaxKeyword
{$$
= $2;}
3031 |
',' MemTypeKeyword
{$$
= $2;}
3036 |
',' MinKeyword
{$$
= $2;}
3042 |
',' NameString
{$$
= $2;}
3045 OptionalNameString_Last
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
3064 |
',' QWordConstExpr
{$$
= $2;}
3069 |
',' RangeTypeKeyword
{$$
= $2;}
3073 : {$$
= TrCreateLeafNode
(PARSEOP_ZERO
);} /* Placeholder is a ZeroOp object */
3074 |
',' {$$
= TrCreateLeafNode
(PARSEOP_ZERO
);} /* Placeholder is a ZeroOp object */
3075 |
',' TermArg
{$$
= $2;}
3078 OptionalResourceType_First
3080 | ResourceTypeKeyword
{$$
= $1;}
3083 OptionalResourceType
3085 |
',' ResourceTypeKeyword
{$$
= $2;}
3088 OptionalSerializeRuleKeyword
3091 |
',' SerializeRuleKeyword
{$$
= $2;}
3097 |
',' ShareTypeKeyword
{$$
= $2;}
3103 |
',' StringData
{$$
= $2;}
3108 | TermArg
{$$
= $1;}
3112 : {$$
= TrCreateLeafNode
(PARSEOP_ZERO
);} /* Placeholder is a ZeroOp object */
3113 | TermArg
{$$
= $1;}
3119 |
',' TypeKeyword
{$$
= $2;}
3125 |
',' TypeKeyword
{$$
= $2;}
3128 OptionalTranslationType_Last
3131 |
',' TranslationKeyword
{$$
= $2;}
3136 : ',' TermArg
{$$
= $2;}
3137 |
',' error {$$
= AslDoError
(); yyclearin;}
3141 : ',' NameString
{$$
= $2;}
3142 |
',' error {$$
= AslDoError
(); yyclearin;}
3150 * Local support functions
3154 AslCompilerwrap
(void)
3159 /*! [End] no source code translation !*/
3162 AslLocalAllocate
(unsigned int Size
)
3167 DbgPrint
(ASL_PARSE_OUTPUT
, "\nAslLocalAllocate: Expanding Stack to %d\n\n", Size
);
3169 Mem
= ACPI_ALLOCATE_ZEROED
(Size
);
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
);
3187 return
(TrCreateLeafNode
(PARSEOP_ERRORNODE
));