2 /******************************************************************************
4 * Module Name: asltypes.y - Bison/Yacc production types/names
6 *****************************************************************************/
9 * Copyright (C) 2000 - 2016, 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.
47 /******************************************************************************
51 *****************************************************************************/
56 %type
<n
> BufferTermData
57 %type
<n
> CompilerDirective
59 %type
<n
> DefinitionBlockTerm
60 %type
<n
> DefinitionBlockList
63 %type
<n
> NameSpaceModifier
66 %type
<n
> ParameterTypePackage
67 %type
<n
> ParameterTypePackageList
68 %type
<n
> ParameterTypesPackage
69 %type
<n
> ParameterTypesPackageList
70 %type
<n
> RequiredTarget
77 %type
<n
> MethodInvocationTerm
79 /* Type4Opcode is obsolete */
82 %type
<n
> Type2BufferOpcode
83 %type
<n
> Type2BufferOrStringOpcode
84 %type
<n
> Type2IntegerOpcode
86 %type
<n
> Type2StringOpcode
91 %type
<n
> AccessAsTerm
92 %type
<n
> ExternalTerm
94 %type
<n
> FieldUnitEntry
95 %type
<n
> FieldUnitList
98 %type
<n
> OptionalAccessAttribTerm
102 %type
<n
> BankFieldTerm
103 %type
<n
> CreateBitFieldTerm
104 %type
<n
> CreateByteFieldTerm
105 %type
<n
> CreateDWordFieldTerm
106 %type
<n
> CreateFieldTerm
107 %type
<n
> CreateQWordFieldTerm
108 %type
<n
> CreateWordFieldTerm
109 %type
<n
> DataRegionTerm
113 %type
<n
> FunctionTerm
114 %type
<n
> IndexFieldTerm
117 %type
<n
> OpRegionTerm
118 %type
<n
> OpRegionSpaceIdTerm
119 %type
<n
> PowerResTerm
120 %type
<n
> ProcessorTerm
121 %type
<n
> ThermalZoneTerm
123 /* Namespace modifiers */
131 %type
<n
> BreakPointTerm
133 %type
<n
> CaseDefaultTermList
135 %type
<n
> ContinueTerm
136 %type
<n
> DefaultTerm
144 %type
<n
> ReleaseTerm
153 /* %type <n> CaseTermList */
157 %type
<n
> AcquireTerm
160 %type
<n
> ConcatResTerm
162 %type
<n
> CondRefOfTerm
163 %type
<n
> CopyObjectTerm
165 %type
<n
> DerefOfTerm
167 %type
<n
> FindSetLeftBitTerm
168 %type
<n
> FindSetRightBitTerm
169 %type
<n
> FromBCDTerm
174 %type
<n
> LGreaterEqualTerm
175 %type
<n
> LGreaterTerm
176 %type
<n
> LLessEqualTerm
178 %type
<n
> LNotEqualTerm
180 %type
<n
> LoadTableTerm
185 %type
<n
> MultiplyTerm
189 %type
<n
> ObjectTypeTerm
191 %type
<n
> RawDataBufferTerm
193 %type
<n
> ShiftLeftTerm
194 %type
<n
> ShiftRightTerm
197 %type
<n
> SubtractTerm
200 %type
<n
> ToBufferTerm
201 %type
<n
> ToDecimalStringTerm
202 %type
<n
> ToHexStringTerm
203 %type
<n
> ToIntegerTerm
204 %type
<n
> ToStringTerm
210 %type
<n
> AccessAttribKeyword
211 %type
<n
> AccessTypeKeyword
212 %type
<n
> AddressingModeKeyword
213 %type
<n
> AddressKeyword
214 %type
<n
> AddressSpaceKeyword
215 %type
<n
> BitsPerByteKeyword
216 %type
<n
> ClockPhaseKeyword
217 %type
<n
> ClockPolarityKeyword
218 %type
<n
> DecodeKeyword
219 %type
<n
> DevicePolarityKeyword
220 %type
<n
> DMATypeKeyword
221 %type
<n
> EndianKeyword
222 %type
<n
> FlowControlKeyword
223 %type
<n
> InterruptLevel
224 %type
<n
> InterruptTypeKeyword
225 %type
<n
> IODecodeKeyword
226 %type
<n
> IoRestrictionKeyword
227 %type
<n
> LockRuleKeyword
228 %type
<n
> MatchOpKeyword
230 %type
<n
> MemTypeKeyword
232 %type
<n
> ObjectTypeKeyword
233 %type
<n
> OptionalBusMasterKeyword
234 %type
<n
> OptionalReadWriteKeyword
235 %type
<n
> ParityTypeKeyword
236 %type
<n
> PinConfigByte
237 %type
<n
> PinConfigKeyword
238 %type
<n
> RangeTypeKeyword
239 %type
<n
> RegionSpaceKeyword
240 %type
<n
> ResourceTypeKeyword
241 %type
<n
> SerializeRuleKeyword
242 %type
<n
> ShareTypeKeyword
243 %type
<n
> SlaveModeKeyword
244 %type
<n
> StopBitsKeyword
245 %type
<n
> TranslationKeyword
246 %type
<n
> TypeKeyword
247 %type
<n
> UpdateRuleKeyword
248 %type
<n
> WireModeKeyword
249 %type
<n
> XferSizeKeyword
250 %type
<n
> XferTypeKeyword
255 %type
<n
> ObjectTypeSource
256 %type
<n
> DerefOfSource
257 %type
<n
> RefOfSource
258 %type
<n
> CondRefOfSource
271 %type
<n
> ConstExprTerm
272 %type
<n
> ByteConstExpr
273 %type
<n
> WordConstExpr
274 %type
<n
> DWordConstExpr
275 %type
<n
> QWordConstExpr
281 %type
<n
> PackageElement
282 %type
<n
> PackageList
283 %type
<n
> PackageTerm
288 %type
<n
> ResourceMacroList
289 %type
<n
> ResourceMacroTerm
290 %type
<n
> ResourceTemplateTerm
292 %type
<n
> PldKeywordList
295 %type
<n
> UnicodeTerm
296 %type
<n
> PrintfArgList
298 %type
<n
> FprintfTerm
301 /* Resource Descriptors */
303 %type
<n
> ConnectionTerm
305 %type
<n
> DWordIOTerm
306 %type
<n
> DWordMemoryTerm
307 %type
<n
> DWordSpaceTerm
308 %type
<n
> EndDependentFnTerm
309 %type
<n
> ExtendedIOTerm
310 %type
<n
> ExtendedMemoryTerm
311 %type
<n
> ExtendedSpaceTerm
312 %type
<n
> FixedDmaTerm
313 %type
<n
> FixedIOTerm
314 %type
<n
> GpioIntTerm
316 %type
<n
> I2cSerialBusTerm
317 %type
<n
> I2cSerialBusTermV2
318 %type
<n
> InterruptTerm
320 %type
<n
> IRQNoFlagsTerm
322 %type
<n
> Memory24Term
323 %type
<n
> Memory32FixedTerm
324 %type
<n
> Memory32Term
327 %type
<n
> QWordIOTerm
328 %type
<n
> QWordMemoryTerm
329 %type
<n
> QWordSpaceTerm
330 %type
<n
> RegisterTerm
331 %type
<n
> SpiSerialBusTerm
332 %type
<n
> SpiSerialBusTermV2
333 %type
<n
> StartDependentFnNoPriTerm
334 %type
<n
> StartDependentFnTerm
335 %type
<n
> UartSerialBusTerm
336 %type
<n
> UartSerialBusTermV2
337 %type
<n
> VendorLongTerm
338 %type
<n
> VendorShortTerm
339 %type
<n
> WordBusNumberTerm
341 %type
<n
> WordSpaceTerm
343 /* Local types that help construct the AML, not in ACPI spec */
345 %type
<n
> AmlPackageLengthTerm
346 %type
<n
> IncludeEndTerm
347 %type
<n
> NameStringItem
348 %type
<n
> TermArgItem
350 %type
<n
> OptionalAccessSize
351 %type
<n
> OptionalAddressingMode
352 %type
<n
> OptionalAddressRange
353 %type
<n
> OptionalBitsPerByte
354 %type
<n
> OptionalBuffer_Last
355 %type
<n
> OptionalByteConstExpr
356 %type
<n
> OptionalCount
357 %type
<n
> OptionalDataCount
358 %type
<n
> OptionalDecodeType
359 %type
<n
> OptionalDevicePolarity
360 %type
<n
> OptionalDWordConstExpr
361 %type
<n
> OptionalEndian
362 %type
<n
> OptionalFlowControl
363 %type
<n
> OptionalIoRestriction
364 %type
<n
> OptionalListString
365 %type
<n
> OptionalMaxType
366 %type
<n
> OptionalMemType
367 %type
<n
> OptionalMinType
368 %type
<n
> OptionalNameString
369 %type
<n
> OptionalNameString_First
370 %type
<n
> OptionalNameString_Last
371 %type
<n
> OptionalObjectTypeKeyword
372 %type
<n
> OptionalParameterTypePackage
373 %type
<n
> OptionalParameterTypesPackage
374 %type
<n
> OptionalParentheses
375 %type
<n
> OptionalParityType
376 %type
<n
> OptionalPredicate
377 %type
<n
> OptionalQWordConstExpr
378 %type
<n
> OptionalRangeType
379 %type
<n
> OptionalReference
380 %type
<n
> OptionalResourceType
381 %type
<n
> OptionalResourceType_First
382 %type
<n
> OptionalReturnArg
383 %type
<n
> OptionalSerializeRuleKeyword
384 %type
<n
> OptionalShareType
385 %type
<n
> OptionalShareType_First
386 %type
<n
> OptionalSlaveMode
387 %type
<n
> OptionalStopBits
388 %type
<n
> OptionalStringData
389 %type
<n
> OptionalTermArg
390 %type
<n
> OptionalTranslationType_Last
391 %type
<n
> OptionalType
392 %type
<n
> OptionalType_Last
393 %type
<n
> OptionalWireMode
394 %type
<n
> OptionalWordConst
395 %type
<n
> OptionalWordConstExpr
396 %type
<n
> OptionalXferSize
399 * ASL+ (C-style) parser
402 /* Expressions and symbolic operators */
406 %type
<n
> IndexExpTerm
408 /* ASL+ Named object declaration support */
410 %type <n> NameTermAslPlus
412 %type <n> BufferBegin
414 %type <n> PackageBegin
416 %type <n> OptionalLength
418 /* ASL+ Structure declarations */
420 %type <n> StructureTerm
421 %type <n> StructureTermBegin
422 %type <n> StructureType
423 %type <n> StructureTag
424 %type <n> StructureElementList
425 %type <n> StructureElement
426 %type <n> StructureElementType
427 %type <n> OptionalStructureElementType
428 %type <n> StructureId
430 /* Structure instantiantion */
432 %type <n> StructureInstanceTerm
433 %type <n> StructureTagReference
434 %type <n> StructureInstanceEnd
436 /* Pseudo-instantiantion for method Args/Locals */
438 %type <n> MethodStructureTerm
439 %type <n> LocalStructureName
441 /* Direct structure references via the Index operator */
443 %type <n> StructureReference
444 %type <n> StructureIndexTerm
445 %type <n> StructurePointerTerm
446 %type <n> StructurePointerReference
447 %type <n> OptionalDefinePointer