1 1.1 christos NoEcho(' 2 1.1 christos /****************************************************************************** 3 1.1 christos * 4 1.1.1.3 christos * Module Name: aslrules.y - Main Bison/Yacc production rules 5 1.1.1.7 christos * - Keep this file synched with the 6 1.1.1.7 christos * CvParseOpBlockType function in cvcompiler.c 7 1.1 christos * 8 1.1 christos *****************************************************************************/ 9 1.1 christos 10 1.1.1.16 christos /****************************************************************************** 11 1.1.1.16 christos * 12 1.1.1.16 christos * 1. Copyright Notice 13 1.1.1.16 christos * 14 1.1.1.17 christos * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. 15 1.1 christos * All rights reserved. 16 1.1 christos * 17 1.1.1.16 christos * 2. License 18 1.1.1.16 christos * 19 1.1.1.16 christos * 2.1. This is your license from Intel Corp. under its intellectual property 20 1.1.1.16 christos * rights. You may have additional license terms from the party that provided 21 1.1.1.16 christos * you this software, covering your right to use that party's intellectual 22 1.1.1.16 christos * property rights. 23 1.1.1.16 christos * 24 1.1.1.16 christos * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 25 1.1.1.16 christos * copy of the source code appearing in this file ("Covered Code") an 26 1.1.1.16 christos * irrevocable, perpetual, worldwide license under Intel's copyrights in the 27 1.1.1.16 christos * base code distributed originally by Intel ("Original Intel Code") to copy, 28 1.1.1.16 christos * make derivatives, distribute, use and display any portion of the Covered 29 1.1.1.16 christos * Code in any form, with the right to sublicense such rights; and 30 1.1.1.16 christos * 31 1.1.1.16 christos * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 32 1.1.1.16 christos * license (with the right to sublicense), under only those claims of Intel 33 1.1.1.16 christos * patents that are infringed by the Original Intel Code, to make, use, sell, 34 1.1.1.16 christos * offer to sell, and import the Covered Code and derivative works thereof 35 1.1.1.16 christos * solely to the minimum extent necessary to exercise the above copyright 36 1.1.1.16 christos * license, and in no event shall the patent license extend to any additions 37 1.1.1.16 christos * to or modifications of the Original Intel Code. No other license or right 38 1.1.1.16 christos * is granted directly or by implication, estoppel or otherwise; 39 1.1.1.16 christos * 40 1.1.1.16 christos * The above copyright and patent license is granted only if the following 41 1.1.1.16 christos * conditions are met: 42 1.1.1.16 christos * 43 1.1.1.16 christos * 3. Conditions 44 1.1.1.16 christos * 45 1.1.1.16 christos * 3.1. Redistribution of Source with Rights to Further Distribute Source. 46 1.1.1.16 christos * Redistribution of source code of any substantial portion of the Covered 47 1.1.1.16 christos * Code or modification with rights to further distribute source must include 48 1.1.1.16 christos * the above Copyright Notice, the above License, this list of Conditions, 49 1.1.1.16 christos * and the following Disclaimer and Export Compliance provision. In addition, 50 1.1.1.16 christos * Licensee must cause all Covered Code to which Licensee contributes to 51 1.1.1.16 christos * contain a file documenting the changes Licensee made to create that Covered 52 1.1.1.16 christos * Code and the date of any change. Licensee must include in that file the 53 1.1.1.16 christos * documentation of any changes made by any predecessor Licensee. Licensee 54 1.1.1.16 christos * must include a prominent statement that the modification is derived, 55 1.1.1.16 christos * directly or indirectly, from Original Intel Code. 56 1.1.1.16 christos * 57 1.1.1.16 christos * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 58 1.1.1.16 christos * Redistribution of source code of any substantial portion of the Covered 59 1.1.1.16 christos * Code or modification without rights to further distribute source must 60 1.1.1.16 christos * include the following Disclaimer and Export Compliance provision in the 61 1.1.1.16 christos * documentation and/or other materials provided with distribution. In 62 1.1.1.16 christos * addition, Licensee may not authorize further sublicense of source of any 63 1.1.1.16 christos * portion of the Covered Code, and must include terms to the effect that the 64 1.1.1.16 christos * license from Licensee to its licensee is limited to the intellectual 65 1.1.1.16 christos * property embodied in the software Licensee provides to its licensee, and 66 1.1.1.16 christos * not to intellectual property embodied in modifications its licensee may 67 1.1.1.16 christos * make. 68 1.1.1.16 christos * 69 1.1.1.16 christos * 3.3. Redistribution of Executable. Redistribution in executable form of any 70 1.1.1.16 christos * substantial portion of the Covered Code or modification must reproduce the 71 1.1.1.16 christos * above Copyright Notice, and the following Disclaimer and Export Compliance 72 1.1.1.16 christos * provision in the documentation and/or other materials provided with the 73 1.1.1.16 christos * distribution. 74 1.1.1.16 christos * 75 1.1.1.16 christos * 3.4. Intel retains all right, title, and interest in and to the Original 76 1.1.1.16 christos * Intel Code. 77 1.1.1.16 christos * 78 1.1.1.16 christos * 3.5. Neither the name Intel nor any other trademark owned or controlled by 79 1.1.1.16 christos * Intel shall be used in advertising or otherwise to promote the sale, use or 80 1.1.1.16 christos * other dealings in products derived from or relating to the Covered Code 81 1.1.1.16 christos * without prior written authorization from Intel. 82 1.1.1.16 christos * 83 1.1.1.16 christos * 4. Disclaimer and Export Compliance 84 1.1.1.16 christos * 85 1.1.1.16 christos * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 86 1.1.1.16 christos * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 87 1.1.1.16 christos * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 88 1.1.1.16 christos * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 89 1.1.1.16 christos * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 90 1.1.1.16 christos * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 91 1.1.1.16 christos * PARTICULAR PURPOSE. 92 1.1.1.16 christos * 93 1.1.1.16 christos * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 94 1.1.1.16 christos * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 95 1.1.1.16 christos * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 96 1.1.1.16 christos * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 97 1.1.1.16 christos * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 98 1.1.1.16 christos * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 99 1.1.1.16 christos * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 100 1.1.1.16 christos * LIMITED REMEDY. 101 1.1.1.16 christos * 102 1.1.1.16 christos * 4.3. Licensee shall not export, either directly or indirectly, any of this 103 1.1.1.16 christos * software or system incorporating such software without first obtaining any 104 1.1.1.16 christos * required license or other approval from the U. S. Department of Commerce or 105 1.1.1.16 christos * any other agency or department of the United States Government. In the 106 1.1.1.16 christos * event Licensee exports any such software from the United States or 107 1.1.1.16 christos * re-exports any such software from a foreign destination, Licensee shall 108 1.1.1.16 christos * ensure that the distribution and export/re-export of the software is in 109 1.1.1.16 christos * compliance with all laws, regulations, orders, or other restrictions of the 110 1.1.1.16 christos * U.S. Export Administration Regulations. Licensee agrees that neither it nor 111 1.1.1.16 christos * any of its subsidiaries will export/re-export any technical data, process, 112 1.1.1.16 christos * software, or service, directly or indirectly, to any country for which the 113 1.1.1.16 christos * United States government or any agency thereof requires an export license, 114 1.1.1.16 christos * other governmental approval, or letter of assurance, without first obtaining 115 1.1.1.16 christos * such license, approval or letter. 116 1.1.1.16 christos * 117 1.1.1.16 christos ***************************************************************************** 118 1.1.1.16 christos * 119 1.1.1.16 christos * Alternatively, you may choose to be licensed under the terms of the 120 1.1.1.16 christos * following license: 121 1.1.1.16 christos * 122 1.1 christos * Redistribution and use in source and binary forms, with or without 123 1.1 christos * modification, are permitted provided that the following conditions 124 1.1 christos * are met: 125 1.1 christos * 1. Redistributions of source code must retain the above copyright 126 1.1 christos * notice, this list of conditions, and the following disclaimer, 127 1.1 christos * without modification. 128 1.1 christos * 2. Redistributions in binary form must reproduce at minimum a disclaimer 129 1.1 christos * substantially similar to the "NO WARRANTY" disclaimer below 130 1.1 christos * ("Disclaimer") and any redistribution must be conditioned upon 131 1.1 christos * including a substantially similar Disclaimer requirement for further 132 1.1 christos * binary redistribution. 133 1.1 christos * 3. Neither the names of the above-listed copyright holders nor the names 134 1.1 christos * of any contributors may be used to endorse or promote products derived 135 1.1 christos * from this software without specific prior written permission. 136 1.1 christos * 137 1.1 christos * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 138 1.1 christos * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 139 1.1.1.13 christos * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 140 1.1 christos * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 141 1.1.1.16 christos * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 142 1.1.1.16 christos * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 143 1.1.1.16 christos * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 144 1.1.1.16 christos * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 145 1.1.1.16 christos * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 146 1.1.1.16 christos * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 147 1.1.1.16 christos * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 148 1.1.1.16 christos * 149 1.1.1.16 christos * Alternatively, you may choose to be licensed under the terms of the 150 1.1.1.16 christos * GNU General Public License ("GPL") version 2 as published by the Free 151 1.1.1.16 christos * Software Foundation. 152 1.1.1.16 christos * 153 1.1.1.16 christos *****************************************************************************/ 154 1.1 christos 155 1.1 christos ') 156 1.1 christos 157 1.1 christos /******************************************************************************* 158 1.1 christos * 159 1.1.1.3 christos * ASL Root and Secondary Terms 160 1.1 christos * 161 1.1 christos ******************************************************************************/ 162 1.1 christos 163 1.1 christos /* 164 1.1.1.3 christos * Root term. Allow multiple #line directives before the definition block 165 1.1 christos * to handle output from preprocessors 166 1.1 christos */ 167 1.1.1.3 christos AslCode 168 1.1.1.8 christos : DefinitionBlockList {$<n>$ = TrLinkOpChildren ( 169 1.1.1.8 christos TrCreateLeafOp (PARSEOP_ASL_CODE),1, $1);} 170 1.1 christos | error {YYABORT; $$ = NULL;} 171 1.1 christos ; 172 1.1 christos 173 1.1 christos 174 1.1 christos /* 175 1.1 christos * Note concerning support for "module-level code". 176 1.1 christos * 177 1.1 christos * ACPI 1.0 allowed Type1 and Type2 executable opcodes outside of control 178 1.1 christos * methods (the so-called module-level code.) This support was explicitly 179 1.1 christos * removed in ACPI 2.0, but this type of code continues to be created by 180 1.1 christos * BIOS vendors. In order to support the disassembly and recompilation of 181 1.1 christos * such code (and the porting of ASL code to iASL), iASL supports this 182 1.1 christos * code in violation of the current ACPI specification. 183 1.1 christos * 184 1.1 christos * The grammar change to support module-level code is to revert the 185 1.1 christos * {ObjectList} portion of the DefinitionBlockTerm in ACPI 2.0 to the 186 1.1 christos * original use of {TermList} instead (see below.) This allows the use 187 1.1 christos * of Type1 and Type2 opcodes at module level. 188 1.1.1.4 christos * 189 1.1.1.4 christos * 04/2016: The module-level code is now allowed in the following terms: 190 1.1.1.4 christos * DeviceTerm, PowerResTerm, ProcessorTerm, ScopeTerm, ThermalZoneTerm. 191 1.1.1.4 christos * The ObjectList term is obsolete and has been removed. 192 1.1 christos */ 193 1.1 christos DefinitionBlockTerm 194 1.1.1.6 christos : PARSEOP_DEFINITION_BLOCK 195 1.1.1.8 christos PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DEFINITION_BLOCK); COMMENT_CAPTURE_OFF;} 196 1.1 christos String ',' 197 1.1 christos String ',' 198 1.1 christos ByteConst ',' 199 1.1 christos String ',' 200 1.1 christos String ',' 201 1.1 christos DWordConst 202 1.1.1.8 christos PARSEOP_CLOSE_PAREN {TrSetOpIntegerWidth ($6,$8); 203 1.1.1.8 christos TrSetOpEndLineNumber ($<n>3); COMMENT_CAPTURE_ON;} 204 1.1.1.8 christos '{' TermList '}' {$$ = TrLinkOpChildren ($<n>3,7, 205 1.1.1.5 christos $4,$6,$8,$10,$12,$14,$18);} 206 1.1 christos ; 207 1.1 christos 208 1.1.1.3 christos DefinitionBlockList 209 1.1.1.3 christos : DefinitionBlockTerm 210 1.1.1.3 christos | DefinitionBlockTerm 211 1.1.1.8 christos DefinitionBlockList {$$ = TrLinkPeerOps (2, $1,$2);} 212 1.1.1.2 christos ; 213 1.1.1.2 christos 214 1.1.1.6 christos 215 1.1.1.6 christos /******* Basic ASCII identifiers **************************************************/ 216 1.1.1.6 christos 217 1.1.1.5 christos /* Allow IO, DMA, IRQ Resource macro and FOR macro names to also be used as identifiers */ 218 1.1.1.5 christos 219 1.1.1.5 christos NameString 220 1.1.1.5 christos : NameSeg {} 221 1.1.1.8 christos | PARSEOP_NAMESTRING {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) $1);} 222 1.1.1.8 christos | PARSEOP_IO {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "IO");} 223 1.1.1.8 christos | PARSEOP_DMA {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "DMA");} 224 1.1.1.8 christos | PARSEOP_IRQ {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "IRQ");} 225 1.1.1.8 christos | PARSEOP_FOR {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "FOR");} 226 1.1.1.5 christos ; 227 1.1.1.5 christos /* 228 1.1.1.5 christos NameSeg 229 1.1.1.8 christos : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESEG, (ACPI_NATIVE_INT) 230 1.1.1.6 christos TrNormalizeNameSeg ($1));} 231 1.1.1.5 christos ; 232 1.1.1.5 christos */ 233 1.1.1.5 christos 234 1.1.1.5 christos NameSeg 235 1.1.1.8 christos : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESEG, 236 1.1.1.6 christos (ACPI_NATIVE_INT) AslCompilerlval.s);} 237 1.1.1.5 christos ; 238 1.1.1.5 christos 239 1.1.1.5 christos 240 1.1.1.6 christos /******* Fundamental argument/statement types ***********************************/ 241 1.1.1.6 christos 242 1.1.1.6 christos Term 243 1.1.1.6 christos : Object {} 244 1.1.1.6 christos | Type1Opcode {} 245 1.1.1.6 christos | Type2Opcode {} 246 1.1.1.8 christos | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);} 247 1.1.1.8 christos | Type2StringOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);} 248 1.1.1.6 christos | Type2BufferOpcode {} 249 1.1.1.6 christos | Type2BufferOrStringOpcode {} 250 1.1.1.6 christos | error {$$ = AslDoError(); yyclearin;} 251 1.1.1.6 christos ; 252 1.1.1.6 christos 253 1.1.1.3 christos SuperName 254 1.1.1.6 christos : SimpleName {} 255 1.1.1.3 christos | DebugTerm {} 256 1.1.1.3 christos | Type6Opcode {} 257 1.1.1.5 christos ; 258 1.1.1.2 christos 259 1.1.1.3 christos Target 260 1.1.1.8 christos : {$$ = TrCreateNullTargetOp ();} /* Placeholder is a ZeroOp object */ 261 1.1.1.8 christos | ',' {$$ = TrCreateNullTargetOp ();} /* Placeholder is a ZeroOp object */ 262 1.1.1.8 christos | ',' SuperName {$$ = TrSetOpFlags ($2, OP_IS_TARGET);} 263 1.1 christos ; 264 1.1.1.14 christos /* 265 1.1.1.6 christos RequiredTarget 266 1.1.1.8 christos : ',' SuperName {$$ = TrSetOpFlags ($2, OP_IS_TARGET);} 267 1.1.1.6 christos ; 268 1.1.1.14 christos */ 269 1.1.1.3 christos TermArg 270 1.1.1.8 christos : SimpleName {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);} 271 1.1.1.8 christos | Type2Opcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);} 272 1.1.1.8 christos | DataObject {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);} 273 1.1.1.6 christos | PARSEOP_OPEN_PAREN 274 1.1.1.6 christos TermArg 275 1.1.1.8 christos PARSEOP_CLOSE_PAREN {$$ = TrSetOpFlags ($2, OP_IS_TERM_ARG);} 276 1.1 christos ; 277 1.1 christos 278 1.1.1.3 christos /* 279 1.1.1.3 christos NOTE: Removed from TermArg due to reduce/reduce conflicts: 280 1.1.1.8 christos | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);} 281 1.1.1.8 christos | Type2StringOpcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);} 282 1.1.1.8 christos | Type2BufferOpcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);} 283 1.1.1.8 christos | Type2BufferOrStringOpcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);} 284 1.1 christos 285 1.1.1.3 christos */ 286 1.1 christos 287 1.1.1.3 christos MethodInvocationTerm 288 1.1.1.6 christos : NameString 289 1.1.1.8 christos PARSEOP_OPEN_PAREN {TrSetOpIntegerValue (PARSEOP_METHODCALL, $1); COMMENT_CAPTURE_OFF;} 290 1.1.1.6 christos ArgList 291 1.1.1.8 christos PARSEOP_CLOSE_PAREN {$$ = TrLinkChildOp ($1,$4); COMMENT_CAPTURE_ON;} 292 1.1 christos ; 293 1.1 christos 294 1.1.1.3 christos /* OptionalCount must appear before ByteList or an incorrect reduction will result */ 295 1.1 christos 296 1.1.1.3 christos OptionalCount 297 1.1.1.8 christos : {$$ = TrCreateLeafOp (PARSEOP_ONES);} /* Placeholder is a OnesOp object */ 298 1.1.1.8 christos | ',' {$$ = TrCreateLeafOp (PARSEOP_ONES);} /* Placeholder is a OnesOp object */ 299 1.1.1.3 christos | ',' TermArg {$$ = $2;} 300 1.1 christos ; 301 1.1 christos 302 1.1.1.5 christos /* 303 1.1.1.5 christos * Data count for buffers and packages (byte count for buffers, 304 1.1.1.5 christos * element count for packages). 305 1.1.1.5 christos */ 306 1.1.1.5 christos OptionalDataCount 307 1.1.1.5 christos 308 1.1.1.5 christos /* Legacy ASL */ 309 1.1.1.5 christos : {$$ = NULL;} 310 1.1.1.6 christos | PARSEOP_OPEN_PAREN 311 1.1.1.6 christos TermArg 312 1.1.1.6 christos PARSEOP_CLOSE_PAREN {$$ = $2;} 313 1.1.1.6 christos | PARSEOP_OPEN_PAREN 314 1.1.1.6 christos PARSEOP_CLOSE_PAREN {$$ = NULL;} 315 1.1.1.5 christos 316 1.1.1.5 christos /* C-style (ASL+) -- adds equals term */ 317 1.1.1.5 christos 318 1.1.1.5 christos | PARSEOP_EXP_EQUALS {$$ = NULL;} 319 1.1.1.5 christos 320 1.1.1.6 christos | PARSEOP_OPEN_PAREN 321 1.1.1.6 christos TermArg 322 1.1.1.6 christos PARSEOP_CLOSE_PAREN 323 1.1.1.5 christos PARSEOP_EXP_EQUALS {$$ = $2;} 324 1.1.1.5 christos 325 1.1.1.6 christos | PARSEOP_OPEN_PAREN 326 1.1.1.6 christos PARSEOP_CLOSE_PAREN 327 1.1.1.6 christos String 328 1.1.1.5 christos PARSEOP_EXP_EQUALS {$$ = NULL;} 329 1.1 christos ; 330 1.1 christos 331 1.1 christos 332 1.1.1.3 christos /******* List Terms **************************************************/ 333 1.1 christos 334 1.1.1.6 christos /* ACPI 3.0 -- allow semicolons between terms */ 335 1.1.1.6 christos 336 1.1.1.6 christos TermList 337 1.1.1.6 christos : {$$ = NULL;} 338 1.1.1.8 christos | TermList Term {$$ = TrLinkPeerOp ( 339 1.1.1.8 christos TrSetOpFlags ($1, OP_RESULT_NOT_USED),$2);} 340 1.1.1.8 christos | TermList Term ';' {$$ = TrLinkPeerOp ( 341 1.1.1.8 christos TrSetOpFlags ($1, OP_RESULT_NOT_USED),$2);} 342 1.1.1.8 christos | TermList ';' Term {$$ = TrLinkPeerOp ( 343 1.1.1.8 christos TrSetOpFlags ($1, OP_RESULT_NOT_USED),$3);} 344 1.1.1.8 christos | TermList ';' Term ';' {$$ = TrLinkPeerOp ( 345 1.1.1.8 christos TrSetOpFlags ($1, OP_RESULT_NOT_USED),$3);} 346 1.1.1.6 christos ; 347 1.1.1.6 christos 348 1.1.1.3 christos ArgList 349 1.1.1.3 christos : {$$ = NULL;} 350 1.1.1.3 christos | TermArg 351 1.1.1.3 christos | ArgList ',' /* Allows a trailing comma at list end */ 352 1.1.1.3 christos | ArgList ',' 353 1.1.1.8 christos TermArg {$$ = TrLinkPeerOp ($1,$3);} 354 1.1 christos ; 355 1.1 christos 356 1.1.1.3 christos ByteList 357 1.1.1.3 christos : {$$ = NULL;} 358 1.1.1.3 christos | ByteConstExpr 359 1.1.1.3 christos | ByteList ',' /* Allows a trailing comma at list end */ 360 1.1.1.3 christos | ByteList ',' 361 1.1.1.8 christos ByteConstExpr {$$ = TrLinkPeerOp ($1,$3);} 362 1.1 christos ; 363 1.1 christos 364 1.1.1.3 christos DWordList 365 1.1.1.3 christos : {$$ = NULL;} 366 1.1.1.3 christos | DWordConstExpr 367 1.1.1.3 christos | DWordList ',' /* Allows a trailing comma at list end */ 368 1.1.1.3 christos | DWordList ',' 369 1.1.1.8 christos DWordConstExpr {$$ = TrLinkPeerOp ($1,$3);} 370 1.1 christos ; 371 1.1 christos 372 1.1.1.3 christos FieldUnitList 373 1.1 christos : {$$ = NULL;} 374 1.1.1.3 christos | FieldUnit 375 1.1.1.3 christos | FieldUnitList ',' /* Allows a trailing comma at list end */ 376 1.1.1.3 christos | FieldUnitList ',' 377 1.1.1.8 christos FieldUnit {$$ = TrLinkPeerOp ($1,$3);} 378 1.1 christos ; 379 1.1 christos 380 1.1.1.3 christos FieldUnit 381 1.1.1.3 christos : FieldUnitEntry {} 382 1.1.1.3 christos | OffsetTerm {} 383 1.1.1.3 christos | AccessAsTerm {} 384 1.1.1.3 christos | ConnectionTerm {} 385 1.1.1.3 christos ; 386 1.1 christos 387 1.1.1.3 christos FieldUnitEntry 388 1.1.1.8 christos : ',' AmlPackageLengthTerm {$$ = TrCreateOp (PARSEOP_RESERVED_BYTES,1,$2);} 389 1.1.1.3 christos | NameSeg ',' 390 1.1.1.8 christos AmlPackageLengthTerm {$$ = TrLinkChildOp ($1,$3);} 391 1.1.1.3 christos ; 392 1.1 christos 393 1.1.1.3 christos Object 394 1.1.1.3 christos : CompilerDirective {} 395 1.1.1.3 christos | NamedObject {} 396 1.1.1.3 christos | NameSpaceModifier {} 397 1.1.1.8 christos /* | StructureTerm {} */ 398 1.1 christos ; 399 1.1 christos 400 1.1.1.3 christos PackageList 401 1.1.1.3 christos : {$$ = NULL;} 402 1.1.1.3 christos | PackageElement 403 1.1.1.3 christos | PackageList ',' /* Allows a trailing comma at list end */ 404 1.1.1.3 christos | PackageList ',' 405 1.1.1.8 christos PackageElement {$$ = TrLinkPeerOp ($1,$3);} 406 1.1 christos ; 407 1.1 christos 408 1.1.1.3 christos PackageElement 409 1.1.1.3 christos : DataObject {} 410 1.1.1.3 christos | NameString {} 411 1.1 christos ; 412 1.1 christos 413 1.1.1.3 christos /* Rules for specifying the type of one method argument or return value */ 414 1.1 christos 415 1.1 christos ParameterTypePackage 416 1.1 christos : {$$ = NULL;} 417 1.1 christos | ObjectTypeKeyword {$$ = $1;} 418 1.1 christos | ParameterTypePackage ',' 419 1.1.1.8 christos ObjectTypeKeyword {$$ = TrLinkPeerOps (2,$1,$3);} 420 1.1 christos ; 421 1.1 christos 422 1.1 christos ParameterTypePackageList 423 1.1 christos : {$$ = NULL;} 424 1.1.1.11 christos | ObjectTypeKeyword {$$ = TrLinkOpChildren ( 425 1.1.1.11 christos TrCreateLeafOp (PARSEOP_DEFAULT_ARG),1,$1);} 426 1.1.1.11 christos | '{' ParameterTypePackage '}' {$$ = TrLinkOpChildren ( 427 1.1.1.11 christos TrCreateLeafOp (PARSEOP_DEFAULT_ARG),1,$2);} 428 1.1 christos ; 429 1.1 christos 430 1.1.1.11 christos 431 1.1 christos OptionalParameterTypePackage 432 1.1.1.11 christos : {$$ = NULL;} 433 1.1.1.11 christos | ',' ParameterTypePackageList {$$ = $2;} 434 1.1 christos ; 435 1.1 christos 436 1.1.1.3 christos /* Rules for specifying the types for method arguments */ 437 1.1 christos 438 1.1 christos ParameterTypesPackage 439 1.1 christos : ParameterTypePackageList {$$ = $1;} 440 1.1 christos | ParameterTypesPackage ',' 441 1.1.1.8 christos ParameterTypePackageList {$$ = TrLinkPeerOps (2,$1,$3);} 442 1.1 christos ; 443 1.1 christos 444 1.1 christos ParameterTypesPackageList 445 1.1 christos : {$$ = NULL;} 446 1.1.1.11 christos | ObjectTypeKeyword {$$ = TrLinkOpChildren ( 447 1.1.1.11 christos TrCreateLeafOp (PARSEOP_DEFAULT_ARG),1,$1);} 448 1.1.1.11 christos | '{' ParameterTypesPackage '}' {$$ = TrLinkOpChildren ( 449 1.1.1.11 christos TrCreateLeafOp (PARSEOP_DEFAULT_ARG),1,$2);} 450 1.1 christos ; 451 1.1 christos 452 1.1 christos OptionalParameterTypesPackage 453 1.1.1.11 christos : {$$ = NULL;} 454 1.1.1.11 christos | ',' ParameterTypesPackageList {$$ = $2;} 455 1.1 christos ; 456 1.1 christos 457 1.1 christos /* 458 1.1.1.3 christos * Case-Default list; allow only one Default term and unlimited Case terms 459 1.1 christos */ 460 1.1.1.3 christos CaseDefaultTermList 461 1.1.1.3 christos : {$$ = NULL;} 462 1.1.1.6 christos | CaseTerm {} 463 1.1.1.6 christos | DefaultTerm {} 464 1.1.1.3 christos | CaseDefaultTermList 465 1.1.1.8 christos CaseTerm {$$ = TrLinkPeerOp ($1,$2);} 466 1.1.1.3 christos | CaseDefaultTermList 467 1.1.1.8 christos DefaultTerm {$$ = TrLinkPeerOp ($1,$2);} 468 1.1 christos 469 1.1.1.3 christos /* Original - attempts to force zero or one default term within the switch */ 470 1.1.1.3 christos 471 1.1.1.3 christos /* 472 1.1.1.3 christos CaseDefaultTermList 473 1.1.1.3 christos : {$$ = NULL;} 474 1.1.1.3 christos | CaseTermList 475 1.1.1.3 christos DefaultTerm 476 1.1.1.8 christos CaseTermList {$$ = TrLinkPeerOp ($1,TrLinkPeerOp ($2, $3));} 477 1.1.1.3 christos | CaseTermList 478 1.1.1.8 christos CaseTerm {$$ = TrLinkPeerOp ($1,$2);} 479 1.1.1.3 christos ; 480 1.1.1.3 christos 481 1.1.1.3 christos CaseTermList 482 1.1.1.3 christos : {$$ = NULL;} 483 1.1.1.3 christos | CaseTerm {} 484 1.1.1.3 christos | CaseTermList 485 1.1.1.8 christos CaseTerm {$$ = TrLinkPeerOp ($1,$2);} 486 1.1.1.3 christos ; 487 1.1.1.3 christos */ 488 1.1.1.3 christos 489 1.1.1.3 christos 490 1.1.1.3 christos /******************************************************************************* 491 1.1.1.3 christos * 492 1.1.1.3 christos * ASL Data and Constant Terms 493 1.1.1.3 christos * 494 1.1.1.3 christos ******************************************************************************/ 495 1.1.1.3 christos 496 1.1.1.3 christos DataObject 497 1.1.1.3 christos : BufferData {} 498 1.1.1.3 christos | PackageData {} 499 1.1.1.3 christos | IntegerData {} 500 1.1.1.3 christos | StringData {} 501 1.1.1.3 christos ; 502 1.1.1.3 christos 503 1.1.1.3 christos BufferData 504 1.1.1.8 christos : Type5Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);} 505 1.1.1.8 christos | Type2BufferOrStringOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);} 506 1.1.1.8 christos | Type2BufferOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);} 507 1.1.1.3 christos | BufferTerm {} 508 1.1.1.3 christos ; 509 1.1.1.3 christos 510 1.1.1.3 christos PackageData 511 1.1.1.3 christos : PackageTerm {} 512 1.1.1.3 christos ; 513 1.1.1.3 christos 514 1.1.1.3 christos IntegerData 515 1.1.1.8 christos : Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);} 516 1.1.1.8 christos | Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);} 517 1.1.1.3 christos | Integer {} 518 1.1.1.3 christos | ConstTerm {} 519 1.1.1.3 christos ; 520 1.1.1.3 christos 521 1.1.1.3 christos StringData 522 1.1.1.8 christos : Type2StringOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);} 523 1.1.1.3 christos | String {} 524 1.1.1.3 christos ; 525 1.1.1.3 christos 526 1.1.1.12 christos StringLiteral 527 1.1.1.12 christos : String {} 528 1.1.1.12 christos ; 529 1.1.1.12 christos 530 1.1.1.3 christos ByteConst 531 1.1.1.8 christos : Integer {$$ = TrSetOpIntegerValue (PARSEOP_BYTECONST, $1);} 532 1.1.1.3 christos ; 533 1.1.1.3 christos 534 1.1.1.3 christos WordConst 535 1.1.1.8 christos : Integer {$$ = TrSetOpIntegerValue (PARSEOP_WORDCONST, $1);} 536 1.1.1.3 christos ; 537 1.1.1.3 christos 538 1.1.1.3 christos DWordConst 539 1.1.1.8 christos : Integer {$$ = TrSetOpIntegerValue (PARSEOP_DWORDCONST, $1);} 540 1.1.1.3 christos ; 541 1.1.1.3 christos 542 1.1.1.3 christos QWordConst 543 1.1.1.8 christos : Integer {$$ = TrSetOpIntegerValue (PARSEOP_QWORDCONST, $1);} 544 1.1.1.3 christos ; 545 1.1.1.3 christos 546 1.1.1.3 christos /* 547 1.1.1.8 christos * The OP_COMPILE_TIME_CONST flag in the following constant expressions 548 1.1.1.3 christos * enables compile-time constant folding to reduce the Type3Opcodes/Type2IntegerOpcodes 549 1.1.1.3 christos * to simple integers. It is an error if these types of expressions cannot be 550 1.1.1.3 christos * reduced, since the AML grammar for ****ConstExpr requires a simple constant. 551 1.1.1.3 christos * Note: The required byte length of the constant is passed through to the 552 1.1.1.3 christos * constant folding code in the node AmlLength field. 553 1.1.1.3 christos */ 554 1.1.1.3 christos ByteConstExpr 555 1.1.1.8 christos : Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST); 556 1.1.1.8 christos TrSetOpAmlLength ($1, 1);} 557 1.1.1.8 christos | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST); 558 1.1.1.8 christos TrSetOpAmlLength ($1, 1);} 559 1.1.1.8 christos | ConstExprTerm {$$ = TrSetOpIntegerValue (PARSEOP_BYTECONST, $1);} 560 1.1.1.3 christos | ByteConst {} 561 1.1.1.3 christos ; 562 1.1.1.3 christos 563 1.1.1.3 christos WordConstExpr 564 1.1.1.8 christos : Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST); 565 1.1.1.8 christos TrSetOpAmlLength ($1, 2);} 566 1.1.1.8 christos | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST); 567 1.1.1.8 christos TrSetOpAmlLength ($1, 2);} 568 1.1.1.8 christos | ConstExprTerm {$$ = TrSetOpIntegerValue (PARSEOP_WORDCONST, $1);} 569 1.1.1.3 christos | WordConst {} 570 1.1.1.3 christos ; 571 1.1.1.3 christos 572 1.1.1.3 christos DWordConstExpr 573 1.1.1.8 christos : Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST); 574 1.1.1.8 christos TrSetOpAmlLength ($1, 4);} 575 1.1.1.8 christos | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST); 576 1.1.1.8 christos TrSetOpAmlLength ($1, 4);} 577 1.1.1.8 christos | ConstExprTerm {$$ = TrSetOpIntegerValue (PARSEOP_DWORDCONST, $1);} 578 1.1.1.3 christos | DWordConst {} 579 1.1.1.3 christos ; 580 1.1.1.3 christos 581 1.1.1.3 christos QWordConstExpr 582 1.1.1.8 christos : Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST); 583 1.1.1.8 christos TrSetOpAmlLength ($1, 8);} 584 1.1.1.8 christos | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST); 585 1.1.1.8 christos TrSetOpAmlLength ($1, 8);} 586 1.1.1.8 christos | ConstExprTerm {$$ = TrSetOpIntegerValue (PARSEOP_QWORDCONST, $1);} 587 1.1.1.3 christos | QWordConst {} 588 1.1.1.3 christos ; 589 1.1.1.3 christos 590 1.1.1.3 christos ConstTerm 591 1.1.1.3 christos : ConstExprTerm {} 592 1.1.1.8 christos | PARSEOP_REVISION {$$ = TrCreateLeafOp (PARSEOP_REVISION);} 593 1.1.1.3 christos ; 594 1.1.1.3 christos 595 1.1.1.3 christos ConstExprTerm 596 1.1.1.8 christos : PARSEOP_ZERO {$$ = TrCreateValuedLeafOp (PARSEOP_ZERO, 0);} 597 1.1.1.8 christos | PARSEOP_ONE {$$ = TrCreateValuedLeafOp (PARSEOP_ONE, 1);} 598 1.1.1.8 christos | PARSEOP_ONES {$$ = TrCreateValuedLeafOp (PARSEOP_ONES, ACPI_UINT64_MAX);} 599 1.1.1.8 christos | PARSEOP___DATE__ {$$ = TrCreateConstantLeafOp (PARSEOP___DATE__);} 600 1.1.1.8 christos | PARSEOP___FILE__ {$$ = TrCreateConstantLeafOp (PARSEOP___FILE__);} 601 1.1.1.8 christos | PARSEOP___LINE__ {$$ = TrCreateConstantLeafOp (PARSEOP___LINE__);} 602 1.1.1.8 christos | PARSEOP___PATH__ {$$ = TrCreateConstantLeafOp (PARSEOP___PATH__);} 603 1.1.1.8 christos | PARSEOP___METHOD__ {$$ = TrCreateConstantLeafOp (PARSEOP___METHOD__);} 604 1.1.1.3 christos ; 605 1.1.1.3 christos 606 1.1.1.3 christos Integer 607 1.1.1.8 christos : PARSEOP_INTEGER {$$ = TrCreateValuedLeafOp (PARSEOP_INTEGER, 608 1.1.1.5 christos AslCompilerlval.i);} 609 1.1.1.3 christos ; 610 1.1.1.3 christos 611 1.1.1.3 christos String 612 1.1.1.8 christos : PARSEOP_STRING_LITERAL {$$ = TrCreateValuedLeafOp (PARSEOP_STRING_LITERAL, 613 1.1.1.5 christos (ACPI_NATIVE_INT) AslCompilerlval.s);} 614 1.1.1.3 christos ; 615 1.1.1.3 christos 616 1.1.1.3 christos 617 1.1.1.3 christos /******************************************************************************* 618 1.1.1.3 christos * 619 1.1.1.3 christos * ASL Opcode Terms 620 1.1.1.3 christos * 621 1.1.1.3 christos ******************************************************************************/ 622 1.1.1.3 christos 623 1.1.1.3 christos CompilerDirective 624 1.1.1.3 christos : IncludeTerm {} 625 1.1.1.3 christos | IncludeEndTerm {} 626 1.1.1.3 christos | ExternalTerm {} 627 1.1.1.3 christos ; 628 1.1.1.3 christos 629 1.1.1.3 christos NamedObject 630 1.1.1.3 christos : BankFieldTerm {} 631 1.1.1.3 christos | CreateBitFieldTerm {} 632 1.1.1.3 christos | CreateByteFieldTerm {} 633 1.1.1.3 christos | CreateDWordFieldTerm {} 634 1.1.1.3 christos | CreateFieldTerm {} 635 1.1.1.3 christos | CreateQWordFieldTerm {} 636 1.1.1.3 christos | CreateWordFieldTerm {} 637 1.1.1.3 christos | DataRegionTerm {} 638 1.1.1.3 christos | DeviceTerm {} 639 1.1.1.3 christos | EventTerm {} 640 1.1.1.3 christos | FieldTerm {} 641 1.1.1.3 christos | FunctionTerm {} 642 1.1.1.3 christos | IndexFieldTerm {} 643 1.1.1.3 christos | MethodTerm {} 644 1.1.1.3 christos | MutexTerm {} 645 1.1.1.3 christos | OpRegionTerm {} 646 1.1.1.3 christos | PowerResTerm {} 647 1.1.1.3 christos | ProcessorTerm {} 648 1.1.1.3 christos | ThermalZoneTerm {} 649 1.1.1.3 christos ; 650 1.1.1.3 christos 651 1.1.1.3 christos NameSpaceModifier 652 1.1.1.3 christos : AliasTerm {} 653 1.1.1.3 christos | NameTerm {} 654 1.1.1.8 christos /* | NameTermAslPlus {} */ 655 1.1.1.3 christos | ScopeTerm {} 656 1.1.1.3 christos ; 657 1.1.1.3 christos 658 1.1.1.6 christos SimpleName 659 1.1.1.3 christos : NameString {} 660 1.1.1.3 christos | LocalTerm {} 661 1.1.1.6 christos | ArgTerm {} 662 1.1.1.6 christos ; 663 1.1.1.6 christos 664 1.1.1.6 christos /* For ObjectType(), SuperName except for MethodInvocationTerm */ 665 1.1.1.6 christos 666 1.1.1.6 christos ObjectTypeSource 667 1.1.1.6 christos : SimpleName {} 668 1.1.1.3 christos | DebugTerm {} 669 1.1.1.3 christos | RefOfTerm {} 670 1.1.1.3 christos | DerefOfTerm {} 671 1.1.1.3 christos | IndexTerm {} 672 1.1.1.5 christos | IndexExpTerm {} 673 1.1.1.3 christos ; 674 1.1.1.3 christos 675 1.1.1.6 christos /* For DeRefOf(), SuperName except for DerefOf and Debug */ 676 1.1.1.6 christos 677 1.1.1.6 christos DerefOfSource 678 1.1.1.6 christos : SimpleName {} 679 1.1.1.6 christos | RefOfTerm {} 680 1.1.1.6 christos | DerefOfTerm {} 681 1.1.1.6 christos | IndexTerm {} 682 1.1.1.6 christos | IndexExpTerm {} 683 1.1.1.6 christos | StoreTerm {} 684 1.1.1.6 christos | EqualsTerm {} 685 1.1.1.6 christos | MethodInvocationTerm {} 686 1.1.1.3 christos ; 687 1.1.1.3 christos 688 1.1.1.6 christos /* For RefOf(), SuperName except for RefOf and MethodInvocationTerm */ 689 1.1.1.6 christos 690 1.1.1.6 christos RefOfSource 691 1.1.1.6 christos : SimpleName {} 692 1.1.1.6 christos | DebugTerm {} 693 1.1.1.6 christos | DerefOfTerm {} 694 1.1.1.6 christos | IndexTerm {} 695 1.1.1.6 christos | IndexExpTerm {} 696 1.1.1.3 christos ; 697 1.1.1.3 christos 698 1.1.1.6 christos /* For CondRefOf(), SuperName except for RefOf and MethodInvocationTerm */ 699 1.1.1.6 christos 700 1.1.1.6 christos CondRefOfSource 701 1.1.1.6 christos : SimpleName {} 702 1.1.1.6 christos | DebugTerm {} 703 1.1.1.6 christos | DerefOfTerm {} 704 1.1.1.6 christos | IndexTerm {} 705 1.1.1.6 christos | IndexExpTerm {} 706 1.1.1.6 christos ; 707 1.1.1.3 christos 708 1.1.1.6 christos /* 709 1.1.1.6 christos * Opcode types, as defined in the ACPI specification 710 1.1.1.6 christos */ 711 1.1.1.3 christos Type1Opcode 712 1.1.1.3 christos : BreakTerm {} 713 1.1.1.3 christos | BreakPointTerm {} 714 1.1.1.3 christos | ContinueTerm {} 715 1.1.1.3 christos | FatalTerm {} 716 1.1.1.4 christos | ForTerm {} 717 1.1.1.3 christos | ElseIfTerm {} 718 1.1.1.3 christos | NoOpTerm {} 719 1.1.1.3 christos | NotifyTerm {} 720 1.1.1.3 christos | ReleaseTerm {} 721 1.1.1.3 christos | ResetTerm {} 722 1.1.1.3 christos | ReturnTerm {} 723 1.1.1.3 christos | SignalTerm {} 724 1.1.1.3 christos | SleepTerm {} 725 1.1.1.3 christos | StallTerm {} 726 1.1.1.3 christos | SwitchTerm {} 727 1.1.1.3 christos | UnloadTerm {} 728 1.1.1.3 christos | WhileTerm {} 729 1.1.1.3 christos ; 730 1.1.1.3 christos 731 1.1.1.3 christos Type2Opcode 732 1.1.1.3 christos : AcquireTerm {} 733 1.1.1.3 christos | CondRefOfTerm {} 734 1.1.1.3 christos | CopyObjectTerm {} 735 1.1.1.3 christos | DerefOfTerm {} 736 1.1.1.14 christos | LoadTerm {} /* Moved from Type1 -- now returns an integer (ACPI 6.4) */ 737 1.1.1.3 christos | ObjectTypeTerm {} 738 1.1.1.3 christos | RefOfTerm {} 739 1.1.1.3 christos | SizeOfTerm {} 740 1.1.1.3 christos | StoreTerm {} 741 1.1.1.3 christos | EqualsTerm {} 742 1.1.1.3 christos | TimerTerm {} 743 1.1.1.3 christos | WaitTerm {} 744 1.1.1.3 christos | MethodInvocationTerm {} 745 1.1.1.3 christos ; 746 1.1.1.3 christos 747 1.1.1.3 christos /* 748 1.1.1.3 christos * Type 3/4/5 opcodes 749 1.1.1.3 christos */ 750 1.1.1.3 christos Type2IntegerOpcode /* "Type3" opcodes */ 751 1.1.1.8 christos : Expression {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);} 752 1.1.1.3 christos | AddTerm {} 753 1.1.1.3 christos | AndTerm {} 754 1.1 christos | DecTerm {} 755 1.1 christos | DivideTerm {} 756 1.1 christos | FindSetLeftBitTerm {} 757 1.1 christos | FindSetRightBitTerm {} 758 1.1 christos | FromBCDTerm {} 759 1.1 christos | IncTerm {} 760 1.1 christos | IndexTerm {} 761 1.1.1.8 christos /* | StructureIndexTerm {} */ 762 1.1.1.8 christos /* | StructurePointerTerm {} */ 763 1.1 christos | LAndTerm {} 764 1.1 christos | LEqualTerm {} 765 1.1 christos | LGreaterTerm {} 766 1.1 christos | LGreaterEqualTerm {} 767 1.1 christos | LLessTerm {} 768 1.1 christos | LLessEqualTerm {} 769 1.1 christos | LNotTerm {} 770 1.1 christos | LNotEqualTerm {} 771 1.1 christos | LoadTableTerm {} 772 1.1 christos | LOrTerm {} 773 1.1 christos | MatchTerm {} 774 1.1 christos | ModTerm {} 775 1.1 christos | MultiplyTerm {} 776 1.1 christos | NAndTerm {} 777 1.1 christos | NOrTerm {} 778 1.1 christos | NotTerm {} 779 1.1 christos | OrTerm {} 780 1.1 christos | ShiftLeftTerm {} 781 1.1 christos | ShiftRightTerm {} 782 1.1 christos | SubtractTerm {} 783 1.1 christos | ToBCDTerm {} 784 1.1 christos | ToIntegerTerm {} 785 1.1 christos | XOrTerm {} 786 1.1 christos ; 787 1.1 christos 788 1.1 christos Type2StringOpcode /* "Type4" Opcodes */ 789 1.1 christos : ToDecimalStringTerm {} 790 1.1 christos | ToHexStringTerm {} 791 1.1 christos | ToStringTerm {} 792 1.1 christos ; 793 1.1 christos 794 1.1 christos Type2BufferOpcode /* "Type5" Opcodes */ 795 1.1 christos : ToBufferTerm {} 796 1.1 christos | ConcatResTerm {} 797 1.1 christos ; 798 1.1 christos 799 1.1 christos Type2BufferOrStringOpcode 800 1.1.1.8 christos : ConcatTerm {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);} 801 1.1.1.2 christos | PrintfTerm {} 802 1.1.1.2 christos | FprintfTerm {} 803 1.1 christos | MidTerm {} 804 1.1 christos ; 805 1.1 christos 806 1.1 christos /* 807 1.1 christos * A type 3 opcode evaluates to an Integer and cannot have a destination operand 808 1.1 christos */ 809 1.1 christos Type3Opcode 810 1.1 christos : EISAIDTerm {} 811 1.1 christos ; 812 1.1 christos 813 1.1 christos /* Obsolete 814 1.1 christos Type4Opcode 815 1.1 christos : ConcatTerm {} 816 1.1 christos | ToDecimalStringTerm {} 817 1.1 christos | ToHexStringTerm {} 818 1.1 christos | MidTerm {} 819 1.1 christos | ToStringTerm {} 820 1.1 christos ; 821 1.1 christos */ 822 1.1 christos 823 1.1.1.5 christos /* Type 5 opcodes are a subset of Type2 opcodes, and return a constant */ 824 1.1.1.5 christos 825 1.1 christos Type5Opcode 826 1.1 christos : ResourceTemplateTerm {} 827 1.1 christos | UnicodeTerm {} 828 1.1.1.2 christos | ToPLDTerm {} 829 1.1 christos | ToUUIDTerm {} 830 1.1 christos ; 831 1.1 christos 832 1.1 christos Type6Opcode 833 1.1 christos : RefOfTerm {} 834 1.1 christos | DerefOfTerm {} 835 1.1 christos | IndexTerm {} 836 1.1.1.3 christos | IndexExpTerm {} 837 1.1.1.8 christos /* | StructureIndexTerm {} */ 838 1.1.1.8 christos /* | StructurePointerTerm {} */ 839 1.1.1.2 christos | MethodInvocationTerm {} 840 1.1 christos ; 841 1.1 christos 842 1.1 christos 843 1.1.1.3 christos /******************************************************************************* 844 1.1.1.3 christos * 845 1.1.1.3 christos * ASL Helper Terms 846 1.1.1.3 christos * 847 1.1.1.3 christos ******************************************************************************/ 848 1.1 christos 849 1.1 christos AmlPackageLengthTerm 850 1.1.1.8 christos : Integer {$$ = TrSetOpIntegerValue (PARSEOP_PACKAGE_LENGTH, 851 1.1.1.5 christos (ACPI_PARSE_OBJECT *) $1);} 852 1.1 christos ; 853 1.1 christos 854 1.1 christos NameStringItem 855 1.1 christos : ',' NameString {$$ = $2;} 856 1.1 christos | ',' error {$$ = AslDoError (); yyclearin;} 857 1.1 christos ; 858 1.1 christos 859 1.1 christos TermArgItem 860 1.1 christos : ',' TermArg {$$ = $2;} 861 1.1 christos | ',' error {$$ = AslDoError (); yyclearin;} 862 1.1 christos ; 863 1.1 christos 864 1.1 christos OptionalReference 865 1.1.1.8 christos : {$$ = TrCreateLeafOp (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */ 866 1.1.1.8 christos | ',' {$$ = TrCreateLeafOp (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */ 867 1.1 christos | ',' TermArg {$$ = $2;} 868 1.1 christos ; 869 1.1 christos 870 1.1 christos OptionalReturnArg 871 1.1.1.8 christos : {$$ = TrSetOpFlags (TrCreateLeafOp (PARSEOP_ZERO), 872 1.1.1.8 christos OP_IS_NULL_RETURN);} /* Placeholder is a ZeroOp object */ 873 1.1 christos | TermArg {$$ = $1;} 874 1.1 christos ; 875 1.1 christos 876 1.1 christos OptionalSerializeRuleKeyword 877 1.1 christos : {$$ = NULL;} 878 1.1 christos | ',' {$$ = NULL;} 879 1.1 christos | ',' SerializeRuleKeyword {$$ = $2;} 880 1.1 christos ; 881 1.1 christos 882 1.1 christos OptionalTermArg 883 1.1.1.8 christos : {$$ = TrCreateLeafOp (PARSEOP_DEFAULT_ARG);} 884 1.1.1.4 christos | TermArg {$$ = $1;} 885 1.1.1.4 christos ; 886 1.1.1.4 christos 887 1.1 christos OptionalWordConst 888 1.1 christos : {$$ = NULL;} 889 1.1 christos | WordConst {$$ = $1;} 890 1.1 christos ; 891