3 /******************************************************************************
5 * Module Name: aslcompiler.y - Bison input file (ASL grammar and actions)
8 *****************************************************************************/
10 /******************************************************************************
14 * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
15 * All rights reserved.
19 * 2.1. This is your license from Intel Corp. under its intellectual property
20 * rights. You may have additional license terms from the party that provided
21 * you this software, covering your right to use that party's intellectual
24 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
25 * copy of the source code appearing in this file ("Covered Code") an
26 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
27 * base code distributed originally by Intel ("Original Intel Code") to copy,
28 * make derivatives, distribute, use and display any portion of the Covered
29 * Code in any form, with the right to sublicense such rights; and
31 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
32 * license (with the right to sublicense), under only those claims of Intel
33 * patents that are infringed by the Original Intel Code, to make, use, sell,
34 * offer to sell, and import the Covered Code and derivative works thereof
35 * solely to the minimum extent necessary to exercise the above copyright
36 * license, and in no event shall the patent license extend to any additions
37 * to or modifications of the Original Intel Code. No other license or right
38 * is granted directly or by implication, estoppel or otherwise;
40 * The above copyright and patent license is granted only if the following
45 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
46 * Redistribution of source code of any substantial portion of the Covered
47 * Code or modification with rights to further distribute source must include
48 * the above Copyright Notice, the above License, this list of Conditions,
49 * and the following Disclaimer and Export Compliance provision. In addition,
50 * Licensee must cause all Covered Code to which Licensee contributes to
51 * contain a file documenting the changes Licensee made to create that Covered
52 * Code and the date of any change. Licensee must include in that file the
53 * documentation of any changes made by any predecessor Licensee. Licensee
54 * must include a prominent statement that the modification is derived,
55 * directly or indirectly, from Original Intel Code.
57 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
58 * Redistribution of source code of any substantial portion of the Covered
59 * Code or modification without rights to further distribute source must
60 * include the following Disclaimer and Export Compliance provision in the
61 * documentation and/or other materials provided with distribution. In
62 * addition, Licensee may not authorize further sublicense of source of any
63 * portion of the Covered Code, and must include terms to the effect that the
64 * license from Licensee to its licensee is limited to the intellectual
65 * property embodied in the software Licensee provides to its licensee, and
66 * not to intellectual property embodied in modifications its licensee may
69 * 3.3. Redistribution of Executable. Redistribution in executable form of any
70 * substantial portion of the Covered Code or modification must reproduce the
71 * above Copyright Notice, and the following Disclaimer and Export Compliance
72 * provision in the documentation and/or other materials provided with the
75 * 3.4. Intel retains all right, title, and interest in and to the Original
78 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
79 * Intel shall be used in advertising or otherwise to promote the sale, use or
80 * other dealings in products derived from or relating to the Covered Code
81 * without prior written authorization from Intel.
83 * 4. Disclaimer and Export Compliance
85 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
86 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
87 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
88 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
89 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
90 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
93 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
94 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
95 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
96 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
97 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
98 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
99 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
102 * 4.3. Licensee shall not export, either directly or indirectly, any of this
103 * software or system incorporating such software without first obtaining any
104 * required license or other approval from the U. S. Department of Commerce or
105 * any other agency or department of the United States Government. In the
106 * event Licensee exports any such software from the United States or
107 * re-exports any such software from a foreign destination, Licensee shall
108 * ensure that the distribution and export/re-export of the software is in
109 * compliance with all laws, regulations, orders, or other restrictions of the
110 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
111 * any of its subsidiaries will export/re-export any technical data, process,
112 * software, or service, directly or indirectly, to any country for which the
113 * United States government or any agency thereof requires an export license,
114 * other governmental approval, or letter of assurance, without first obtaining
115 * such license, approval or letter.
117 *****************************************************************************/
120 #define YYERROR_VERBOSE 1
123 * State stack - compiler will fault if it overflows. (Default was 200)
125 #define YYINITDEPTH 600
127 #include "aslcompiler.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 zer0
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_MEM
404 %token
<i
> PARSEOP_REGIONSPACE_PCI
405 %token
<i
> PARSEOP_REGIONSPACE_PCIBAR
406 %token
<i
> PARSEOP_REGIONSPACE_SMBUS
407 %token
<i
> PARSEOP_REGISTER
408 %token
<i
> PARSEOP_RELEASE
409 %token
<i
> PARSEOP_RESERVED_BYTES
410 %token
<i
> PARSEOP_RESET
411 %token
<i
> PARSEOP_RESOURCETEMPLATE
412 %token
<i
> PARSEOP_RESOURCETYPE_CONSUMER
413 %token
<i
> PARSEOP_RESOURCETYPE_PRODUCER
414 %token
<i
> PARSEOP_RETURN
415 %token
<i
> PARSEOP_REVISION
416 %token
<i
> PARSEOP_SCOPE
417 %token
<i
> PARSEOP_SERIALIZERULE_NOTSERIAL
418 %token
<i
> PARSEOP_SERIALIZERULE_SERIAL
419 %token
<i
> PARSEOP_SHARETYPE_EXCLUSIVE
420 %token
<i
> PARSEOP_SHARETYPE_SHARED
421 %token
<i
> PARSEOP_SHIFTLEFT
422 %token
<i
> PARSEOP_SHIFTRIGHT
423 %token
<i
> PARSEOP_SIGNAL
424 %token
<i
> PARSEOP_SIZEOF
425 %token
<i
> PARSEOP_SLEEP
426 %token
<i
> PARSEOP_STALL
427 %token
<i
> PARSEOP_STARTDEPENDENTFN
428 %token
<i
> PARSEOP_STARTDEPENDENTFN_NOPRI
429 %token
<i
> PARSEOP_STORE
430 %token
<s
> PARSEOP_STRING_LITERAL
431 %token
<i
> PARSEOP_SUBTRACT
432 %token
<i
> PARSEOP_SWITCH
433 %token
<i
> PARSEOP_THERMALZONE
434 %token
<i
> PARSEOP_TIMER
435 %token
<i
> PARSEOP_TOBCD
436 %token
<i
> PARSEOP_TOBUFFER
437 %token
<i
> PARSEOP_TODECIMALSTRING
438 %token
<i
> PARSEOP_TOHEXSTRING
439 %token
<i
> PARSEOP_TOINTEGER
440 %token
<i
> PARSEOP_TOSTRING
441 %token
<i
> PARSEOP_TOUUID
442 %token
<i
> PARSEOP_TRANSLATIONTYPE_DENSE
443 %token
<i
> PARSEOP_TRANSLATIONTYPE_SPARSE
444 %token
<i
> PARSEOP_TYPE_STATIC
445 %token
<i
> PARSEOP_TYPE_TRANSLATION
446 %token
<i
> PARSEOP_UNICODE
447 %token
<i
> PARSEOP_UNLOAD
448 %token
<i
> PARSEOP_UPDATERULE_ONES
449 %token
<i
> PARSEOP_UPDATERULE_PRESERVE
450 %token
<i
> PARSEOP_UPDATERULE_ZEROS
451 %token
<i
> PARSEOP_VAR_PACKAGE
452 %token
<i
> PARSEOP_VENDORLONG
453 %token
<i
> PARSEOP_VENDORSHORT
454 %token
<i
> PARSEOP_WAIT
455 %token
<i
> PARSEOP_WHILE
456 %token
<i
> PARSEOP_WORDBUSNUMBER
457 %token
<i
> PARSEOP_WORDCONST
458 %token
<i
> PARSEOP_WORDIO
459 %token
<i
> PARSEOP_WORDSPACE
460 %token
<i
> PARSEOP_XFERTYPE_8
461 %token
<i
> PARSEOP_XFERTYPE_8_16
462 %token
<i
> PARSEOP_XFERTYPE_16
463 %token
<i
> PARSEOP_XOR
464 %token
<i
> PARSEOP_ZERO
472 %type
<n
> DefinitionBlockTerm
475 %type
<n
> CompilerDirective
480 %type
<n
> PackageData
481 %type
<n
> IntegerData
483 %type
<n
> NamedObject
484 %type
<n
> NameSpaceModifier
489 %type
<n
> RequiredTarget
490 %type
<n
> SimpleTarget
491 %type
<n
> BufferTermData
492 %type
<n
> ParameterTypePackage
493 %type
<n
> ParameterTypePackageList
494 %type
<n
> ParameterTypesPackage
495 %type
<n
> ParameterTypesPackageList
497 %type
<n
> Type1Opcode
498 %type
<n
> Type2Opcode
499 %type
<n
> Type2IntegerOpcode
500 %type
<n
> Type2StringOpcode
501 %type
<n
> Type2BufferOpcode
502 %type
<n
> Type2BufferOrStringOpcode
503 %type
<n
> Type3Opcode
505 /* Obsolete %type <n> Type4Opcode */
507 %type
<n
> Type5Opcode
508 %type
<n
> Type6Opcode
511 %type
<n
> IncludeTerm
512 %type
<n
> IncludeCStyleTerm
513 %type
<n
> ExternalTerm
515 %type
<n
> FieldUnitList
517 %type
<n
> FieldUnitEntry
520 %type
<n
> AccessAsTerm
521 %type
<n
> OptionalAccessAttribTerm
526 %type
<n
> BankFieldTerm
527 %type
<n
> CreateBitFieldTerm
528 %type
<n
> CreateByteFieldTerm
529 %type
<n
> CreateDWordFieldTerm
530 %type
<n
> CreateFieldTerm
531 %type
<n
> CreateQWordFieldTerm
532 %type
<n
> CreateWordFieldTerm
533 %type
<n
> DataRegionTerm
537 %type
<n
> FunctionTerm
538 %type
<n
> IndexFieldTerm
541 %type
<n
> OpRegionTerm
542 %type
<n
> OpRegionSpaceIdTerm
543 %type
<n
> PowerResTerm
544 %type
<n
> ProcessorTerm
545 %type
<n
> ThermalZoneTerm
548 /* Namespace modifiers */
557 %type
<n
> BreakPointTerm
558 %type
<n
> ContinueTerm
566 %type
<n
> ReleaseTerm
573 %type
<n
> CaseDefaultTermList
574 //%type <n> CaseTermList
576 %type
<n
> DefaultTerm
582 %type
<n
> AcquireTerm
586 %type
<n
> ConcatResTerm
587 %type
<n
> CondRefOfTerm
588 %type
<n
> CopyObjectTerm
590 %type
<n
> DerefOfTerm
592 %type
<n
> FindSetLeftBitTerm
593 %type
<n
> FindSetRightBitTerm
594 %type
<n
> FromBCDTerm
599 %type
<n
> LGreaterTerm
600 %type
<n
> LGreaterEqualTerm
602 %type
<n
> LLessEqualTerm
604 %type
<n
> LNotEqualTerm
605 %type
<n
> LoadTableTerm
610 %type
<n
> MultiplyTerm
614 %type
<n
> ObjectTypeTerm
617 %type
<n
> ShiftLeftTerm
618 %type
<n
> ShiftRightTerm
621 %type
<n
> SubtractTerm
624 %type
<n
> ToBufferTerm
625 %type
<n
> ToDecimalStringTerm
626 %type
<n
> ToHexStringTerm
627 %type
<n
> ToIntegerTerm
628 %type
<n
> ToStringTerm
632 %type
<n
> OptionalTermArg
633 %type
<n
> OptionalReturnArg
634 %type
<n
> OptionalListString
639 %type
<n
> ObjectTypeKeyword
640 %type
<n
> AccessTypeKeyword
641 %type
<n
> AccessAttribKeyword
642 %type
<n
> LockRuleKeyword
643 %type
<n
> UpdateRuleKeyword
644 %type
<n
> RegionSpaceKeyword
645 %type
<n
> AddressSpaceKeyword
646 %type
<n
> MatchOpKeyword
647 %type
<n
> SerializeRuleKeyword
648 %type
<n
> DMATypeKeyword
649 %type
<n
> OptionalBusMasterKeyword
650 %type
<n
> XferTypeKeyword
651 %type
<n
> ResourceTypeKeyword
654 %type
<n
> DecodeKeyword
655 %type
<n
> RangeTypeKeyword
656 %type
<n
> MemTypeKeyword
657 %type
<n
> OptionalReadWriteKeyword
658 %type
<n
> InterruptTypeKeyword
659 %type
<n
> InterruptLevel
660 %type
<n
> ShareTypeKeyword
661 %type
<n
> IODecodeKeyword
662 %type
<n
> TypeKeyword
663 %type
<n
> TranslationKeyword
664 %type
<n
> AddressKeyword
681 %type
<n
> ByteConstExpr
682 %type
<n
> WordConstExpr
683 %type
<n
> DWordConstExpr
684 %type
<n
> QWordConstExpr
685 %type
<n
> ConstExprTerm
691 %type
<n
> PackageTerm
692 %type
<n
> PackageList
693 %type
<n
> PackageElement
695 %type
<n
> VarPackageLengthTerm
700 %type
<n
> ResourceTemplateTerm
702 %type
<n
> UnicodeTerm
703 %type
<n
> ResourceMacroList
704 %type
<n
> ResourceMacroTerm
707 %type
<n
> DWordIOTerm
708 %type
<n
> DWordMemoryTerm
709 %type
<n
> DWordSpaceTerm
710 %type
<n
> EndDependentFnTerm
711 %type
<n
> ExtendedIOTerm
712 %type
<n
> ExtendedMemoryTerm
713 %type
<n
> ExtendedSpaceTerm
714 %type
<n
> FixedIOTerm
715 %type
<n
> InterruptTerm
717 %type
<n
> IRQNoFlagsTerm
719 %type
<n
> Memory24Term
720 %type
<n
> Memory32FixedTerm
721 %type
<n
> Memory32Term
722 %type
<n
> QWordIOTerm
723 %type
<n
> QWordMemoryTerm
724 %type
<n
> QWordSpaceTerm
725 %type
<n
> RegisterTerm
726 %type
<n
> StartDependentFnTerm
727 %type
<n
> StartDependentFnNoPriTerm
728 %type
<n
> VendorLongTerm
729 %type
<n
> VendorShortTerm
730 %type
<n
> WordBusNumberTerm
732 %type
<n
> WordSpaceTerm
738 /* Local types that help construct the AML, not in ACPI spec */
740 %type
<n
> IncludeEndTerm
741 %type
<n
> AmlPackageLengthTerm
742 %type
<n
> OptionalByteConstExpr
743 %type
<n
> OptionalDWordConstExpr
744 %type
<n
> OptionalQWordConstExpr
745 %type
<n
> OptionalSerializeRuleKeyword
746 %type
<n
> OptionalResourceType_First
747 %type
<n
> OptionalResourceType
748 %type
<n
> OptionalMinType
749 %type
<n
> OptionalMaxType
750 %type
<n
> OptionalMemType
751 %type
<n
> OptionalCount
752 %type
<n
> OptionalDecodeType
753 %type
<n
> OptionalRangeType
754 %type
<n
> OptionalShareType
755 %type
<n
> OptionalType
756 %type
<n
> OptionalType_Last
757 %type
<n
> OptionalTranslationType_Last
758 %type
<n
> OptionalStringData
759 %type
<n
> OptionalNameString
760 %type
<n
> OptionalNameString_First
761 %type
<n
> OptionalNameString_Last
762 %type
<n
> OptionalAddressRange
763 %type
<n
> OptionalObjectTypeKeyword
764 %type
<n
> OptionalParameterTypePackage
765 %type
<n
> OptionalParameterTypesPackage
766 %type
<n
> OptionalReference
767 %type
<n
> OptionalAccessSize
770 %type
<n
> TermArgItem
771 %type
<n
> NameStringItem
776 /*******************************************************************************
778 * Production rules start here
780 ******************************************************************************/
788 * Blocks, Data, and Opcodes
792 : DefinitionBlockTerm
793 |
error {YYABORT; $$
= NULL
;}
797 : PARSEOP_DEFINITIONBLOCK
'(' {$$
= TrCreateLeafNode
(PARSEOP_DEFINITIONBLOCK
);}
804 ')' {TrSetEndLineNumber
($
<n
>3);}
805 '{' TermList
'}' {$$
= TrLinkChildren
($
<n
>3,7,$4,$6,$8,$10,$12,$14,$18);}
808 /* ACPI 3.0 -- allow semicolons between terms */
812 | TermList Term
{$$
= TrLinkPeerNode
(TrSetNodeFlags
($1, NODE_RESULT_NOT_USED
),$2);}
813 | TermList
';' Term
{$$
= TrLinkPeerNode
(TrSetNodeFlags
($1, NODE_RESULT_NOT_USED
),$3);}
820 | Type2IntegerOpcode
{}
821 | Type2StringOpcode
{}
822 | Type2BufferOpcode
{}
823 | Type2BufferOrStringOpcode
{}
824 |
error {$$
= AslDoError
(); yyclearin;}
829 | IncludeCStyleTerm
{$$
= NULL
;}
830 | LineTerm
{$$
= NULL
;}
836 | ObjectList Object
{$$
= TrLinkPeerNode
($1,$2);}
837 |
error {$$
= AslDoError
(); yyclearin;}
841 : CompilerDirective
{}
843 | NameSpaceModifier
{}
854 : Type5Opcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
);}
855 | Type2BufferOrStringOpcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
);}
856 | Type2BufferOpcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
);}
865 : Type2IntegerOpcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
);}
866 | Type3Opcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
);}
872 : Type2StringOpcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
);}
878 | CreateBitFieldTerm
{}
879 | CreateByteFieldTerm
{}
880 | CreateDWordFieldTerm
{}
882 | CreateQWordFieldTerm
{}
883 | CreateWordFieldTerm
{}
905 : NameString
'(' {TrUpdateNode
(PARSEOP_METHODCALL
, $1);}
906 ArgList
')' {$$
= TrLinkChildNode
($1,$4);}
912 | ArgList
',' /* Allows a trailing comma at list end */
914 TermArg
{$$
= TrLinkPeerNode
($1,$3);}
918 Removed from TermArg due to reduce/reduce conflicts
919 | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
920 | Type2StringOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
921 | Type2BufferOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
922 | Type2BufferOrStringOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
927 : Type2Opcode
{$$
= TrSetNodeFlags
($1, NODE_IS_TERM_ARG
);}
928 | DataObject
{$$
= TrSetNodeFlags
($1, NODE_IS_TERM_ARG
);}
929 | NameString
{$$
= TrSetNodeFlags
($1, NODE_IS_TERM_ARG
);}
930 | ArgTerm
{$$
= TrSetNodeFlags
($1, NODE_IS_TERM_ARG
);}
931 | LocalTerm
{$$
= TrSetNodeFlags
($1, NODE_IS_TERM_ARG
);}
935 : {$$
= TrSetNodeFlags
(TrCreateLeafNode
(PARSEOP_ZERO
), NODE_IS_TARGET | NODE_COMPILE_TIME_CONST
);} /* Placeholder is a ZeroOp object */
936 |
',' {$$
= TrSetNodeFlags
(TrCreateLeafNode
(PARSEOP_ZERO
), NODE_IS_TARGET | NODE_COMPILE_TIME_CONST
);} /* Placeholder is a ZeroOp object */
937 |
',' SuperName
{$$
= TrSetNodeFlags
($2, NODE_IS_TARGET
);}
941 : ',' SuperName
{$$
= TrSetNodeFlags
($2, NODE_IS_TARGET
);}
950 /* Rules for specifying the type of one method argument or return value */
954 | ObjectTypeKeyword
{$$
= $1;}
955 | ParameterTypePackage
','
956 ObjectTypeKeyword
{$$
= TrLinkPeerNodes
(2,$1,$3);}
959 ParameterTypePackageList
961 | ObjectTypeKeyword
{$$
= $1;}
962 |
'{' ParameterTypePackage
'}' {$$
= $2;}
965 OptionalParameterTypePackage
966 : {$$
= TrCreateLeafNode
(PARSEOP_DEFAULT_ARG
);}
967 |
',' ParameterTypePackageList
{$$
= TrLinkChildren
(TrCreateLeafNode
(PARSEOP_DEFAULT_ARG
),1,$2);}
970 /* Rules for specifying the types for method arguments */
972 ParameterTypesPackage
973 : ParameterTypePackageList
{$$
= $1;}
974 | ParameterTypesPackage
','
975 ParameterTypePackageList
{$$
= TrLinkPeerNodes
(2,$1,$3);}
978 ParameterTypesPackageList
980 | ObjectTypeKeyword
{$$
= $1;}
981 |
'{' ParameterTypesPackage
'}' {$$
= $2;}
984 OptionalParameterTypesPackage
985 : {$$
= TrCreateLeafNode
(PARSEOP_DEFAULT_ARG
);}
986 |
',' ParameterTypesPackageList
{$$
= TrLinkChildren
(TrCreateLeafNode
(PARSEOP_DEFAULT_ARG
),1,$2);}
1027 * Type 3/4/5 opcodes
1030 Type2IntegerOpcode
/* "Type3" opcodes */
1035 | FindSetLeftBitTerm
{}
1036 | FindSetRightBitTerm
{}
1043 | LGreaterEqualTerm
{}
1065 Type2StringOpcode
/* "Type4" Opcodes */
1066 : ToDecimalStringTerm
{}
1067 | ToHexStringTerm
{}
1071 Type2BufferOpcode
/* "Type5" Opcodes */
1076 Type2BufferOrStringOpcode
1082 * A type 3 opcode evaluates to an Integer and cannot have a destination operand
1092 | ToDecimalStringTerm {}
1093 | ToHexStringTerm {}
1101 : ResourceTemplateTerm
{}
1114 : PARSEOP_INCLUDE
'(' {$$
= TrCreateLeafNode
(PARSEOP_INCLUDE
);}
1115 String
')' {$$
= TrLinkChildren
($
<n
>3,1,$4);FlOpenIncludeFile
($4);}
1117 IncludeEndTerm
{$$
= TrLinkPeerNodes
(3,$
<n
>3,$7,$8);}
1121 : PARSEOP_INCLUDE_END
{$$
= TrCreateLeafNode
(PARSEOP_INCLUDE_END
);}
1125 : PARSEOP_INCLUDE_CSTYLE
1126 String
{FlOpenIncludeFile
($2);}
1130 : PARSEOP_LINE_CSTYLE
1131 Integer
{FlSetLineNumber
($2);}
1135 : PARSEOP_EXTERNAL
'('
1137 OptionalObjectTypeKeyword
1138 OptionalParameterTypePackage
1139 OptionalParameterTypesPackage
1140 ')' {$$
= TrCreateNode
(PARSEOP_EXTERNAL
,4,$3,$4,$5,$6);}
1141 | PARSEOP_EXTERNAL
'('
1142 error ')' {$$
= AslDoError
(); yyclearin;}
1146 /******* Named Objects *******************************************************/
1150 : PARSEOP_BANKFIELD
'(' {$$
= TrCreateLeafNode
(PARSEOP_BANKFIELD
);}
1154 ',' AccessTypeKeyword
1156 ',' UpdateRuleKeyword
1158 FieldUnitList
'}' {$$
= TrLinkChildren
($
<n
>3,7,$4,$5,$6,$8,$10,$12,$15);}
1159 | PARSEOP_BANKFIELD
'('
1160 error ')' '{' error '}' {$$
= AslDoError
(); yyclearin;}
1166 | FieldUnitList
',' /* Allows a trailing comma at list end */
1168 FieldUnit
{$$
= TrLinkPeerNode
($1,$3);}
1178 : ',' AmlPackageLengthTerm
{$$
= TrCreateNode
(PARSEOP_RESERVED_BYTES
,1,$2);}
1180 AmlPackageLengthTerm
{$$
= TrLinkChildNode
($1,$3);}
1184 : PARSEOP_OFFSET
'('
1185 AmlPackageLengthTerm
1186 ')' {$$
= TrCreateNode
(PARSEOP_OFFSET
,1,$3);}
1187 | PARSEOP_OFFSET
'('
1188 error ')' {$$
= AslDoError
(); yyclearin;}
1192 : PARSEOP_ACCESSAS
'('
1194 OptionalAccessAttribTerm
1195 ')' {$$
= TrCreateNode
(PARSEOP_ACCESSAS
,2,$3,$4);}
1196 | PARSEOP_ACCESSAS
'('
1197 error ')' {$$
= AslDoError
(); yyclearin;}
1201 : PARSEOP_CREATEBITFIELD
'(' {$$
= TrCreateLeafNode
(PARSEOP_CREATEBITFIELD
);}
1205 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,TrSetNodeFlags
($6, NODE_IS_NAME_DECLARATION
));}
1206 | PARSEOP_CREATEBITFIELD
'('
1207 error ')' {$$
= AslDoError
(); yyclearin;}
1211 : PARSEOP_CREATEBYTEFIELD
'(' {$$
= TrCreateLeafNode
(PARSEOP_CREATEBYTEFIELD
);}
1215 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,TrSetNodeFlags
($6, NODE_IS_NAME_DECLARATION
));}
1216 | PARSEOP_CREATEBYTEFIELD
'('
1217 error ')' {$$
= AslDoError
(); yyclearin;}
1220 CreateDWordFieldTerm
1221 : PARSEOP_CREATEDWORDFIELD
'(' {$$
= TrCreateLeafNode
(PARSEOP_CREATEDWORDFIELD
);}
1225 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,TrSetNodeFlags
($6, NODE_IS_NAME_DECLARATION
));}
1226 | PARSEOP_CREATEDWORDFIELD
'('
1227 error ')' {$$
= AslDoError
(); yyclearin;}
1231 : PARSEOP_CREATEFIELD
'(' {$$
= TrCreateLeafNode
(PARSEOP_CREATEFIELD
);}
1236 ')' {$$
= TrLinkChildren
($
<n
>3,4,$4,$5,$6,TrSetNodeFlags
($7, NODE_IS_NAME_DECLARATION
));}
1237 | PARSEOP_CREATEFIELD
'('
1238 error ')' {$$
= AslDoError
(); yyclearin;}
1241 CreateQWordFieldTerm
1242 : PARSEOP_CREATEQWORDFIELD
'(' {$$
= TrCreateLeafNode
(PARSEOP_CREATEQWORDFIELD
);}
1246 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,TrSetNodeFlags
($6, NODE_IS_NAME_DECLARATION
));}
1247 | PARSEOP_CREATEQWORDFIELD
'('
1248 error ')' {$$
= AslDoError
(); yyclearin;}
1252 : PARSEOP_CREATEWORDFIELD
'(' {$$
= TrCreateLeafNode
(PARSEOP_CREATEWORDFIELD
);}
1256 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,TrSetNodeFlags
($6, NODE_IS_NAME_DECLARATION
));}
1257 | PARSEOP_CREATEWORDFIELD
'('
1258 error ')' {$$
= AslDoError
(); yyclearin;}
1262 : PARSEOP_DATATABLEREGION
'(' {$$
= TrCreateLeafNode
(PARSEOP_DATATABLEREGION
);}
1267 ')' {$$
= TrLinkChildren
($
<n
>3,4,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$5,$6,$7);}
1268 | PARSEOP_DATATABLEREGION
'('
1269 error ')' {$$
= AslDoError
(); yyclearin;}
1273 : PARSEOP_DEVICE
'(' {$$
= TrCreateLeafNode
(PARSEOP_DEVICE
);}
1276 ObjectList
'}' {$$
= TrLinkChildren
($
<n
>3,2,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$7);}
1277 | PARSEOP_DEVICE
'('
1278 error ')' {$$
= AslDoError
(); yyclearin;}
1282 : PARSEOP_EVENT
'(' {$$
= TrCreateLeafNode
(PARSEOP_EVENT
);}
1284 ')' {$$
= TrLinkChildren
($
<n
>3,1,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
));}
1286 error ')' {$$
= AslDoError
(); yyclearin;}
1290 : PARSEOP_FIELD
'(' {$$
= TrCreateLeafNode
(PARSEOP_FIELD
);}
1292 ',' AccessTypeKeyword
1294 ',' UpdateRuleKeyword
1296 FieldUnitList
'}' {$$
= TrLinkChildren
($
<n
>3,5,$4,$6,$8,$10,$13);}
1298 error ')' '{' error '}' {$$
= AslDoError
(); yyclearin;}
1302 : PARSEOP_FUNCTION
'(' {$$
= TrCreateLeafNode
(PARSEOP_METHOD
);}
1304 OptionalParameterTypePackage
1305 OptionalParameterTypesPackage
1307 TermList
'}' {$$
= TrLinkChildren
($
<n
>3,7,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),
1308 TrCreateValuedLeafNode
(PARSEOP_BYTECONST
, 0),
1309 TrCreateLeafNode
(PARSEOP_SERIALIZERULE_NOTSERIAL
),
1310 TrCreateValuedLeafNode
(PARSEOP_BYTECONST
, 0),$5,$6,$9);}
1311 | PARSEOP_FUNCTION
'('
1312 error ')' {$$
= AslDoError
(); yyclearin;}
1316 : PARSEOP_INDEXFIELD
'(' {$$
= TrCreateLeafNode
(PARSEOP_INDEXFIELD
);}
1319 ',' AccessTypeKeyword
1321 ',' UpdateRuleKeyword
1323 FieldUnitList
'}' {$$
= TrLinkChildren
($
<n
>3,6,$4,$5,$7,$9,$11,$14);}
1324 | PARSEOP_INDEXFIELD
'('
1325 error ')' '{' error '}' {$$
= AslDoError
(); yyclearin;}
1329 : PARSEOP_METHOD
'(' {$$
= TrCreateLeafNode
(PARSEOP_METHOD
);}
1331 OptionalByteConstExpr
{$$
= UtCheckIntegerRange
($5, 0, 7);}
1332 OptionalSerializeRuleKeyword
1333 OptionalByteConstExpr
1334 OptionalParameterTypePackage
1335 OptionalParameterTypesPackage
1337 TermList
'}' {$$
= TrLinkChildren
($
<n
>3,7,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$5,$7,$8,$9,$10,$13);}
1338 | PARSEOP_METHOD
'('
1339 error ')' {$$
= AslDoError
(); yyclearin;}
1343 : PARSEOP_MUTEX
'(' {$$
= TrCreateLeafNode
(PARSEOP_MUTEX
);}
1346 ')' {$$
= TrLinkChildren
($
<n
>3,2,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$6);}
1348 error ')' {$$
= AslDoError
(); yyclearin;}
1352 : PARSEOP_OPERATIONREGION
'(' {$$
= TrCreateLeafNode
(PARSEOP_OPERATIONREGION
);}
1354 ',' OpRegionSpaceIdTerm
1357 ')' {$$
= TrLinkChildren
($
<n
>3,4,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$6,$7,$8);}
1358 | PARSEOP_OPERATIONREGION
'('
1359 error ')' {$$
= AslDoError
(); yyclearin;}
1363 : RegionSpaceKeyword
{}
1364 | ByteConst
{$$
= UtCheckIntegerRange
($1, 0x80, 0xFF);}
1368 : PARSEOP_POWERRESOURCE
'(' {$$
= TrCreateLeafNode
(PARSEOP_POWERRESOURCE
);}
1373 ObjectList
'}' {$$
= TrLinkChildren
($
<n
>3,4,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$6,$8,$11);}
1374 | PARSEOP_POWERRESOURCE
'('
1375 error ')' {$$
= AslDoError
(); yyclearin;}
1379 : PARSEOP_PROCESSOR
'(' {$$
= TrCreateLeafNode
(PARSEOP_PROCESSOR
);}
1382 OptionalDWordConstExpr
1383 OptionalByteConstExpr
1385 ObjectList
'}' {$$
= TrLinkChildren
($
<n
>3,5,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$6,$7,$8,$11);}
1386 | PARSEOP_PROCESSOR
'('
1387 error ')' {$$
= AslDoError
(); yyclearin;}
1391 : PARSEOP_THERMALZONE
'(' {$$
= TrCreateLeafNode
(PARSEOP_THERMALZONE
);}
1394 ObjectList
'}' {$$
= TrLinkChildren
($
<n
>3,2,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$7);}
1395 | PARSEOP_THERMALZONE
'('
1396 error ')' {$$
= AslDoError
(); yyclearin;}
1400 /******* Namespace modifiers *************************************************/
1404 : PARSEOP_ALIAS
'(' {$$
= TrCreateLeafNode
(PARSEOP_ALIAS
);}
1407 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,TrSetNodeFlags
($5, NODE_IS_NAME_DECLARATION
));}
1409 error ')' {$$
= AslDoError
(); yyclearin;}
1413 : PARSEOP_NAME
'(' {$$
= TrCreateLeafNode
(PARSEOP_NAME
);}
1416 ')' {$$
= TrLinkChildren
($
<n
>3,2,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$6);}
1418 error ')' {$$
= AslDoError
(); yyclearin;}
1422 : PARSEOP_SCOPE
'(' {$$
= TrCreateLeafNode
(PARSEOP_SCOPE
);}
1425 ObjectList
'}' {$$
= TrLinkChildren
($
<n
>3,2,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$7);}
1427 error ')' {$$
= AslDoError
(); yyclearin;}
1431 /******* Type 1 opcodes *******************************************************/
1435 : PARSEOP_BREAK
{$$
= TrCreateNode
(PARSEOP_BREAK
, 0);}
1439 : PARSEOP_BREAKPOINT
{$$
= TrCreateNode
(PARSEOP_BREAKPOINT
, 0);}
1443 : PARSEOP_CONTINUE
{$$
= TrCreateNode
(PARSEOP_CONTINUE
, 0);}
1447 : PARSEOP_FATAL
'(' {$$
= TrCreateLeafNode
(PARSEOP_FATAL
);}
1451 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$6,$7);}
1453 error ')' {$$
= AslDoError
(); yyclearin;}
1457 : IfTerm ElseTerm
{$$
= TrLinkPeerNode
($1,$2);}
1461 : PARSEOP_IF
'(' {$$
= TrCreateLeafNode
(PARSEOP_IF
);}
1464 TermList
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
1467 error ')' {$$
= AslDoError
(); yyclearin;}
1472 | PARSEOP_ELSE
'{' {$$
= TrCreateLeafNode
(PARSEOP_ELSE
);}
1473 TermList
'}' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1476 error '}' {$$
= AslDoError
(); yyclearin;}
1479 error {$$
= AslDoError
(); yyclearin;}
1481 | PARSEOP_ELSEIF
'(' {$$
= TrCreateLeafNode
(PARSEOP_ELSE
);}
1482 TermArg
{$$
= TrCreateLeafNode
(PARSEOP_IF
);}
1484 TermList
'}' {$$
= TrLinkChildren
($
<n
>5,2,$4,$8);}
1485 ElseTerm
{$$
= TrLinkPeerNode
($
<n
>5,$11);}
1486 {$$
= TrLinkChildren
($
<n
>3,1,$
<n
>5);}
1488 | PARSEOP_ELSEIF
'('
1489 error ')' {$$
= AslDoError
(); yyclearin;}
1492 error {$$
= AslDoError
(); yyclearin;}
1496 : PARSEOP_LOAD
'(' {$$
= TrCreateLeafNode
(PARSEOP_LOAD
);}
1499 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1501 error ')' {$$
= AslDoError
(); yyclearin;}
1505 : PARSEOP_NOOP
{$$
= TrCreateNode
(PARSEOP_NOOP
, 0);}
1509 : PARSEOP_NOTIFY
'(' {$$
= TrCreateLeafNode
(PARSEOP_NOTIFY
);}
1512 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1513 | PARSEOP_NOTIFY
'('
1514 error ')' {$$
= AslDoError
(); yyclearin;}
1518 : PARSEOP_RELEASE
'(' {$$
= TrCreateLeafNode
(PARSEOP_RELEASE
);}
1520 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1521 | PARSEOP_RELEASE
'('
1522 error ')' {$$
= AslDoError
(); yyclearin;}
1526 : PARSEOP_RESET
'(' {$$
= TrCreateLeafNode
(PARSEOP_RESET
);}
1528 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1530 error ')' {$$
= AslDoError
(); yyclearin;}
1534 : PARSEOP_RETURN
'(' {$$
= TrCreateLeafNode
(PARSEOP_RETURN
);}
1536 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1537 | PARSEOP_RETURN
{$$
= TrLinkChildren
(TrCreateLeafNode
(PARSEOP_RETURN
),1,TrCreateLeafNode
(PARSEOP_ZERO
));}
1538 | PARSEOP_RETURN
'('
1539 error ')' {$$
= AslDoError
(); yyclearin;}
1543 : PARSEOP_SIGNAL
'(' {$$
= TrCreateLeafNode
(PARSEOP_SIGNAL
);}
1545 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1546 | PARSEOP_SIGNAL
'('
1547 error ')' {$$
= AslDoError
(); yyclearin;}
1551 : PARSEOP_SLEEP
'(' {$$
= TrCreateLeafNode
(PARSEOP_SLEEP
);}
1553 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1555 error ')' {$$
= AslDoError
(); yyclearin;}
1559 : PARSEOP_STALL
'(' {$$
= TrCreateLeafNode
(PARSEOP_STALL
);}
1561 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1563 error ')' {$$
= AslDoError
(); yyclearin;}
1567 : PARSEOP_SWITCH
'(' {$$
= TrCreateLeafNode
(PARSEOP_SWITCH
);}
1570 CaseDefaultTermList
'}'
1571 {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
1572 | PARSEOP_SWITCH
'('
1573 error ')' {$$
= AslDoError
(); yyclearin;}
1577 * Case-Default list; allow only one Default term and unlimited Case terms
1584 | CaseDefaultTermList
1585 CaseTerm
{$$
= TrLinkPeerNode
($1,$2);}
1586 | CaseDefaultTermList
1587 DefaultTerm
{$$
= TrLinkPeerNode
($1,$2);}
1589 /* Original - attempts to force zero or one default term within the switch */
1596 CaseTermList {$$ = TrLinkPeerNode ($1,TrLinkPeerNode ($2, $3));}
1598 CaseTerm {$$ = TrLinkPeerNode ($1,$2);}
1605 CaseTerm {$$ = TrLinkPeerNode ($1,$2);}
1610 : PARSEOP_CASE
'(' {$$
= TrCreateLeafNode
(PARSEOP_CASE
);}
1613 TermList
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
1615 error ')' {$$
= AslDoError
(); yyclearin;}
1619 : PARSEOP_DEFAULT
'{' {$$
= TrCreateLeafNode
(PARSEOP_DEFAULT
);}
1620 TermList
'}' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1621 | PARSEOP_DEFAULT
'{'
1622 error '}' {$$
= AslDoError
(); yyclearin;}
1626 : PARSEOP_UNLOAD
'(' {$$
= TrCreateLeafNode
(PARSEOP_UNLOAD
);}
1628 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1629 | PARSEOP_UNLOAD
'('
1630 error ')' {$$
= AslDoError
(); yyclearin;}
1634 : PARSEOP_WHILE
'(' {$$
= TrCreateLeafNode
(PARSEOP_WHILE
);}
1636 ')' '{' TermList
'}'
1637 {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
1639 error ')' {$$
= AslDoError
(); yyclearin;}
1643 /******* Type 2 opcodes *******************************************************/
1646 : PARSEOP_ACQUIRE
'(' {$$
= TrCreateLeafNode
(PARSEOP_ACQUIRE
);}
1649 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$6);}
1650 | PARSEOP_ACQUIRE
'('
1651 error ')' {$$
= AslDoError
(); yyclearin;}
1655 : PARSEOP_ADD
'(' {$$
= TrCreateLeafNode
(PARSEOP_ADD
);}
1659 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1661 error ')' {$$
= AslDoError
(); yyclearin;}
1665 : PARSEOP_AND
'(' {$$
= TrCreateLeafNode
(PARSEOP_AND
);}
1669 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1671 error ')' {$$
= AslDoError
(); yyclearin;}
1675 : PARSEOP_CONCATENATE
'(' {$$
= TrCreateLeafNode
(PARSEOP_CONCATENATE
);}
1679 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1680 | PARSEOP_CONCATENATE
'('
1681 error ')' {$$
= AslDoError
(); yyclearin;}
1685 : PARSEOP_CONCATENATERESTEMPLATE
'(' {$$
= TrCreateLeafNode
(PARSEOP_CONCATENATERESTEMPLATE
);}
1689 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1690 | PARSEOP_CONCATENATERESTEMPLATE
'('
1691 error ')' {$$
= AslDoError
(); yyclearin;}
1695 : PARSEOP_CONDREFOF
'(' {$$
= TrCreateLeafNode
(PARSEOP_CONDREFOF
);}
1698 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1699 | PARSEOP_CONDREFOF
'('
1700 error ')' {$$
= AslDoError
(); yyclearin;}
1704 : PARSEOP_COPYOBJECT
'(' {$$
= TrCreateLeafNode
(PARSEOP_COPYOBJECT
);}
1707 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,TrSetNodeFlags
($6, NODE_IS_TARGET
));}
1708 | PARSEOP_COPYOBJECT
'('
1709 error ')' {$$
= AslDoError
(); yyclearin;}
1713 : PARSEOP_DECREMENT
'(' {$$
= TrCreateLeafNode
(PARSEOP_DECREMENT
);}
1715 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1716 | PARSEOP_DECREMENT
'('
1717 error ')' {$$
= AslDoError
(); yyclearin;}
1721 : PARSEOP_DEREFOF
'(' {$$
= TrCreateLeafNode
(PARSEOP_DEREFOF
);}
1723 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1724 | PARSEOP_DEREFOF
'('
1725 error ')' {$$
= AslDoError
(); yyclearin;}
1729 : PARSEOP_DIVIDE
'(' {$$
= TrCreateLeafNode
(PARSEOP_DIVIDE
);}
1734 ')' {$$
= TrLinkChildren
($
<n
>3,4,$4,$5,$6,$7);}
1735 | PARSEOP_DIVIDE
'('
1736 error ')' {$$
= AslDoError
(); yyclearin;}
1740 : PARSEOP_FINDSETLEFTBIT
'(' {$$
= TrCreateLeafNode
(PARSEOP_FINDSETLEFTBIT
);}
1743 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1744 | PARSEOP_FINDSETLEFTBIT
'('
1745 error ')' {$$
= AslDoError
(); yyclearin;}
1749 : PARSEOP_FINDSETRIGHTBIT
'(' {$$
= TrCreateLeafNode
(PARSEOP_FINDSETRIGHTBIT
);}
1752 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1753 | PARSEOP_FINDSETRIGHTBIT
'('
1754 error ')' {$$
= AslDoError
(); yyclearin;}
1758 : PARSEOP_FROMBCD
'(' {$$
= TrCreateLeafNode
(PARSEOP_FROMBCD
);}
1761 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1762 | PARSEOP_FROMBCD
'('
1763 error ')' {$$
= AslDoError
(); yyclearin;}
1767 : PARSEOP_INCREMENT
'(' {$$
= TrCreateLeafNode
(PARSEOP_INCREMENT
);}
1769 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1770 | PARSEOP_INCREMENT
'('
1771 error ')' {$$
= AslDoError
(); yyclearin;}
1775 : PARSEOP_INDEX
'(' {$$
= TrCreateLeafNode
(PARSEOP_INDEX
);}
1779 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1781 error ')' {$$
= AslDoError
(); yyclearin;}
1785 : PARSEOP_LAND
'(' {$$
= TrCreateLeafNode
(PARSEOP_LAND
);}
1788 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1790 error ')' {$$
= AslDoError
(); yyclearin;}
1794 : PARSEOP_LEQUAL
'(' {$$
= TrCreateLeafNode
(PARSEOP_LEQUAL
);}
1797 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1798 | PARSEOP_LEQUAL
'('
1799 error ')' {$$
= AslDoError
(); yyclearin;}
1803 : PARSEOP_LGREATER
'(' {$$
= TrCreateLeafNode
(PARSEOP_LGREATER
);}
1806 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1807 | PARSEOP_LGREATER
'('
1808 error ')' {$$
= AslDoError
(); yyclearin;}
1812 : PARSEOP_LGREATEREQUAL
'(' {$$
= TrCreateLeafNode
(PARSEOP_LLESS
);}
1815 ')' {$$
= TrCreateNode
(PARSEOP_LNOT
, 1, TrLinkChildren
($
<n
>3,2,$4,$5));}
1816 | PARSEOP_LGREATEREQUAL
'('
1817 error ')' {$$
= AslDoError
(); yyclearin;}
1821 : PARSEOP_LLESS
'(' {$$
= TrCreateLeafNode
(PARSEOP_LLESS
);}
1824 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1826 error ')' {$$
= AslDoError
(); yyclearin;}
1830 : PARSEOP_LLESSEQUAL
'(' {$$
= TrCreateLeafNode
(PARSEOP_LGREATER
);}
1833 ')' {$$
= TrCreateNode
(PARSEOP_LNOT
, 1, TrLinkChildren
($
<n
>3,2,$4,$5));}
1834 | PARSEOP_LLESSEQUAL
'('
1835 error ')' {$$
= AslDoError
(); yyclearin;}
1839 : PARSEOP_LNOT
'(' {$$
= TrCreateLeafNode
(PARSEOP_LNOT
);}
1841 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1843 error ')' {$$
= AslDoError
(); yyclearin;}
1847 : PARSEOP_LNOTEQUAL
'(' {$$
= TrCreateLeafNode
(PARSEOP_LEQUAL
);}
1850 ')' {$$
= TrCreateNode
(PARSEOP_LNOT
, 1, TrLinkChildren
($
<n
>3,2,$4,$5));}
1851 | PARSEOP_LNOTEQUAL
'('
1852 error ')' {$$
= AslDoError
(); yyclearin;}
1856 : PARSEOP_LOADTABLE
'(' {$$
= TrCreateLeafNode
(PARSEOP_LOADTABLE
);}
1863 ')' {$$
= TrLinkChildren
($
<n
>3,6,$4,$5,$6,$7,$8,$9);}
1864 | PARSEOP_LOADTABLE
'('
1865 error ')' {$$
= AslDoError
(); yyclearin;}
1869 : PARSEOP_LOR
'(' {$$
= TrCreateLeafNode
(PARSEOP_LOR
);}
1872 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1874 error ')' {$$
= AslDoError
(); yyclearin;}
1878 : PARSEOP_MATCH
'(' {$$
= TrCreateLeafNode
(PARSEOP_MATCH
);}
1885 ')' {$$
= TrLinkChildren
($
<n
>3,6,$4,$6,$7,$9,$10,$11);}
1887 error ')' {$$
= AslDoError
(); yyclearin;}
1891 : PARSEOP_MID
'(' {$$
= TrCreateLeafNode
(PARSEOP_MID
);}
1896 ')' {$$
= TrLinkChildren
($
<n
>3,4,$4,$5,$6,$7);}
1898 error ')' {$$
= AslDoError
(); yyclearin;}
1902 : PARSEOP_MOD
'(' {$$
= TrCreateLeafNode
(PARSEOP_MOD
);}
1906 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1908 error ')' {$$
= AslDoError
(); yyclearin;}
1912 : PARSEOP_MULTIPLY
'(' {$$
= TrCreateLeafNode
(PARSEOP_MULTIPLY
);}
1916 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1917 | PARSEOP_MULTIPLY
'('
1918 error ')' {$$
= AslDoError
(); yyclearin;}
1922 : PARSEOP_NAND
'(' {$$
= TrCreateLeafNode
(PARSEOP_NAND
);}
1926 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1928 error ')' {$$
= AslDoError
(); yyclearin;}
1932 : PARSEOP_NOR
'(' {$$
= TrCreateLeafNode
(PARSEOP_NOR
);}
1936 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1938 error ')' {$$
= AslDoError
(); yyclearin;}
1942 : PARSEOP_NOT
'(' {$$
= TrCreateLeafNode
(PARSEOP_NOT
);}
1945 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1947 error ')' {$$
= AslDoError
(); yyclearin;}
1951 : PARSEOP_OBJECTTYPE
'(' {$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE
);}
1953 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1954 | PARSEOP_OBJECTTYPE
'('
1955 error ')' {$$
= AslDoError
(); yyclearin;}
1959 : PARSEOP_OR
'(' {$$
= TrCreateLeafNode
(PARSEOP_OR
);}
1963 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1965 error ')' {$$
= AslDoError
(); yyclearin;}
1969 * In RefOf, the node isn't really a target, but we can't keep track of it after
1970 * we've taken a pointer to it. (hard to tell if a local becomes initialized this way.)
1973 : PARSEOP_REFOF
'(' {$$
= TrCreateLeafNode
(PARSEOP_REFOF
);}
1975 ')' {$$
= TrLinkChildren
($
<n
>3,1,TrSetNodeFlags
($4, NODE_IS_TARGET
));}
1977 error ')' {$$
= AslDoError
(); yyclearin;}
1981 : PARSEOP_SHIFTLEFT
'(' {$$
= TrCreateLeafNode
(PARSEOP_SHIFTLEFT
);}
1985 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1986 | PARSEOP_SHIFTLEFT
'('
1987 error ')' {$$
= AslDoError
(); yyclearin;}
1991 : PARSEOP_SHIFTRIGHT
'(' {$$
= TrCreateLeafNode
(PARSEOP_SHIFTRIGHT
);}
1995 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1996 | PARSEOP_SHIFTRIGHT
'('
1997 error ')' {$$
= AslDoError
(); yyclearin;}
2001 : PARSEOP_SIZEOF
'(' {$$
= TrCreateLeafNode
(PARSEOP_SIZEOF
);}
2003 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
2004 | PARSEOP_SIZEOF
'('
2005 error ')' {$$
= AslDoError
(); yyclearin;}
2009 : PARSEOP_STORE
'(' {$$
= TrCreateLeafNode
(PARSEOP_STORE
);}
2012 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,TrSetNodeFlags
($6, NODE_IS_TARGET
));}
2014 error ')' {$$
= AslDoError
(); yyclearin;}
2018 : PARSEOP_SUBTRACT
'(' {$$
= TrCreateLeafNode
(PARSEOP_SUBTRACT
);}
2022 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
2023 | PARSEOP_SUBTRACT
'('
2024 error ')' {$$
= AslDoError
(); yyclearin;}
2028 : PARSEOP_TIMER
'(' {$$
= TrCreateLeafNode
(PARSEOP_TIMER
);}
2029 ')' {$$
= TrLinkChildren
($
<n
>3,0);}
2030 | PARSEOP_TIMER
{$$
= TrLinkChildren
(TrCreateLeafNode
(PARSEOP_TIMER
),0);}
2032 error ')' {$$
= AslDoError
(); yyclearin;}
2036 : PARSEOP_TOBCD
'(' {$$
= TrCreateLeafNode
(PARSEOP_TOBCD
);}
2039 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
2041 error ')' {$$
= AslDoError
(); yyclearin;}
2045 : PARSEOP_TOBUFFER
'(' {$$
= TrCreateLeafNode
(PARSEOP_TOBUFFER
);}
2048 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
2049 | PARSEOP_TOBUFFER
'('
2050 error ')' {$$
= AslDoError
(); yyclearin;}
2054 : PARSEOP_TODECIMALSTRING
'(' {$$
= TrCreateLeafNode
(PARSEOP_TODECIMALSTRING
);}
2057 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
2058 | PARSEOP_TODECIMALSTRING
'('
2059 error ')' {$$
= AslDoError
(); yyclearin;}
2063 : PARSEOP_TOHEXSTRING
'(' {$$
= TrCreateLeafNode
(PARSEOP_TOHEXSTRING
);}
2066 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
2067 | PARSEOP_TOHEXSTRING
'('
2068 error ')' {$$
= AslDoError
(); yyclearin;}
2072 : PARSEOP_TOINTEGER
'(' {$$
= TrCreateLeafNode
(PARSEOP_TOINTEGER
);}
2075 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
2076 | PARSEOP_TOINTEGER
'('
2077 error ')' {$$
= AslDoError
(); yyclearin;}
2081 : PARSEOP_TOSTRING
'(' {$$
= TrCreateLeafNode
(PARSEOP_TOSTRING
);}
2085 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
2086 | PARSEOP_TOSTRING
'('
2087 error ')' {$$
= AslDoError
(); yyclearin;}
2091 : PARSEOP_TOUUID
'('
2092 StringData
')' {$$
= TrUpdateNode
(PARSEOP_TOUUID
, $3);}
2093 | PARSEOP_TOUUID
'('
2094 error ')' {$$
= AslDoError
(); yyclearin;}
2098 : PARSEOP_WAIT
'(' {$$
= TrCreateLeafNode
(PARSEOP_WAIT
);}
2101 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
2103 error ')' {$$
= AslDoError
(); yyclearin;}
2107 : PARSEOP_XOR
'(' {$$
= TrCreateLeafNode
(PARSEOP_XOR
);}
2111 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
2113 error ')' {$$
= AslDoError
(); yyclearin;}
2117 /******* Keywords *************************************************************/
2121 : PARSEOP_OBJECTTYPE_UNK
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_UNK
);}
2122 | PARSEOP_OBJECTTYPE_INT
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_INT
);}
2123 | PARSEOP_OBJECTTYPE_STR
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_STR
);}
2124 | PARSEOP_OBJECTTYPE_BUF
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_BUF
);}
2125 | PARSEOP_OBJECTTYPE_PKG
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_PKG
);}
2126 | PARSEOP_OBJECTTYPE_FLD
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_FLD
);}
2127 | PARSEOP_OBJECTTYPE_DEV
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_DEV
);}
2128 | PARSEOP_OBJECTTYPE_EVT
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_EVT
);}
2129 | PARSEOP_OBJECTTYPE_MTH
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_MTH
);}
2130 | PARSEOP_OBJECTTYPE_MTX
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_MTX
);}
2131 | PARSEOP_OBJECTTYPE_OPR
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_OPR
);}
2132 | PARSEOP_OBJECTTYPE_POW
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_POW
);}
2133 | PARSEOP_OBJECTTYPE_PRO
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_PRO
);}
2134 | PARSEOP_OBJECTTYPE_THZ
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_THZ
);}
2135 | PARSEOP_OBJECTTYPE_BFF
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_BFF
);}
2136 | PARSEOP_OBJECTTYPE_DDB
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_DDB
);}
2140 : PARSEOP_ACCESSTYPE_ANY
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSTYPE_ANY
);}
2141 | PARSEOP_ACCESSTYPE_BYTE
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSTYPE_BYTE
);}
2142 | PARSEOP_ACCESSTYPE_WORD
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSTYPE_WORD
);}
2143 | PARSEOP_ACCESSTYPE_DWORD
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSTYPE_DWORD
);}
2144 | PARSEOP_ACCESSTYPE_QWORD
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSTYPE_QWORD
);}
2145 | PARSEOP_ACCESSTYPE_BUF
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSTYPE_BUF
);}
2149 : PARSEOP_ACCESSATTRIB_QUICK
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSATTRIB_QUICK
);}
2150 | PARSEOP_ACCESSATTRIB_SND_RCV
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSATTRIB_SND_RCV
);}
2151 | PARSEOP_ACCESSATTRIB_BYTE
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSATTRIB_BYTE
);}
2152 | PARSEOP_ACCESSATTRIB_WORD
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSATTRIB_WORD
);}
2153 | PARSEOP_ACCESSATTRIB_BLOCK
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSATTRIB_BLOCK
);}
2154 | PARSEOP_ACCESSATTRIB_WORD_CALL
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSATTRIB_WORD_CALL
);}
2155 | PARSEOP_ACCESSATTRIB_BLOCK_CALL
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSATTRIB_BLOCK_CALL
);}
2159 : PARSEOP_LOCKRULE_LOCK
{$$
= TrCreateLeafNode
(PARSEOP_LOCKRULE_LOCK
);}
2160 | PARSEOP_LOCKRULE_NOLOCK
{$$
= TrCreateLeafNode
(PARSEOP_LOCKRULE_NOLOCK
);}
2164 : PARSEOP_UPDATERULE_PRESERVE
{$$
= TrCreateLeafNode
(PARSEOP_UPDATERULE_PRESERVE
);}
2165 | PARSEOP_UPDATERULE_ONES
{$$
= TrCreateLeafNode
(PARSEOP_UPDATERULE_ONES
);}
2166 | PARSEOP_UPDATERULE_ZEROS
{$$
= TrCreateLeafNode
(PARSEOP_UPDATERULE_ZEROS
);}
2171 : PARSEOP_REGIONSPACE_IO
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_IO
);}
2172 | PARSEOP_REGIONSPACE_MEM
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_MEM
);}
2173 | PARSEOP_REGIONSPACE_PCI
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_PCI
);}
2174 | PARSEOP_REGIONSPACE_EC
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_EC
);}
2175 | PARSEOP_REGIONSPACE_SMBUS
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_SMBUS
);}
2176 | PARSEOP_REGIONSPACE_CMOS
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_CMOS
);}
2177 | PARSEOP_REGIONSPACE_PCIBAR
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_PCIBAR
);}
2181 : ByteConst
{$$
= UtCheckIntegerRange
($1, 0x80, 0xFF);}
2182 | RegionSpaceKeyword
{}
2183 | PARSEOP_ADDRESSSPACE_FFIXEDHW
{$$
= TrCreateLeafNode
(PARSEOP_ADDRESSSPACE_FFIXEDHW
);}
2187 SerializeRuleKeyword
2188 : PARSEOP_SERIALIZERULE_SERIAL
{$$
= TrCreateLeafNode
(PARSEOP_SERIALIZERULE_SERIAL
);}
2189 | PARSEOP_SERIALIZERULE_NOTSERIAL
{$$
= TrCreateLeafNode
(PARSEOP_SERIALIZERULE_NOTSERIAL
);}
2193 : PARSEOP_MATCHTYPE_MTR
{$$
= TrCreateLeafNode
(PARSEOP_MATCHTYPE_MTR
);}
2194 | PARSEOP_MATCHTYPE_MEQ
{$$
= TrCreateLeafNode
(PARSEOP_MATCHTYPE_MEQ
);}
2195 | PARSEOP_MATCHTYPE_MLE
{$$
= TrCreateLeafNode
(PARSEOP_MATCHTYPE_MLE
);}
2196 | PARSEOP_MATCHTYPE_MLT
{$$
= TrCreateLeafNode
(PARSEOP_MATCHTYPE_MLT
);}
2197 | PARSEOP_MATCHTYPE_MGE
{$$
= TrCreateLeafNode
(PARSEOP_MATCHTYPE_MGE
);}
2198 | PARSEOP_MATCHTYPE_MGT
{$$
= TrCreateLeafNode
(PARSEOP_MATCHTYPE_MGT
);}
2202 : PARSEOP_DMATYPE_A
{$$
= TrCreateLeafNode
(PARSEOP_DMATYPE_A
);}
2203 | PARSEOP_DMATYPE_COMPATIBILITY
{$$
= TrCreateLeafNode
(PARSEOP_DMATYPE_COMPATIBILITY
);}
2204 | PARSEOP_DMATYPE_B
{$$
= TrCreateLeafNode
(PARSEOP_DMATYPE_B
);}
2205 | PARSEOP_DMATYPE_F
{$$
= TrCreateLeafNode
(PARSEOP_DMATYPE_F
);}
2209 : PARSEOP_XFERTYPE_8
{$$
= TrCreateLeafNode
(PARSEOP_XFERTYPE_8
);}
2210 | PARSEOP_XFERTYPE_8_16
{$$
= TrCreateLeafNode
(PARSEOP_XFERTYPE_8_16
);}
2211 | PARSEOP_XFERTYPE_16
{$$
= TrCreateLeafNode
(PARSEOP_XFERTYPE_16
);}
2215 : PARSEOP_RESOURCETYPE_CONSUMER
{$$
= TrCreateLeafNode
(PARSEOP_RESOURCETYPE_CONSUMER
);}
2216 | PARSEOP_RESOURCETYPE_PRODUCER
{$$
= TrCreateLeafNode
(PARSEOP_RESOURCETYPE_PRODUCER
);}
2220 : PARSEOP_MINTYPE_FIXED
{$$
= TrCreateLeafNode
(PARSEOP_MINTYPE_FIXED
);}
2221 | PARSEOP_MINTYPE_NOTFIXED
{$$
= TrCreateLeafNode
(PARSEOP_MINTYPE_NOTFIXED
);}
2225 : PARSEOP_MAXTYPE_FIXED
{$$
= TrCreateLeafNode
(PARSEOP_MAXTYPE_FIXED
);}
2226 | PARSEOP_MAXTYPE_NOTFIXED
{$$
= TrCreateLeafNode
(PARSEOP_MAXTYPE_NOTFIXED
);}
2230 : PARSEOP_DECODETYPE_POS
{$$
= TrCreateLeafNode
(PARSEOP_DECODETYPE_POS
);}
2231 | PARSEOP_DECODETYPE_SUB
{$$
= TrCreateLeafNode
(PARSEOP_DECODETYPE_SUB
);}
2235 : PARSEOP_RANGETYPE_ISAONLY
{$$
= TrCreateLeafNode
(PARSEOP_RANGETYPE_ISAONLY
);}
2236 | PARSEOP_RANGETYPE_NONISAONLY
{$$
= TrCreateLeafNode
(PARSEOP_RANGETYPE_NONISAONLY
);}
2237 | PARSEOP_RANGETYPE_ENTIRE
{$$
= TrCreateLeafNode
(PARSEOP_RANGETYPE_ENTIRE
);}
2241 : PARSEOP_MEMTYPE_CACHEABLE
{$$
= TrCreateLeafNode
(PARSEOP_MEMTYPE_CACHEABLE
);}
2242 | PARSEOP_MEMTYPE_WRITECOMBINING
{$$
= TrCreateLeafNode
(PARSEOP_MEMTYPE_WRITECOMBINING
);}
2243 | PARSEOP_MEMTYPE_PREFETCHABLE
{$$
= TrCreateLeafNode
(PARSEOP_MEMTYPE_PREFETCHABLE
);}
2244 | PARSEOP_MEMTYPE_NONCACHEABLE
{$$
= TrCreateLeafNode
(PARSEOP_MEMTYPE_NONCACHEABLE
);}
2247 OptionalReadWriteKeyword
2248 : {$$
= TrCreateLeafNode
(PARSEOP_READWRITETYPE_BOTH
);}
2249 | PARSEOP_READWRITETYPE_BOTH
{$$
= TrCreateLeafNode
(PARSEOP_READWRITETYPE_BOTH
);}
2250 | PARSEOP_READWRITETYPE_READONLY
{$$
= TrCreateLeafNode
(PARSEOP_READWRITETYPE_READONLY
);}
2253 InterruptTypeKeyword
2254 : PARSEOP_INTTYPE_EDGE
{$$
= TrCreateLeafNode
(PARSEOP_INTTYPE_EDGE
);}
2255 | PARSEOP_INTTYPE_LEVEL
{$$
= TrCreateLeafNode
(PARSEOP_INTTYPE_LEVEL
);}
2259 : PARSEOP_INTLEVEL_ACTIVEHIGH
{$$
= TrCreateLeafNode
(PARSEOP_INTLEVEL_ACTIVEHIGH
);}
2260 | PARSEOP_INTLEVEL_ACTIVELOW
{$$
= TrCreateLeafNode
(PARSEOP_INTLEVEL_ACTIVELOW
);}
2264 : PARSEOP_SHARETYPE_SHARED
{$$
= TrCreateLeafNode
(PARSEOP_SHARETYPE_SHARED
);}
2265 | PARSEOP_SHARETYPE_EXCLUSIVE
{$$
= TrCreateLeafNode
(PARSEOP_SHARETYPE_EXCLUSIVE
);}
2269 : PARSEOP_IODECODETYPE_16
{$$
= TrCreateLeafNode
(PARSEOP_IODECODETYPE_16
);}
2270 | PARSEOP_IODECODETYPE_10
{$$
= TrCreateLeafNode
(PARSEOP_IODECODETYPE_10
);}
2274 : PARSEOP_TYPE_TRANSLATION
{$$
= TrCreateLeafNode
(PARSEOP_TYPE_TRANSLATION
);}
2275 | PARSEOP_TYPE_STATIC
{$$
= TrCreateLeafNode
(PARSEOP_TYPE_STATIC
);}
2279 : PARSEOP_TRANSLATIONTYPE_SPARSE
{$$
= TrCreateLeafNode
(PARSEOP_TRANSLATIONTYPE_SPARSE
);}
2280 | PARSEOP_TRANSLATIONTYPE_DENSE
{$$
= TrCreateLeafNode
(PARSEOP_TRANSLATIONTYPE_DENSE
);}
2284 : PARSEOP_ADDRESSTYPE_MEMORY
{$$
= TrCreateLeafNode
(PARSEOP_ADDRESSTYPE_MEMORY
);}
2285 | PARSEOP_ADDRESSTYPE_RESERVED
{$$
= TrCreateLeafNode
(PARSEOP_ADDRESSTYPE_RESERVED
);}
2286 | PARSEOP_ADDRESSTYPE_NVS
{$$
= TrCreateLeafNode
(PARSEOP_ADDRESSTYPE_NVS
);}
2287 | PARSEOP_ADDRESSTYPE_ACPI
{$$
= TrCreateLeafNode
(PARSEOP_ADDRESSTYPE_ACPI
);}
2291 /******* Miscellaneous Types **************************************************/
2300 /* | UserTerm {} */ /* Caused reduce/reduce with Type6Opcode->UserTerm */
2304 : PARSEOP_ARG0
{$$
= TrCreateLeafNode
(PARSEOP_ARG0
);}
2305 | PARSEOP_ARG1
{$$
= TrCreateLeafNode
(PARSEOP_ARG1
);}
2306 | PARSEOP_ARG2
{$$
= TrCreateLeafNode
(PARSEOP_ARG2
);}
2307 | PARSEOP_ARG3
{$$
= TrCreateLeafNode
(PARSEOP_ARG3
);}
2308 | PARSEOP_ARG4
{$$
= TrCreateLeafNode
(PARSEOP_ARG4
);}
2309 | PARSEOP_ARG5
{$$
= TrCreateLeafNode
(PARSEOP_ARG5
);}
2310 | PARSEOP_ARG6
{$$
= TrCreateLeafNode
(PARSEOP_ARG6
);}
2314 : PARSEOP_LOCAL0
{$$
= TrCreateLeafNode
(PARSEOP_LOCAL0
);}
2315 | PARSEOP_LOCAL1
{$$
= TrCreateLeafNode
(PARSEOP_LOCAL1
);}
2316 | PARSEOP_LOCAL2
{$$
= TrCreateLeafNode
(PARSEOP_LOCAL2
);}
2317 | PARSEOP_LOCAL3
{$$
= TrCreateLeafNode
(PARSEOP_LOCAL3
);}
2318 | PARSEOP_LOCAL4
{$$
= TrCreateLeafNode
(PARSEOP_LOCAL4
);}
2319 | PARSEOP_LOCAL5
{$$
= TrCreateLeafNode
(PARSEOP_LOCAL5
);}
2320 | PARSEOP_LOCAL6
{$$
= TrCreateLeafNode
(PARSEOP_LOCAL6
);}
2321 | PARSEOP_LOCAL7
{$$
= TrCreateLeafNode
(PARSEOP_LOCAL7
);}
2325 : PARSEOP_DEBUG
{$$
= TrCreateLeafNode
(PARSEOP_DEBUG
);}
2330 : Integer
{$$
= TrUpdateNode
(PARSEOP_BYTECONST
, $1);}
2334 : Integer
{$$
= TrUpdateNode
(PARSEOP_WORDCONST
, $1);}
2338 : Integer
{$$
= TrUpdateNode
(PARSEOP_DWORDCONST
, $1);}
2342 : Integer
{$$
= TrUpdateNode
(PARSEOP_QWORDCONST
, $1);}
2346 : PARSEOP_INTEGER
{$$
= TrCreateValuedLeafNode
(PARSEOP_INTEGER
, AslCompilerlval.i
);}
2350 : PARSEOP_STRING_LITERAL
{$$
= TrCreateValuedLeafNode
(PARSEOP_STRING_LITERAL
, (ACPI_NATIVE_INT
) AslCompilerlval.s
);}
2355 | PARSEOP_REVISION
{$$
= TrCreateLeafNode
(PARSEOP_REVISION
);}
2359 : Type3Opcode
{$$
= TrUpdateNode
(PARSEOP_BYTECONST
, $1);}
2360 | Type2IntegerOpcode
{$$
= TrUpdateNode
(PARSEOP_BYTECONST
, $1);}
2361 | ConstExprTerm
{$$
= TrUpdateNode
(PARSEOP_BYTECONST
, $1);}
2366 : Type3Opcode
{$$
= TrUpdateNode
(PARSEOP_WORDCONST
, $1);}
2367 | Type2IntegerOpcode
{$$
= TrUpdateNode
(PARSEOP_WORDCONST
, $1);}
2368 | ConstExprTerm
{$$
= TrUpdateNode
(PARSEOP_WORDCONST
, $1);}
2373 : Type3Opcode
{$$
= TrUpdateNode
(PARSEOP_DWORDCONST
, $1);}
2374 | Type2IntegerOpcode
{$$
= TrUpdateNode
(PARSEOP_DWORDCONST
, $1);}
2375 | ConstExprTerm
{$$
= TrUpdateNode
(PARSEOP_DWORDCONST
, $1);}
2380 : Type3Opcode
{$$
= TrUpdateNode
(PARSEOP_QWORDCONST
, $1);}
2381 | Type2IntegerOpcode
{$$
= TrUpdateNode
(PARSEOP_QWORDCONST
, $1);}
2382 | ConstExprTerm
{$$
= TrUpdateNode
(PARSEOP_QWORDCONST
, $1);}
2387 : PARSEOP_ZERO
{$$
= TrCreateValuedLeafNode
(PARSEOP_ZERO
, 0);}
2388 | PARSEOP_ONE
{$$
= TrCreateValuedLeafNode
(PARSEOP_ONE
, 1);}
2389 | PARSEOP_ONES
{$$
= TrCreateValuedLeafNode
(PARSEOP_ONES
, ACPI_INTEGER_MAX
);}
2392 /* OptionalCount must appear before ByteList or an incorrect reduction will result */
2395 : {$$
= TrCreateLeafNode
(PARSEOP_ONES
);} /* Placeholder is a OnesOp object */
2396 |
',' {$$
= TrCreateLeafNode
(PARSEOP_ONES
);} /* Placeholder is a OnesOp object */
2397 |
',' TermArg
{$$
= $2;}
2402 : PARSEOP_BUFFER
'(' {$$
= TrCreateLeafNode
(PARSEOP_BUFFER
);}
2405 BufferTermData
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
2406 | PARSEOP_BUFFER
'('
2407 error ')' {$$
= AslDoError
(); yyclearin;}
2418 | ByteList
',' /* Allows a trailing comma at list end */
2420 ByteConstExpr
{$$
= TrLinkPeerNode
($1,$3);}
2426 | DWordList
',' /* Allows a trailing comma at list end */
2428 DWordConstExpr
{$$
= TrLinkPeerNode
($1,$3);}
2432 : PARSEOP_PACKAGE
'(' {$$
= TrCreateLeafNode
(PARSEOP_VAR_PACKAGE
);}
2433 VarPackageLengthTerm
2435 PackageList
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
2436 | PARSEOP_PACKAGE
'('
2437 error ')' {$$
= AslDoError
(); yyclearin;}
2440 VarPackageLengthTerm
2441 : {$$
= TrCreateLeafNode
(PARSEOP_DEFAULT_ARG
);}
2442 | TermArg
{$$
= $1;}
2448 | PackageList
',' /* Allows a trailing comma at list end */
2450 PackageElement
{$$
= TrLinkPeerNode
($1,$3);}
2459 : PARSEOP_EISAID
'('
2460 StringData
')' {$$
= TrUpdateNode
(PARSEOP_EISAID
, $3);}
2461 | PARSEOP_EISAID
'('
2462 error ')' {$$
= AslDoError
(); yyclearin;}
2466 /******* Resources and Memory ***********************************************/
2470 * Note: Create two default nodes to allow conversion to a Buffer AML opcode
2471 * Also, insert the EndTag at the end of the template.
2473 ResourceTemplateTerm
2474 : PARSEOP_RESOURCETEMPLATE
'(' ')'
2476 ResourceMacroList
'}' {$$
= TrCreateNode
(PARSEOP_RESOURCETEMPLATE
,4,
2477 TrCreateLeafNode
(PARSEOP_DEFAULT_ARG
),
2478 TrCreateLeafNode
(PARSEOP_DEFAULT_ARG
),
2480 TrCreateLeafNode
(PARSEOP_ENDTAG
));}
2484 : PARSEOP_UNICODE
'(' {$$
= TrCreateLeafNode
(PARSEOP_UNICODE
);}
2486 ')' {$$
= TrLinkChildren
($
<n
>3,2,0,$4);}
2487 | PARSEOP_UNICODE
'('
2488 error ')' {$$
= AslDoError
(); yyclearin;}
2494 ResourceMacroTerm
{$$
= TrLinkPeerNode
($1,$2);}
2500 | DWordMemoryTerm
{}
2502 | EndDependentFnTerm
{}
2504 | ExtendedMemoryTerm
{}
2505 | ExtendedSpaceTerm
{}
2512 | Memory32FixedTerm
{}
2515 | QWordMemoryTerm
{}
2518 | StartDependentFnTerm
{}
2519 | StartDependentFnNoPriTerm
{}
2521 | VendorShortTerm
{}
2522 | WordBusNumberTerm
{}
2528 : PARSEOP_DMA
'(' {$$
= TrCreateLeafNode
(PARSEOP_DMA
);}
2530 OptionalBusMasterKeyword
2532 OptionalNameString_Last
2534 ByteList
'}' {$$
= TrLinkChildren
($
<n
>3,5,$4,$5,$7,$8,$11);}
2536 error ')' {$$
= AslDoError
(); yyclearin;}
2540 : PARSEOP_DWORDIO
'(' {$$
= TrCreateLeafNode
(PARSEOP_DWORDIO
);}
2541 OptionalResourceType_First
2551 OptionalByteConstExpr
2555 OptionalTranslationType_Last
2556 ')' {$$
= TrLinkChildren
($
<n
>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
2557 | PARSEOP_DWORDIO
'('
2558 error ')' {$$
= AslDoError
(); yyclearin;}
2562 : PARSEOP_DWORDMEMORY
'(' {$$
= TrCreateLeafNode
(PARSEOP_DWORDMEMORY
);}
2563 OptionalResourceType_First
2568 ',' OptionalReadWriteKeyword
2574 OptionalByteConstExpr
2577 OptionalAddressRange
2579 ')' {$$
= TrLinkChildren
($
<n
>3,16,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
2580 | PARSEOP_DWORDMEMORY
'('
2581 error ')' {$$
= AslDoError
(); yyclearin;}
2585 : PARSEOP_DWORDSPACE
'(' {$$
= TrCreateLeafNode
(PARSEOP_DWORDSPACE
);}
2586 ByteConstExpr
{$$
= UtCheckIntegerRange
($4, 0xC0, 0xFF);}
2587 OptionalResourceType
2597 OptionalByteConstExpr
2599 OptionalNameString_Last
2600 ')' {$$
= TrLinkChildren
($
<n
>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
2601 | PARSEOP_DWORDSPACE
'('
2602 error ')' {$$
= AslDoError
(); yyclearin;}
2607 : PARSEOP_ENDDEPENDENTFN
'('
2608 ')' {$$
= TrCreateLeafNode
(PARSEOP_ENDDEPENDENTFN
);}
2609 | PARSEOP_ENDDEPENDENTFN
'('
2610 error ')' {$$
= AslDoError
(); yyclearin;}
2614 : PARSEOP_EXTENDEDIO
'(' {$$
= TrCreateLeafNode
(PARSEOP_EXTENDEDIO
);}
2615 OptionalResourceType_First
2625 OptionalQWordConstExpr
2628 OptionalTranslationType_Last
2629 ')' {$$
= TrLinkChildren
($
<n
>3,14,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22);}
2630 | PARSEOP_EXTENDEDIO
'('
2631 error ')' {$$
= AslDoError
(); yyclearin;}
2635 : PARSEOP_EXTENDEDMEMORY
'(' {$$
= TrCreateLeafNode
(PARSEOP_EXTENDEDMEMORY
);}
2636 OptionalResourceType_First
2641 ',' OptionalReadWriteKeyword
2647 OptionalQWordConstExpr
2649 OptionalAddressRange
2651 ')' {$$
= TrLinkChildren
($
<n
>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24);}
2652 | PARSEOP_EXTENDEDMEMORY
'('
2653 error ')' {$$
= AslDoError
(); yyclearin;}
2657 : PARSEOP_EXTENDEDSPACE
'(' {$$
= TrCreateLeafNode
(PARSEOP_EXTENDEDSPACE
);}
2658 ByteConstExpr
{$$
= UtCheckIntegerRange
($4, 0xC0, 0xFF);}
2659 OptionalResourceType
2669 OptionalQWordConstExpr
2670 OptionalNameString_Last
2671 ')' {$$
= TrLinkChildren
($
<n
>3,13,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23);}
2672 | PARSEOP_EXTENDEDSPACE
'('
2673 error ')' {$$
= AslDoError
(); yyclearin;}
2677 : PARSEOP_FIXEDIO
'(' {$$
= TrCreateLeafNode
(PARSEOP_FIXEDIO
);}
2680 OptionalNameString_Last
2681 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$6,$7);}
2682 | PARSEOP_FIXEDIO
'('
2683 error ')' {$$
= AslDoError
(); yyclearin;}
2687 : PARSEOP_INTERRUPT
'(' {$$
= TrCreateLeafNode
(PARSEOP_INTERRUPT
);}
2688 OptionalResourceType_First
2689 ',' InterruptTypeKeyword
2692 OptionalByteConstExpr
2694 OptionalNameString_Last
2696 DWordList
'}' {$$
= TrLinkChildren
($
<n
>3,8,$4,$6,$8,$9,$10,$11,$12,$15);}
2697 | PARSEOP_INTERRUPT
'('
2698 error ')' {$$
= AslDoError
(); yyclearin;}
2702 : PARSEOP_IO
'(' {$$
= TrCreateLeafNode
(PARSEOP_IO
);}
2708 OptionalNameString_Last
2709 ')' {$$
= TrLinkChildren
($
<n
>3,6,$4,$6,$8,$10,$12,$13);}
2711 error ')' {$$
= AslDoError
(); yyclearin;}
2715 : PARSEOP_IRQNOFLAGS
'(' {$$
= TrCreateLeafNode
(PARSEOP_IRQNOFLAGS
);}
2716 OptionalNameString_First
2718 ByteList
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
2719 | PARSEOP_IRQNOFLAGS
'('
2720 error ')' {$$
= AslDoError
(); yyclearin;}
2724 : PARSEOP_IRQ
'(' {$$
= TrCreateLeafNode
(PARSEOP_IRQ
);}
2725 InterruptTypeKeyword
2728 OptionalNameString_Last
2730 ByteList
'}' {$$
= TrLinkChildren
($
<n
>3,5,$4,$6,$7,$8,$11);}
2732 error ')' {$$
= AslDoError
(); yyclearin;}
2736 : PARSEOP_MEMORY24
'(' {$$
= TrCreateLeafNode
(PARSEOP_MEMORY24
);}
2737 OptionalReadWriteKeyword
2742 OptionalNameString_Last
2743 ')' {$$
= TrLinkChildren
($
<n
>3,6,$4,$6,$8,$10,$12,$13);}
2744 | PARSEOP_MEMORY24
'('
2745 error ')' {$$
= AslDoError
(); yyclearin;}
2749 : PARSEOP_MEMORY32FIXED
'(' {$$
= TrCreateLeafNode
(PARSEOP_MEMORY32FIXED
);}
2750 OptionalReadWriteKeyword
2753 OptionalNameString_Last
2754 ')' {$$
= TrLinkChildren
($
<n
>3,4,$4,$6,$8,$9);}
2755 | PARSEOP_MEMORY32FIXED
'('
2756 error ')' {$$
= AslDoError
(); yyclearin;}
2760 : PARSEOP_MEMORY32
'(' {$$
= TrCreateLeafNode
(PARSEOP_MEMORY32
);}
2761 OptionalReadWriteKeyword
2766 OptionalNameString_Last
2767 ')' {$$
= TrLinkChildren
($
<n
>3,6,$4,$6,$8,$10,$12,$13);}
2768 | PARSEOP_MEMORY32
'('
2769 error ')' {$$
= AslDoError
(); yyclearin;}
2773 : PARSEOP_QWORDIO
'(' {$$
= TrCreateLeafNode
(PARSEOP_QWORDIO
);}
2774 OptionalResourceType_First
2784 OptionalByteConstExpr
2788 OptionalTranslationType_Last
2789 ')' {$$
= TrLinkChildren
($
<n
>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
2790 | PARSEOP_QWORDIO
'('
2791 error ')' {$$
= AslDoError
(); yyclearin;}
2795 : PARSEOP_QWORDMEMORY
'(' {$$
= TrCreateLeafNode
(PARSEOP_QWORDMEMORY
);}
2796 OptionalResourceType_First
2801 ',' OptionalReadWriteKeyword
2807 OptionalByteConstExpr
2810 OptionalAddressRange
2812 ')' {$$
= TrLinkChildren
($
<n
>3,16,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
2813 | PARSEOP_QWORDMEMORY
'('
2814 error ')' {$$
= AslDoError
(); yyclearin;}
2818 : PARSEOP_QWORDSPACE
'(' {$$
= TrCreateLeafNode
(PARSEOP_QWORDSPACE
);}
2819 ByteConstExpr
{$$
= UtCheckIntegerRange
($4, 0xC0, 0xFF);}
2820 OptionalResourceType
2830 OptionalByteConstExpr
2832 OptionalNameString_Last
2833 ')' {$$
= TrLinkChildren
($
<n
>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
2834 | PARSEOP_QWORDSPACE
'('
2835 error ')' {$$
= AslDoError
(); yyclearin;}
2839 : PARSEOP_REGISTER
'(' {$$
= TrCreateLeafNode
(PARSEOP_REGISTER
);}
2845 OptionalNameString_Last
2846 ')' {$$
= TrLinkChildren
($
<n
>3,6,$4,$6,$8,$10,$11,$12);}
2847 | PARSEOP_REGISTER
'('
2848 error ')' {$$
= AslDoError
(); yyclearin;}
2851 StartDependentFnTerm
2852 : PARSEOP_STARTDEPENDENTFN
'(' {$$
= TrCreateLeafNode
(PARSEOP_STARTDEPENDENTFN
);}
2856 ResourceMacroList
'}' {$$
= TrLinkChildren
($
<n
>3,3,$4,$6,$9);}
2857 | PARSEOP_STARTDEPENDENTFN
'('
2858 error ')' {$$
= AslDoError
(); yyclearin;}
2861 StartDependentFnNoPriTerm
2862 : PARSEOP_STARTDEPENDENTFN_NOPRI
'(' {$$
= TrCreateLeafNode
(PARSEOP_STARTDEPENDENTFN_NOPRI
);}
2864 ResourceMacroList
'}' {$$
= TrLinkChildren
($
<n
>3,1,$6);}
2865 | PARSEOP_STARTDEPENDENTFN_NOPRI
'('
2866 error ')' {$$
= AslDoError
(); yyclearin;}
2870 : PARSEOP_VENDORLONG
'(' {$$
= TrCreateLeafNode
(PARSEOP_VENDORLONG
);}
2871 OptionalNameString_First
2873 ByteList
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
2874 | PARSEOP_VENDORLONG
'('
2875 error ')' {$$
= AslDoError
(); yyclearin;}
2879 : PARSEOP_VENDORSHORT
'(' {$$
= TrCreateLeafNode
(PARSEOP_VENDORSHORT
);}
2880 OptionalNameString_First
2882 ByteList
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
2883 | PARSEOP_VENDORSHORT
'('
2884 error ')' {$$
= AslDoError
(); yyclearin;}
2888 : PARSEOP_WORDBUSNUMBER
'(' {$$
= TrCreateLeafNode
(PARSEOP_WORDBUSNUMBER
);}
2889 OptionalResourceType_First
2898 OptionalByteConstExpr
2900 OptionalNameString_Last
2901 ')' {$$
= TrLinkChildren
($
<n
>3,12,$4,$5,$6,$7,$9,$11,$13,$15,$17,$18,$19,$20);}
2902 | PARSEOP_WORDBUSNUMBER
'('
2903 error ')' {$$
= AslDoError
(); yyclearin;}
2907 : PARSEOP_WORDIO
'(' {$$
= TrCreateLeafNode
(PARSEOP_WORDIO
);}
2908 OptionalResourceType_First
2918 OptionalByteConstExpr
2922 OptionalTranslationType_Last
2923 ')' {$$
= TrLinkChildren
($
<n
>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
2924 | PARSEOP_WORDIO
'('
2925 error ')' {$$
= AslDoError
(); yyclearin;}
2929 : PARSEOP_WORDSPACE
'(' {$$
= TrCreateLeafNode
(PARSEOP_WORDSPACE
);}
2930 ByteConstExpr
{$$
= UtCheckIntegerRange
($4, 0xC0, 0xFF);}
2931 OptionalResourceType
2941 OptionalByteConstExpr
2943 OptionalNameString_Last
2944 ')' {$$
= TrLinkChildren
($
<n
>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
2945 | PARSEOP_WORDSPACE
'('
2946 error ')' {$$
= AslDoError
(); yyclearin;}
2950 /******* Object References ***********************************************/
2952 /* Allow IO, DMA, IRQ Resource macro names to also be used as identifiers */
2956 | PARSEOP_NAMESTRING
{$$
= TrCreateValuedLeafNode
(PARSEOP_NAMESTRING
, (ACPI_NATIVE_INT
) AslCompilerlval.s
);}
2957 | PARSEOP_IO
{$$
= TrCreateValuedLeafNode
(PARSEOP_NAMESTRING
, (ACPI_NATIVE_INT
) "IO");}
2958 | PARSEOP_DMA
{$$
= TrCreateValuedLeafNode
(PARSEOP_NAMESTRING
, (ACPI_NATIVE_INT
) "DMA");}
2959 | PARSEOP_IRQ
{$$
= TrCreateValuedLeafNode
(PARSEOP_NAMESTRING
, (ACPI_NATIVE_INT
) "IRQ");}
2963 : PARSEOP_NAMESEG
{$$
= TrCreateValuedLeafNode
(PARSEOP_NAMESEG
, (ACPI_NATIVE_INT
) AslCompilerlval.s
);}
2967 /******* Helper rules ****************************************************/
2970 AmlPackageLengthTerm
2971 : Integer
{$$
= TrUpdateNode
(PARSEOP_PACKAGE_LENGTH
,(ACPI_PARSE_OBJECT
*) $1);}
2974 OptionalBusMasterKeyword
2975 : ',' {$$
= TrCreateLeafNode
(PARSEOP_BUSMASTERTYPE_MASTER
);}
2976 |
',' PARSEOP_BUSMASTERTYPE_MASTER
{$$
= TrCreateLeafNode
(PARSEOP_BUSMASTERTYPE_MASTER
);}
2977 |
',' PARSEOP_BUSMASTERTYPE_NOTMASTER
{$$
= TrCreateLeafNode
(PARSEOP_BUSMASTERTYPE_NOTMASTER
);}
2980 OptionalAccessAttribTerm
2983 |
',' ByteConstExpr
{$$
= $2;}
2984 |
',' AccessAttribKeyword
{$$
= $2;}
2988 : {$$
= TrCreateValuedLeafNode
(PARSEOP_BYTECONST
, 0);}
2989 |
',' {$$
= TrCreateValuedLeafNode
(PARSEOP_BYTECONST
, 0);}
2990 |
',' ByteConstExpr
{$$
= $2;}
2993 OptionalAddressRange
2996 |
',' AddressKeyword
{$$
= $2;}
2999 OptionalByteConstExpr
3002 |
',' ByteConstExpr
{$$
= $2;}
3007 |
',' DecodeKeyword
{$$
= $2;}
3010 OptionalDWordConstExpr
3013 |
',' DWordConstExpr
{$$
= $2;}
3017 : {$$
= TrCreateValuedLeafNode
(PARSEOP_STRING_LITERAL
, ACPI_TO_INTEGER
(""));} /* Placeholder is a NULL string */
3018 |
',' {$$
= TrCreateValuedLeafNode
(PARSEOP_STRING_LITERAL
, ACPI_TO_INTEGER
(""));} /* Placeholder is a NULL string */
3019 |
',' TermArg
{$$
= $2;}
3024 |
',' MaxKeyword
{$$
= $2;}
3029 |
',' MemTypeKeyword
{$$
= $2;}
3034 |
',' MinKeyword
{$$
= $2;}
3040 |
',' NameString
{$$
= $2;}
3043 OptionalNameString_Last
3046 |
',' NameString
{$$
= $2;}
3049 OptionalNameString_First
3050 : {$$
= TrCreateLeafNode
(PARSEOP_ZERO
);}
3051 | NameString
{$$
= $1;}
3054 OptionalObjectTypeKeyword
3055 : {$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_UNK
);}
3056 |
',' ObjectTypeKeyword
{$$
= $2;}
3059 OptionalQWordConstExpr
3062 |
',' QWordConstExpr
{$$
= $2;}
3067 |
',' RangeTypeKeyword
{$$
= $2;}
3071 : {$$
= TrCreateLeafNode
(PARSEOP_ZERO
);} /* Placeholder is a ZeroOp object */
3072 |
',' {$$
= TrCreateLeafNode
(PARSEOP_ZERO
);} /* Placeholder is a ZeroOp object */
3073 |
',' DataObject
{$$
= $2;}
3074 |
',' NameString
{$$
= $2;}
3077 OptionalResourceType_First
3079 | ResourceTypeKeyword
{$$
= $1;}
3082 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
));