diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2015-06-18 17:27:40 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2015-06-18 17:27:40 +0000 |
| commit | f3bbb1ca6c1b2b877d015a8f5f0c67e48a7a57ae (patch) | |
| tree | 621303c71b8318af14f03b2d426d3026537e2dfb /source/compiler | |
| parent | 764ef0515d13e66403dc8a0578ff91b88675ade6 (diff) | |
Notes
Diffstat (limited to 'source/compiler')
| -rw-r--r-- | source/compiler/aslcompiler.l | 2 | ||||
| -rw-r--r-- | source/compiler/aslfiles.c | 2 | ||||
| -rw-r--r-- | source/compiler/aslfold.c | 11 | ||||
| -rw-r--r-- | source/compiler/dtcompiler.h | 8 | ||||
| -rw-r--r-- | source/compiler/dtio.c | 14 |
5 files changed, 24 insertions, 13 deletions
diff --git a/source/compiler/aslcompiler.l b/source/compiler/aslcompiler.l index d7b7e08370f9..e0b2423331b0 100644 --- a/source/compiler/aslcompiler.l +++ b/source/compiler/aslcompiler.l @@ -709,7 +709,7 @@ NamePathTail [.]{NameSeg} return (PARSEOP_NAMESTRING); } . { count (1); - if (isprint (*AslCompilertext)) + if (isprint ((int) *AslCompilertext)) { sprintf (MsgBuffer, "Invalid character (%c), expecting ASL keyword or name", diff --git a/source/compiler/aslfiles.c b/source/compiler/aslfiles.c index fcdc3c28d84a..2ad62ecc18a4 100644 --- a/source/compiler/aslfiles.c +++ b/source/compiler/aslfiles.c @@ -336,7 +336,7 @@ FlOpenIncludeWithPrefix ( */ Gbl_CurrentLineNumber--; OriginalLineNumber = Gbl_CurrentLineNumber; - while (DtGetNextLine (IncludeFile) != ASL_EOF) + while (DtGetNextLine (IncludeFile, DT_ALLOW_MULTILINE_QUOTES) != ASL_EOF) { if (Gbl_CurrentLineBuffer[0] == '#') { diff --git a/source/compiler/aslfold.c b/source/compiler/aslfold.c index 6baa081359d8..0b3ef8d166a9 100644 --- a/source/compiler/aslfold.c +++ b/source/compiler/aslfold.c @@ -236,6 +236,8 @@ OpcAmlCheckForConstant ( */ if (WalkState->Opcode == AML_BUFFER_OP) { + DbgPrint (ASL_PARSE_OUTPUT, + "\nBuffer+Buffer->Buffer constant reduction is not supported yet"); Status = AE_TYPE; goto CleanupAndExit; } @@ -496,6 +498,10 @@ TrTransformToStoreOp ( goto EvalError; } + /* Truncate any subtree expressions, they have been evaluated */ + + Child1->Asl.Child = NULL; + /* Folded constant is in ObjDesc, store into Child1 */ TrInstallReducedConstant (Child1, ObjDesc); @@ -507,11 +513,6 @@ TrTransformToStoreOp ( UtSetParseOpName (Op); Op->Common.Parent = OriginalParent; - /* Truncate any subtree expressions, they have been evaluated */ - - Child1->Asl.Child = NULL; - Child2->Asl.Child = NULL; - /* First child is the folded constant */ /* Second child will be the target */ diff --git a/source/compiler/dtcompiler.h b/source/compiler/dtcompiler.h index 765e61cadd3d..44fc56de812b 100644 --- a/source/compiler/dtcompiler.h +++ b/source/compiler/dtcompiler.h @@ -181,7 +181,13 @@ DtCompilePadding ( UINT32 DtGetNextLine ( - FILE *Handle); + FILE *Handle, + UINT32 Flags); + +/* Flags for DtGetNextLine */ + +#define DT_ALLOW_MULTILINE_QUOTES 0x01 + DT_FIELD * DtScanFile ( diff --git a/source/compiler/dtio.c b/source/compiler/dtio.c index 3b108ec5071d..41b46b525593 100644 --- a/source/compiler/dtio.c +++ b/source/compiler/dtio.c @@ -406,7 +406,8 @@ DtParseLine ( UINT32 DtGetNextLine ( - FILE *Handle) + FILE *Handle, + UINT32 Flags) { BOOLEAN LineNotAllBlanks = FALSE; UINT32 State = DT_NORMAL_TEXT; @@ -550,9 +551,12 @@ DtGetNextLine ( case '\n': - AcpiOsPrintf ("ERROR at line %u: Unterminated quoted string\n", - Gbl_CurrentLineNumber++); - State = DT_NORMAL_TEXT; + if (!(Flags & DT_ALLOW_MULTILINE_QUOTES)) + { + AcpiOsPrintf ("ERROR at line %u: Unterminated quoted string\n", + Gbl_CurrentLineNumber++); + State = DT_NORMAL_TEXT; + } break; default: /* Get next character */ @@ -746,7 +750,7 @@ DtScanFile ( /* Scan line-by-line */ - while ((Offset = DtGetNextLine (Handle)) != ASL_EOF) + while ((Offset = DtGetNextLine (Handle, 0)) != ASL_EOF) { ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Line %2.2u/%4.4X - %s", Gbl_CurrentLineNumber, Offset, Gbl_CurrentLineBuffer)); |
