1 %{ 2 /****************************************************************************** 3 * 4 * Module Name: aslcompiler.l - Flex/lex input file 5 * 6 *****************************************************************************/ 7 8 /****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. 13 * All rights reserved. 14 * 15 * 2. License 16 * 17 * 2.1. This is your license from Intel Corp. under its intellectual property 18 * rights. You may have additional license terms from the party that provided 19 * you this software, covering your right to use that party's intellectual 20 * property rights. 21 * 22 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 23 * copy of the source code appearing in this file ("Covered Code") an 24 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 25 * base code distributed originally by Intel ("Original Intel Code") to copy, 26 * make derivatives, distribute, use and display any portion of the Covered 27 * Code in any form, with the right to sublicense such rights; and 28 * 29 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 30 * license (with the right to sublicense), under only those claims of Intel 31 * patents that are infringed by the Original Intel Code, to make, use, sell, 32 * offer to sell, and import the Covered Code and derivative works thereof 33 * solely to the minimum extent necessary to exercise the above copyright 34 * license, and in no event shall the patent license extend to any additions 35 * to or modifications of the Original Intel Code. No other license or right 36 * is granted directly or by implication, estoppel or otherwise; 37 * 38 * The above copyright and patent license is granted only if the following 39 * conditions are met: 40 * 41 * 3. Conditions 42 * 43 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 44 * Redistribution of source code of any substantial portion of the Covered 45 * Code or modification with rights to further distribute source must include 46 * the above Copyright Notice, the above License, this list of Conditions, 47 * and the following Disclaimer and Export Compliance provision. In addition, 48 * Licensee must cause all Covered Code to which Licensee contributes to 49 * contain a file documenting the changes Licensee made to create that Covered 50 * Code and the date of any change. Licensee must include in that file the 51 * documentation of any changes made by any predecessor Licensee. Licensee 52 * must include a prominent statement that the modification is derived, 53 * directly or indirectly, from Original Intel Code. 54 * 55 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 56 * Redistribution of source code of any substantial portion of the Covered 57 * Code or modification without rights to further distribute source must 58 * include the following Disclaimer and Export Compliance provision in the 59 * documentation and/or other materials provided with distribution. In 60 * addition, Licensee may not authorize further sublicense of source of any 61 * portion of the Covered Code, and must include terms to the effect that the 62 * license from Licensee to its licensee is limited to the intellectual 63 * property embodied in the software Licensee provides to its licensee, and 64 * not to intellectual property embodied in modifications its licensee may 65 * make. 66 * 67 * 3.3. Redistribution of Executable. Redistribution in executable form of any 68 * substantial portion of the Covered Code or modification must reproduce the 69 * above Copyright Notice, and the following Disclaimer and Export Compliance 70 * provision in the documentation and/or other materials provided with the 71 * distribution. 72 * 73 * 3.4. Intel retains all right, title, and interest in and to the Original 74 * Intel Code. 75 * 76 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 77 * Intel shall be used in advertising or otherwise to promote the sale, use or 78 * other dealings in products derived from or relating to the Covered Code 79 * without prior written authorization from Intel. 80 * 81 * 4. Disclaimer and Export Compliance 82 * 83 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 84 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 85 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 86 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 87 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 89 * PARTICULAR PURPOSE. 90 * 91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 98 * LIMITED REMEDY. 99 * 100 * 4.3. Licensee shall not export, either directly or indirectly, any of this 101 * software or system incorporating such software without first obtaining any 102 * required license or other approval from the U. S. Department of Commerce or 103 * any other agency or department of the United States Government. In the 104 * event Licensee exports any such software from the United States or 105 * re-exports any such software from a foreign destination, Licensee shall 106 * ensure that the distribution and export/re-export of the software is in 107 * compliance with all laws, regulations, orders, or other restrictions of the 108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 109 * any of its subsidiaries will export/re-export any technical data, process, 110 * software, or service, directly or indirectly, to any country for which the 111 * United States government or any agency thereof requires an export license, 112 * other governmental approval, or letter of assurance, without first obtaining 113 * such license, approval or letter. 114 * 115 ***************************************************************************** 116 * 117 * Alternatively, you may choose to be licensed under the terms of the 118 * following license: 119 * 120 * Redistribution and use in source and binary forms, with or without 121 * modification, are permitted provided that the following conditions 122 * are met: 123 * 1. Redistributions of source code must retain the above copyright 124 * notice, this list of conditions, and the following disclaimer, 125 * without modification. 126 * 2. Redistributions in binary form must reproduce at minimum a disclaimer 127 * substantially similar to the "NO WARRANTY" disclaimer below 128 * ("Disclaimer") and any redistribution must be conditioned upon 129 * including a substantially similar Disclaimer requirement for further 130 * binary redistribution. 131 * 3. Neither the names of the above-listed copyright holders nor the names 132 * of any contributors may be used to endorse or promote products derived 133 * from this software without specific prior written permission. 134 * 135 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 136 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 137 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 138 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 139 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 140 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 141 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 142 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 143 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 144 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 145 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 146 * 147 * Alternatively, you may choose to be licensed under the terms of the 148 * GNU General Public License ("GPL") version 2 as published by the Free 149 * Software Foundation. 150 * 151 *****************************************************************************/ 152 153 #include <contrib/dev/acpica/compiler/aslcompiler.h> 154 #include "aslcompiler.y.h" 155 #include <contrib/dev/acpica/include/acconvert.h> 156 157 #include <stdlib.h> 158 #include <string.h> 159 YYSTYPE AslCompilerlval; 160 161 /* 162 * Generation: Use the following command line: 163 * 164 * flex.exe -PAslCompiler -i -o$(InputPath).c $(InputPath) 165 * 166 * -i: Scanner must be case-insensitive 167 */ 168 169 #define _COMPONENT ACPI_COMPILER 170 ACPI_MODULE_NAME ("aslscanner") 171 172 173 /* Local prototypes */ 174 175 static void 176 AslDoLineDirective (void); 177 178 static BOOLEAN 179 AslDoComment (void); 180 181 static BOOLEAN 182 AslDoCommentType2 (void); 183 184 static char 185 AslDoStringLiteral (void); 186 187 static void 188 count (int type); 189 190 191 /*! [Begin] no source code translation */ 192 193 %} 194 /* Definitions */ 195 196 LeadNameChar [A-Za-z_] 197 DigitChar [0-9] 198 HexDigitChar [A-Fa-f0-9] 199 RootChar [\\] 200 Nothing [] 201 202 NameChar [A-Za-z_0-9] 203 NameSeg1 {LeadNameChar}{NameChar} 204 NameSeg2 {LeadNameChar}{NameChar}{NameChar} 205 NameSeg3 {LeadNameChar}{NameChar}{NameChar}{NameChar} 206 NameSeg {LeadNameChar}|{NameSeg1}|{NameSeg2}|{NameSeg3} 207 208 NameString {RootChar}|{RootChar}{NamePath}|[\^]+{NamePath}|{NonEmptyNamePath} 209 NamePath {NonEmptyNamePath}? 210 NonEmptyNamePath {NameSeg}{NamePathTail}* 211 NamePathTail [.]{NameSeg} 212 213 %% 214 /* Rules */ 215 216 [ ] { count (0); } 217 [\n] { count (0); } /* Handle files with both LF and CR/LF */ 218 [\r] { count (0); } /* termination on both Unix and Windows */ 219 [ \t] { count (0); } 220 221 222 "/*" { if (!AslDoComment ()) {yyterminate ();} } 223 "//" { if (!AslDoCommentType2 ()) {yyterminate ();} } 224 225 "\"" { if (AslDoStringLiteral ()) {return (PARSEOP_STRING_LITERAL);} 226 else {yyterminate ();} } 227 ";" { count (0); return(';'); } 228 229 /* ASL Extension: Standard C operators */ 230 231 "~" { count (3); return (PARSEOP_EXP_NOT); } 232 "!" { count (3); return (PARSEOP_EXP_LOGICAL_NOT); } 233 "*" { count (3); return (PARSEOP_EXP_MULTIPLY); } 234 "/" { count (3); return (PARSEOP_EXP_DIVIDE); } 235 "%" { count (3); return (PARSEOP_EXP_MODULO); } 236 "+" { count (3); return (PARSEOP_EXP_ADD); } 237 "-" { count (3); return (PARSEOP_EXP_SUBTRACT); } 238 ">>" { count (3); return (PARSEOP_EXP_SHIFT_RIGHT); } 239 "<<" { count (3); return (PARSEOP_EXP_SHIFT_LEFT); } 240 "<" { count (3); return (PARSEOP_EXP_LESS); } 241 ">" { count (3); return (PARSEOP_EXP_GREATER); } 242 "&" { count (3); return (PARSEOP_EXP_AND); } 243 "<=" { count (3); return (PARSEOP_EXP_LESS_EQUAL); } 244 ">=" { count (3); return (PARSEOP_EXP_GREATER_EQUAL); } 245 "==" { count (3); return (PARSEOP_EXP_EQUAL); } 246 "!=" { count (3); return (PARSEOP_EXP_NOT_EQUAL); } 247 "|" { count (3); return (PARSEOP_EXP_OR); } 248 "&&" { count (3); return (PARSEOP_EXP_LOGICAL_AND); } 249 "||" { count (3); return (PARSEOP_EXP_LOGICAL_OR); } 250 "++" { count (3); return (PARSEOP_EXP_INCREMENT); } 251 "--" { count (3); return (PARSEOP_EXP_DECREMENT); } 252 "^ " { count (3); return (PARSEOP_EXP_XOR); } 253 254 /* ASL Extension: Standard C assignment operators */ 255 256 "=" { count (3); return (PARSEOP_EXP_EQUALS); } 257 "+=" { count (3); return (PARSEOP_EXP_ADD_EQ); } 258 "-=" { count (3); return (PARSEOP_EXP_SUB_EQ); } 259 "*=" { count (3); return (PARSEOP_EXP_MUL_EQ); } 260 "/=" { count (3); return (PARSEOP_EXP_DIV_EQ); } 261 "%=" { count (3); return (PARSEOP_EXP_MOD_EQ); } 262 "<<=" { count (3); return (PARSEOP_EXP_SHL_EQ); } 263 ">>=" { count (3); return (PARSEOP_EXP_SHR_EQ); } 264 "&=" { count (3); return (PARSEOP_EXP_AND_EQ); } 265 "^=" { count (3); return (PARSEOP_EXP_XOR_EQ); } 266 "|=" { count (3); return (PARSEOP_EXP_OR_EQ); } 267 268 "[" { count (3); return (PARSEOP_EXP_INDEX_LEFT); } 269 "]" { count (0); return (PARSEOP_EXP_INDEX_RIGHT); } 270 "(" { count (0); return (PARSEOP_OPEN_PAREN); } 271 ")" { count (0); return (PARSEOP_CLOSE_PAREN); } 272 273 "{" { count (0); return ('{'); } 274 "}" { count (0); return ('}'); } 275 "," { count (0); return (','); } 276 277 278 /* 279 * Begin standard ASL grammar 280 */ 281 0[xX]{HexDigitChar}+ | 282 {DigitChar}+ { AslCompilerlval.i = UtDoConstant ((char *) AslCompilertext); 283 count (1); return (PARSEOP_INTEGER); } 284 285 "Include" { count (1); return (PARSEOP_INCLUDE); } 286 "External" { count (1); return (PARSEOP_EXTERNAL); } 287 288 /* 289 * The #line directive is emitted by the preprocessor and handled 290 * here in the main iASL lexer - simply set the line number and 291 * optionally the current filename. 292 */ 293 "#line" { AslDoLineDirective ();} 294 295 296 /**************************************************************************** 297 * 298 * Main ASL operators 299 * 300 ****************************************************************************/ 301 302 "AccessAs" { count (1); return (PARSEOP_ACCESSAS); } 303 "Acquire" { count (3); return (PARSEOP_ACQUIRE); } 304 "Add" { count (3); return (PARSEOP_ADD); } 305 "Alias" { count (2); return (PARSEOP_ALIAS); } 306 "And" { count (3); return (PARSEOP_AND); } 307 "BankField" { count (2); return (PARSEOP_BANKFIELD); } 308 "Break" { count (3); return (PARSEOP_BREAK); } 309 "BreakPoint" { count (3); return (PARSEOP_BREAKPOINT); } 310 "Buffer" { count (1); return (PARSEOP_BUFFER); } 311 "Case" { count (3); return (PARSEOP_CASE); } 312 "Concatenate" { count (3); return (PARSEOP_CONCATENATE); } 313 "ConcatenateResTemplate" { count (3); return (PARSEOP_CONCATENATERESTEMPLATE); } 314 "CondRefOf" { count (3); return (PARSEOP_CONDREFOF); } 315 "Connection" { count (2); return (PARSEOP_CONNECTION); } 316 "Continue" { count (3); return (PARSEOP_CONTINUE); } 317 "CopyObject" { count (3); return (PARSEOP_COPYOBJECT); } 318 "CreateBitField" { count (2); return (PARSEOP_CREATEBITFIELD); } 319 "CreateByteField" { count (2); return (PARSEOP_CREATEBYTEFIELD); } 320 "CreateDWordField" { count (2); return (PARSEOP_CREATEDWORDFIELD); } 321 "CreateField" { count (2); return (PARSEOP_CREATEFIELD); } 322 "CreateQWordField" { count (2); return (PARSEOP_CREATEQWORDFIELD); } 323 "CreateWordField" { count (2); return (PARSEOP_CREATEWORDFIELD); } 324 "DataTableRegion" { count (2); return (PARSEOP_DATATABLEREGION); } 325 "Debug" { count (1); return (PARSEOP_DEBUG); } 326 "Decrement" { count (3); return (PARSEOP_DECREMENT); } 327 "Default" { count (3); return (PARSEOP_DEFAULT); } 328 "DefinitionBlock" { count (1); return (PARSEOP_DEFINITION_BLOCK); } 329 "DeRefOf" { count (3); return (PARSEOP_DEREFOF); } 330 "Device" { count (2); return (PARSEOP_DEVICE); } 331 "Divide" { count (3); return (PARSEOP_DIVIDE); } 332 "Eisaid" { count (1); return (PARSEOP_EISAID); } 333 "Else" { count (3); return (PARSEOP_ELSE); } 334 "ElseIf" { count (3); return (PARSEOP_ELSEIF); } 335 "Event" { count (2); return (PARSEOP_EVENT); } 336 "Fatal" { count (3); return (PARSEOP_FATAL); } 337 "Field" { count (2); return (PARSEOP_FIELD); } 338 "FindSetLeftBit" { count (3); return (PARSEOP_FINDSETLEFTBIT); } 339 "FindSetRightBit" { count (3); return (PARSEOP_FINDSETRIGHTBIT); } 340 "FromBcd" { count (3); return (PARSEOP_FROMBCD); } 341 "Function" { count (2); return (PARSEOP_FUNCTION); } 342 "If" { count (3); return (PARSEOP_IF); } 343 "Increment" { count (3); return (PARSEOP_INCREMENT); } 344 "Index" { count (3); return (PARSEOP_INDEX); } 345 "IndexField" { count (2); return (PARSEOP_INDEXFIELD); } 346 "LAnd" { count (3); return (PARSEOP_LAND); } 347 "LEqual" { count (3); return (PARSEOP_LEQUAL); } 348 "LGreater" { count (3); return (PARSEOP_LGREATER); } 349 "LGreaterEqual" { count (3); return (PARSEOP_LGREATEREQUAL); } 350 "LLess" { count (3); return (PARSEOP_LLESS); } 351 "LLessEqual" { count (3); return (PARSEOP_LLESSEQUAL); } 352 "LNot" { count (3); return (PARSEOP_LNOT); } 353 "LNotEqual" { count (3); return (PARSEOP_LNOTEQUAL); } 354 "Load" { count (3); return (PARSEOP_LOAD); } 355 "LoadTable" { count (3); return (PARSEOP_LOADTABLE); } 356 "LOr" { count (3); return (PARSEOP_LOR); } 357 "Match" { count (3); return (PARSEOP_MATCH); } 358 "Method" { count (2); return (PARSEOP_METHOD); } 359 "Mid" { count (3); return (PARSEOP_MID); } 360 "Mod" { count (3); return (PARSEOP_MOD); } 361 "Multiply" { count (3); return (PARSEOP_MULTIPLY); } 362 "Mutex" { count (2); return (PARSEOP_MUTEX); } 363 "Name" { count (2); return (PARSEOP_NAME); } 364 "NAnd" { count (3); return (PARSEOP_NAND); } 365 "Noop" { if (!AcpiGbl_IgnoreNoopOperator) {count (3); return (PARSEOP_NOOP);} } 366 "NOr" { count (3); return (PARSEOP_NOR); } 367 "Not" { count (3); return (PARSEOP_NOT); } 368 "Notify" { count (3); return (PARSEOP_NOTIFY); } 369 "ObjectType" { count (3); return (PARSEOP_OBJECTTYPE); } 370 "Offset" { count (1); return (PARSEOP_OFFSET); } 371 "One" { count (1); return (PARSEOP_ONE); } 372 "Ones" { count (1); return (PARSEOP_ONES); } 373 "OperationRegion" { count (2); return (PARSEOP_OPERATIONREGION); } 374 "Or" { count (3); return (PARSEOP_OR); } 375 "Package" { count (1); return (PARSEOP_PACKAGE); } 376 "PowerResource" { count (2); return (PARSEOP_POWERRESOURCE); } 377 "Processor" { count (2); return (PARSEOP_PROCESSOR); } 378 "RefOf" { count (3); return (PARSEOP_REFOF); } 379 "Release" { count (3); return (PARSEOP_RELEASE); } 380 "Reset" { count (3); return (PARSEOP_RESET); } 381 "Return" { count (3); return (PARSEOP_RETURN); } 382 "Revision" { count (1); return (PARSEOP_REVISION); } 383 "Scope" { count (2); return (PARSEOP_SCOPE); } 384 "ShiftLeft" { count (3); return (PARSEOP_SHIFTLEFT); } 385 "ShiftRight" { count (3); return (PARSEOP_SHIFTRIGHT); } 386 "Signal" { count (3); return (PARSEOP_SIGNAL); } 387 "SizeOf" { count (3); return (PARSEOP_SIZEOF); } 388 "Sleep" { count (3); return (PARSEOP_SLEEP); } 389 "Stall" { count (3); return (PARSEOP_STALL); } 390 "Store" { count (3); return (PARSEOP_STORE); } 391 "Subtract" { count (3); return (PARSEOP_SUBTRACT); } 392 "Switch" { count (3); return (PARSEOP_SWITCH); } 393 "ThermalZone" { count (2); return (PARSEOP_THERMALZONE); } 394 "Timer" { count (3); return (PARSEOP_TIMER); } 395 "ToBcd" { count (3); return (PARSEOP_TOBCD); } 396 "ToBuffer" { count (3); return (PARSEOP_TOBUFFER); } 397 "ToDecimalString" { count (3); return (PARSEOP_TODECIMALSTRING); } 398 "ToHexString" { count (3); return (PARSEOP_TOHEXSTRING); } 399 "ToInteger" { count (3); return (PARSEOP_TOINTEGER); } 400 "ToString" { count (3); return (PARSEOP_TOSTRING); } 401 "ToUuid" { count (1); return (PARSEOP_TOUUID); } 402 "Unicode" { count (1); return (PARSEOP_UNICODE); } 403 "Unload" { count (3); return (PARSEOP_UNLOAD); } 404 "Wait" { count (3); return (PARSEOP_WAIT); } 405 "While" { count (3); return (PARSEOP_WHILE); } 406 "XOr" { count (3); return (PARSEOP_XOR); } 407 "Zero" { count (1); return (PARSEOP_ZERO); } 408 409 /* Control method arguments and locals */ 410 411 "Arg0" { count (1); return (PARSEOP_ARG0); } 412 "Arg1" { count (1); return (PARSEOP_ARG1); } 413 "Arg2" { count (1); return (PARSEOP_ARG2); } 414 "Arg3" { count (1); return (PARSEOP_ARG3); } 415 "Arg4" { count (1); return (PARSEOP_ARG4); } 416 "Arg5" { count (1); return (PARSEOP_ARG5); } 417 "Arg6" { count (1); return (PARSEOP_ARG6); } 418 "Local0" { count (1); return (PARSEOP_LOCAL0); } 419 "Local1" { count (1); return (PARSEOP_LOCAL1); } 420 "Local2" { count (1); return (PARSEOP_LOCAL2); } 421 "Local3" { count (1); return (PARSEOP_LOCAL3); } 422 "Local4" { count (1); return (PARSEOP_LOCAL4); } 423 "Local5" { count (1); return (PARSEOP_LOCAL5); } 424 "Local6" { count (1); return (PARSEOP_LOCAL6); } 425 "Local7" { count (1); return (PARSEOP_LOCAL7); } 426 427 428 /**************************************************************************** 429 * 430 * Resource Descriptor macros 431 * 432 ****************************************************************************/ 433 434 "ResourceTemplate" { count (1); return (PARSEOP_RESOURCETEMPLATE); } 435 "RawDataBuffer" { count (1); return (PARSEOP_DATABUFFER); } 436 437 "DMA" { count (1); return (PARSEOP_DMA); } 438 "DWordIO" { count (1); return (PARSEOP_DWORDIO); } 439 "DWordMemory" { count (1); return (PARSEOP_DWORDMEMORY); } 440 "DWordSpace" { count (1); return (PARSEOP_DWORDSPACE); } 441 "EndDependentFn" { count (1); return (PARSEOP_ENDDEPENDENTFN); } 442 "ExtendedIO" { count (1); return (PARSEOP_EXTENDEDIO); } 443 "ExtendedMemory" { count (1); return (PARSEOP_EXTENDEDMEMORY); } 444 "ExtendedSpace" { count (1); return (PARSEOP_EXTENDEDSPACE); } 445 "FixedDma" { count (1); return (PARSEOP_FIXEDDMA); } 446 "FixedIO" { count (1); return (PARSEOP_FIXEDIO); } 447 "GpioInt" { count (1); return (PARSEOP_GPIO_INT); } 448 "GpioIo" { count (1); return (PARSEOP_GPIO_IO); } 449 "I2cSerialBus" { count (1); return (PARSEOP_I2C_SERIALBUS); } 450 "I2cSerialBusV2" { count (1); return (PARSEOP_I2C_SERIALBUS_V2); } 451 "Interrupt" { count (1); return (PARSEOP_INTERRUPT); } 452 "IO" { count (1); return (PARSEOP_IO); } 453 "IRQ" { count (1); return (PARSEOP_IRQ); } 454 "IRQNoFlags" { count (1); return (PARSEOP_IRQNOFLAGS); } 455 "Memory24" { count (1); return (PARSEOP_MEMORY24); } 456 "Memory32" { count (1); return (PARSEOP_MEMORY32); } 457 "Memory32Fixed" { count (1); return (PARSEOP_MEMORY32FIXED); } 458 "QWordIO" { count (1); return (PARSEOP_QWORDIO); } 459 "QWordMemory" { count (1); return (PARSEOP_QWORDMEMORY); } 460 "QWordSpace" { count (1); return (PARSEOP_QWORDSPACE); } 461 "Register" { count (1); return (PARSEOP_REGISTER); } 462 "SpiSerialBus" { count (1); return (PARSEOP_SPI_SERIALBUS); } 463 "SpiSerialBusV2" { count (1); return (PARSEOP_SPI_SERIALBUS_V2); } 464 "StartDependentFn" { count (1); return (PARSEOP_STARTDEPENDENTFN); } 465 "StartDependentFnNoPri" { count (1); return (PARSEOP_STARTDEPENDENTFN_NOPRI); } 466 "UartSerialBus" { count (1); return (PARSEOP_UART_SERIALBUS); } 467 "UartSerialBusV2" { count (1); return (PARSEOP_UART_SERIALBUS_V2); } 468 "VendorLong" { count (1); return (PARSEOP_VENDORLONG); } 469 "VendorShort" { count (1); return (PARSEOP_VENDORSHORT); } 470 "WordBusNumber" { count (1); return (PARSEOP_WORDBUSNUMBER); } 471 "WordIO" { count (1); return (PARSEOP_WORDIO); } 472 "WordSpace" { count (1); return (PARSEOP_WORDSPACE); } 473 474 475 /**************************************************************************** 476 * 477 * Keywords used as arguments to ASL operators and macros 478 * 479 ****************************************************************************/ 480 481 /* AccessAttribKeyword: Serial Bus Attributes (ACPI 5.0) */ 482 483 "AttribQuick" { count (0); return (PARSEOP_ACCESSATTRIB_QUICK); } 484 "AttribSendReceive" { count (0); return (PARSEOP_ACCESSATTRIB_SND_RCV); } 485 "AttribByte" { count (0); return (PARSEOP_ACCESSATTRIB_BYTE); } 486 "AttribWord" { count (0); return (PARSEOP_ACCESSATTRIB_WORD); } 487 "AttribBlock" { count (0); return (PARSEOP_ACCESSATTRIB_BLOCK); } 488 "AttribProcessCall" { count (0); return (PARSEOP_ACCESSATTRIB_WORD_CALL); } 489 "AttribBlockProcessCall" { count (0); return (PARSEOP_ACCESSATTRIB_BLOCK_CALL); } 490 491 /* AccessAttribKeyword: Legacy synonyms for above (pre-ACPI 5.0) */ 492 493 "SMBQuick" { count (0); return (PARSEOP_ACCESSATTRIB_QUICK); } 494 "SMBSendReceive" { count (0); return (PARSEOP_ACCESSATTRIB_SND_RCV); } 495 "SMBByte" { count (0); return (PARSEOP_ACCESSATTRIB_BYTE); } 496 "SMBWord" { count (0); return (PARSEOP_ACCESSATTRIB_WORD); } 497 "SMBBlock" { count (0); return (PARSEOP_ACCESSATTRIB_BLOCK); } 498 "SMBProcessCall" { count (0); return (PARSEOP_ACCESSATTRIB_WORD_CALL); } 499 "SMBBlockProcessCall" { count (0); return (PARSEOP_ACCESSATTRIB_BLOCK_CALL); } 500 501 /* AccessTypeKeyword: Field Access Types */ 502 503 "AnyAcc" { count (0); return (PARSEOP_ACCESSTYPE_ANY); } 504 "ByteAcc" { count (0); return (PARSEOP_ACCESSTYPE_BYTE); } 505 "WordAcc" { count (0); return (PARSEOP_ACCESSTYPE_WORD); } 506 "DWordAcc" { count (0); return (PARSEOP_ACCESSTYPE_DWORD); } 507 "QWordAcc" { count (0); return (PARSEOP_ACCESSTYPE_QWORD); } 508 "BufferAcc" { count (0); return (PARSEOP_ACCESSTYPE_BUF); } 509 510 /* AddressingModeKeyword: Mode - Resource Descriptors (ACPI 5.0) */ 511 512 "AddressingMode7Bit" { count (0); return (PARSEOP_ADDRESSINGMODE_7BIT); } 513 "AddressingMode10Bit" { count (0); return (PARSEOP_ADDRESSINGMODE_10BIT); } 514 515 /* AddressKeyword: ACPI memory range types */ 516 517 "AddressRangeMemory" { count (0); return (PARSEOP_ADDRESSTYPE_MEMORY); } 518 "AddressRangeReserved" { count (0); return (PARSEOP_ADDRESSTYPE_RESERVED); } 519 "AddressRangeNVS" { count (0); return (PARSEOP_ADDRESSTYPE_NVS); } 520 "AddressRangeACPI" { count (0); return (PARSEOP_ADDRESSTYPE_ACPI); } 521 522 /* BusMasterKeyword: DMA Bus Mastering */ 523 524 "BusMaster" { count (0); return (PARSEOP_BUSMASTERTYPE_MASTER); } 525 "NotBusMaster" { count (0); return (PARSEOP_BUSMASTERTYPE_NOTMASTER); } 526 527 /* ByteLengthKeyword: Bits per Byte - Resource Descriptors (ACPI 5.0) */ 528 529 "DataBitsFive" { count (0); return (PARSEOP_BITSPERBYTE_FIVE); } 530 "DataBitsSix" { count (0); return (PARSEOP_BITSPERBYTE_SIX); } 531 "DataBitsSeven" { count (0); return (PARSEOP_BITSPERBYTE_SEVEN); } 532 "DataBitsEight" { count (0); return (PARSEOP_BITSPERBYTE_EIGHT); } 533 "DataBitsNine" { count (0); return (PARSEOP_BITSPERBYTE_NINE); } 534 535 /* ClockPhaseKeyword: Resource Descriptors (ACPI 5.0) */ 536 537 "ClockPhaseFirst" { count (0); return (PARSEOP_CLOCKPHASE_FIRST); } 538 "ClockPhaseSecond" { count (0); return (PARSEOP_CLOCKPHASE_SECOND); } 539 540 /* ClockPolarityKeyword: Resource Descriptors (ACPI 5.0) */ 541 542 "ClockPolarityLow" { count (0); return (PARSEOP_CLOCKPOLARITY_LOW); } 543 "ClockPolarityHigh" { count (0); return (PARSEOP_CLOCKPOLARITY_HIGH); } 544 545 /* DecodeKeyword: Type of Memory Decoding - Resource Descriptors */ 546 547 "PosDecode" { count (0); return (PARSEOP_DECODETYPE_POS); } 548 "SubDecode" { count (0); return (PARSEOP_DECODETYPE_SUB); } 549 550 /* DmaTypeKeyword: DMA Types - DMA Resource Descriptor */ 551 552 "Compatibility" { count (0); return (PARSEOP_DMATYPE_COMPATIBILITY); } 553 "TypeA" { count (0); return (PARSEOP_DMATYPE_A); } 554 "TypeB" { count (0); return (PARSEOP_DMATYPE_B); } 555 "TypeF" { count (0); return (PARSEOP_DMATYPE_F); } 556 557 /* EndianKeyword: Endian type - Resource Descriptor (ACPI 5.0) */ 558 559 "LittleEndian" { count (0); return (PARSEOP_ENDIAN_LITTLE); } 560 "BigEndian" { count (0); return (PARSEOP_ENDIAN_BIG); } 561 562 /* ExtendedAttribKeyword: Bus attributes, AccessAs operator (ACPI 5.0) */ 563 564 "AttribBytes" { count (0); return (PARSEOP_ACCESSATTRIB_MULTIBYTE); } 565 "AttribRawBytes" { count (0); return (PARSEOP_ACCESSATTRIB_RAW_BYTES); } 566 "AttribRawProcessBytes" { count (0); return (PARSEOP_ACCESSATTRIB_RAW_PROCESS); } 567 568 /* FlowControlKeyword: Resource Descriptors (ACPI 5.0) */ 569 570 "FlowControlHardware" { count (0); return (PARSEOP_FLOWCONTROL_HW); } 571 "FlowControlNone" { count (0); return (PARSEOP_FLOWCONTROL_NONE); } 572 "FlowControlXon" { count (0); return (PARSEOP_FLOWCONTROL_SW); } 573 574 /* InterruptLevelKeyword: Interrupt Active Types */ 575 576 "ActiveBoth" { count (0); return (PARSEOP_INTLEVEL_ACTIVEBOTH); } 577 "ActiveHigh" { count (0); return (PARSEOP_INTLEVEL_ACTIVEHIGH); } 578 "ActiveLow" { count (0); return (PARSEOP_INTLEVEL_ACTIVELOW); } 579 580 /* InterruptTypeKeyword: Interrupt Types */ 581 582 "Edge" { count (0); return (PARSEOP_INTTYPE_EDGE); } 583 "Level" { count (0); return (PARSEOP_INTTYPE_LEVEL); } 584 585 /* IoDecodeKeyword: Type of Memory Decoding - Resource Descriptors */ 586 587 "Decode10" { count (0); return (PARSEOP_IODECODETYPE_10); } 588 "Decode16" { count (0); return (PARSEOP_IODECODETYPE_16); } 589 590 /* IoRestrictionKeyword: I/O Restriction - GPIO Resource Descriptors (ACPI 5.0) */ 591 592 "IoRestrictionNone" { count (0); return (PARSEOP_IORESTRICT_NONE); } 593 "IoRestrictionInputOnly" { count (0); return (PARSEOP_IORESTRICT_IN); } 594 "IoRestrictionOutputOnly" { count (0); return (PARSEOP_IORESTRICT_OUT); } 595 "IoRestrictionNoneAndPreserve" { count (0); return (PARSEOP_IORESTRICT_PRESERVE); } 596 597 /* LockRuleKeyword: Global Lock use for Field Operator */ 598 599 "Lock" { count (0); return (PARSEOP_LOCKRULE_LOCK); } 600 "NoLock" { count (0); return (PARSEOP_LOCKRULE_NOLOCK); } 601 602 /* MatchOpKeyword: Types for Match Operator */ 603 604 "MTR" { count (0); return (PARSEOP_MATCHTYPE_MTR); } 605 "MEQ" { count (0); return (PARSEOP_MATCHTYPE_MEQ); } 606 "MLE" { count (0); return (PARSEOP_MATCHTYPE_MLE); } 607 "MLT" { count (0); return (PARSEOP_MATCHTYPE_MLT); } 608 "MGE" { count (0); return (PARSEOP_MATCHTYPE_MGE); } 609 "MGT" { count (0); return (PARSEOP_MATCHTYPE_MGT); } 610 611 /* MaxKeyword: Max Range Type - Resource Descriptors */ 612 613 "MaxFixed" { count (0); return (PARSEOP_MAXTYPE_FIXED); } 614 "MaxNotFixed" { count (0); return (PARSEOP_MAXTYPE_NOTFIXED); } 615 616 /* MemTypeKeyword: Memory Types - Resource Descriptors */ 617 618 "Cacheable" { count (0); return (PARSEOP_MEMTYPE_CACHEABLE); } 619 "WriteCombining" { count (0); return (PARSEOP_MEMTYPE_WRITECOMBINING); } 620 "Prefetchable" { count (0); return (PARSEOP_MEMTYPE_PREFETCHABLE); } 621 "NonCacheable" { count (0); return (PARSEOP_MEMTYPE_NONCACHEABLE); } 622 623 /* MinKeyword: Min Range Type - Resource Descriptors */ 624 625 "MinFixed" { count (0); return (PARSEOP_MINTYPE_FIXED); } 626 "MinNotFixed" { count (0); return (PARSEOP_MINTYPE_NOTFIXED); } 627 628 /* ObjectTypeKeyword: ACPI Object Types */ 629 630 "UnknownObj" { count (0); return (PARSEOP_OBJECTTYPE_UNK); } 631 "IntObj" { count (0); return (PARSEOP_OBJECTTYPE_INT); } 632 "StrObj" { count (0); return (PARSEOP_OBJECTTYPE_STR); } 633 "BuffObj" { count (0); return (PARSEOP_OBJECTTYPE_BUF); } 634 "PkgObj" { count (0); return (PARSEOP_OBJECTTYPE_PKG); } 635 "FieldUnitObj" { count (0); return (PARSEOP_OBJECTTYPE_FLD); } 636 "DeviceObj" { count (0); return (PARSEOP_OBJECTTYPE_DEV); } 637 "EventObj" { count (0); return (PARSEOP_OBJECTTYPE_EVT); } 638 "MethodObj" { count (0); return (PARSEOP_OBJECTTYPE_MTH); } 639 "MutexObj" { count (0); return (PARSEOP_OBJECTTYPE_MTX); } 640 "OpRegionObj" { count (0); return (PARSEOP_OBJECTTYPE_OPR); } 641 "PowerResObj" { count (0); return (PARSEOP_OBJECTTYPE_POW); } 642 "ProcessorObj" { count (0); return (PARSEOP_OBJECTTYPE_PRO); } 643 "ThermalZoneObj" { count (0); return (PARSEOP_OBJECTTYPE_THZ); } 644 "BuffFieldObj" { count (0); return (PARSEOP_OBJECTTYPE_BFF); } 645 "DDBHandleObj" { count (0); return (PARSEOP_OBJECTTYPE_DDB); } 646 647 /* ParityKeyword: Resource Descriptors (ACPI 5.0) */ 648 649 "ParityTypeSpace" { count (0); return (PARSEOP_PARITYTYPE_SPACE); } 650 "ParityTypeMark" { count (0); return (PARSEOP_PARITYTYPE_MARK); } 651 "ParityTypeOdd" { count (0); return (PARSEOP_PARITYTYPE_ODD); } 652 "ParityTypeEven" { count (0); return (PARSEOP_PARITYTYPE_EVEN); } 653 "ParityTypeNone" { count (0); return (PARSEOP_PARITYTYPE_NONE); } 654 655 /* PinConfigKeyword: Pin Configuration - GPIO Resource Descriptors (ACPI 5.0) */ 656 657 "PullDefault" { count (0); return (PARSEOP_PIN_PULLDEFAULT); } 658 "PullUp" { count (0); return (PARSEOP_PIN_PULLUP); } 659 "PullDown" { count (0); return (PARSEOP_PIN_PULLDOWN); } 660 "PullNone" { count (0); return (PARSEOP_PIN_NOPULL); } 661 662 /* PolarityKeyword: Resource Descriptors (ACPI 5.0) */ 663 664 "PolarityLow" { count (0); return (PARSEOP_DEVICEPOLARITY_LOW); } 665 "PolarityHigh" { count (0); return (PARSEOP_DEVICEPOLARITY_HIGH); } 666 667 /* RangeTypeKeyword: I/O Range Types - Resource Descriptors */ 668 669 "ISAOnlyRanges" { count (0); return (PARSEOP_RANGETYPE_ISAONLY); } 670 "NonISAOnlyRanges" { count (0); return (PARSEOP_RANGETYPE_NONISAONLY); } 671 "EntireRange" { count (0); return (PARSEOP_RANGETYPE_ENTIRE); } 672 673 /* ReadWriteKeyword: Memory Access Types - Resource Descriptors */ 674 675 "ReadWrite" { count (0); return (PARSEOP_READWRITETYPE_BOTH); } 676 "ReadOnly" { count (0); return (PARSEOP_READWRITETYPE_READONLY); } 677 678 /* RegionSpaceKeyword: Operation Region Address Space Types */ 679 680 "SystemIO" { count (0); return (PARSEOP_REGIONSPACE_IO); } 681 "SystemMemory" { count (0); return (PARSEOP_REGIONSPACE_MEM); } 682 "PCI_Config" { count (0); return (PARSEOP_REGIONSPACE_PCI); } 683 "EmbeddedControl" { count (0); return (PARSEOP_REGIONSPACE_EC); } 684 "SMBus" { count (0); return (PARSEOP_REGIONSPACE_SMBUS); } 685 "SystemCMOS" { count (0); return (PARSEOP_REGIONSPACE_CMOS); } 686 "PciBarTarget" { count (0); return (PARSEOP_REGIONSPACE_PCIBAR); } 687 "IPMI" { count (0); return (PARSEOP_REGIONSPACE_IPMI); } 688 "GeneralPurposeIo" { count (0); return (PARSEOP_REGIONSPACE_GPIO); } /* ACPI 5.0 */ 689 "GenericSerialBus" { count (0); return (PARSEOP_REGIONSPACE_GSBUS); } /* ACPI 5.0 */ 690 "PCC" { count (0); return (PARSEOP_REGIONSPACE_PCC); } /* ACPI 5.0 */ 691 "FFixedHW" { count (0); return (PARSEOP_REGIONSPACE_FFIXEDHW); } 692 693 /* ResourceTypeKeyword: Resource Usage - Resource Descriptors */ 694 695 "ResourceConsumer" { count (0); return (PARSEOP_RESOURCETYPE_CONSUMER); } 696 "ResourceProducer" { count (0); return (PARSEOP_RESOURCETYPE_PRODUCER); } 697 698 /* SerializeRuleKeyword: Control Method Serialization */ 699 700 "Serialized" { count (0); return (PARSEOP_SERIALIZERULE_SERIAL); } 701 "NotSerialized" { count (0); return (PARSEOP_SERIALIZERULE_NOTSERIAL); } 702 703 /* ShareTypeKeyword: Interrupt Sharing - Resource Descriptors */ 704 705 "Shared" { count (0); return (PARSEOP_SHARETYPE_SHARED); } 706 "Exclusive" { count (0); return (PARSEOP_SHARETYPE_EXCLUSIVE); } 707 "SharedAndWake" { count (0); return (PARSEOP_SHARETYPE_SHAREDWAKE); } /* ACPI 5.0 */ 708 "ExclusiveAndWake" { count (0); return (PARSEOP_SHARETYPE_EXCLUSIVEWAKE); } /* ACPI 5.0 */ 709 710 /* SlaveModeKeyword: Resource Descriptors (ACPI 5.0) */ 711 712 "ControllerInitiated" { count (0); return (PARSEOP_SLAVEMODE_CONTROLLERINIT); } 713 "DeviceInitiated" { count (0); return (PARSEOP_SLAVEMODE_DEVICEINIT); } 714 715 /* StopBitsKeyword: Resource Descriptors (ACPI 5.0) */ 716 717 "StopBitsOne" { count (0); return (PARSEOP_STOPBITS_ONE); } 718 "StopBitsOnePlusHalf" { count (0); return (PARSEOP_STOPBITS_ONEPLUSHALF); } 719 "StopBitsTwo" { count (0); return (PARSEOP_STOPBITS_TWO); } 720 "StopBitsZero" { count (0); return (PARSEOP_STOPBITS_ZERO); } 721 722 /* TransferWidthKeyword: DMA Widths - Fixed DMA Resource Descriptor (ACPI 5.0) */ 723 724 "Width8bit" { count (0); return (PARSEOP_XFERSIZE_8); } 725 "Width16bit" { count (0); return (PARSEOP_XFERSIZE_16); } 726 "Width32bit" { count (0); return (PARSEOP_XFERSIZE_32); } 727 "Width64bit" { count (0); return (PARSEOP_XFERSIZE_64); } 728 "Width128bit" { count (0); return (PARSEOP_XFERSIZE_128); } 729 "Width256bit" { count (0); return (PARSEOP_XFERSIZE_256); } 730 731 /* TranslationKeyword: Translation Density Types - Resource Descriptors */ 732 733 "SparseTranslation" { count (0); return (PARSEOP_TRANSLATIONTYPE_SPARSE); } 734 "DenseTranslation" { count (0); return (PARSEOP_TRANSLATIONTYPE_DENSE); } 735 736 /* TypeKeyword: Translation Types - Resource Descriptors */ 737 738 "TypeTranslation" { count (0); return (PARSEOP_TYPE_TRANSLATION); } 739 "TypeStatic" { count (0); return (PARSEOP_TYPE_STATIC); } 740 741 /* UpdateRuleKeyword: Field Update Rules */ 742 743 "Preserve" { count (0); return (PARSEOP_UPDATERULE_PRESERVE); } 744 "WriteAsOnes" { count (0); return (PARSEOP_UPDATERULE_ONES); } 745 "WriteAsZeros" { count (0); return (PARSEOP_UPDATERULE_ZEROS); } 746 747 /* WireModeKeyword: SPI Wire Mode - Resource Descriptors (ACPI 5.0) */ 748 749 "FourWireMode" { count (0); return (PARSEOP_WIREMODE_FOUR); } 750 "ThreeWireMode" { count (0); return (PARSEOP_WIREMODE_THREE); } 751 752 /* XferTypeKeyword: DMA Transfer Types */ 753 754 "Transfer8" { count (0); return (PARSEOP_XFERTYPE_8); } 755 "Transfer8_16" { count (0); return (PARSEOP_XFERTYPE_8_16); } 756 "Transfer16" { count (0); return (PARSEOP_XFERTYPE_16); } 757 758 /* ToPld macro */ 759 760 "ToPLD" { count (0); return (PARSEOP_TOPLD); } 761 762 "PLD_Revision" { count (0); return (PARSEOP_PLD_REVISION); } 763 "PLD_IgnoreColor" { count (0); return (PARSEOP_PLD_IGNORECOLOR); } 764 "PLD_Red" { count (0); return (PARSEOP_PLD_RED); } 765 "PLD_Green" { count (0); return (PARSEOP_PLD_GREEN); } 766 "PLD_Blue" { count (0); return (PARSEOP_PLD_BLUE); } 767 "PLD_Width" { count (0); return (PARSEOP_PLD_WIDTH); } 768 "PLD_Height" { count (0); return (PARSEOP_PLD_HEIGHT); } 769 "PLD_UserVisible" { count (0); return (PARSEOP_PLD_USERVISIBLE); } 770 "PLD_Dock" { count (0); return (PARSEOP_PLD_DOCK); } 771 "PLD_Lid" { count (0); return (PARSEOP_PLD_LID); } 772 "PLD_Panel" { count (0); return (PARSEOP_PLD_PANEL); } 773 "PLD_VerticalPosition" { count (0); return (PARSEOP_PLD_VERTICALPOSITION); } 774 "PLD_HorizontalPosition" { count (0); return (PARSEOP_PLD_HORIZONTALPOSITION); } 775 "PLD_Shape" { count (0); return (PARSEOP_PLD_SHAPE); } 776 "PLD_GroupOrientation" { count (0); return (PARSEOP_PLD_GROUPORIENTATION); } 777 "PLD_GroupToken" { count (0); return (PARSEOP_PLD_GROUPTOKEN); } 778 "PLD_GroupPosition" { count (0); return (PARSEOP_PLD_GROUPPOSITION); } 779 "PLD_Bay" { count (0); return (PARSEOP_PLD_BAY); } 780 "PLD_Ejectable" { count (0); return (PARSEOP_PLD_EJECTABLE); } 781 "PLD_EjectRequired" { count (0); return (PARSEOP_PLD_EJECTREQUIRED); } 782 "PLD_CabinetNumber" { count (0); return (PARSEOP_PLD_CABINETNUMBER); } 783 "PLD_CardCageNumber" { count (0); return (PARSEOP_PLD_CARDCAGENUMBER); } 784 "PLD_Reference" { count (0); return (PARSEOP_PLD_REFERENCE); } 785 "PLD_Rotation" { count (0); return (PARSEOP_PLD_ROTATION); } 786 "PLD_Order" { count (0); return (PARSEOP_PLD_ORDER); } 787 "PLD_Reserved" { count (0); return (PARSEOP_PLD_RESERVED); } 788 "PLD_VerticalOffset" { count (0); return (PARSEOP_PLD_VERTICALOFFSET); } 789 "PLD_HorizontalOffset" { count (0); return (PARSEOP_PLD_HORIZONTALOFFSET); } 790 791 792 /* printf debug macros */ 793 794 "printf" { count (0); return (PARSEOP_PRINTF); } 795 "fprintf" { count (0); return (PARSEOP_FPRINTF); } 796 797 /* Other macros */ 798 799 "For" { count (0); return (PARSEOP_FOR); } 800 801 /* Predefined compiler names */ 802 803 "__DATE__" { count (0); return (PARSEOP___DATE__); } 804 "__FILE__" { count (0); return (PARSEOP___FILE__); } 805 "__LINE__" { count (0); return (PARSEOP___LINE__); } 806 "__PATH__" { count (0); return (PARSEOP___PATH__); } 807 808 809 {NameSeg} { char *s; 810 count (0); 811 s=UtStringCacheCalloc (ACPI_NAME_SIZE + 1); 812 if (strcmp (AslCompilertext, "\\")) 813 { 814 strcpy (s, "____"); 815 AcpiUtStrupr (AslCompilertext); 816 } 817 memcpy (s, AslCompilertext, strlen (AslCompilertext)); 818 AslCompilerlval.s = s; 819 DbgPrint (ASL_PARSE_OUTPUT, "NameSeg: %s\n", s); 820 return (PARSEOP_NAMESEG); } 821 822 {NameString} { char *s; 823 count (0); 824 s=UtStringCacheCalloc (strlen (AslCompilertext)+1); 825 AcpiUtStrupr (AslCompilertext); 826 strcpy (s, AslCompilertext); 827 AslCompilerlval.s = s; 828 DbgPrint (ASL_PARSE_OUTPUT, "NameString: %s\n", s); 829 return (PARSEOP_NAMESTRING); } 830 831 . { count (1); 832 if (isprint ((int) *AslCompilertext)) 833 { 834 sprintf (MsgBuffer, 835 "Invalid character (%c), expecting ASL keyword or name", 836 *AslCompilertext); 837 } 838 else 839 { 840 sprintf (MsgBuffer, 841 "Invalid character (0x%2.2X), expecting ASL keyword or name", 842 *AslCompilertext); 843 } 844 AslCompilererror (MsgBuffer);} 845 846 <<EOF>> { if (AslPopInputFileStack ()) 847 {yyterminate();} 848 else 849 {return (PARSEOP_INCLUDE_END);} }; 850 851 %% 852 853 /*! [End] no source code translation !*/ 854 855 /* 856 * Bring in the scanner support routines 857 */ 858 #include <contrib/dev/acpica/compiler/aslsupport.l> 859