diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2020-03-26 21:13:14 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2020-03-26 21:13:14 +0000 |
commit | a117a0a6c82c5a5030040bd2b75704a1366741d6 (patch) | |
tree | 29eb5a43c2eeafbdaada31b2f23a7b96f623b260 /source/compiler/aslcompiler.l | |
parent | aa36cd6999384cddbfa0d030bcdd44e8bf9c7779 (diff) |
Notes
Diffstat (limited to 'source/compiler/aslcompiler.l')
-rw-r--r-- | source/compiler/aslcompiler.l | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/source/compiler/aslcompiler.l b/source/compiler/aslcompiler.l index 797f989915cf..4c3fbde3ae93 100644 --- a/source/compiler/aslcompiler.l +++ b/source/compiler/aslcompiler.l @@ -156,7 +156,6 @@ #include <stdlib.h> #include <string.h> -YYSTYPE AslCompilerlval; /* * Generation: Use the following command line: @@ -195,6 +194,7 @@ count (int type); LeadNameChar [A-Za-z_] DigitChar [0-9] +ErrorCode [(][ ]*[1-9][0-9][0-9][0-9][ ]*[)] OctalChar [0-7] HexDigitChar [A-Fa-f0-9] RootChar [\\] @@ -692,7 +692,7 @@ NamePathTail [.]{NameSeg} "IPMI" { count (0); return (PARSEOP_REGIONSPACE_IPMI); } "GeneralPurposeIo" { count (0); return (PARSEOP_REGIONSPACE_GPIO); } /* ACPI 5.0 */ "GenericSerialBus" { count (0); return (PARSEOP_REGIONSPACE_GSBUS); } /* ACPI 5.0 */ -"PlatformCommChannel" { count (0); return (PARSEOP_REGIONSPACE_PCC); } /* ACPI 5.0 */ +"PCC" { count (0); return (PARSEOP_REGIONSPACE_PCC); } /* ACPI 5.0 */ "FFixedHW" { count (0); return (PARSEOP_REGIONSPACE_FFIXEDHW); } /* ResourceTypeKeyword: Resource Usage - Resource Descriptors */ @@ -810,6 +810,22 @@ NamePathTail [.]{NameSeg} "__LINE__" { count (0); return (PARSEOP___LINE__); } "__PATH__" { count (0); return (PARSEOP___PATH__); } "__METHOD__" { count (0); return (PARSEOP___METHOD__); } +"__EXPECT__"{ErrorCode} { char *s; + int index = 0; + count (0); + while (!isdigit (AslCompilertext[index])) + { + index++; + } + + /* + * The eror code is contained inside the + * {ErrorCode} pattern. Extract it and log it + * as the expected error code. + */ + s = UtLocalCacheCalloc (ASL_ERROR_CODE_LENGTH + 1); + memcpy (s, AslCompilertext + index, ASL_ERROR_CODE_LENGTH); + AslLogExpectedExceptionByLine (s); } {NameSeg} { char *s; count (0); |