aslrules.y revision 199767f8919635c4928607450d9e0abb932109ce
NoEcho('
/******************************************************************************
*
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* substantially similar to the "NO WARRANTY" disclaimer below
* ("Disclaimer") and any redistribution must be conditioned upon
* including a substantially similar Disclaimer requirement for further
* binary redistribution.
* 3. Neither the names of the above-listed copyright holders nor the names
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* Alternatively, this software may be distributed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software Foundation.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*/
')
/*******************************************************************************
*
* Production rules start here
*
******************************************************************************/
/*
* ASL Names
*
* Root rule. Allow multiple #line directives before the definition block
* to handle output from preprocessors
*/
;
/*
* Blocks, Data, and Opcodes
*/
/*
* Note concerning support for "module-level code".
*
* ACPI 1.0 allowed Type1 and Type2 executable opcodes outside of control
* methods (the so-called module-level code.) This support was explicitly
* removed in ACPI 2.0, but this type of code continues to be created by
* BIOS vendors. In order to support the disassembly and recompilation of
* such code (and the porting of ASL code to iASL), iASL supports this
* code in violation of the current ACPI specification.
*
* The grammar change to support module-level code is to revert the
* {ObjectList} portion of the DefinitionBlockTerm in ACPI 2.0 to the
* original use of {TermList} instead (see below.) This allows the use
* of Type1 and Type2 opcodes at module level.
*/
String ','
String ','
ByteConst ','
String ','
String ','
;
/*
* The implementation transforms these operators into the standard
* AML opcodes and syntax.
*
* Supported operators and precedence rules (high-to-low)
*
* NOTE: The operator precedence and associativity rules are
* implemented by the tokens in asltokens.y
*
* (left-to-right):
* 1) ( ) expr++ expr--
*
* (right-to-left):
* 2) ! ~
*
* (left-to-right):
* 3) * / %
* 4) + -
* 5) >> <<
* 6) < > <= >=
* 7) == !=
* 8) &
* 9) ^
* 10) |
* 11) &&
* 12) ||
*
* (right-to-left):
* 13) = += -= *= /= %= <<= >>= &= ^= |=
*/
/* Unary operators */
/* Binary operators: math and logical */
TrCreateNullTarget ());}
/* Parentheses */
;
/* All assignment-type operations */
;
/* ACPI 3.0 -- allow semicolons between terms */
: {$$ = NULL;}
;
: Object {}
| Type1Opcode {}
| Type2Opcode {}
| Type2BufferOpcode {}
;
: IncludeTerm {}
| ExternalTerm {}
;
: {$$ = NULL;}
;
: CompilerDirective {}
| NamedObject {}
| NameSpaceModifier {}
;
: BufferData {}
| PackageData {}
| IntegerData {}
| StringData {}
;
| BufferTerm {}
;
: PackageTerm {}
;
| Integer {}
| ConstTerm {}
;
| String {}
;
: BankFieldTerm {}
| CreateBitFieldTerm {}
| CreateByteFieldTerm {}
| CreateDWordFieldTerm {}
| CreateFieldTerm {}
| CreateQWordFieldTerm {}
| CreateWordFieldTerm {}
| DataRegionTerm {}
| DeviceTerm {}
| EventTerm {}
| FieldTerm {}
| FunctionTerm {}
| IndexFieldTerm {}
| MethodTerm {}
| MutexTerm {}
| OpRegionTerm {}
| PowerResTerm {}
| ProcessorTerm {}
| ThermalZoneTerm {}
;
: AliasTerm {}
| NameTerm {}
| ScopeTerm {}
;
;
: {$$ = NULL;}
| TermArg
| ArgList ','
;
/*
| Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
| Type2StringOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
| Type2BufferOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
| Type2BufferOrStringOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
*/
;
: {$$ = TrCreateNullTarget ();} /* Placeholder is a ZeroOp object */
;
;
: NameString {}
| LocalTerm {}
| ArgTerm {}
;
/* Rules for specifying the type of one method argument or return value */
: {$$ = NULL;}
| ObjectTypeKeyword {$$ = $1;}
| ParameterTypePackage ','
;
: {$$ = NULL;}
| ObjectTypeKeyword {$$ = $1;}
;
: {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
;
/* Rules for specifying the types for method arguments */
: ParameterTypePackageList {$$ = $1;}
| ParameterTypesPackage ','
;
: {$$ = NULL;}
| ObjectTypeKeyword {$$ = $1;}
;
: {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
| ',' ParameterTypesPackageList {$$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_DEFAULT_ARG),1,$2);}
;
/* Opcode types */
: BreakTerm {}
| BreakPointTerm {}
| ContinueTerm {}
| FatalTerm {}
| IfElseTerm {}
| LoadTerm {}
| NoOpTerm {}
| NotifyTerm {}
| ReleaseTerm {}
| ResetTerm {}
| ReturnTerm {}
| SignalTerm {}
| SleepTerm {}
| StallTerm {}
| SwitchTerm {}
| UnloadTerm {}
| WhileTerm {}
;
: AcquireTerm {}
| CondRefOfTerm {}
| CopyObjectTerm {}
| DerefOfTerm {}
| ObjectTypeTerm {}
| RefOfTerm {}
| SizeOfTerm {}
| StoreTerm {}
| EqualsTerm {}
| TimerTerm {}
| WaitTerm {}
| MethodInvocationTerm {}
;
/*
* Type 3/4/5 opcodes
*/
Type2IntegerOpcode /* "Type3" opcodes */
| AddTerm {}
| AndTerm {}
| DecTerm {}
| DivideTerm {}
| FindSetLeftBitTerm {}
| FindSetRightBitTerm {}
| FromBCDTerm {}
| IncTerm {}
| IndexTerm {}
| LAndTerm {}
| LEqualTerm {}
| LGreaterTerm {}
| LGreaterEqualTerm {}
| LLessTerm {}
| LLessEqualTerm {}
| LNotTerm {}
| LNotEqualTerm {}
| LoadTableTerm {}
| LOrTerm {}
| MatchTerm {}
| ModTerm {}
| MultiplyTerm {}
| NAndTerm {}
| NOrTerm {}
| NotTerm {}
| OrTerm {}
| ShiftLeftTerm {}
| ShiftRightTerm {}
| SubtractTerm {}
| ToBCDTerm {}
| ToIntegerTerm {}
| XOrTerm {}
;
Type2StringOpcode /* "Type4" Opcodes */
: ToDecimalStringTerm {}
| ToHexStringTerm {}
| ToStringTerm {}
;
Type2BufferOpcode /* "Type5" Opcodes */
: ToBufferTerm {}
| ConcatResTerm {}
;
| PrintfTerm {}
| FprintfTerm {}
| MidTerm {}
;
/*
* A type 3 opcode evaluates to an Integer and cannot have a destination operand
*/
: EISAIDTerm {}
;
/* Obsolete
Type4Opcode
: ConcatTerm {}
| ToDecimalStringTerm {}
| ToHexStringTerm {}
| MidTerm {}
| ToStringTerm {}
;
*/
: ResourceTemplateTerm {}
| UnicodeTerm {}
| ToPLDTerm {}
| ToUUIDTerm {}
;
: RefOfTerm {}
| DerefOfTerm {}
| IndexTerm {}
| MethodInvocationTerm {}
;
;
;
: PARSEOP_EXTERNAL '('
| PARSEOP_EXTERNAL '('
;
/******* Named Objects *******************************************************/
',' LockRuleKeyword
')' '{'
| PARSEOP_BANKFIELD '('
;
: {$$ = NULL;}
| FieldUnitList ','
;
: FieldUnitEntry {}
| OffsetTerm {}
| AccessAsTerm {}
| ConnectionTerm {}
;
| NameSeg ','
;
: PARSEOP_OFFSET '('
| PARSEOP_OFFSET '('
;
: PARSEOP_ACCESSAS '('
| PARSEOP_ACCESSAS '('
;
: PARSEOP_CONNECTION '('
$4));}
| PARSEOP_CONNECTION '('
;
| PARSEOP_CREATEBITFIELD '('
;
| PARSEOP_CREATEBYTEFIELD '('
;
| PARSEOP_CREATEDWORDFIELD '('
;
| PARSEOP_CREATEFIELD '('
;
| PARSEOP_CREATEQWORDFIELD '('
;
| PARSEOP_CREATEWORDFIELD '('
;
| PARSEOP_DATATABLEREGION '('
;
')' '{'
| PARSEOP_DEVICE '('
;
| PARSEOP_EVENT '('
;
',' LockRuleKeyword
')' '{'
| PARSEOP_FIELD '('
;
')' '{'
| PARSEOP_FUNCTION '('
;
',' LockRuleKeyword
')' '{'
| PARSEOP_INDEXFIELD '('
;
')' '{'
TermList '}' {$$ = TrLinkChildren ($<n>3,7,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$5,$7,$8,$9,$10,$13);}
| PARSEOP_METHOD '('
;
',' ByteConstExpr
| PARSEOP_MUTEX '('
;
| PARSEOP_OPERATIONREGION '('
;
: RegionSpaceKeyword {}
;
',' ByteConstExpr
',' WordConstExpr
')' '{'
ObjectList '}' {$$ = TrLinkChildren ($<n>3,4,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$8,$11);}
| PARSEOP_POWERRESOURCE '('
;
',' ByteConstExpr
')' '{'
ObjectList '}' {$$ = TrLinkChildren ($<n>3,5,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$7,$8,$11);}
| PARSEOP_PROCESSOR '('
;
')' '{'
| PARSEOP_THERMALZONE '('
;
/******* Namespace modifiers *************************************************/
| PARSEOP_ALIAS '('
;
',' DataObject
| PARSEOP_NAME '('
;
')' '{'
| PARSEOP_SCOPE '('
;
/******* Type 1 opcodes *******************************************************/
;
;
;
',' DWordConstExpr
| PARSEOP_FATAL '('
;
;
')' '{'
| PARSEOP_IF '('
;
: {$$ = NULL;}
| PARSEOP_ELSE '{'
')' '{'
| PARSEOP_ELSEIF '('
;
| PARSEOP_LOAD '('
;
;
| PARSEOP_NOTIFY '('
;
| PARSEOP_RELEASE '('
;
| PARSEOP_RESET '('
;
| PARSEOP_RETURN {$$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_RETURN),1,TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO), NODE_IS_NULL_RETURN));}
| PARSEOP_RETURN '('
;
| PARSEOP_SIGNAL '('
;
| PARSEOP_SLEEP '('
;
| PARSEOP_STALL '('
;
')' '{'
| PARSEOP_SWITCH '('
;
/*
* Case-Default list; allow only one Default term and unlimited Case terms
*/
: {$$ = NULL;}
| CaseTerm {}
| DefaultTerm {}
/* Original - attempts to force zero or one default term within the switch */
/*
CaseDefaultTermList
: {$$ = NULL;}
| CaseTermList
DefaultTerm
CaseTermList {$$ = TrLinkPeerNode ($1,TrLinkPeerNode ($2, $3));}
| CaseTermList
CaseTerm {$$ = TrLinkPeerNode ($1,$2);}
;
CaseTermList
: {$$ = NULL;}
| CaseTerm {}
| CaseTermList
CaseTerm {$$ = TrLinkPeerNode ($1,$2);}
;
*/
')' '{'
| PARSEOP_CASE '('
;
| PARSEOP_DEFAULT '{'
;
| PARSEOP_UNLOAD '('
;
| PARSEOP_WHILE '('
;
/******* Type 2 opcodes *******************************************************/
',' WordConstExpr
| PARSEOP_ACQUIRE '('
;
| PARSEOP_ADD '('
;
| PARSEOP_AND '('
;
| PARSEOP_CONCATENATE '('
;
;
| PARSEOP_CONDREFOF '('
;
',' SimpleTarget
| PARSEOP_COPYOBJECT '('
;
| PARSEOP_DECREMENT '('
;
| PARSEOP_DEREFOF '('
;
| PARSEOP_DIVIDE '('
;
| PARSEOP_FINDSETLEFTBIT '('
;
| PARSEOP_FINDSETRIGHTBIT '('
;
| PARSEOP_FROMBCD '('
;
| PARSEOP_INCREMENT '('
;
| PARSEOP_INDEX '('
;
| PARSEOP_LAND '('
;
| PARSEOP_LEQUAL '('
;
| PARSEOP_LGREATER '('
;
| PARSEOP_LGREATEREQUAL '('
;
| PARSEOP_LLESS '('
;
| PARSEOP_LLESSEQUAL '('
;
| PARSEOP_LNOT '('
;
| PARSEOP_LNOTEQUAL '('
;
| PARSEOP_LOADTABLE '('
;
| PARSEOP_LOR '('
;
',' MatchOpKeyword
',' MatchOpKeyword
| PARSEOP_MATCH '('
;
| PARSEOP_MID '('
;
| PARSEOP_MOD '('
;
| PARSEOP_MULTIPLY '('
;
| PARSEOP_NAND '('
;
| PARSEOP_NOR '('
;
| PARSEOP_NOT '('
;
| PARSEOP_OBJECTTYPE '('
;
| PARSEOP_OR '('
;
/*
* In RefOf, the node isn't really a target, but we can't keep track of it after
* we've taken a pointer to it. (hard to tell if a local becomes initialized this way.)
*/
| PARSEOP_REFOF '('
;
| PARSEOP_SHIFTLEFT '('
;
| PARSEOP_SHIFTRIGHT '('
;
| PARSEOP_SIZEOF '('
;
',' SuperName
| PARSEOP_STORE '('
;
| PARSEOP_SUBTRACT '('
;
| PARSEOP_TIMER '('
;
| PARSEOP_TOBCD '('
;
| PARSEOP_TOBUFFER '('
;
| PARSEOP_TODECIMALSTRING '('
;
| PARSEOP_TOHEXSTRING '('
;
| PARSEOP_TOINTEGER '('
;
;
: {$$ = NULL;}
| PldKeywordList ','
| PldKeywordList ','
;
| PARSEOP_TOPLD '('
;
: {$$ = NULL;}
| TermArg {$$ = $1;}
| PrintfArgList ','
;
| PARSEOP_PRINTF '('
;
TermArg ','
| PARSEOP_FPRINTF '('
;
| PARSEOP_TOSTRING '('
;
: PARSEOP_TOUUID '('
| PARSEOP_TOUUID '('
;
| PARSEOP_WAIT '('
;
| PARSEOP_XOR '('
;
/******* Keywords *************************************************************/
| PARSEOP_ACCESSATTRIB_RAW_PROCESS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_PROCESS);}
;
;
;
;
| RegionSpaceKeyword {}
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
: PinConfigKeyword {$$ = $1;}
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
/******* Miscellaneous Types **************************************************/
: NameString {}
| ArgTerm {}
| LocalTerm {}
| DebugTerm {}
| Type6Opcode {}
/* For ObjectType: SuperName except for MethodInvocationTerm */
: NameString {}
| ArgTerm {}
| LocalTerm {}
| DebugTerm {}
| RefOfTerm {}
| DerefOfTerm {}
| IndexTerm {}
;
;
;
;
;
;
;
;
;
: PARSEOP_STRING_LITERAL {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, (ACPI_NATIVE_INT) AslCompilerlval.s);}
;
: ConstExprTerm {}
;
;
/*
* The NODE_COMPILE_TIME_CONST flag in the following constant expressions
* enables compile-time constant folding to reduce the Type3Opcodes/Type2IntegerOpcodes
* to simple integers. It is an error if these types of expressions cannot be
* reduced, since the AML grammar for ****ConstExpr requires a simple constant.
* Note: The required byte length of the constant is passed through to the
* constant folding code in the node AmlLength field.
*/
| Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 1);}
| ByteConst {}
;
| Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 2);}
| WordConst {}
;
| Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 4);}
| DWordConst {}
;
| Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 8);}
| QWordConst {}
;
/* OptionalCount must appear before ByteList or an incorrect reduction will result */
;
')' '{'
| PARSEOP_BUFFER '('
;
: ByteList {}
| StringData {}
;
: {$$ = NULL;}
| ByteList ','
;
')' '{'
| PARSEOP_DATABUFFER '('
;
: {$$ = NULL;}
| DWordList ','
;
')' '{'
| PARSEOP_PACKAGE '('
;
: {$$ = NULL;}
| PackageList ','
;
: DataObject {}
| NameString {}
;
: {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
| TermArg {$$ = $1;}
;
/******* Macros ***********************************************/
: PARSEOP_EISAID '('
| PARSEOP_EISAID '('
;
| PARSEOP_UNICODE '('
;
/******* Resources and Memory ***********************************************/
/*
* Note: Create two default nodes to allow conversion to a Buffer AML opcode
* Also, insert the EndTag at the end of the template.
*/
: PARSEOP_RESOURCETEMPLATE '(' ')'
'{'
$5,
;
: {$$ = NULL;}
;
: DMATerm {}
| DWordIOTerm {}
| DWordMemoryTerm {}
| DWordSpaceTerm {}
| EndDependentFnTerm {}
| ExtendedIOTerm {}
| ExtendedMemoryTerm {}
| ExtendedSpaceTerm {}
| FixedDmaTerm {}
| FixedIOTerm {}
| GpioIntTerm {}
| GpioIoTerm {}
| I2cSerialBusTerm {}
| InterruptTerm {}
| IOTerm {}
| IRQNoFlagsTerm {}
| IRQTerm {}
| Memory24Term {}
| Memory32FixedTerm {}
| Memory32Term {}
| QWordIOTerm {}
| QWordMemoryTerm {}
| QWordSpaceTerm {}
| RegisterTerm {}
| SpiSerialBusTerm {}
| StartDependentFnTerm {}
| UartSerialBusTerm {}
| VendorLongTerm {}
| VendorShortTerm {}
| WordBusNumberTerm {}
| WordIOTerm {}
| WordSpaceTerm {}
;
',' XferTypeKeyword
')' '{'
| PARSEOP_DMA '('
;
',' DWordConstExpr
',' DWordConstExpr
',' DWordConstExpr
',' DWordConstExpr
',' DWordConstExpr
| PARSEOP_DWORDIO '('
;
',' DWordConstExpr
',' DWordConstExpr
',' DWordConstExpr
',' DWordConstExpr
',' DWordConstExpr
| PARSEOP_DWORDMEMORY '('
;
',' ByteConstExpr
',' DWordConstExpr
',' DWordConstExpr
',' DWordConstExpr
',' DWordConstExpr
',' DWordConstExpr
| PARSEOP_DWORDSPACE '('
;
: PARSEOP_ENDDEPENDENTFN '('
| PARSEOP_ENDDEPENDENTFN '('
;
',' QWordConstExpr
',' QWordConstExpr
',' QWordConstExpr
',' QWordConstExpr
',' QWordConstExpr
| PARSEOP_EXTENDEDIO '('
;
',' QWordConstExpr
',' QWordConstExpr
',' QWordConstExpr
',' QWordConstExpr
',' QWordConstExpr
| PARSEOP_EXTENDEDMEMORY '('
;
',' ByteConstExpr
',' QWordConstExpr
',' QWordConstExpr
',' QWordConstExpr
',' QWordConstExpr
',' QWordConstExpr
| PARSEOP_EXTENDEDSPACE '('
;
WordConstExpr /* 04: DMA RequestLines */
OptionalXferSize /* 07: DMA TransferSize */
OptionalNameString /* 08: DescriptorName */
| PARSEOP_FIXEDDMA '('
;
',' ByteConstExpr
| PARSEOP_FIXEDIO '('
;
InterruptTypeKeyword /* 04: InterruptType */
OptionalShareType /* 07: SharedType */
OptionalWordConstExpr /* 10: DebounceTimeout */
OptionalByteConstExpr /* 13: ResourceSourceIndex */
OptionalResourceType /* 14: ResourceType */
OptionalNameString /* 15: DescriptorName */
OptionalBuffer_Last /* 16: VendorData */
')' '{'
| PARSEOP_GPIO_INT '('
;
OptionalShareType_First /* 04: SharedType */
OptionalWordConstExpr /* 07: DebounceTimeout */
OptionalWordConstExpr /* 08: DriveStrength */
OptionalIoRestriction /* 09: IoRestriction */
OptionalByteConstExpr /* 12: ResourceSourceIndex */
OptionalResourceType /* 13: ResourceType */
OptionalNameString /* 14: DescriptorName */
OptionalBuffer_Last /* 15: VendorData */
')' '{'
| PARSEOP_GPIO_IO '('
;
WordConstExpr /* 04: SlaveAddress */
OptionalSlaveMode /* 05: SlaveMode */
OptionalAddressingMode /* 08: AddressingMode */
OptionalByteConstExpr /* 11: ResourceSourceIndex */
OptionalResourceType /* 12: ResourceType */
OptionalNameString /* 13: DescriptorName */
OptionalBuffer_Last /* 14: VendorData */
| PARSEOP_I2C_SERIALBUS '('
;
',' InterruptLevel
')' '{'
| PARSEOP_INTERRUPT '('
;
',' WordConstExpr
',' WordConstExpr
',' ByteConstExpr
',' ByteConstExpr
| PARSEOP_IO '('
;
')' '{'
| PARSEOP_IRQNOFLAGS '('
;
',' InterruptLevel
')' '{'
| PARSEOP_IRQ '('
;
',' WordConstExpr
',' WordConstExpr
',' WordConstExpr
',' WordConstExpr
| PARSEOP_MEMORY24 '('
;
',' DWordConstExpr
',' DWordConstExpr
| PARSEOP_MEMORY32FIXED '('
;
',' DWordConstExpr
',' DWordConstExpr
',' DWordConstExpr
',' DWordConstExpr
| PARSEOP_MEMORY32 '('
;
',' QWordConstExpr
',' QWordConstExpr
',' QWordConstExpr
',' QWordConstExpr
',' QWordConstExpr
| PARSEOP_QWORDIO '('
;
',' QWordConstExpr
',' QWordConstExpr
',' QWordConstExpr
',' QWordConstExpr
',' QWordConstExpr
| PARSEOP_QWORDMEMORY '('
;
',' ByteConstExpr
',' QWordConstExpr
',' QWordConstExpr
',' QWordConstExpr
',' QWordConstExpr
',' QWordConstExpr
| PARSEOP_QWORDSPACE '('
;
',' ByteConstExpr
',' ByteConstExpr
',' QWordConstExpr
| PARSEOP_REGISTER '('
;
WordConstExpr /* 04: DeviceSelection */
OptionalDevicePolarity /* 05: DevicePolarity */
OptionalWireMode /* 06: WireMode */
OptionalSlaveMode /* 09: SlaveMode */
OptionalByteConstExpr /* 18: ResourceSourceIndex */
OptionalResourceType /* 19: ResourceType */
OptionalNameString /* 20: DescriptorName */
OptionalBuffer_Last /* 21: VendorData */
| PARSEOP_SPI_SERIALBUS '('
;
')' '{'
;
',' ByteConstExpr
')' '{'
| PARSEOP_STARTDEPENDENTFN '('
;
DWordConstExpr /* 04: ConnectionSpeed */
OptionalBitsPerByte /* 05: BitsPerByte */
OptionalStopBits /* 06: StopBits */
OptionalEndian /* 09: Endianess */
OptionalParityType /* 10: Parity */
OptionalFlowControl /* 11: FlowControl */
OptionalByteConstExpr /* 18: ResourceSourceIndex */
OptionalResourceType /* 19: ResourceType */
OptionalNameString /* 20: DescriptorName */
OptionalBuffer_Last /* 21: VendorData */
| PARSEOP_UART_SERIALBUS '('
;
')' '{'
| PARSEOP_VENDORLONG '('
;
')' '{'
| PARSEOP_VENDORSHORT '('
;
',' WordConstExpr
',' WordConstExpr
',' WordConstExpr
',' WordConstExpr
',' WordConstExpr
| PARSEOP_WORDBUSNUMBER '('
;
',' WordConstExpr
',' WordConstExpr
',' WordConstExpr
',' WordConstExpr
',' WordConstExpr
| PARSEOP_WORDIO '('
;
',' ByteConstExpr
',' WordConstExpr
',' WordConstExpr
',' WordConstExpr
',' WordConstExpr
',' WordConstExpr
| PARSEOP_WORDSPACE '('
;
/******* Object References ***********************************************/
/* Allow IO, DMA, IRQ Resource macro names to also be used as identifiers */
: NameSeg {}
| PARSEOP_NAMESTRING {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) AslCompilerlval.s);}
;
: PARSEOP_NAMESEG {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESEG, (ACPI_NATIVE_INT) AslCompilerlval.s);}
;
/******* Helper rules ****************************************************/
;
;
;
;
: {$$ = NULL;}
| ',' {$$ = NULL;}
;
: {$$ = TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0);}
;
: ',' {$$ = NULL;}
;
: {$$ = NULL;}
| ',' {$$ = NULL;}
;
: ',' {$$ = NULL;}
;
: {$$ = NULL;}
| ',' {$$ = NULL;}
;
: {$$ = NULL;}
| ',' {$$ = NULL;}
;
: ',' {$$ = NULL;}
;
: ',' {$$ = NULL;}
;
: {$$ = NULL;}
| ',' {$$ = NULL;}
;
: ',' {$$ = NULL;}
;
: ',' {$$ = NULL;}
;
: ',' {$$ = NULL;}
;
: {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */
| ',' {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */
;
: ',' {$$ = NULL;}
;
: ',' {$$ = NULL;}
;
: ',' {$$ = NULL;}
;
: {$$ = NULL;}
| ',' {$$ = NULL;}
;
: {$$ = NULL;}
| ',' {$$ = NULL;}
;
: {$$ = TrCreateLeafNode (PARSEOP_ZERO);}
| NameString {$$ = $1;}
;
: {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_UNK);}
;
: ',' {$$ = NULL;}
;
: {$$ = NULL;}
| ',' {$$ = NULL;}
;
: ',' {$$ = NULL;}
;
: {$$ = TrCreateLeafNode (PARSEOP_READWRITETYPE_BOTH);}
;
;
: {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);}
| ResourceTypeKeyword {$$ = $1;}
;
: {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);}
;
: {$$ = TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO), NODE_IS_NULL_RETURN);} /* Placeholder is a ZeroOp object */
| TermArg {$$ = $1;}
;
: {$$ = NULL;}
| ',' {$$ = NULL;}
;
: ',' {$$ = NULL;}
;
: {$$ = NULL;}
| ',' {$$ = NULL;}
;
: {$$ = NULL;}
| ShareTypeKeyword {$$ = $1;}
;
: ',' {$$ = NULL;}
;
: {$$ = NULL;}
| ',' {$$ = NULL;}
;
: {$$ = NULL;}
| TermArg {$$ = $1;}
;
: {$$ = NULL;}
| ',' {$$ = NULL;}
;
: {$$ = NULL;}
| ',' {$$ = NULL;}
;
: {$$ = NULL;}
| ',' {$$ = NULL;}
;
: ',' {$$ = NULL;}
;
: {$$ = NULL;}
| WordConst {$$ = $1;}
;
: ',' {$$ = NULL;}
;
;