aboutsummaryrefslogtreecommitdiffstats
path: root/source/compiler/dtio.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler/dtio.c')
-rw-r--r--source/compiler/dtio.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/source/compiler/dtio.c b/source/compiler/dtio.c
index 6357bfbacdda..2b4e433d0e2d 100644
--- a/source/compiler/dtio.c
+++ b/source/compiler/dtio.c
@@ -427,7 +427,6 @@ DtGetNextLine (
{
case DT_START_QUOTED_STRING:
case DT_SLASH_ASTERISK_COMMENT:
- case DT_SLASH_SLASH_COMMENT:
AcpiOsPrintf ("**** EOF within comment/string %u\n", State);
break;
@@ -436,7 +435,22 @@ DtGetNextLine (
break;
}
- return (ASL_EOF);
+ /* Standalone EOF is OK */
+
+ if (i == 0)
+ {
+ return (ASL_EOF);
+ }
+
+ /*
+ * Received an EOF in the middle of a line. Terminate the
+ * line with a newline. The next call to this function will
+ * return a standalone EOF. Thus, the upper parsing software
+ * never has to deal with an EOF within a valid line (or
+ * the last line does not get tossed on the floor.)
+ */
+ c = '\n';
+ State = DT_NORMAL_TEXT;
}
switch (State)