2 /******************************************************************************
4 * Module Name: aslcompiler.y - Bison/Yacc input file (ASL grammar and actions)
6 *****************************************************************************/
9 * Copyright (C) 2000 - 2013, Intel Corp.
10 * All rights reserved.
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions, and the following disclaimer,
17 * without modification.
18 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
19 * substantially similar to the "NO WARRANTY" disclaimer below
20 * ("Disclaimer") and any redistribution must be conditioned upon
21 * including a substantially similar Disclaimer requirement for further
22 * binary redistribution.
23 * 3. Neither the names of the above-listed copyright holders nor the names
24 * of any contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
27 * Alternatively, this software may be distributed under the terms of the
28 * GNU General Public License ("GPL") version 2 as published by the Free
29 * Software Foundation.
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
35 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
40 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
41 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42 * POSSIBILITY OF SUCH DAMAGES.
45 #include "aslcompiler.h"
52 #define _COMPONENT ACPI_COMPILER
53 ACPI_MODULE_NAME
("aslparse")
58 * October 2005: The following list terms have been optimized (from the
59 * original ASL grammar in the ACPI specification) to force the immediate
60 * reduction of each list item so that the parse stack use doesn't increase on
61 * each list element and possibly overflow on very large lists (>4000 items).
62 * This dramatically reduces use of the parse stack overall.
64 * ArgList, TermList, Objectlist, ByteList, DWordList, PackageList,
65 * ResourceMacroList, and FieldUnitList
68 void * AslLocalAllocate
(unsigned int Size
);
70 /* Bison/yacc configuration */
74 #define alloca AslLocalAllocate
75 #define yytname AslCompilername
77 #define YYINITDEPTH 600 /* State stack depth */
78 #define YYDEBUG 1 /* Enable debug output */
79 #define YYERROR_VERBOSE 1 /* Verbose error messages */
81 /* Define YYMALLOC/YYFREE to prevent redefinition errors */
83 #define YYMALLOC malloc
87 * The windows version of bison defines this incorrectly as "32768" (Not negative).
88 * We use a custom (edited binary) version of bison that defines YYFLAG as YYFBAD
89 * instead (#define YYFBAD 32768), so we can define it correctly here.
91 * The problem is that if YYFLAG is positive, the extended syntax error messages
99 * Declare the type of values in the grammar
104 ACPI_PARSE_OBJECT
*n
;
107 /*! [Begin] no source code translation */
110 * These shift/reduce conflicts are expected. There should be zero
111 * reduce/reduce conflicts.
115 /******************************************************************************
117 * Token types: These are returned by the lexer
119 * NOTE: This list MUST match the AslKeywordMapping table found
120 * in aslmap.c EXACTLY! Double check any changes!
122 *****************************************************************************/
124 %token
<i
> PARSEOP_ACCESSAS
125 %token
<i
> PARSEOP_ACCESSATTRIB_BLOCK
126 %token
<i
> PARSEOP_ACCESSATTRIB_BLOCK_CALL
127 %token
<i
> PARSEOP_ACCESSATTRIB_BYTE
128 %token
<i
> PARSEOP_ACCESSATTRIB_MULTIBYTE
129 %token
<i
> PARSEOP_ACCESSATTRIB_QUICK
130 %token
<i
> PARSEOP_ACCESSATTRIB_RAW_BYTES
131 %token
<i
> PARSEOP_ACCESSATTRIB_RAW_PROCESS
132 %token
<i
> PARSEOP_ACCESSATTRIB_SND_RCV
133 %token
<i
> PARSEOP_ACCESSATTRIB_WORD
134 %token
<i
> PARSEOP_ACCESSATTRIB_WORD_CALL
135 %token
<i
> PARSEOP_ACCESSTYPE_ANY
136 %token
<i
> PARSEOP_ACCESSTYPE_BUF
137 %token
<i
> PARSEOP_ACCESSTYPE_BYTE
138 %token
<i
> PARSEOP_ACCESSTYPE_DWORD
139 %token
<i
> PARSEOP_ACCESSTYPE_QWORD
140 %token
<i
> PARSEOP_ACCESSTYPE_WORD
141 %token
<i
> PARSEOP_ACQUIRE
142 %token
<i
> PARSEOP_ADD
143 %token
<i
> PARSEOP_ADDRESSINGMODE_7BIT
144 %token
<i
> PARSEOP_ADDRESSINGMODE_10BIT
145 %token
<i
> PARSEOP_ADDRESSTYPE_ACPI
146 %token
<i
> PARSEOP_ADDRESSTYPE_MEMORY
147 %token
<i
> PARSEOP_ADDRESSTYPE_NVS
148 %token
<i
> PARSEOP_ADDRESSTYPE_RESERVED
149 %token
<i
> PARSEOP_ALIAS
150 %token
<i
> PARSEOP_AND
151 %token
<i
> PARSEOP_ARG0
152 %token
<i
> PARSEOP_ARG1
153 %token
<i
> PARSEOP_ARG2
154 %token
<i
> PARSEOP_ARG3
155 %token
<i
> PARSEOP_ARG4
156 %token
<i
> PARSEOP_ARG5
157 %token
<i
> PARSEOP_ARG6
158 %token
<i
> PARSEOP_BANKFIELD
159 %token
<i
> PARSEOP_BITSPERBYTE_EIGHT
160 %token
<i
> PARSEOP_BITSPERBYTE_FIVE
161 %token
<i
> PARSEOP_BITSPERBYTE_NINE
162 %token
<i
> PARSEOP_BITSPERBYTE_SEVEN
163 %token
<i
> PARSEOP_BITSPERBYTE_SIX
164 %token
<i
> PARSEOP_BREAK
165 %token
<i
> PARSEOP_BREAKPOINT
166 %token
<i
> PARSEOP_BUFFER
167 %token
<i
> PARSEOP_BUSMASTERTYPE_MASTER
168 %token
<i
> PARSEOP_BUSMASTERTYPE_NOTMASTER
169 %token
<i
> PARSEOP_BYTECONST
170 %token
<i
> PARSEOP_CASE
171 %token
<i
> PARSEOP_CLOCKPHASE_FIRST
172 %token
<i
> PARSEOP_CLOCKPHASE_SECOND
173 %token
<i
> PARSEOP_CLOCKPOLARITY_HIGH
174 %token
<i
> PARSEOP_CLOCKPOLARITY_LOW
175 %token
<i
> PARSEOP_CONCATENATE
176 %token
<i
> PARSEOP_CONCATENATERESTEMPLATE
177 %token
<i
> PARSEOP_CONDREFOF
178 %token
<i
> PARSEOP_CONNECTION
179 %token
<i
> PARSEOP_CONTINUE
180 %token
<i
> PARSEOP_COPYOBJECT
181 %token
<i
> PARSEOP_CREATEBITFIELD
182 %token
<i
> PARSEOP_CREATEBYTEFIELD
183 %token
<i
> PARSEOP_CREATEDWORDFIELD
184 %token
<i
> PARSEOP_CREATEFIELD
185 %token
<i
> PARSEOP_CREATEQWORDFIELD
186 %token
<i
> PARSEOP_CREATEWORDFIELD
187 %token
<i
> PARSEOP_DATABUFFER
188 %token
<i
> PARSEOP_DATATABLEREGION
189 %token
<i
> PARSEOP_DEBUG
190 %token
<i
> PARSEOP_DECODETYPE_POS
191 %token
<i
> PARSEOP_DECODETYPE_SUB
192 %token
<i
> PARSEOP_DECREMENT
193 %token
<i
> PARSEOP_DEFAULT
194 %token
<i
> PARSEOP_DEFAULT_ARG
195 %token
<i
> PARSEOP_DEFINITIONBLOCK
196 %token
<i
> PARSEOP_DEREFOF
197 %token
<i
> PARSEOP_DEVICE
198 %token
<i
> PARSEOP_DEVICEPOLARITY_HIGH
199 %token
<i
> PARSEOP_DEVICEPOLARITY_LOW
200 %token
<i
> PARSEOP_DIVIDE
201 %token
<i
> PARSEOP_DMA
202 %token
<i
> PARSEOP_DMATYPE_A
203 %token
<i
> PARSEOP_DMATYPE_COMPATIBILITY
204 %token
<i
> PARSEOP_DMATYPE_B
205 %token
<i
> PARSEOP_DMATYPE_F
206 %token
<i
> PARSEOP_DWORDCONST
207 %token
<i
> PARSEOP_DWORDIO
208 %token
<i
> PARSEOP_DWORDMEMORY
209 %token
<i
> PARSEOP_DWORDSPACE
210 %token
<i
> PARSEOP_EISAID
211 %token
<i
> PARSEOP_ELSE
212 %token
<i
> PARSEOP_ELSEIF
213 %token
<i
> PARSEOP_ENDDEPENDENTFN
214 %token
<i
> PARSEOP_ENDIAN_BIG
215 %token
<i
> PARSEOP_ENDIAN_LITTLE
216 %token
<i
> PARSEOP_ENDTAG
217 %token
<i
> PARSEOP_ERRORNODE
218 %token
<i
> PARSEOP_EVENT
219 %token
<i
> PARSEOP_EXTENDEDIO
220 %token
<i
> PARSEOP_EXTENDEDMEMORY
221 %token
<i
> PARSEOP_EXTENDEDSPACE
222 %token
<i
> PARSEOP_EXTERNAL
223 %token
<i
> PARSEOP_FATAL
224 %token
<i
> PARSEOP_FIELD
225 %token
<i
> PARSEOP_FINDSETLEFTBIT
226 %token
<i
> PARSEOP_FINDSETRIGHTBIT
227 %token
<i
> PARSEOP_FIXEDDMA
228 %token
<i
> PARSEOP_FIXEDIO
229 %token
<i
> PARSEOP_FLOWCONTROL_HW
230 %token
<i
> PARSEOP_FLOWCONTROL_NONE
231 %token
<i
> PARSEOP_FLOWCONTROL_SW
232 %token
<i
> PARSEOP_FROMBCD
233 %token
<i
> PARSEOP_FUNCTION
234 %token
<i
> PARSEOP_GPIO_INT
235 %token
<i
> PARSEOP_GPIO_IO
236 %token
<i
> PARSEOP_I2C_SERIALBUS
237 %token
<i
> PARSEOP_IF
238 %token
<i
> PARSEOP_INCLUDE
239 %token
<i
> PARSEOP_INCLUDE_END
240 %token
<i
> PARSEOP_INCREMENT
241 %token
<i
> PARSEOP_INDEX
242 %token
<i
> PARSEOP_INDEXFIELD
243 %token
<i
> PARSEOP_INTEGER
244 %token
<i
> PARSEOP_INTERRUPT
245 %token
<i
> PARSEOP_INTLEVEL_ACTIVEBOTH
246 %token
<i
> PARSEOP_INTLEVEL_ACTIVEHIGH
247 %token
<i
> PARSEOP_INTLEVEL_ACTIVELOW
248 %token
<i
> PARSEOP_INTTYPE_EDGE
249 %token
<i
> PARSEOP_INTTYPE_LEVEL
250 %token
<i
> PARSEOP_IO
251 %token
<i
> PARSEOP_IODECODETYPE_10
252 %token
<i
> PARSEOP_IODECODETYPE_16
253 %token
<i
> PARSEOP_IORESTRICT_IN
254 %token
<i
> PARSEOP_IORESTRICT_NONE
255 %token
<i
> PARSEOP_IORESTRICT_OUT
256 %token
<i
> PARSEOP_IORESTRICT_PRESERVE
257 %token
<i
> PARSEOP_IRQ
258 %token
<i
> PARSEOP_IRQNOFLAGS
259 %token
<i
> PARSEOP_LAND
260 %token
<i
> PARSEOP_LEQUAL
261 %token
<i
> PARSEOP_LGREATER
262 %token
<i
> PARSEOP_LGREATEREQUAL
263 %token
<i
> PARSEOP_LLESS
264 %token
<i
> PARSEOP_LLESSEQUAL
265 %token
<i
> PARSEOP_LNOT
266 %token
<i
> PARSEOP_LNOTEQUAL
267 %token
<i
> PARSEOP_LOAD
268 %token
<i
> PARSEOP_LOADTABLE
269 %token
<i
> PARSEOP_LOCAL0
270 %token
<i
> PARSEOP_LOCAL1
271 %token
<i
> PARSEOP_LOCAL2
272 %token
<i
> PARSEOP_LOCAL3
273 %token
<i
> PARSEOP_LOCAL4
274 %token
<i
> PARSEOP_LOCAL5
275 %token
<i
> PARSEOP_LOCAL6
276 %token
<i
> PARSEOP_LOCAL7
277 %token
<i
> PARSEOP_LOCKRULE_LOCK
278 %token
<i
> PARSEOP_LOCKRULE_NOLOCK
279 %token
<i
> PARSEOP_LOR
280 %token
<i
> PARSEOP_MATCH
281 %token
<i
> PARSEOP_MATCHTYPE_MEQ
282 %token
<i
> PARSEOP_MATCHTYPE_MGE
283 %token
<i
> PARSEOP_MATCHTYPE_MGT
284 %token
<i
> PARSEOP_MATCHTYPE_MLE
285 %token
<i
> PARSEOP_MATCHTYPE_MLT
286 %token
<i
> PARSEOP_MATCHTYPE_MTR
287 %token
<i
> PARSEOP_MAXTYPE_FIXED
288 %token
<i
> PARSEOP_MAXTYPE_NOTFIXED
289 %token
<i
> PARSEOP_MEMORY24
290 %token
<i
> PARSEOP_MEMORY32
291 %token
<i
> PARSEOP_MEMORY32FIXED
292 %token
<i
> PARSEOP_MEMTYPE_CACHEABLE
293 %token
<i
> PARSEOP_MEMTYPE_NONCACHEABLE
294 %token
<i
> PARSEOP_MEMTYPE_PREFETCHABLE
295 %token
<i
> PARSEOP_MEMTYPE_WRITECOMBINING
296 %token
<i
> PARSEOP_METHOD
297 %token
<i
> PARSEOP_METHODCALL
298 %token
<i
> PARSEOP_MID
299 %token
<i
> PARSEOP_MINTYPE_FIXED
300 %token
<i
> PARSEOP_MINTYPE_NOTFIXED
301 %token
<i
> PARSEOP_MOD
302 %token
<i
> PARSEOP_MULTIPLY
303 %token
<i
> PARSEOP_MUTEX
304 %token
<i
> PARSEOP_NAME
305 %token
<s
> PARSEOP_NAMESEG
306 %token
<s
> PARSEOP_NAMESTRING
307 %token
<i
> PARSEOP_NAND
308 %token
<i
> PARSEOP_NOOP
309 %token
<i
> PARSEOP_NOR
310 %token
<i
> PARSEOP_NOT
311 %token
<i
> PARSEOP_NOTIFY
312 %token
<i
> PARSEOP_OBJECTTYPE
313 %token
<i
> PARSEOP_OBJECTTYPE_BFF
314 %token
<i
> PARSEOP_OBJECTTYPE_BUF
315 %token
<i
> PARSEOP_OBJECTTYPE_DDB
316 %token
<i
> PARSEOP_OBJECTTYPE_DEV
317 %token
<i
> PARSEOP_OBJECTTYPE_EVT
318 %token
<i
> PARSEOP_OBJECTTYPE_FLD
319 %token
<i
> PARSEOP_OBJECTTYPE_INT
320 %token
<i
> PARSEOP_OBJECTTYPE_MTH
321 %token
<i
> PARSEOP_OBJECTTYPE_MTX
322 %token
<i
> PARSEOP_OBJECTTYPE_OPR
323 %token
<i
> PARSEOP_OBJECTTYPE_PKG
324 %token
<i
> PARSEOP_OBJECTTYPE_POW
325 %token
<i
> PARSEOP_OBJECTTYPE_PRO
326 %token
<i
> PARSEOP_OBJECTTYPE_STR
327 %token
<i
> PARSEOP_OBJECTTYPE_THZ
328 %token
<i
> PARSEOP_OBJECTTYPE_UNK
329 %token
<i
> PARSEOP_OFFSET
330 %token
<i
> PARSEOP_ONE
331 %token
<i
> PARSEOP_ONES
332 %token
<i
> PARSEOP_OPERATIONREGION
333 %token
<i
> PARSEOP_OR
334 %token
<i
> PARSEOP_PACKAGE
335 %token
<i
> PARSEOP_PACKAGE_LENGTH
336 %token
<i
> PARSEOP_PARITYTYPE_EVEN
337 %token
<i
> PARSEOP_PARITYTYPE_MARK
338 %token
<i
> PARSEOP_PARITYTYPE_NONE
339 %token
<i
> PARSEOP_PARITYTYPE_ODD
340 %token
<i
> PARSEOP_PARITYTYPE_SPACE
341 %token
<i
> PARSEOP_PIN_NOPULL
342 %token
<i
> PARSEOP_PIN_PULLDEFAULT
343 %token
<i
> PARSEOP_PIN_PULLDOWN
344 %token
<i
> PARSEOP_PIN_PULLUP
345 %token
<i
> PARSEOP_POWERRESOURCE
346 %token
<i
> PARSEOP_PROCESSOR
347 %token
<i
> PARSEOP_QWORDCONST
348 %token
<i
> PARSEOP_QWORDIO
349 %token
<i
> PARSEOP_QWORDMEMORY
350 %token
<i
> PARSEOP_QWORDSPACE
351 %token
<i
> PARSEOP_RANGETYPE_ENTIRE
352 %token
<i
> PARSEOP_RANGETYPE_ISAONLY
353 %token
<i
> PARSEOP_RANGETYPE_NONISAONLY
354 %token
<i
> PARSEOP_RAW_DATA
355 %token
<i
> PARSEOP_READWRITETYPE_BOTH
356 %token
<i
> PARSEOP_READWRITETYPE_READONLY
357 %token
<i
> PARSEOP_REFOF
358 %token
<i
> PARSEOP_REGIONSPACE_CMOS
359 %token
<i
> PARSEOP_REGIONSPACE_EC
360 %token
<i
> PARSEOP_REGIONSPACE_FFIXEDHW
361 %token
<i
> PARSEOP_REGIONSPACE_GPIO
362 %token
<i
> PARSEOP_REGIONSPACE_GSBUS
363 %token
<i
> PARSEOP_REGIONSPACE_IO
364 %token
<i
> PARSEOP_REGIONSPACE_IPMI
365 %token
<i
> PARSEOP_REGIONSPACE_MEM
366 %token
<i
> PARSEOP_REGIONSPACE_PCC
367 %token
<i
> PARSEOP_REGIONSPACE_PCI
368 %token
<i
> PARSEOP_REGIONSPACE_PCIBAR
369 %token
<i
> PARSEOP_REGIONSPACE_SMBUS
370 %token
<i
> PARSEOP_REGISTER
371 %token
<i
> PARSEOP_RELEASE
372 %token
<i
> PARSEOP_RESERVED_BYTES
373 %token
<i
> PARSEOP_RESET
374 %token
<i
> PARSEOP_RESOURCETEMPLATE
375 %token
<i
> PARSEOP_RESOURCETYPE_CONSUMER
376 %token
<i
> PARSEOP_RESOURCETYPE_PRODUCER
377 %token
<i
> PARSEOP_RETURN
378 %token
<i
> PARSEOP_REVISION
379 %token
<i
> PARSEOP_SCOPE
380 %token
<i
> PARSEOP_SERIALIZERULE_NOTSERIAL
381 %token
<i
> PARSEOP_SERIALIZERULE_SERIAL
382 %token
<i
> PARSEOP_SHARETYPE_EXCLUSIVE
383 %token
<i
> PARSEOP_SHARETYPE_EXCLUSIVEWAKE
384 %token
<i
> PARSEOP_SHARETYPE_SHARED
385 %token
<i
> PARSEOP_SHARETYPE_SHAREDWAKE
386 %token
<i
> PARSEOP_SHIFTLEFT
387 %token
<i
> PARSEOP_SHIFTRIGHT
388 %token
<i
> PARSEOP_SIGNAL
389 %token
<i
> PARSEOP_SIZEOF
390 %token
<i
> PARSEOP_SLAVEMODE_CONTROLLERINIT
391 %token
<i
> PARSEOP_SLAVEMODE_DEVICEINIT
392 %token
<i
> PARSEOP_SLEEP
393 %token
<i
> PARSEOP_SPI_SERIALBUS
394 %token
<i
> PARSEOP_STALL
395 %token
<i
> PARSEOP_STARTDEPENDENTFN
396 %token
<i
> PARSEOP_STARTDEPENDENTFN_NOPRI
397 %token
<i
> PARSEOP_STOPBITS_ONE
398 %token
<i
> PARSEOP_STOPBITS_ONEPLUSHALF
399 %token
<i
> PARSEOP_STOPBITS_TWO
400 %token
<i
> PARSEOP_STOPBITS_ZERO
401 %token
<i
> PARSEOP_STORE
402 %token
<s
> PARSEOP_STRING_LITERAL
403 %token
<i
> PARSEOP_SUBTRACT
404 %token
<i
> PARSEOP_SWITCH
405 %token
<i
> PARSEOP_THERMALZONE
406 %token
<i
> PARSEOP_TIMER
407 %token
<i
> PARSEOP_TOBCD
408 %token
<i
> PARSEOP_TOBUFFER
409 %token
<i
> PARSEOP_TODECIMALSTRING
410 %token
<i
> PARSEOP_TOHEXSTRING
411 %token
<i
> PARSEOP_TOINTEGER
412 %token
<i
> PARSEOP_TOSTRING
413 %token
<i
> PARSEOP_TOUUID
414 %token
<i
> PARSEOP_TRANSLATIONTYPE_DENSE
415 %token
<i
> PARSEOP_TRANSLATIONTYPE_SPARSE
416 %token
<i
> PARSEOP_TYPE_STATIC
417 %token
<i
> PARSEOP_TYPE_TRANSLATION
418 %token
<i
> PARSEOP_UART_SERIALBUS
419 %token
<i
> PARSEOP_UNICODE
420 %token
<i
> PARSEOP_UNLOAD
421 %token
<i
> PARSEOP_UPDATERULE_ONES
422 %token
<i
> PARSEOP_UPDATERULE_PRESERVE
423 %token
<i
> PARSEOP_UPDATERULE_ZEROS
424 %token
<i
> PARSEOP_VAR_PACKAGE
425 %token
<i
> PARSEOP_VENDORLONG
426 %token
<i
> PARSEOP_VENDORSHORT
427 %token
<i
> PARSEOP_WAIT
428 %token
<i
> PARSEOP_WHILE
429 %token
<i
> PARSEOP_WIREMODE_FOUR
430 %token
<i
> PARSEOP_WIREMODE_THREE
431 %token
<i
> PARSEOP_WORDBUSNUMBER
432 %token
<i
> PARSEOP_WORDCONST
433 %token
<i
> PARSEOP_WORDIO
434 %token
<i
> PARSEOP_WORDSPACE
435 %token
<i
> PARSEOP_XFERSIZE_8
436 %token
<i
> PARSEOP_XFERSIZE_16
437 %token
<i
> PARSEOP_XFERSIZE_32
438 %token
<i
> PARSEOP_XFERSIZE_64
439 %token
<i
> PARSEOP_XFERSIZE_128
440 %token
<i
> PARSEOP_XFERSIZE_256
441 %token
<i
> PARSEOP_XFERTYPE_8
442 %token
<i
> PARSEOP_XFERTYPE_8_16
443 %token
<i
> PARSEOP_XFERTYPE_16
444 %token
<i
> PARSEOP_XOR
445 %token
<i
> PARSEOP_ZERO
448 * Special functions. These should probably stay at the end of this
451 %token
<i
> PARSEOP___DATE__
452 %token
<i
> PARSEOP___FILE__
453 %token
<i
> PARSEOP___LINE__
454 %token
<i
> PARSEOP___PATH__
457 /******************************************************************************
461 *****************************************************************************/
466 %type
<n
> BufferTermData
467 %type
<n
> CompilerDirective
469 %type
<n
> DefinitionBlockTerm
470 %type
<n
> IntegerData
471 %type
<n
> NamedObject
472 %type
<n
> NameSpaceModifier
475 %type
<n
> PackageData
476 %type
<n
> ParameterTypePackage
477 %type
<n
> ParameterTypePackageList
478 %type
<n
> ParameterTypesPackage
479 %type
<n
> ParameterTypesPackageList
480 %type
<n
> RequiredTarget
481 %type
<n
> SimpleTarget
489 /* Type4Opcode is obsolete */
491 %type
<n
> Type1Opcode
492 %type
<n
> Type2BufferOpcode
493 %type
<n
> Type2BufferOrStringOpcode
494 %type
<n
> Type2IntegerOpcode
495 %type
<n
> Type2Opcode
496 %type
<n
> Type2StringOpcode
497 %type
<n
> Type3Opcode
498 %type
<n
> Type5Opcode
499 %type
<n
> Type6Opcode
501 %type
<n
> AccessAsTerm
502 %type
<n
> ExternalTerm
504 %type
<n
> FieldUnitEntry
505 %type
<n
> FieldUnitList
506 %type
<n
> IncludeTerm
508 %type
<n
> OptionalAccessAttribTerm
512 %type
<n
> BankFieldTerm
513 %type
<n
> CreateBitFieldTerm
514 %type
<n
> CreateByteFieldTerm
515 %type
<n
> CreateDWordFieldTerm
516 %type
<n
> CreateFieldTerm
517 %type
<n
> CreateQWordFieldTerm
518 %type
<n
> CreateWordFieldTerm
519 %type
<n
> DataRegionTerm
523 %type
<n
> FunctionTerm
524 %type
<n
> IndexFieldTerm
527 %type
<n
> OpRegionTerm
528 %type
<n
> OpRegionSpaceIdTerm
529 %type
<n
> PowerResTerm
530 %type
<n
> ProcessorTerm
531 %type
<n
> ThermalZoneTerm
533 /* Namespace modifiers */
541 %type
<n
> BreakPointTerm
543 %type
<n
> CaseDefaultTermList
545 %type
<n
> ContinueTerm
546 %type
<n
> DefaultTerm
554 %type
<n
> ReleaseTerm
563 /* %type <n> CaseTermList */
567 %type
<n
> AcquireTerm
570 %type
<n
> ConcatResTerm
572 %type
<n
> CondRefOfTerm
573 %type
<n
> CopyObjectTerm
575 %type
<n
> DerefOfTerm
577 %type
<n
> FindSetLeftBitTerm
578 %type
<n
> FindSetRightBitTerm
579 %type
<n
> FromBCDTerm
584 %type
<n
> LGreaterEqualTerm
585 %type
<n
> LGreaterTerm
586 %type
<n
> LLessEqualTerm
588 %type
<n
> LNotEqualTerm
590 %type
<n
> LoadTableTerm
595 %type
<n
> MultiplyTerm
599 %type
<n
> ObjectTypeTerm
602 %type
<n
> ShiftLeftTerm
603 %type
<n
> ShiftRightTerm
606 %type
<n
> SubtractTerm
609 %type
<n
> ToBufferTerm
610 %type
<n
> ToDecimalStringTerm
611 %type
<n
> ToHexStringTerm
612 %type
<n
> ToIntegerTerm
613 %type
<n
> ToStringTerm
619 %type
<n
> AccessAttribKeyword
620 %type
<n
> AccessTypeKeyword
621 %type
<n
> AddressingModeKeyword
622 %type
<n
> AddressKeyword
623 %type
<n
> AddressSpaceKeyword
624 %type
<n
> BitsPerByteKeyword
625 %type
<n
> ClockPhaseKeyword
626 %type
<n
> ClockPolarityKeyword
627 %type
<n
> DecodeKeyword
628 %type
<n
> DevicePolarityKeyword
629 %type
<n
> DMATypeKeyword
630 %type
<n
> EndianKeyword
631 %type
<n
> FlowControlKeyword
632 %type
<n
> InterruptLevel
633 %type
<n
> InterruptTypeKeyword
634 %type
<n
> IODecodeKeyword
635 %type
<n
> IoRestrictionKeyword
636 %type
<n
> LockRuleKeyword
637 %type
<n
> MatchOpKeyword
639 %type
<n
> MemTypeKeyword
641 %type
<n
> ObjectTypeKeyword
642 %type
<n
> OptionalBusMasterKeyword
643 %type
<n
> OptionalReadWriteKeyword
644 %type
<n
> ParityTypeKeyword
645 %type
<n
> PinConfigByte
646 %type
<n
> PinConfigKeyword
647 %type
<n
> RangeTypeKeyword
648 %type
<n
> RegionSpaceKeyword
649 %type
<n
> ResourceTypeKeyword
650 %type
<n
> SerializeRuleKeyword
651 %type
<n
> ShareTypeKeyword
652 %type
<n
> SlaveModeKeyword
653 %type
<n
> StopBitsKeyword
654 %type
<n
> TranslationKeyword
655 %type
<n
> TypeKeyword
656 %type
<n
> UpdateRuleKeyword
657 %type
<n
> WireModeKeyword
658 %type
<n
> XferSizeKeyword
659 %type
<n
> XferTypeKeyword
664 %type
<n
> ObjectTypeName
677 %type
<n
> ConstExprTerm
678 %type
<n
> ByteConstExpr
679 %type
<n
> WordConstExpr
680 %type
<n
> DWordConstExpr
681 %type
<n
> QWordConstExpr
687 %type
<n
> PackageElement
688 %type
<n
> PackageList
689 %type
<n
> PackageTerm
690 %type
<n
> VarPackageLengthTerm
695 %type
<n
> ResourceMacroList
696 %type
<n
> ResourceMacroTerm
697 %type
<n
> ResourceTemplateTerm
699 %type
<n
> UnicodeTerm
701 /* Resource Descriptors */
703 %type
<n
> ConnectionTerm
704 %type
<n
> DataBufferTerm
706 %type
<n
> DWordIOTerm
707 %type
<n
> DWordMemoryTerm
708 %type
<n
> DWordSpaceTerm
709 %type
<n
> EndDependentFnTerm
710 %type
<n
> ExtendedIOTerm
711 %type
<n
> ExtendedMemoryTerm
712 %type
<n
> ExtendedSpaceTerm
713 %type
<n
> FixedDmaTerm
714 %type
<n
> FixedIOTerm
715 %type
<n
> GpioIntTerm
717 %type
<n
> I2cSerialBusTerm
718 %type
<n
> InterruptTerm
720 %type
<n
> IRQNoFlagsTerm
722 %type
<n
> Memory24Term
723 %type
<n
> Memory32FixedTerm
724 %type
<n
> Memory32Term
727 %type
<n
> QWordIOTerm
728 %type
<n
> QWordMemoryTerm
729 %type
<n
> QWordSpaceTerm
730 %type
<n
> RegisterTerm
731 %type
<n
> SpiSerialBusTerm
732 %type
<n
> StartDependentFnNoPriTerm
733 %type
<n
> StartDependentFnTerm
734 %type
<n
> UartSerialBusTerm
735 %type
<n
> VendorLongTerm
736 %type
<n
> VendorShortTerm
737 %type
<n
> WordBusNumberTerm
739 %type
<n
> WordSpaceTerm
741 /* Local types that help construct the AML, not in ACPI spec */
743 %type
<n
> AmlPackageLengthTerm
744 %type
<n
> IncludeEndTerm
745 %type
<n
> NameStringItem
746 %type
<n
> TermArgItem
748 %type
<n
> OptionalAccessSize
749 %type
<n
> OptionalAddressingMode
750 %type
<n
> OptionalAddressRange
751 %type
<n
> OptionalBitsPerByte
752 %type
<n
> OptionalBuffer_Last
753 %type
<n
> OptionalByteConstExpr
754 %type
<n
> OptionalCount
755 %type
<n
> OptionalDecodeType
756 %type
<n
> OptionalDevicePolarity
757 %type
<n
> OptionalDWordConstExpr
758 %type
<n
> OptionalEndian
759 %type
<n
> OptionalFlowControl
760 %type
<n
> OptionalIoRestriction
761 %type
<n
> OptionalListString
762 %type
<n
> OptionalMaxType
763 %type
<n
> OptionalMemType
764 %type
<n
> OptionalMinType
765 %type
<n
> OptionalNameString
766 %type
<n
> OptionalNameString_First
767 %type
<n
> OptionalNameString_Last
768 %type
<n
> OptionalObjectTypeKeyword
769 %type
<n
> OptionalParameterTypePackage
770 %type
<n
> OptionalParameterTypesPackage
771 %type
<n
> OptionalParityType
772 %type
<n
> OptionalQWordConstExpr
773 %type
<n
> OptionalRangeType
774 %type
<n
> OptionalReference
775 %type
<n
> OptionalResourceType
776 %type
<n
> OptionalResourceType_First
777 %type
<n
> OptionalReturnArg
778 %type
<n
> OptionalSerializeRuleKeyword
779 %type
<n
> OptionalShareType
780 %type
<n
> OptionalShareType_First
781 %type
<n
> OptionalSlaveMode
782 %type
<n
> OptionalStopBits
783 %type
<n
> OptionalStringData
784 %type
<n
> OptionalTermArg
785 %type
<n
> OptionalTranslationType_Last
786 %type
<n
> OptionalType
787 %type
<n
> OptionalType_Last
788 %type
<n
> OptionalWireMode
789 %type
<n
> OptionalWordConst
790 %type
<n
> OptionalWordConstExpr
791 %type
<n
> OptionalXferSize
794 /*******************************************************************************
796 * Production rules start here
798 ******************************************************************************/
806 * Root rule. Allow multiple #line directives before the definition block
807 * to handle output from preprocessors
810 : DefinitionBlockTerm
811 |
error {YYABORT; $$
= NULL
;}
815 * Blocks, Data, and Opcodes
819 * Note concerning support for "module-level code".
821 * ACPI 1.0 allowed Type1 and Type2 executable opcodes outside of control
822 * methods (the so-called module-level code.) This support was explicitly
823 * removed in ACPI 2.0, but this type of code continues to be created by
824 * BIOS vendors. In order to support the disassembly and recompilation of
825 * such code (and the porting of ASL code to iASL), iASL supports this
826 * code in violation of the current ACPI specification.
828 * The grammar change to support module-level code is to revert the
829 * {ObjectList} portion of the DefinitionBlockTerm in ACPI 2.0 to the
830 * original use of {TermList} instead (see below.) This allows the use
831 * of Type1 and Type2 opcodes at module level.
834 : PARSEOP_DEFINITIONBLOCK
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DEFINITIONBLOCK
);}
841 ')' {TrSetEndLineNumber
($
<n
>3);}
842 '{' TermList
'}' {$$
= TrLinkChildren
($
<n
>3,7,$4,$6,$8,$10,$12,$14,$18);}
845 /* ACPI 3.0 -- allow semicolons between terms */
849 | TermList Term
{$$
= TrLinkPeerNode
(TrSetNodeFlags
($1, NODE_RESULT_NOT_USED
),$2);}
850 | TermList Term
';' {$$
= TrLinkPeerNode
(TrSetNodeFlags
($1, NODE_RESULT_NOT_USED
),$2);}
851 | TermList
';' Term
{$$
= TrLinkPeerNode
(TrSetNodeFlags
($1, NODE_RESULT_NOT_USED
),$3);}
852 | TermList
';' Term
';' {$$
= TrLinkPeerNode
(TrSetNodeFlags
($1, NODE_RESULT_NOT_USED
),$3);}
859 | Type2IntegerOpcode
{}
860 | Type2StringOpcode
{}
861 | Type2BufferOpcode
{}
862 | Type2BufferOrStringOpcode
{}
863 |
error {$$
= AslDoError
(); yyclearin;}
873 | ObjectList Object
{$$
= TrLinkPeerNode
($1,$2);}
874 |
error {$$
= AslDoError
(); yyclearin;}
878 : CompilerDirective
{}
880 | NameSpaceModifier
{}
891 : Type5Opcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
);}
892 | Type2BufferOrStringOpcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
);}
893 | Type2BufferOpcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
);}
902 : Type2IntegerOpcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
);}
903 | Type3Opcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
);}
909 : Type2StringOpcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
);}
915 | CreateBitFieldTerm
{}
916 | CreateByteFieldTerm
{}
917 | CreateDWordFieldTerm
{}
919 | CreateQWordFieldTerm
{}
920 | CreateWordFieldTerm
{}
942 : NameString
'(' {TrUpdateNode
(PARSEOP_METHODCALL
, $1);}
943 ArgList
')' {$$
= TrLinkChildNode
($1,$4);}
949 | ArgList
',' /* Allows a trailing comma at list end */
951 TermArg
{$$
= TrLinkPeerNode
($1,$3);}
955 Removed from TermArg due to reduce/reduce conflicts
956 | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
957 | Type2StringOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
958 | Type2BufferOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
959 | Type2BufferOrStringOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
964 : Type2Opcode
{$$
= TrSetNodeFlags
($1, NODE_IS_TERM_ARG
);}
965 | DataObject
{$$
= TrSetNodeFlags
($1, NODE_IS_TERM_ARG
);}
966 | NameString
{$$
= TrSetNodeFlags
($1, NODE_IS_TERM_ARG
);}
967 | ArgTerm
{$$
= TrSetNodeFlags
($1, NODE_IS_TERM_ARG
);}
968 | LocalTerm
{$$
= TrSetNodeFlags
($1, NODE_IS_TERM_ARG
);}
972 : {$$
= TrSetNodeFlags
(TrCreateLeafNode
(PARSEOP_ZERO
), NODE_IS_TARGET | NODE_COMPILE_TIME_CONST
);} /* Placeholder is a ZeroOp object */
973 |
',' {$$
= TrSetNodeFlags
(TrCreateLeafNode
(PARSEOP_ZERO
), NODE_IS_TARGET | NODE_COMPILE_TIME_CONST
);} /* Placeholder is a ZeroOp object */
974 |
',' SuperName
{$$
= TrSetNodeFlags
($2, NODE_IS_TARGET
);}
978 : ',' SuperName
{$$
= TrSetNodeFlags
($2, NODE_IS_TARGET
);}
987 /* Rules for specifying the type of one method argument or return value */
991 | ObjectTypeKeyword
{$$
= $1;}
992 | ParameterTypePackage
','
993 ObjectTypeKeyword
{$$
= TrLinkPeerNodes
(2,$1,$3);}
996 ParameterTypePackageList
998 | ObjectTypeKeyword
{$$
= $1;}
999 |
'{' ParameterTypePackage
'}' {$$
= $2;}
1002 OptionalParameterTypePackage
1003 : {$$
= TrCreateLeafNode
(PARSEOP_DEFAULT_ARG
);}
1004 |
',' ParameterTypePackageList
{$$
= TrLinkChildren
(TrCreateLeafNode
(PARSEOP_DEFAULT_ARG
),1,$2);}
1007 /* Rules for specifying the types for method arguments */
1009 ParameterTypesPackage
1010 : ParameterTypePackageList
{$$
= $1;}
1011 | ParameterTypesPackage
','
1012 ParameterTypePackageList
{$$
= TrLinkPeerNodes
(2,$1,$3);}
1015 ParameterTypesPackageList
1017 | ObjectTypeKeyword
{$$
= $1;}
1018 |
'{' ParameterTypesPackage
'}' {$$
= $2;}
1021 OptionalParameterTypesPackage
1022 : {$$
= TrCreateLeafNode
(PARSEOP_DEFAULT_ARG
);}
1023 |
',' ParameterTypesPackageList
{$$
= TrLinkChildren
(TrCreateLeafNode
(PARSEOP_DEFAULT_ARG
),1,$2);}
1064 * Type 3/4/5 opcodes
1067 Type2IntegerOpcode
/* "Type3" opcodes */
1072 | FindSetLeftBitTerm
{}
1073 | FindSetRightBitTerm
{}
1080 | LGreaterEqualTerm
{}
1102 Type2StringOpcode
/* "Type4" Opcodes */
1103 : ToDecimalStringTerm
{}
1104 | ToHexStringTerm
{}
1108 Type2BufferOpcode
/* "Type5" Opcodes */
1113 Type2BufferOrStringOpcode
1119 * A type 3 opcode evaluates to an Integer and cannot have a destination operand
1129 | ToDecimalStringTerm {}
1130 | ToHexStringTerm {}
1138 : ResourceTemplateTerm
{}
1151 : PARSEOP_INCLUDE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_INCLUDE
);}
1152 String
')' {TrLinkChildren
($
<n
>3,1,$4);FlOpenIncludeFile
($4);}
1154 IncludeEndTerm
{$$
= TrLinkPeerNodes
(3,$
<n
>3,$7,$8);}
1158 : PARSEOP_INCLUDE_END
{$$
= TrCreateLeafNode
(PARSEOP_INCLUDE_END
);}
1162 : PARSEOP_EXTERNAL
'('
1164 OptionalObjectTypeKeyword
1165 OptionalParameterTypePackage
1166 OptionalParameterTypesPackage
1167 ')' {$$
= TrCreateNode
(PARSEOP_EXTERNAL
,4,$3,$4,$5,$6);}
1168 | PARSEOP_EXTERNAL
'('
1169 error ')' {$$
= AslDoError
(); yyclearin;}
1173 /******* Named Objects *******************************************************/
1177 : PARSEOP_BANKFIELD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_BANKFIELD
);}
1181 ',' AccessTypeKeyword
1183 ',' UpdateRuleKeyword
1185 FieldUnitList
'}' {$$
= TrLinkChildren
($
<n
>3,7,$4,$5,$6,$8,$10,$12,$15);}
1186 | PARSEOP_BANKFIELD
'('
1187 error ')' '{' error '}' {$$
= AslDoError
(); yyclearin;}
1193 | FieldUnitList
',' /* Allows a trailing comma at list end */
1195 FieldUnit
{$$
= TrLinkPeerNode
($1,$3);}
1206 : ',' AmlPackageLengthTerm
{$$
= TrCreateNode
(PARSEOP_RESERVED_BYTES
,1,$2);}
1208 AmlPackageLengthTerm
{$$
= TrLinkChildNode
($1,$3);}
1212 : PARSEOP_OFFSET
'('
1213 AmlPackageLengthTerm
1214 ')' {$$
= TrCreateNode
(PARSEOP_OFFSET
,1,$3);}
1215 | PARSEOP_OFFSET
'('
1216 error ')' {$$
= AslDoError
(); yyclearin;}
1220 : PARSEOP_ACCESSAS
'('
1222 OptionalAccessAttribTerm
1223 ')' {$$
= TrCreateNode
(PARSEOP_ACCESSAS
,2,$3,$4);}
1224 | PARSEOP_ACCESSAS
'('
1225 error ')' {$$
= AslDoError
(); yyclearin;}
1229 : PARSEOP_CONNECTION
'('
1231 ')' {$$
= TrCreateNode
(PARSEOP_CONNECTION
,1,$3);}
1232 | PARSEOP_CONNECTION
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CONNECTION
);}
1234 ')' {$$
= TrLinkChildren
($
<n
>3, 1,
1235 TrLinkChildren
(TrCreateLeafNode
(PARSEOP_RESOURCETEMPLATE
), 3,
1236 TrCreateLeafNode
(PARSEOP_DEFAULT_ARG
),
1237 TrCreateLeafNode
(PARSEOP_DEFAULT_ARG
),
1239 | PARSEOP_CONNECTION
'('
1240 error ')' {$$
= AslDoError
(); yyclearin;}
1244 : PARSEOP_CREATEBITFIELD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CREATEBITFIELD
);}
1248 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,TrSetNodeFlags
($6, NODE_IS_NAME_DECLARATION
));}
1249 | PARSEOP_CREATEBITFIELD
'('
1250 error ')' {$$
= AslDoError
(); yyclearin;}
1254 : PARSEOP_CREATEBYTEFIELD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CREATEBYTEFIELD
);}
1258 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,TrSetNodeFlags
($6, NODE_IS_NAME_DECLARATION
));}
1259 | PARSEOP_CREATEBYTEFIELD
'('
1260 error ')' {$$
= AslDoError
(); yyclearin;}
1263 CreateDWordFieldTerm
1264 : PARSEOP_CREATEDWORDFIELD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CREATEDWORDFIELD
);}
1268 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,TrSetNodeFlags
($6, NODE_IS_NAME_DECLARATION
));}
1269 | PARSEOP_CREATEDWORDFIELD
'('
1270 error ')' {$$
= AslDoError
(); yyclearin;}
1274 : PARSEOP_CREATEFIELD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CREATEFIELD
);}
1279 ')' {$$
= TrLinkChildren
($
<n
>3,4,$4,$5,$6,TrSetNodeFlags
($7, NODE_IS_NAME_DECLARATION
));}
1280 | PARSEOP_CREATEFIELD
'('
1281 error ')' {$$
= AslDoError
(); yyclearin;}
1284 CreateQWordFieldTerm
1285 : PARSEOP_CREATEQWORDFIELD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CREATEQWORDFIELD
);}
1289 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,TrSetNodeFlags
($6, NODE_IS_NAME_DECLARATION
));}
1290 | PARSEOP_CREATEQWORDFIELD
'('
1291 error ')' {$$
= AslDoError
(); yyclearin;}
1295 : PARSEOP_CREATEWORDFIELD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CREATEWORDFIELD
);}
1299 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,TrSetNodeFlags
($6, NODE_IS_NAME_DECLARATION
));}
1300 | PARSEOP_CREATEWORDFIELD
'('
1301 error ')' {$$
= AslDoError
(); yyclearin;}
1305 : PARSEOP_DATATABLEREGION
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DATATABLEREGION
);}
1310 ')' {$$
= TrLinkChildren
($
<n
>3,4,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$5,$6,$7);}
1311 | PARSEOP_DATATABLEREGION
'('
1312 error ')' {$$
= AslDoError
(); yyclearin;}
1316 : PARSEOP_DEVICE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DEVICE
);}
1319 ObjectList
'}' {$$
= TrLinkChildren
($
<n
>3,2,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$7);}
1320 | PARSEOP_DEVICE
'('
1321 error ')' {$$
= AslDoError
(); yyclearin;}
1325 : PARSEOP_EVENT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_EVENT
);}
1327 ')' {$$
= TrLinkChildren
($
<n
>3,1,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
));}
1329 error ')' {$$
= AslDoError
(); yyclearin;}
1333 : PARSEOP_FIELD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_FIELD
);}
1335 ',' AccessTypeKeyword
1337 ',' UpdateRuleKeyword
1339 FieldUnitList
'}' {$$
= TrLinkChildren
($
<n
>3,5,$4,$6,$8,$10,$13);}
1341 error ')' '{' error '}' {$$
= AslDoError
(); yyclearin;}
1345 : PARSEOP_FUNCTION
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_METHOD
);}
1347 OptionalParameterTypePackage
1348 OptionalParameterTypesPackage
1350 TermList
'}' {$$
= TrLinkChildren
($
<n
>3,7,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),
1351 TrCreateValuedLeafNode
(PARSEOP_BYTECONST
, 0),
1352 TrCreateLeafNode
(PARSEOP_SERIALIZERULE_NOTSERIAL
),
1353 TrCreateValuedLeafNode
(PARSEOP_BYTECONST
, 0),$5,$6,$9);}
1354 | PARSEOP_FUNCTION
'('
1355 error ')' {$$
= AslDoError
(); yyclearin;}
1359 : PARSEOP_INDEXFIELD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_INDEXFIELD
);}
1362 ',' AccessTypeKeyword
1364 ',' UpdateRuleKeyword
1366 FieldUnitList
'}' {$$
= TrLinkChildren
($
<n
>3,6,$4,$5,$7,$9,$11,$14);}
1367 | PARSEOP_INDEXFIELD
'('
1368 error ')' '{' error '}' {$$
= AslDoError
(); yyclearin;}
1372 : PARSEOP_METHOD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_METHOD
);}
1374 OptionalByteConstExpr
{UtCheckIntegerRange
($5, 0, 7);}
1375 OptionalSerializeRuleKeyword
1376 OptionalByteConstExpr
1377 OptionalParameterTypePackage
1378 OptionalParameterTypesPackage
1380 TermList
'}' {$$
= TrLinkChildren
($
<n
>3,7,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$5,$7,$8,$9,$10,$13);}
1381 | PARSEOP_METHOD
'('
1382 error ')' {$$
= AslDoError
(); yyclearin;}
1386 : PARSEOP_MUTEX
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_MUTEX
);}
1389 ')' {$$
= TrLinkChildren
($
<n
>3,2,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$6);}
1391 error ')' {$$
= AslDoError
(); yyclearin;}
1395 : PARSEOP_OPERATIONREGION
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_OPERATIONREGION
);}
1397 ',' OpRegionSpaceIdTerm
1400 ')' {$$
= TrLinkChildren
($
<n
>3,4,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$6,$7,$8);}
1401 | PARSEOP_OPERATIONREGION
'('
1402 error ')' {$$
= AslDoError
(); yyclearin;}
1406 : RegionSpaceKeyword
{}
1407 | ByteConst
{$$
= UtCheckIntegerRange
($1, 0x80, 0xFF);}
1411 : PARSEOP_POWERRESOURCE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_POWERRESOURCE
);}
1416 ObjectList
'}' {$$
= TrLinkChildren
($
<n
>3,4,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$6,$8,$11);}
1417 | PARSEOP_POWERRESOURCE
'('
1418 error ')' {$$
= AslDoError
(); yyclearin;}
1422 : PARSEOP_PROCESSOR
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_PROCESSOR
);}
1425 OptionalDWordConstExpr
1426 OptionalByteConstExpr
1428 ObjectList
'}' {$$
= TrLinkChildren
($
<n
>3,5,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$6,$7,$8,$11);}
1429 | PARSEOP_PROCESSOR
'('
1430 error ')' {$$
= AslDoError
(); yyclearin;}
1434 : PARSEOP_THERMALZONE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_THERMALZONE
);}
1437 ObjectList
'}' {$$
= TrLinkChildren
($
<n
>3,2,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$7);}
1438 | PARSEOP_THERMALZONE
'('
1439 error ')' {$$
= AslDoError
(); yyclearin;}
1443 /******* Namespace modifiers *************************************************/
1447 : PARSEOP_ALIAS
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_ALIAS
);}
1450 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,TrSetNodeFlags
($5, NODE_IS_NAME_DECLARATION
));}
1452 error ')' {$$
= AslDoError
(); yyclearin;}
1456 : PARSEOP_NAME
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_NAME
);}
1459 ')' {$$
= TrLinkChildren
($
<n
>3,2,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$6);}
1461 error ')' {$$
= AslDoError
(); yyclearin;}
1465 : PARSEOP_SCOPE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_SCOPE
);}
1468 ObjectList
'}' {$$
= TrLinkChildren
($
<n
>3,2,TrSetNodeFlags
($4, NODE_IS_NAME_DECLARATION
),$7);}
1470 error ')' {$$
= AslDoError
(); yyclearin;}
1474 /******* Type 1 opcodes *******************************************************/
1478 : PARSEOP_BREAK
{$$
= TrCreateNode
(PARSEOP_BREAK
, 0);}
1482 : PARSEOP_BREAKPOINT
{$$
= TrCreateNode
(PARSEOP_BREAKPOINT
, 0);}
1486 : PARSEOP_CONTINUE
{$$
= TrCreateNode
(PARSEOP_CONTINUE
, 0);}
1490 : PARSEOP_FATAL
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_FATAL
);}
1494 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$6,$7);}
1496 error ')' {$$
= AslDoError
(); yyclearin;}
1500 : IfTerm ElseTerm
{$$
= TrLinkPeerNode
($1,$2);}
1504 : PARSEOP_IF
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_IF
);}
1507 TermList
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
1510 error ')' {$$
= AslDoError
(); yyclearin;}
1515 | PARSEOP_ELSE
'{' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_ELSE
);}
1516 TermList
'}' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1519 error '}' {$$
= AslDoError
(); yyclearin;}
1522 error {$$
= AslDoError
(); yyclearin;}
1524 | PARSEOP_ELSEIF
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_ELSE
);}
1525 TermArg
{$
<n
>$
= TrCreateLeafNode
(PARSEOP_IF
);}
1527 TermList
'}' {TrLinkChildren
($
<n
>5,2,$4,$8);}
1528 ElseTerm
{TrLinkPeerNode
($
<n
>5,$11);}
1529 {$$
= TrLinkChildren
($
<n
>3,1,$
<n
>5);}
1531 | PARSEOP_ELSEIF
'('
1532 error ')' {$$
= AslDoError
(); yyclearin;}
1535 error {$$
= AslDoError
(); yyclearin;}
1539 : PARSEOP_LOAD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LOAD
);}
1542 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1544 error ')' {$$
= AslDoError
(); yyclearin;}
1548 : PARSEOP_NOOP
{$$
= TrCreateNode
(PARSEOP_NOOP
, 0);}
1552 : PARSEOP_NOTIFY
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_NOTIFY
);}
1555 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1556 | PARSEOP_NOTIFY
'('
1557 error ')' {$$
= AslDoError
(); yyclearin;}
1561 : PARSEOP_RELEASE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_RELEASE
);}
1563 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1564 | PARSEOP_RELEASE
'('
1565 error ')' {$$
= AslDoError
(); yyclearin;}
1569 : PARSEOP_RESET
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_RESET
);}
1571 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1573 error ')' {$$
= AslDoError
(); yyclearin;}
1577 : PARSEOP_RETURN
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_RETURN
);}
1579 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1580 | PARSEOP_RETURN
{$$
= TrLinkChildren
(TrCreateLeafNode
(PARSEOP_RETURN
),1,TrSetNodeFlags
(TrCreateLeafNode
(PARSEOP_ZERO
), NODE_IS_NULL_RETURN
));}
1581 | PARSEOP_RETURN
'('
1582 error ')' {$$
= AslDoError
(); yyclearin;}
1586 : PARSEOP_SIGNAL
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_SIGNAL
);}
1588 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1589 | PARSEOP_SIGNAL
'('
1590 error ')' {$$
= AslDoError
(); yyclearin;}
1594 : PARSEOP_SLEEP
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_SLEEP
);}
1596 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1598 error ')' {$$
= AslDoError
(); yyclearin;}
1602 : PARSEOP_STALL
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_STALL
);}
1604 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1606 error ')' {$$
= AslDoError
(); yyclearin;}
1610 : PARSEOP_SWITCH
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_SWITCH
);}
1613 CaseDefaultTermList
'}'
1614 {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
1615 | PARSEOP_SWITCH
'('
1616 error ')' {$$
= AslDoError
(); yyclearin;}
1620 * Case-Default list; allow only one Default term and unlimited Case terms
1627 | CaseDefaultTermList
1628 CaseTerm
{$$
= TrLinkPeerNode
($1,$2);}
1629 | CaseDefaultTermList
1630 DefaultTerm
{$$
= TrLinkPeerNode
($1,$2);}
1632 /* Original - attempts to force zero or one default term within the switch */
1639 CaseTermList {$$ = TrLinkPeerNode ($1,TrLinkPeerNode ($2, $3));}
1641 CaseTerm {$$ = TrLinkPeerNode ($1,$2);}
1648 CaseTerm {$$ = TrLinkPeerNode ($1,$2);}
1653 : PARSEOP_CASE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CASE
);}
1656 TermList
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
1658 error ')' {$$
= AslDoError
(); yyclearin;}
1662 : PARSEOP_DEFAULT
'{' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DEFAULT
);}
1663 TermList
'}' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1664 | PARSEOP_DEFAULT
'{'
1665 error '}' {$$
= AslDoError
(); yyclearin;}
1669 : PARSEOP_UNLOAD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_UNLOAD
);}
1671 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1672 | PARSEOP_UNLOAD
'('
1673 error ')' {$$
= AslDoError
(); yyclearin;}
1677 : PARSEOP_WHILE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_WHILE
);}
1679 ')' '{' TermList
'}'
1680 {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
1682 error ')' {$$
= AslDoError
(); yyclearin;}
1686 /******* Type 2 opcodes *******************************************************/
1689 : PARSEOP_ACQUIRE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_ACQUIRE
);}
1692 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$6);}
1693 | PARSEOP_ACQUIRE
'('
1694 error ')' {$$
= AslDoError
(); yyclearin;}
1698 : PARSEOP_ADD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_ADD
);}
1702 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1704 error ')' {$$
= AslDoError
(); yyclearin;}
1708 : PARSEOP_AND
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_AND
);}
1712 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1714 error ')' {$$
= AslDoError
(); yyclearin;}
1718 : PARSEOP_CONCATENATE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CONCATENATE
);}
1722 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1723 | PARSEOP_CONCATENATE
'('
1724 error ')' {$$
= AslDoError
(); yyclearin;}
1728 : PARSEOP_CONCATENATERESTEMPLATE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CONCATENATERESTEMPLATE
);}
1732 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1733 | PARSEOP_CONCATENATERESTEMPLATE
'('
1734 error ')' {$$
= AslDoError
(); yyclearin;}
1738 : PARSEOP_CONDREFOF
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_CONDREFOF
);}
1741 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1742 | PARSEOP_CONDREFOF
'('
1743 error ')' {$$
= AslDoError
(); yyclearin;}
1747 : PARSEOP_COPYOBJECT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_COPYOBJECT
);}
1750 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,TrSetNodeFlags
($6, NODE_IS_TARGET
));}
1751 | PARSEOP_COPYOBJECT
'('
1752 error ')' {$$
= AslDoError
(); yyclearin;}
1756 : PARSEOP_DECREMENT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DECREMENT
);}
1758 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1759 | PARSEOP_DECREMENT
'('
1760 error ')' {$$
= AslDoError
(); yyclearin;}
1764 : PARSEOP_DEREFOF
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DEREFOF
);}
1766 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1767 | PARSEOP_DEREFOF
'('
1768 error ')' {$$
= AslDoError
(); yyclearin;}
1772 : PARSEOP_DIVIDE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DIVIDE
);}
1777 ')' {$$
= TrLinkChildren
($
<n
>3,4,$4,$5,$6,$7);}
1778 | PARSEOP_DIVIDE
'('
1779 error ')' {$$
= AslDoError
(); yyclearin;}
1783 : PARSEOP_FINDSETLEFTBIT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_FINDSETLEFTBIT
);}
1786 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1787 | PARSEOP_FINDSETLEFTBIT
'('
1788 error ')' {$$
= AslDoError
(); yyclearin;}
1792 : PARSEOP_FINDSETRIGHTBIT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_FINDSETRIGHTBIT
);}
1795 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1796 | PARSEOP_FINDSETRIGHTBIT
'('
1797 error ')' {$$
= AslDoError
(); yyclearin;}
1801 : PARSEOP_FROMBCD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_FROMBCD
);}
1804 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1805 | PARSEOP_FROMBCD
'('
1806 error ')' {$$
= AslDoError
(); yyclearin;}
1810 : PARSEOP_INCREMENT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_INCREMENT
);}
1812 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1813 | PARSEOP_INCREMENT
'('
1814 error ')' {$$
= AslDoError
(); yyclearin;}
1818 : PARSEOP_INDEX
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_INDEX
);}
1822 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1824 error ')' {$$
= AslDoError
(); yyclearin;}
1828 : PARSEOP_LAND
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LAND
);}
1831 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1833 error ')' {$$
= AslDoError
(); yyclearin;}
1837 : PARSEOP_LEQUAL
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LEQUAL
);}
1840 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1841 | PARSEOP_LEQUAL
'('
1842 error ')' {$$
= AslDoError
(); yyclearin;}
1846 : PARSEOP_LGREATER
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LGREATER
);}
1849 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1850 | PARSEOP_LGREATER
'('
1851 error ')' {$$
= AslDoError
(); yyclearin;}
1855 : PARSEOP_LGREATEREQUAL
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LLESS
);}
1858 ')' {$$
= TrCreateNode
(PARSEOP_LNOT
, 1, TrLinkChildren
($
<n
>3,2,$4,$5));}
1859 | PARSEOP_LGREATEREQUAL
'('
1860 error ')' {$$
= AslDoError
(); yyclearin;}
1864 : PARSEOP_LLESS
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LLESS
);}
1867 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1869 error ')' {$$
= AslDoError
(); yyclearin;}
1873 : PARSEOP_LLESSEQUAL
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LGREATER
);}
1876 ')' {$$
= TrCreateNode
(PARSEOP_LNOT
, 1, TrLinkChildren
($
<n
>3,2,$4,$5));}
1877 | PARSEOP_LLESSEQUAL
'('
1878 error ')' {$$
= AslDoError
(); yyclearin;}
1882 : PARSEOP_LNOT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LNOT
);}
1884 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1886 error ')' {$$
= AslDoError
(); yyclearin;}
1890 : PARSEOP_LNOTEQUAL
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LEQUAL
);}
1893 ')' {$$
= TrCreateNode
(PARSEOP_LNOT
, 1, TrLinkChildren
($
<n
>3,2,$4,$5));}
1894 | PARSEOP_LNOTEQUAL
'('
1895 error ')' {$$
= AslDoError
(); yyclearin;}
1899 : PARSEOP_LOADTABLE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LOADTABLE
);}
1906 ')' {$$
= TrLinkChildren
($
<n
>3,6,$4,$5,$6,$7,$8,$9);}
1907 | PARSEOP_LOADTABLE
'('
1908 error ')' {$$
= AslDoError
(); yyclearin;}
1912 : PARSEOP_LOR
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_LOR
);}
1915 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1917 error ')' {$$
= AslDoError
(); yyclearin;}
1921 : PARSEOP_MATCH
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_MATCH
);}
1928 ')' {$$
= TrLinkChildren
($
<n
>3,6,$4,$6,$7,$9,$10,$11);}
1930 error ')' {$$
= AslDoError
(); yyclearin;}
1934 : PARSEOP_MID
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_MID
);}
1939 ')' {$$
= TrLinkChildren
($
<n
>3,4,$4,$5,$6,$7);}
1941 error ')' {$$
= AslDoError
(); yyclearin;}
1945 : PARSEOP_MOD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_MOD
);}
1949 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1951 error ')' {$$
= AslDoError
(); yyclearin;}
1955 : PARSEOP_MULTIPLY
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_MULTIPLY
);}
1959 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1960 | PARSEOP_MULTIPLY
'('
1961 error ')' {$$
= AslDoError
(); yyclearin;}
1965 : PARSEOP_NAND
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_NAND
);}
1969 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1971 error ')' {$$
= AslDoError
(); yyclearin;}
1975 : PARSEOP_NOR
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_NOR
);}
1979 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
1981 error ')' {$$
= AslDoError
(); yyclearin;}
1985 : PARSEOP_NOT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_NOT
);}
1988 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
1990 error ')' {$$
= AslDoError
(); yyclearin;}
1994 : PARSEOP_OBJECTTYPE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE
);}
1996 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
1997 | PARSEOP_OBJECTTYPE
'('
1998 error ')' {$$
= AslDoError
(); yyclearin;}
2002 : PARSEOP_OR
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_OR
);}
2006 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
2008 error ')' {$$
= AslDoError
(); yyclearin;}
2012 * In RefOf, the node isn't really a target, but we can't keep track of it after
2013 * we've taken a pointer to it. (hard to tell if a local becomes initialized this way.)
2016 : PARSEOP_REFOF
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_REFOF
);}
2018 ')' {$$
= TrLinkChildren
($
<n
>3,1,TrSetNodeFlags
($4, NODE_IS_TARGET
));}
2020 error ')' {$$
= AslDoError
(); yyclearin;}
2024 : PARSEOP_SHIFTLEFT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_SHIFTLEFT
);}
2028 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
2029 | PARSEOP_SHIFTLEFT
'('
2030 error ')' {$$
= AslDoError
(); yyclearin;}
2034 : PARSEOP_SHIFTRIGHT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_SHIFTRIGHT
);}
2038 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
2039 | PARSEOP_SHIFTRIGHT
'('
2040 error ')' {$$
= AslDoError
(); yyclearin;}
2044 : PARSEOP_SIZEOF
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_SIZEOF
);}
2046 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
2047 | PARSEOP_SIZEOF
'('
2048 error ')' {$$
= AslDoError
(); yyclearin;}
2052 : PARSEOP_STORE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_STORE
);}
2055 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,TrSetNodeFlags
($6, NODE_IS_TARGET
));}
2057 error ')' {$$
= AslDoError
(); yyclearin;}
2061 : PARSEOP_SUBTRACT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_SUBTRACT
);}
2065 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
2066 | PARSEOP_SUBTRACT
'('
2067 error ')' {$$
= AslDoError
(); yyclearin;}
2071 : PARSEOP_TIMER
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_TIMER
);}
2072 ')' {$$
= TrLinkChildren
($
<n
>3,0);}
2073 | PARSEOP_TIMER
{$$
= TrLinkChildren
(TrCreateLeafNode
(PARSEOP_TIMER
),0);}
2075 error ')' {$$
= AslDoError
(); yyclearin;}
2079 : PARSEOP_TOBCD
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_TOBCD
);}
2082 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
2084 error ')' {$$
= AslDoError
(); yyclearin;}
2088 : PARSEOP_TOBUFFER
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_TOBUFFER
);}
2091 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
2092 | PARSEOP_TOBUFFER
'('
2093 error ')' {$$
= AslDoError
(); yyclearin;}
2097 : PARSEOP_TODECIMALSTRING
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_TODECIMALSTRING
);}
2100 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
2101 | PARSEOP_TODECIMALSTRING
'('
2102 error ')' {$$
= AslDoError
(); yyclearin;}
2106 : PARSEOP_TOHEXSTRING
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_TOHEXSTRING
);}
2109 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
2110 | PARSEOP_TOHEXSTRING
'('
2111 error ')' {$$
= AslDoError
(); yyclearin;}
2115 : PARSEOP_TOINTEGER
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_TOINTEGER
);}
2118 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
2119 | PARSEOP_TOINTEGER
'('
2120 error ')' {$$
= AslDoError
(); yyclearin;}
2124 : PARSEOP_TOSTRING
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_TOSTRING
);}
2128 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
2129 | PARSEOP_TOSTRING
'('
2130 error ')' {$$
= AslDoError
(); yyclearin;}
2134 : PARSEOP_TOUUID
'('
2135 StringData
')' {$$
= TrUpdateNode
(PARSEOP_TOUUID
, $3);}
2136 | PARSEOP_TOUUID
'('
2137 error ')' {$$
= AslDoError
(); yyclearin;}
2141 : PARSEOP_WAIT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_WAIT
);}
2144 ')' {$$
= TrLinkChildren
($
<n
>3,2,$4,$5);}
2146 error ')' {$$
= AslDoError
(); yyclearin;}
2150 : PARSEOP_XOR
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_XOR
);}
2154 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$5,$6);}
2156 error ')' {$$
= AslDoError
(); yyclearin;}
2160 /******* Keywords *************************************************************/
2164 : PARSEOP_ACCESSATTRIB_BLOCK
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSATTRIB_BLOCK
);}
2165 | PARSEOP_ACCESSATTRIB_BLOCK_CALL
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSATTRIB_BLOCK_CALL
);}
2166 | PARSEOP_ACCESSATTRIB_BYTE
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSATTRIB_BYTE
);}
2167 | PARSEOP_ACCESSATTRIB_QUICK
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSATTRIB_QUICK
);}
2168 | PARSEOP_ACCESSATTRIB_SND_RCV
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSATTRIB_SND_RCV
);}
2169 | PARSEOP_ACCESSATTRIB_WORD
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSATTRIB_WORD
);}
2170 | PARSEOP_ACCESSATTRIB_WORD_CALL
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSATTRIB_WORD_CALL
);}
2171 | PARSEOP_ACCESSATTRIB_MULTIBYTE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_ACCESSATTRIB_MULTIBYTE
);}
2173 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
2174 | PARSEOP_ACCESSATTRIB_RAW_BYTES
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_ACCESSATTRIB_RAW_BYTES
);}
2176 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
2177 | PARSEOP_ACCESSATTRIB_RAW_PROCESS
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_ACCESSATTRIB_RAW_PROCESS
);}
2179 ')' {$$
= TrLinkChildren
($
<n
>3,1,$4);}
2183 : PARSEOP_ACCESSTYPE_ANY
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSTYPE_ANY
);}
2184 | PARSEOP_ACCESSTYPE_BYTE
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSTYPE_BYTE
);}
2185 | PARSEOP_ACCESSTYPE_WORD
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSTYPE_WORD
);}
2186 | PARSEOP_ACCESSTYPE_DWORD
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSTYPE_DWORD
);}
2187 | PARSEOP_ACCESSTYPE_QWORD
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSTYPE_QWORD
);}
2188 | PARSEOP_ACCESSTYPE_BUF
{$$
= TrCreateLeafNode
(PARSEOP_ACCESSTYPE_BUF
);}
2191 AddressingModeKeyword
2192 : PARSEOP_ADDRESSINGMODE_7BIT
{$$
= TrCreateLeafNode
(PARSEOP_ADDRESSINGMODE_7BIT
);}
2193 | PARSEOP_ADDRESSINGMODE_10BIT
{$$
= TrCreateLeafNode
(PARSEOP_ADDRESSINGMODE_10BIT
);}
2197 : PARSEOP_ADDRESSTYPE_MEMORY
{$$
= TrCreateLeafNode
(PARSEOP_ADDRESSTYPE_MEMORY
);}
2198 | PARSEOP_ADDRESSTYPE_RESERVED
{$$
= TrCreateLeafNode
(PARSEOP_ADDRESSTYPE_RESERVED
);}
2199 | PARSEOP_ADDRESSTYPE_NVS
{$$
= TrCreateLeafNode
(PARSEOP_ADDRESSTYPE_NVS
);}
2200 | PARSEOP_ADDRESSTYPE_ACPI
{$$
= TrCreateLeafNode
(PARSEOP_ADDRESSTYPE_ACPI
);}
2204 : ByteConst
{$$
= UtCheckIntegerRange
($1, 0x0A, 0xFF);}
2205 | RegionSpaceKeyword
{}
2209 : PARSEOP_BITSPERBYTE_FIVE
{$$
= TrCreateLeafNode
(PARSEOP_BITSPERBYTE_FIVE
);}
2210 | PARSEOP_BITSPERBYTE_SIX
{$$
= TrCreateLeafNode
(PARSEOP_BITSPERBYTE_SIX
);}
2211 | PARSEOP_BITSPERBYTE_SEVEN
{$$
= TrCreateLeafNode
(PARSEOP_BITSPERBYTE_SEVEN
);}
2212 | PARSEOP_BITSPERBYTE_EIGHT
{$$
= TrCreateLeafNode
(PARSEOP_BITSPERBYTE_EIGHT
);}
2213 | PARSEOP_BITSPERBYTE_NINE
{$$
= TrCreateLeafNode
(PARSEOP_BITSPERBYTE_NINE
);}
2217 : PARSEOP_CLOCKPHASE_FIRST
{$$
= TrCreateLeafNode
(PARSEOP_CLOCKPHASE_FIRST
);}
2218 | PARSEOP_CLOCKPHASE_SECOND
{$$
= TrCreateLeafNode
(PARSEOP_CLOCKPHASE_SECOND
);}
2221 ClockPolarityKeyword
2222 : PARSEOP_CLOCKPOLARITY_LOW
{$$
= TrCreateLeafNode
(PARSEOP_CLOCKPOLARITY_LOW
);}
2223 | PARSEOP_CLOCKPOLARITY_HIGH
{$$
= TrCreateLeafNode
(PARSEOP_CLOCKPOLARITY_HIGH
);}
2227 : PARSEOP_DECODETYPE_POS
{$$
= TrCreateLeafNode
(PARSEOP_DECODETYPE_POS
);}
2228 | PARSEOP_DECODETYPE_SUB
{$$
= TrCreateLeafNode
(PARSEOP_DECODETYPE_SUB
);}
2231 DevicePolarityKeyword
2232 : PARSEOP_DEVICEPOLARITY_LOW
{$$
= TrCreateLeafNode
(PARSEOP_DEVICEPOLARITY_LOW
);}
2233 | PARSEOP_DEVICEPOLARITY_HIGH
{$$
= TrCreateLeafNode
(PARSEOP_DEVICEPOLARITY_HIGH
);}
2237 : PARSEOP_DMATYPE_A
{$$
= TrCreateLeafNode
(PARSEOP_DMATYPE_A
);}
2238 | PARSEOP_DMATYPE_COMPATIBILITY
{$$
= TrCreateLeafNode
(PARSEOP_DMATYPE_COMPATIBILITY
);}
2239 | PARSEOP_DMATYPE_B
{$$
= TrCreateLeafNode
(PARSEOP_DMATYPE_B
);}
2240 | PARSEOP_DMATYPE_F
{$$
= TrCreateLeafNode
(PARSEOP_DMATYPE_F
);}
2244 : PARSEOP_ENDIAN_LITTLE
{$$
= TrCreateLeafNode
(PARSEOP_ENDIAN_LITTLE
);}
2245 | PARSEOP_ENDIAN_BIG
{$$
= TrCreateLeafNode
(PARSEOP_ENDIAN_BIG
);}
2249 : PARSEOP_FLOWCONTROL_HW
{$$
= TrCreateLeafNode
(PARSEOP_FLOWCONTROL_HW
);}
2250 | PARSEOP_FLOWCONTROL_NONE
{$$
= TrCreateLeafNode
(PARSEOP_FLOWCONTROL_NONE
);}
2251 | PARSEOP_FLOWCONTROL_SW
{$$
= TrCreateLeafNode
(PARSEOP_FLOWCONTROL_SW
);}
2255 : PARSEOP_INTLEVEL_ACTIVEBOTH
{$$
= TrCreateLeafNode
(PARSEOP_INTLEVEL_ACTIVEBOTH
);}
2256 | PARSEOP_INTLEVEL_ACTIVEHIGH
{$$
= TrCreateLeafNode
(PARSEOP_INTLEVEL_ACTIVEHIGH
);}
2257 | PARSEOP_INTLEVEL_ACTIVELOW
{$$
= TrCreateLeafNode
(PARSEOP_INTLEVEL_ACTIVELOW
);}
2260 InterruptTypeKeyword
2261 : PARSEOP_INTTYPE_EDGE
{$$
= TrCreateLeafNode
(PARSEOP_INTTYPE_EDGE
);}
2262 | PARSEOP_INTTYPE_LEVEL
{$$
= TrCreateLeafNode
(PARSEOP_INTTYPE_LEVEL
);}
2266 : PARSEOP_IODECODETYPE_16
{$$
= TrCreateLeafNode
(PARSEOP_IODECODETYPE_16
);}
2267 | PARSEOP_IODECODETYPE_10
{$$
= TrCreateLeafNode
(PARSEOP_IODECODETYPE_10
);}
2270 IoRestrictionKeyword
2271 : PARSEOP_IORESTRICT_IN
{$$
= TrCreateLeafNode
(PARSEOP_IORESTRICT_IN
);}
2272 | PARSEOP_IORESTRICT_OUT
{$$
= TrCreateLeafNode
(PARSEOP_IORESTRICT_OUT
);}
2273 | PARSEOP_IORESTRICT_NONE
{$$
= TrCreateLeafNode
(PARSEOP_IORESTRICT_NONE
);}
2274 | PARSEOP_IORESTRICT_PRESERVE
{$$
= TrCreateLeafNode
(PARSEOP_IORESTRICT_PRESERVE
);}
2278 : PARSEOP_LOCKRULE_LOCK
{$$
= TrCreateLeafNode
(PARSEOP_LOCKRULE_LOCK
);}
2279 | PARSEOP_LOCKRULE_NOLOCK
{$$
= TrCreateLeafNode
(PARSEOP_LOCKRULE_NOLOCK
);}
2283 : PARSEOP_MATCHTYPE_MTR
{$$
= TrCreateLeafNode
(PARSEOP_MATCHTYPE_MTR
);}
2284 | PARSEOP_MATCHTYPE_MEQ
{$$
= TrCreateLeafNode
(PARSEOP_MATCHTYPE_MEQ
);}
2285 | PARSEOP_MATCHTYPE_MLE
{$$
= TrCreateLeafNode
(PARSEOP_MATCHTYPE_MLE
);}
2286 | PARSEOP_MATCHTYPE_MLT
{$$
= TrCreateLeafNode
(PARSEOP_MATCHTYPE_MLT
);}
2287 | PARSEOP_MATCHTYPE_MGE
{$$
= TrCreateLeafNode
(PARSEOP_MATCHTYPE_MGE
);}
2288 | PARSEOP_MATCHTYPE_MGT
{$$
= TrCreateLeafNode
(PARSEOP_MATCHTYPE_MGT
);}
2292 : PARSEOP_MAXTYPE_FIXED
{$$
= TrCreateLeafNode
(PARSEOP_MAXTYPE_FIXED
);}
2293 | PARSEOP_MAXTYPE_NOTFIXED
{$$
= TrCreateLeafNode
(PARSEOP_MAXTYPE_NOTFIXED
);}
2297 : PARSEOP_MEMTYPE_CACHEABLE
{$$
= TrCreateLeafNode
(PARSEOP_MEMTYPE_CACHEABLE
);}
2298 | PARSEOP_MEMTYPE_WRITECOMBINING
{$$
= TrCreateLeafNode
(PARSEOP_MEMTYPE_WRITECOMBINING
);}
2299 | PARSEOP_MEMTYPE_PREFETCHABLE
{$$
= TrCreateLeafNode
(PARSEOP_MEMTYPE_PREFETCHABLE
);}
2300 | PARSEOP_MEMTYPE_NONCACHEABLE
{$$
= TrCreateLeafNode
(PARSEOP_MEMTYPE_NONCACHEABLE
);}
2304 : PARSEOP_MINTYPE_FIXED
{$$
= TrCreateLeafNode
(PARSEOP_MINTYPE_FIXED
);}
2305 | PARSEOP_MINTYPE_NOTFIXED
{$$
= TrCreateLeafNode
(PARSEOP_MINTYPE_NOTFIXED
);}
2309 : PARSEOP_OBJECTTYPE_UNK
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_UNK
);}
2310 | PARSEOP_OBJECTTYPE_INT
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_INT
);}
2311 | PARSEOP_OBJECTTYPE_STR
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_STR
);}
2312 | PARSEOP_OBJECTTYPE_BUF
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_BUF
);}
2313 | PARSEOP_OBJECTTYPE_PKG
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_PKG
);}
2314 | PARSEOP_OBJECTTYPE_FLD
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_FLD
);}
2315 | PARSEOP_OBJECTTYPE_DEV
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_DEV
);}
2316 | PARSEOP_OBJECTTYPE_EVT
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_EVT
);}
2317 | PARSEOP_OBJECTTYPE_MTH
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_MTH
);}
2318 | PARSEOP_OBJECTTYPE_MTX
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_MTX
);}
2319 | PARSEOP_OBJECTTYPE_OPR
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_OPR
);}
2320 | PARSEOP_OBJECTTYPE_POW
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_POW
);}
2321 | PARSEOP_OBJECTTYPE_PRO
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_PRO
);}
2322 | PARSEOP_OBJECTTYPE_THZ
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_THZ
);}
2323 | PARSEOP_OBJECTTYPE_BFF
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_BFF
);}
2324 | PARSEOP_OBJECTTYPE_DDB
{$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_DDB
);}
2328 : PARSEOP_PARITYTYPE_SPACE
{$$
= TrCreateLeafNode
(PARSEOP_PARITYTYPE_SPACE
);}
2329 | PARSEOP_PARITYTYPE_MARK
{$$
= TrCreateLeafNode
(PARSEOP_PARITYTYPE_MARK
);}
2330 | PARSEOP_PARITYTYPE_ODD
{$$
= TrCreateLeafNode
(PARSEOP_PARITYTYPE_ODD
);}
2331 | PARSEOP_PARITYTYPE_EVEN
{$$
= TrCreateLeafNode
(PARSEOP_PARITYTYPE_EVEN
);}
2332 | PARSEOP_PARITYTYPE_NONE
{$$
= TrCreateLeafNode
(PARSEOP_PARITYTYPE_NONE
);}
2336 : PinConfigKeyword
{$$
= $1;}
2337 | ByteConstExpr
{$$
= UtCheckIntegerRange
($1, 0x80, 0xFF);}
2341 : PARSEOP_PIN_NOPULL
{$$
= TrCreateLeafNode
(PARSEOP_PIN_NOPULL
);}
2342 | PARSEOP_PIN_PULLDOWN
{$$
= TrCreateLeafNode
(PARSEOP_PIN_PULLDOWN
);}
2343 | PARSEOP_PIN_PULLUP
{$$
= TrCreateLeafNode
(PARSEOP_PIN_PULLUP
);}
2344 | PARSEOP_PIN_PULLDEFAULT
{$$
= TrCreateLeafNode
(PARSEOP_PIN_PULLDEFAULT
);}
2348 : PARSEOP_RANGETYPE_ISAONLY
{$$
= TrCreateLeafNode
(PARSEOP_RANGETYPE_ISAONLY
);}
2349 | PARSEOP_RANGETYPE_NONISAONLY
{$$
= TrCreateLeafNode
(PARSEOP_RANGETYPE_NONISAONLY
);}
2350 | PARSEOP_RANGETYPE_ENTIRE
{$$
= TrCreateLeafNode
(PARSEOP_RANGETYPE_ENTIRE
);}
2354 : PARSEOP_REGIONSPACE_IO
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_IO
);}
2355 | PARSEOP_REGIONSPACE_MEM
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_MEM
);}
2356 | PARSEOP_REGIONSPACE_PCI
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_PCI
);}
2357 | PARSEOP_REGIONSPACE_EC
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_EC
);}
2358 | PARSEOP_REGIONSPACE_SMBUS
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_SMBUS
);}
2359 | PARSEOP_REGIONSPACE_CMOS
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_CMOS
);}
2360 | PARSEOP_REGIONSPACE_PCIBAR
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_PCIBAR
);}
2361 | PARSEOP_REGIONSPACE_IPMI
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_IPMI
);}
2362 | PARSEOP_REGIONSPACE_GPIO
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_GPIO
);}
2363 | PARSEOP_REGIONSPACE_GSBUS
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_GSBUS
);}
2364 | PARSEOP_REGIONSPACE_PCC
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_PCC
);}
2365 | PARSEOP_REGIONSPACE_FFIXEDHW
{$$
= TrCreateLeafNode
(PARSEOP_REGIONSPACE_FFIXEDHW
);}
2369 : PARSEOP_RESOURCETYPE_CONSUMER
{$$
= TrCreateLeafNode
(PARSEOP_RESOURCETYPE_CONSUMER
);}
2370 | PARSEOP_RESOURCETYPE_PRODUCER
{$$
= TrCreateLeafNode
(PARSEOP_RESOURCETYPE_PRODUCER
);}
2373 SerializeRuleKeyword
2374 : PARSEOP_SERIALIZERULE_SERIAL
{$$
= TrCreateLeafNode
(PARSEOP_SERIALIZERULE_SERIAL
);}
2375 | PARSEOP_SERIALIZERULE_NOTSERIAL
{$$
= TrCreateLeafNode
(PARSEOP_SERIALIZERULE_NOTSERIAL
);}
2379 : PARSEOP_SHARETYPE_SHARED
{$$
= TrCreateLeafNode
(PARSEOP_SHARETYPE_SHARED
);}
2380 | PARSEOP_SHARETYPE_EXCLUSIVE
{$$
= TrCreateLeafNode
(PARSEOP_SHARETYPE_EXCLUSIVE
);}
2381 | PARSEOP_SHARETYPE_SHAREDWAKE
{$$
= TrCreateLeafNode
(PARSEOP_SHARETYPE_SHAREDWAKE
);}
2382 | PARSEOP_SHARETYPE_EXCLUSIVEWAKE
{$$
= TrCreateLeafNode
(PARSEOP_SHARETYPE_EXCLUSIVEWAKE
);}
2386 : PARSEOP_SLAVEMODE_CONTROLLERINIT
{$$
= TrCreateLeafNode
(PARSEOP_SLAVEMODE_CONTROLLERINIT
);}
2387 | PARSEOP_SLAVEMODE_DEVICEINIT
{$$
= TrCreateLeafNode
(PARSEOP_SLAVEMODE_DEVICEINIT
);}
2391 : PARSEOP_STOPBITS_TWO
{$$
= TrCreateLeafNode
(PARSEOP_STOPBITS_TWO
);}
2392 | PARSEOP_STOPBITS_ONEPLUSHALF
{$$
= TrCreateLeafNode
(PARSEOP_STOPBITS_ONEPLUSHALF
);}
2393 | PARSEOP_STOPBITS_ONE
{$$
= TrCreateLeafNode
(PARSEOP_STOPBITS_ONE
);}
2394 | PARSEOP_STOPBITS_ZERO
{$$
= TrCreateLeafNode
(PARSEOP_STOPBITS_ZERO
);}
2398 : PARSEOP_TRANSLATIONTYPE_SPARSE
{$$
= TrCreateLeafNode
(PARSEOP_TRANSLATIONTYPE_SPARSE
);}
2399 | PARSEOP_TRANSLATIONTYPE_DENSE
{$$
= TrCreateLeafNode
(PARSEOP_TRANSLATIONTYPE_DENSE
);}
2403 : PARSEOP_TYPE_TRANSLATION
{$$
= TrCreateLeafNode
(PARSEOP_TYPE_TRANSLATION
);}
2404 | PARSEOP_TYPE_STATIC
{$$
= TrCreateLeafNode
(PARSEOP_TYPE_STATIC
);}
2408 : PARSEOP_UPDATERULE_PRESERVE
{$$
= TrCreateLeafNode
(PARSEOP_UPDATERULE_PRESERVE
);}
2409 | PARSEOP_UPDATERULE_ONES
{$$
= TrCreateLeafNode
(PARSEOP_UPDATERULE_ONES
);}
2410 | PARSEOP_UPDATERULE_ZEROS
{$$
= TrCreateLeafNode
(PARSEOP_UPDATERULE_ZEROS
);}
2414 : PARSEOP_WIREMODE_FOUR
{$$
= TrCreateLeafNode
(PARSEOP_WIREMODE_FOUR
);}
2415 | PARSEOP_WIREMODE_THREE
{$$
= TrCreateLeafNode
(PARSEOP_WIREMODE_THREE
);}
2419 : PARSEOP_XFERSIZE_8
{$$
= TrCreateValuedLeafNode
(PARSEOP_XFERSIZE_8
, 0);}
2420 | PARSEOP_XFERSIZE_16
{$$
= TrCreateValuedLeafNode
(PARSEOP_XFERSIZE_16
, 1);}
2421 | PARSEOP_XFERSIZE_32
{$$
= TrCreateValuedLeafNode
(PARSEOP_XFERSIZE_32
, 2);}
2422 | PARSEOP_XFERSIZE_64
{$$
= TrCreateValuedLeafNode
(PARSEOP_XFERSIZE_64
, 3);}
2423 | PARSEOP_XFERSIZE_128
{$$
= TrCreateValuedLeafNode
(PARSEOP_XFERSIZE_128
, 4);}
2424 | PARSEOP_XFERSIZE_256
{$$
= TrCreateValuedLeafNode
(PARSEOP_XFERSIZE_256
, 5);}
2428 : PARSEOP_XFERTYPE_8
{$$
= TrCreateLeafNode
(PARSEOP_XFERTYPE_8
);}
2429 | PARSEOP_XFERTYPE_8_16
{$$
= TrCreateLeafNode
(PARSEOP_XFERTYPE_8_16
);}
2430 | PARSEOP_XFERTYPE_16
{$$
= TrCreateLeafNode
(PARSEOP_XFERTYPE_16
);}
2434 /******* Miscellaneous Types **************************************************/
2444 /* For ObjectType: SuperName except for UserTerm (method invocation) */
2455 /* | UserTerm {} */ /* Caused reduce/reduce with Type6Opcode->UserTerm */
2459 : PARSEOP_ARG0
{$$
= TrCreateLeafNode
(PARSEOP_ARG0
);}
2460 | PARSEOP_ARG1
{$$
= TrCreateLeafNode
(PARSEOP_ARG1
);}
2461 | PARSEOP_ARG2
{$$
= TrCreateLeafNode
(PARSEOP_ARG2
);}
2462 | PARSEOP_ARG3
{$$
= TrCreateLeafNode
(PARSEOP_ARG3
);}
2463 | PARSEOP_ARG4
{$$
= TrCreateLeafNode
(PARSEOP_ARG4
);}
2464 | PARSEOP_ARG5
{$$
= TrCreateLeafNode
(PARSEOP_ARG5
);}
2465 | PARSEOP_ARG6
{$$
= TrCreateLeafNode
(PARSEOP_ARG6
);}
2469 : PARSEOP_LOCAL0
{$$
= TrCreateLeafNode
(PARSEOP_LOCAL0
);}
2470 | PARSEOP_LOCAL1
{$$
= TrCreateLeafNode
(PARSEOP_LOCAL1
);}
2471 | PARSEOP_LOCAL2
{$$
= TrCreateLeafNode
(PARSEOP_LOCAL2
);}
2472 | PARSEOP_LOCAL3
{$$
= TrCreateLeafNode
(PARSEOP_LOCAL3
);}
2473 | PARSEOP_LOCAL4
{$$
= TrCreateLeafNode
(PARSEOP_LOCAL4
);}
2474 | PARSEOP_LOCAL5
{$$
= TrCreateLeafNode
(PARSEOP_LOCAL5
);}
2475 | PARSEOP_LOCAL6
{$$
= TrCreateLeafNode
(PARSEOP_LOCAL6
);}
2476 | PARSEOP_LOCAL7
{$$
= TrCreateLeafNode
(PARSEOP_LOCAL7
);}
2480 : PARSEOP_DEBUG
{$$
= TrCreateLeafNode
(PARSEOP_DEBUG
);}
2485 : Integer
{$$
= TrUpdateNode
(PARSEOP_BYTECONST
, $1);}
2489 : Integer
{$$
= TrUpdateNode
(PARSEOP_WORDCONST
, $1);}
2493 : Integer
{$$
= TrUpdateNode
(PARSEOP_DWORDCONST
, $1);}
2497 : Integer
{$$
= TrUpdateNode
(PARSEOP_QWORDCONST
, $1);}
2501 : PARSEOP_INTEGER
{$$
= TrCreateValuedLeafNode
(PARSEOP_INTEGER
, AslCompilerlval.i
);}
2505 : PARSEOP_STRING_LITERAL
{$$
= TrCreateValuedLeafNode
(PARSEOP_STRING_LITERAL
, (ACPI_NATIVE_INT
) AslCompilerlval.s
);}
2510 | PARSEOP_REVISION
{$$
= TrCreateLeafNode
(PARSEOP_REVISION
);}
2514 : PARSEOP_ZERO
{$$
= TrCreateValuedLeafNode
(PARSEOP_ZERO
, 0);}
2515 | PARSEOP_ONE
{$$
= TrCreateValuedLeafNode
(PARSEOP_ONE
, 1);}
2516 | PARSEOP_ONES
{$$
= TrCreateValuedLeafNode
(PARSEOP_ONES
, ACPI_UINT64_MAX
);}
2517 | PARSEOP___DATE__
{$$
= TrCreateConstantLeafNode
(PARSEOP___DATE__
);}
2518 | PARSEOP___FILE__
{$$
= TrCreateConstantLeafNode
(PARSEOP___FILE__
);}
2519 | PARSEOP___LINE__
{$$
= TrCreateConstantLeafNode
(PARSEOP___LINE__
);}
2520 | PARSEOP___PATH__
{$$
= TrCreateConstantLeafNode
(PARSEOP___PATH__
);}
2524 * The NODE_COMPILE_TIME_CONST flag in the following constant expressions
2525 * enables compile-time constant folding to reduce the Type3Opcodes/Type2IntegerOpcodes
2526 * to simple integers. It is an error if these types of expressions cannot be
2527 * reduced, since the AML grammar for ****ConstExpr requires a simple constant.
2528 * Note: The required byte length of the constant is passed through to the
2529 * constant folding code in the node AmlLength field.
2532 : Type3Opcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
); TrSetNodeAmlLength
($1, 1);}
2533 | Type2IntegerOpcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
); TrSetNodeAmlLength
($1, 1);}
2534 | ConstExprTerm
{$$
= TrUpdateNode
(PARSEOP_BYTECONST
, $1);}
2539 : Type3Opcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
); TrSetNodeAmlLength
($1, 2);}
2540 | Type2IntegerOpcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
); TrSetNodeAmlLength
($1, 2);}
2541 | ConstExprTerm
{$$
= TrUpdateNode
(PARSEOP_WORDCONST
, $1);}
2546 : Type3Opcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
); TrSetNodeAmlLength
($1, 4);}
2547 | Type2IntegerOpcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
); TrSetNodeAmlLength
($1, 4);}
2548 | ConstExprTerm
{$$
= TrUpdateNode
(PARSEOP_DWORDCONST
, $1);}
2553 : Type3Opcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
); TrSetNodeAmlLength
($1, 8);}
2554 | Type2IntegerOpcode
{$$
= TrSetNodeFlags
($1, NODE_COMPILE_TIME_CONST
); TrSetNodeAmlLength
($1, 8);}
2555 | ConstExprTerm
{$$
= TrUpdateNode
(PARSEOP_QWORDCONST
, $1);}
2559 /* OptionalCount must appear before ByteList or an incorrect reduction will result */
2562 : {$$
= TrCreateLeafNode
(PARSEOP_ONES
);} /* Placeholder is a OnesOp object */
2563 |
',' {$$
= TrCreateLeafNode
(PARSEOP_ONES
);} /* Placeholder is a OnesOp object */
2564 |
',' TermArg
{$$
= $2;}
2568 : PARSEOP_BUFFER
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_BUFFER
);}
2571 BufferTermData
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
2572 | PARSEOP_BUFFER
'('
2573 error ')' {$$
= AslDoError
(); yyclearin;}
2584 | ByteList
',' /* Allows a trailing comma at list end */
2586 ByteConstExpr
{$$
= TrLinkPeerNode
($1,$3);}
2590 : PARSEOP_DATABUFFER
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DATABUFFER
);}
2593 ByteList
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
2594 | PARSEOP_DATABUFFER
'('
2595 error ')' {$$
= AslDoError
(); yyclearin;}
2601 | DWordList
',' /* Allows a trailing comma at list end */
2603 DWordConstExpr
{$$
= TrLinkPeerNode
($1,$3);}
2607 : PARSEOP_PACKAGE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_VAR_PACKAGE
);}
2608 VarPackageLengthTerm
2610 PackageList
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
2611 | PARSEOP_PACKAGE
'('
2612 error ')' {$$
= AslDoError
(); yyclearin;}
2618 | PackageList
',' /* Allows a trailing comma at list end */
2620 PackageElement
{$$
= TrLinkPeerNode
($1,$3);}
2628 VarPackageLengthTerm
2629 : {$$
= TrCreateLeafNode
(PARSEOP_DEFAULT_ARG
);}
2630 | TermArg
{$$
= $1;}
2634 /******* Macros ***********************************************/
2638 : PARSEOP_EISAID
'('
2639 StringData
')' {$$
= TrUpdateNode
(PARSEOP_EISAID
, $3);}
2640 | PARSEOP_EISAID
'('
2641 error ')' {$$
= AslDoError
(); yyclearin;}
2645 : PARSEOP_UNICODE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_UNICODE
);}
2647 ')' {$$
= TrLinkChildren
($
<n
>3,2,0,$4);}
2648 | PARSEOP_UNICODE
'('
2649 error ')' {$$
= AslDoError
(); yyclearin;}
2653 /******* Resources and Memory ***********************************************/
2657 * Note: Create two default nodes to allow conversion to a Buffer AML opcode
2658 * Also, insert the EndTag at the end of the template.
2660 ResourceTemplateTerm
2661 : PARSEOP_RESOURCETEMPLATE
'(' ')'
2663 ResourceMacroList
'}' {$$
= TrCreateNode
(PARSEOP_RESOURCETEMPLATE
,4,
2664 TrCreateLeafNode
(PARSEOP_DEFAULT_ARG
),
2665 TrCreateLeafNode
(PARSEOP_DEFAULT_ARG
),
2667 TrCreateLeafNode
(PARSEOP_ENDTAG
));}
2673 ResourceMacroTerm
{$$
= TrLinkPeerNode
($1,$2);}
2679 | DWordMemoryTerm
{}
2681 | EndDependentFnTerm
{}
2683 | ExtendedMemoryTerm
{}
2684 | ExtendedSpaceTerm
{}
2689 | I2cSerialBusTerm
{}
2695 | Memory32FixedTerm
{}
2698 | QWordMemoryTerm
{}
2701 | SpiSerialBusTerm
{}
2702 | StartDependentFnNoPriTerm
{}
2703 | StartDependentFnTerm
{}
2704 | UartSerialBusTerm
{}
2706 | VendorShortTerm
{}
2707 | WordBusNumberTerm
{}
2713 : PARSEOP_DMA
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DMA
);}
2715 OptionalBusMasterKeyword
2717 OptionalNameString_Last
2719 ByteList
'}' {$$
= TrLinkChildren
($
<n
>3,5,$4,$5,$7,$8,$11);}
2721 error ')' {$$
= AslDoError
(); yyclearin;}
2725 : PARSEOP_DWORDIO
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DWORDIO
);}
2726 OptionalResourceType_First
2736 OptionalByteConstExpr
2740 OptionalTranslationType_Last
2741 ')' {$$
= TrLinkChildren
($
<n
>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
2742 | PARSEOP_DWORDIO
'('
2743 error ')' {$$
= AslDoError
(); yyclearin;}
2747 : PARSEOP_DWORDMEMORY
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DWORDMEMORY
);}
2748 OptionalResourceType_First
2753 ',' OptionalReadWriteKeyword
2759 OptionalByteConstExpr
2762 OptionalAddressRange
2764 ')' {$$
= TrLinkChildren
($
<n
>3,16,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
2765 | PARSEOP_DWORDMEMORY
'('
2766 error ')' {$$
= AslDoError
(); yyclearin;}
2770 : PARSEOP_DWORDSPACE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_DWORDSPACE
);}
2771 ByteConstExpr
{UtCheckIntegerRange
($4, 0xC0, 0xFF);}
2772 OptionalResourceType
2782 OptionalByteConstExpr
2784 OptionalNameString_Last
2785 ')' {$$
= TrLinkChildren
($
<n
>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
2786 | PARSEOP_DWORDSPACE
'('
2787 error ')' {$$
= AslDoError
(); yyclearin;}
2792 : PARSEOP_ENDDEPENDENTFN
'('
2793 ')' {$$
= TrCreateLeafNode
(PARSEOP_ENDDEPENDENTFN
);}
2794 | PARSEOP_ENDDEPENDENTFN
'('
2795 error ')' {$$
= AslDoError
(); yyclearin;}
2799 : PARSEOP_EXTENDEDIO
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_EXTENDEDIO
);}
2800 OptionalResourceType_First
2810 OptionalQWordConstExpr
2813 OptionalTranslationType_Last
2814 ')' {$$
= TrLinkChildren
($
<n
>3,14,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22);}
2815 | PARSEOP_EXTENDEDIO
'('
2816 error ')' {$$
= AslDoError
(); yyclearin;}
2820 : PARSEOP_EXTENDEDMEMORY
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_EXTENDEDMEMORY
);}
2821 OptionalResourceType_First
2826 ',' OptionalReadWriteKeyword
2832 OptionalQWordConstExpr
2834 OptionalAddressRange
2836 ')' {$$
= TrLinkChildren
($
<n
>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24);}
2837 | PARSEOP_EXTENDEDMEMORY
'('
2838 error ')' {$$
= AslDoError
(); yyclearin;}
2842 : PARSEOP_EXTENDEDSPACE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_EXTENDEDSPACE
);}
2843 ByteConstExpr
{UtCheckIntegerRange
($4, 0xC0, 0xFF);}
2844 OptionalResourceType
2854 OptionalQWordConstExpr
2855 OptionalNameString_Last
2856 ')' {$$
= TrLinkChildren
($
<n
>3,13,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23);}
2857 | PARSEOP_EXTENDEDSPACE
'('
2858 error ')' {$$
= AslDoError
(); yyclearin;}
2862 : PARSEOP_FIXEDDMA
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_FIXEDDMA
);}
2863 WordConstExpr
/* 04: DMA RequestLines */
2864 ',' WordConstExpr
/* 06: DMA Channels */
2865 OptionalXferSize
/* 07: DMA TransferSize */
2866 OptionalNameString
/* 08: DescriptorName */
2867 ')' {$$
= TrLinkChildren
($
<n
>3,4,$4,$6,$7,$8);}
2868 | PARSEOP_FIXEDDMA
'('
2869 error ')' {$$
= AslDoError
(); yyclearin;}
2873 : PARSEOP_FIXEDIO
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_FIXEDIO
);}
2876 OptionalNameString_Last
2877 ')' {$$
= TrLinkChildren
($
<n
>3,3,$4,$6,$7);}
2878 | PARSEOP_FIXEDIO
'('
2879 error ')' {$$
= AslDoError
(); yyclearin;}
2883 : PARSEOP_GPIO_INT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_GPIO_INT
);}
2884 InterruptTypeKeyword
/* 04: InterruptType */
2885 ',' InterruptLevel
/* 06: InterruptLevel */
2886 OptionalShareType
/* 07: SharedType */
2887 ',' PinConfigByte
/* 09: PinConfig */
2888 OptionalWordConstExpr
/* 10: DebounceTimeout */
2889 ',' StringData
/* 12: ResourceSource */
2890 OptionalByteConstExpr
/* 13: ResourceSourceIndex */
2891 OptionalResourceType
/* 14: ResourceType */
2892 OptionalNameString
/* 15: DescriptorName */
2893 OptionalBuffer_Last
/* 16: VendorData */
2895 DWordConstExpr
'}' {$$
= TrLinkChildren
($
<n
>3,11,$4,$6,$7,$9,$10,$12,$13,$14,$15,$16,$19);}
2896 | PARSEOP_GPIO_INT
'('
2897 error ')' {$$
= AslDoError
(); yyclearin;}
2901 : PARSEOP_GPIO_IO
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_GPIO_IO
);}
2902 OptionalShareType_First
/* 04: SharedType */
2903 ',' PinConfigByte
/* 06: PinConfig */
2904 OptionalWordConstExpr
/* 07: DebounceTimeout */
2905 OptionalWordConstExpr
/* 08: DriveStrength */
2906 OptionalIoRestriction
/* 09: IoRestriction */
2907 ',' StringData
/* 11: ResourceSource */
2908 OptionalByteConstExpr
/* 12: ResourceSourceIndex */
2909 OptionalResourceType
/* 13: ResourceType */
2910 OptionalNameString
/* 14: DescriptorName */
2911 OptionalBuffer_Last
/* 15: VendorData */
2913 DWordList
'}' {$$
= TrLinkChildren
($
<n
>3,11,$4,$6,$7,$8,$9,$11,$12,$13,$14,$15,$18);}
2914 | PARSEOP_GPIO_IO
'('
2915 error ')' {$$
= AslDoError
(); yyclearin;}
2919 : PARSEOP_I2C_SERIALBUS
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_I2C_SERIALBUS
);}
2920 WordConstExpr
/* 04: SlaveAddress */
2921 OptionalSlaveMode
/* 05: SlaveMode */
2922 ',' DWordConstExpr
/* 07: ConnectionSpeed */
2923 OptionalAddressingMode
/* 08: AddressingMode */
2924 ',' StringData
/* 10: ResourceSource */
2925 OptionalByteConstExpr
/* 11: ResourceSourceIndex */
2926 OptionalResourceType
/* 12: ResourceType */
2927 OptionalNameString
/* 13: DescriptorName */
2928 OptionalBuffer_Last
/* 14: VendorData */
2929 ')' {$$
= TrLinkChildren
($
<n
>3,9,$4,$5,$7,$8,$10,$11,$12,$13,$14);}
2930 | PARSEOP_I2C_SERIALBUS
'('
2931 error ')' {$$
= AslDoError
(); yyclearin;}
2935 : PARSEOP_INTERRUPT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_INTERRUPT
);}
2936 OptionalResourceType_First
2937 ',' InterruptTypeKeyword
2940 OptionalByteConstExpr
2942 OptionalNameString_Last
2944 DWordList
'}' {$$
= TrLinkChildren
($
<n
>3,8,$4,$6,$8,$9,$10,$11,$12,$15);}
2945 | PARSEOP_INTERRUPT
'('
2946 error ')' {$$
= AslDoError
(); yyclearin;}
2950 : PARSEOP_IO
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_IO
);}
2956 OptionalNameString_Last
2957 ')' {$$
= TrLinkChildren
($
<n
>3,6,$4,$6,$8,$10,$12,$13);}
2959 error ')' {$$
= AslDoError
(); yyclearin;}
2963 : PARSEOP_IRQNOFLAGS
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_IRQNOFLAGS
);}
2964 OptionalNameString_First
2966 ByteList
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
2967 | PARSEOP_IRQNOFLAGS
'('
2968 error ')' {$$
= AslDoError
(); yyclearin;}
2972 : PARSEOP_IRQ
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_IRQ
);}
2973 InterruptTypeKeyword
2976 OptionalNameString_Last
2978 ByteList
'}' {$$
= TrLinkChildren
($
<n
>3,5,$4,$6,$7,$8,$11);}
2980 error ')' {$$
= AslDoError
(); yyclearin;}
2984 : PARSEOP_MEMORY24
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_MEMORY24
);}
2985 OptionalReadWriteKeyword
2990 OptionalNameString_Last
2991 ')' {$$
= TrLinkChildren
($
<n
>3,6,$4,$6,$8,$10,$12,$13);}
2992 | PARSEOP_MEMORY24
'('
2993 error ')' {$$
= AslDoError
(); yyclearin;}
2997 : PARSEOP_MEMORY32FIXED
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_MEMORY32FIXED
);}
2998 OptionalReadWriteKeyword
3001 OptionalNameString_Last
3002 ')' {$$
= TrLinkChildren
($
<n
>3,4,$4,$6,$8,$9);}
3003 | PARSEOP_MEMORY32FIXED
'('
3004 error ')' {$$
= AslDoError
(); yyclearin;}
3008 : PARSEOP_MEMORY32
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_MEMORY32
);}
3009 OptionalReadWriteKeyword
3014 OptionalNameString_Last
3015 ')' {$$
= TrLinkChildren
($
<n
>3,6,$4,$6,$8,$10,$12,$13);}
3016 | PARSEOP_MEMORY32
'('
3017 error ')' {$$
= AslDoError
(); yyclearin;}
3021 : PARSEOP_QWORDIO
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_QWORDIO
);}
3022 OptionalResourceType_First
3032 OptionalByteConstExpr
3036 OptionalTranslationType_Last
3037 ')' {$$
= TrLinkChildren
($
<n
>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
3038 | PARSEOP_QWORDIO
'('
3039 error ')' {$$
= AslDoError
(); yyclearin;}
3043 : PARSEOP_QWORDMEMORY
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_QWORDMEMORY
);}
3044 OptionalResourceType_First
3049 ',' OptionalReadWriteKeyword
3055 OptionalByteConstExpr
3058 OptionalAddressRange
3060 ')' {$$
= TrLinkChildren
($
<n
>3,16,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
3061 | PARSEOP_QWORDMEMORY
'('
3062 error ')' {$$
= AslDoError
(); yyclearin;}
3066 : PARSEOP_QWORDSPACE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_QWORDSPACE
);}
3067 ByteConstExpr
{UtCheckIntegerRange
($4, 0xC0, 0xFF);}
3068 OptionalResourceType
3078 OptionalByteConstExpr
3080 OptionalNameString_Last
3081 ')' {$$
= TrLinkChildren
($
<n
>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
3082 | PARSEOP_QWORDSPACE
'('
3083 error ')' {$$
= AslDoError
(); yyclearin;}
3087 : PARSEOP_REGISTER
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_REGISTER
);}
3093 OptionalNameString_Last
3094 ')' {$$
= TrLinkChildren
($
<n
>3,6,$4,$6,$8,$10,$11,$12);}
3095 | PARSEOP_REGISTER
'('
3096 error ')' {$$
= AslDoError
(); yyclearin;}
3100 : PARSEOP_SPI_SERIALBUS
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_SPI_SERIALBUS
);}
3101 WordConstExpr
/* 04: DeviceSelection */
3102 OptionalDevicePolarity
/* 05: DevicePolarity */
3103 OptionalWireMode
/* 06: WireMode */
3104 ',' ByteConstExpr
/* 08: DataBitLength */
3105 OptionalSlaveMode
/* 09: SlaveMode */
3106 ',' DWordConstExpr
/* 11: ConnectionSpeed */
3107 ',' ClockPolarityKeyword
/* 13: ClockPolarity */
3108 ',' ClockPhaseKeyword
/* 15: ClockPhase */
3109 ',' StringData
/* 17: ResourceSource */
3110 OptionalByteConstExpr
/* 18: ResourceSourceIndex */
3111 OptionalResourceType
/* 19: ResourceType */
3112 OptionalNameString
/* 20: DescriptorName */
3113 OptionalBuffer_Last
/* 21: VendorData */
3114 ')' {$$
= TrLinkChildren
($
<n
>3,13,$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,$21);}
3115 | PARSEOP_SPI_SERIALBUS
'('
3116 error ')' {$$
= AslDoError
(); yyclearin;}
3119 StartDependentFnNoPriTerm
3120 : PARSEOP_STARTDEPENDENTFN_NOPRI
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_STARTDEPENDENTFN_NOPRI
);}
3122 ResourceMacroList
'}' {$$
= TrLinkChildren
($
<n
>3,1,$6);}
3123 | PARSEOP_STARTDEPENDENTFN_NOPRI
'('
3124 error ')' {$$
= AslDoError
(); yyclearin;}
3127 StartDependentFnTerm
3128 : PARSEOP_STARTDEPENDENTFN
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_STARTDEPENDENTFN
);}
3132 ResourceMacroList
'}' {$$
= TrLinkChildren
($
<n
>3,3,$4,$6,$9);}
3133 | PARSEOP_STARTDEPENDENTFN
'('
3134 error ')' {$$
= AslDoError
(); yyclearin;}
3138 : PARSEOP_UART_SERIALBUS
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_UART_SERIALBUS
);}
3139 DWordConstExpr
/* 04: ConnectionSpeed */
3140 OptionalBitsPerByte
/* 05: BitsPerByte */
3141 OptionalStopBits
/* 06: StopBits */
3142 ',' ByteConstExpr
/* 08: LinesInUse */
3143 OptionalEndian
/* 09: Endianess */
3144 OptionalParityType
/* 10: Parity */
3145 OptionalFlowControl
/* 11: FlowControl */
3146 ',' WordConstExpr
/* 13: Rx BufferSize */
3147 ',' WordConstExpr
/* 15: Tx BufferSize */
3148 ',' StringData
/* 17: ResourceSource */
3149 OptionalByteConstExpr
/* 18: ResourceSourceIndex */
3150 OptionalResourceType
/* 19: ResourceType */
3151 OptionalNameString
/* 20: DescriptorName */
3152 OptionalBuffer_Last
/* 21: VendorData */
3153 ')' {$$
= TrLinkChildren
($
<n
>3,14,$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,$21);}
3154 | PARSEOP_UART_SERIALBUS
'('
3155 error ')' {$$
= AslDoError
(); yyclearin;}
3159 : PARSEOP_VENDORLONG
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_VENDORLONG
);}
3160 OptionalNameString_First
3162 ByteList
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
3163 | PARSEOP_VENDORLONG
'('
3164 error ')' {$$
= AslDoError
(); yyclearin;}
3168 : PARSEOP_VENDORSHORT
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_VENDORSHORT
);}
3169 OptionalNameString_First
3171 ByteList
'}' {$$
= TrLinkChildren
($
<n
>3,2,$4,$7);}
3172 | PARSEOP_VENDORSHORT
'('
3173 error ')' {$$
= AslDoError
(); yyclearin;}
3177 : PARSEOP_WORDBUSNUMBER
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_WORDBUSNUMBER
);}
3178 OptionalResourceType_First
3187 OptionalByteConstExpr
3189 OptionalNameString_Last
3190 ')' {$$
= TrLinkChildren
($
<n
>3,12,$4,$5,$6,$7,$9,$11,$13,$15,$17,$18,$19,$20);}
3191 | PARSEOP_WORDBUSNUMBER
'('
3192 error ')' {$$
= AslDoError
(); yyclearin;}
3196 : PARSEOP_WORDIO
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_WORDIO
);}
3197 OptionalResourceType_First
3207 OptionalByteConstExpr
3211 OptionalTranslationType_Last
3212 ')' {$$
= TrLinkChildren
($
<n
>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
3213 | PARSEOP_WORDIO
'('
3214 error ')' {$$
= AslDoError
(); yyclearin;}
3218 : PARSEOP_WORDSPACE
'(' {$
<n
>$
= TrCreateLeafNode
(PARSEOP_WORDSPACE
);}
3219 ByteConstExpr
{UtCheckIntegerRange
($4, 0xC0, 0xFF);}
3220 OptionalResourceType
3230 OptionalByteConstExpr
3232 OptionalNameString_Last
3233 ')' {$$
= TrLinkChildren
($
<n
>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
3234 | PARSEOP_WORDSPACE
'('
3235 error ')' {$$
= AslDoError
(); yyclearin;}
3239 /******* Object References ***********************************************/
3241 /* Allow IO, DMA, IRQ Resource macro names to also be used as identifiers */
3245 | PARSEOP_NAMESTRING
{$$
= TrCreateValuedLeafNode
(PARSEOP_NAMESTRING
, (ACPI_NATIVE_INT
) AslCompilerlval.s
);}
3246 | PARSEOP_IO
{$$
= TrCreateValuedLeafNode
(PARSEOP_NAMESTRING
, (ACPI_NATIVE_INT
) "IO");}
3247 | PARSEOP_DMA
{$$
= TrCreateValuedLeafNode
(PARSEOP_NAMESTRING
, (ACPI_NATIVE_INT
) "DMA");}
3248 | PARSEOP_IRQ
{$$
= TrCreateValuedLeafNode
(PARSEOP_NAMESTRING
, (ACPI_NATIVE_INT
) "IRQ");}
3252 : PARSEOP_NAMESEG
{$$
= TrCreateValuedLeafNode
(PARSEOP_NAMESEG
, (ACPI_NATIVE_INT
) AslCompilerlval.s
);}
3256 /******* Helper rules ****************************************************/
3259 AmlPackageLengthTerm
3260 : Integer
{$$
= TrUpdateNode
(PARSEOP_PACKAGE_LENGTH
,(ACPI_PARSE_OBJECT
*) $1);}
3264 : ',' NameString
{$$
= $2;}
3265 |
',' error {$$
= AslDoError
(); yyclearin;}
3269 : ',' TermArg
{$$
= $2;}
3270 |
',' error {$$
= AslDoError
(); yyclearin;}
3273 OptionalBusMasterKeyword
3274 : ',' {$$
= TrCreateLeafNode
(PARSEOP_BUSMASTERTYPE_MASTER
);}
3275 |
',' PARSEOP_BUSMASTERTYPE_MASTER
{$$
= TrCreateLeafNode
(PARSEOP_BUSMASTERTYPE_MASTER
);}
3276 |
',' PARSEOP_BUSMASTERTYPE_NOTMASTER
{$$
= TrCreateLeafNode
(PARSEOP_BUSMASTERTYPE_NOTMASTER
);}
3279 OptionalAccessAttribTerm
3282 |
',' ByteConstExpr
{$$
= $2;}
3283 |
',' AccessAttribKeyword
{$$
= $2;}
3287 : {$$
= TrCreateValuedLeafNode
(PARSEOP_BYTECONST
, 0);}
3288 |
',' {$$
= TrCreateValuedLeafNode
(PARSEOP_BYTECONST
, 0);}
3289 |
',' ByteConstExpr
{$$
= $2;}
3292 OptionalAddressingMode
3294 |
',' AddressingModeKeyword
{$$
= $2;}
3297 OptionalAddressRange
3300 |
',' AddressKeyword
{$$
= $2;}
3305 |
',' BitsPerByteKeyword
{$$
= $2;}
3311 |
',' DataBufferTerm
{$$
= $2;}
3314 OptionalByteConstExpr
3317 |
',' ByteConstExpr
{$$
= $2;}
3322 |
',' DecodeKeyword
{$$
= $2;}
3325 OptionalDevicePolarity
3327 |
',' DevicePolarityKeyword
{$$
= $2;}
3330 OptionalDWordConstExpr
3333 |
',' DWordConstExpr
{$$
= $2;}
3338 |
',' EndianKeyword
{$$
= $2;}
3343 |
',' FlowControlKeyword
{$$
= $2;}
3346 OptionalIoRestriction
3348 |
',' IoRestrictionKeyword
{$$
= $2;}
3352 : {$$
= TrCreateValuedLeafNode
(PARSEOP_STRING_LITERAL
, ACPI_TO_INTEGER
(""));} /* Placeholder is a NULL string */
3353 |
',' {$$
= TrCreateValuedLeafNode
(PARSEOP_STRING_LITERAL
, ACPI_TO_INTEGER
(""));} /* Placeholder is a NULL string */
3354 |
',' TermArg
{$$
= $2;}
3359 |
',' MaxKeyword
{$$
= $2;}
3364 |
',' MemTypeKeyword
{$$
= $2;}
3369 |
',' MinKeyword
{$$
= $2;}
3375 |
',' NameString
{$$
= $2;}
3378 OptionalNameString_Last
3381 |
',' NameString
{$$
= $2;}
3384 OptionalNameString_First
3385 : {$$
= TrCreateLeafNode
(PARSEOP_ZERO
);}
3386 | NameString
{$$
= $1;}
3389 OptionalObjectTypeKeyword
3390 : {$$
= TrCreateLeafNode
(PARSEOP_OBJECTTYPE_UNK
);}
3391 |
',' ObjectTypeKeyword
{$$
= $2;}
3396 |
',' ParityTypeKeyword
{$$
= $2;}
3399 OptionalQWordConstExpr
3402 |
',' QWordConstExpr
{$$
= $2;}
3407 |
',' RangeTypeKeyword
{$$
= $2;}
3410 OptionalReadWriteKeyword
3411 : {$$
= TrCreateLeafNode
(PARSEOP_READWRITETYPE_BOTH
);}
3412 | PARSEOP_READWRITETYPE_BOTH
{$$
= TrCreateLeafNode
(PARSEOP_READWRITETYPE_BOTH
);}
3413 | PARSEOP_READWRITETYPE_READONLY
{$$
= TrCreateLeafNode
(PARSEOP_READWRITETYPE_READONLY
);}
3417 : {$$
= TrCreateLeafNode
(PARSEOP_ZERO
);} /* Placeholder is a ZeroOp object */
3418 |
',' {$$
= TrCreateLeafNode
(PARSEOP_ZERO
);} /* Placeholder is a ZeroOp object */
3419 |
',' TermArg
{$$
= $2;}
3422 OptionalResourceType_First
3423 : {$$
= TrCreateLeafNode
(PARSEOP_RESOURCETYPE_CONSUMER
);}
3424 | ResourceTypeKeyword
{$$
= $1;}
3427 OptionalResourceType
3428 : {$$
= TrCreateLeafNode
(PARSEOP_RESOURCETYPE_CONSUMER
);}
3429 |
',' {$$
= TrCreateLeafNode
(PARSEOP_RESOURCETYPE_CONSUMER
);}
3430 |
',' ResourceTypeKeyword
{$$
= $2;}
3434 : {$$
= TrSetNodeFlags
(TrCreateLeafNode
(PARSEOP_ZERO
), NODE_IS_NULL_RETURN
);} /* Placeholder is a ZeroOp object */
3435 | TermArg
{$$
= $1;}
3438 OptionalSerializeRuleKeyword
3441 |
',' SerializeRuleKeyword
{$$
= $2;}
3446 |
',' SlaveModeKeyword
{$$
= $2;}
3452 |
',' ShareTypeKeyword
{$$
= $2;}
3455 OptionalShareType_First
3457 | ShareTypeKeyword
{$$
= $1;}
3462 |
',' StopBitsKeyword
{$$
= $2;}
3468 |
',' StringData
{$$
= $2;}
3473 | TermArg
{$$
= $1;}
3479 |
',' TypeKeyword
{$$
= $2;}
3485 |
',' TypeKeyword
{$$
= $2;}
3488 OptionalTranslationType_Last
3491 |
',' TranslationKeyword
{$$
= $2;}
3496 |
',' WireModeKeyword
{$$
= $2;}
3501 | WordConst
{$$
= $1;}
3504 OptionalWordConstExpr
3506 |
',' WordConstExpr
{$$
= $2;}
3510 : {$$
= TrCreateValuedLeafNode
(PARSEOP_XFERSIZE_32
, 2);}
3511 |
',' {$$
= TrCreateValuedLeafNode
(PARSEOP_XFERSIZE_32
, 2);}
3512 |
',' XferSizeKeyword
{$$
= $2;}
3516 /******************************************************************************
3518 * Local support functions
3520 *****************************************************************************/
3523 AslCompilerwrap
(void)
3528 /*! [End] no source code translation !*/
3531 AslLocalAllocate
(unsigned int Size
)
3536 DbgPrint
(ASL_PARSE_OUTPUT
, "\nAslLocalAllocate: Expanding Stack to %u\n\n", Size
);
3538 Mem
= ACPI_ALLOCATE_ZEROED
(Size
);
3541 AslCommonError
(ASL_ERROR
, ASL_MSG_MEMORY_ALLOCATION
,
3542 Gbl_CurrentLineNumber
, Gbl_LogicalLineNumber
,
3543 Gbl_InputByteCount
, Gbl_CurrentColumn
,
3544 Gbl_Files
[ASL_FILE_INPUT
].Filename
, NULL
);
3556 return
(TrCreateLeafNode
(PARSEOP_ERRORNODE
));
3561 /*******************************************************************************
3563 * FUNCTION: UtGetOpName
3565 * PARAMETERS: ParseOpcode - Parser keyword ID
3567 * RETURN: Pointer to the opcode name
3569 * DESCRIPTION: Get the ascii name of the parse opcode
3571 ******************************************************************************/
3577 #ifdef ASL_YYTNAME_START
3579 * First entries (ASL_YYTNAME_START) in yytname are special reserved names.
3580 * Ignore first 8 characters of the name
3582 return
((char *) yytname
3583 [(ParseOpcode
- ASL_FIRST_PARSE_OPCODE
) + ASL_YYTNAME_START
] + 8);
3585 return
("[Unknown parser generator]");