diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2013-08-23 18:01:58 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2013-08-23 18:01:58 +0000 |
| commit | 59ce063597ddbda74269a45aba8187dece2fe00a (patch) | |
| tree | 89234dd9f502de2faaf4a280ccd0d3785a7ae96f /source/compiler/aslcompile.c | |
| parent | dbded195f9840f9044a6828c8877c6bf0a956482 (diff) | |
Notes
Diffstat (limited to 'source/compiler/aslcompile.c')
| -rw-r--r-- | source/compiler/aslcompile.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/source/compiler/aslcompile.c b/source/compiler/aslcompile.c index 87f97efaad7a..6aa8701ddc36 100644 --- a/source/compiler/aslcompile.c +++ b/source/compiler/aslcompile.c @@ -593,10 +593,15 @@ CmDoCompile ( AslCompilerparse(); UtEndEvent (Event); - /* Flush out any remaining source after parse tree is complete */ + /* Check for parse errors */ - Event = UtBeginEvent ("Flush source input"); - CmFlushSourceCode (); + Status = AslCheckForErrorExit (); + if (ACPI_FAILURE (Status)) + { + fprintf (stderr, "Compiler aborting due to parser-detected syntax error(s)\n"); + LsDumpParseTree (); + goto ErrorExit; + } /* Did the parse tree get successfully constructed? */ @@ -606,16 +611,18 @@ CmDoCompile ( * If there are no errors, then we have some sort of * internal problem. */ - Status = AslCheckForErrorExit (); - if (Status == AE_OK) - { - AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, - NULL, "- Could not resolve parse tree root node"); - } + AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, + NULL, "- Could not resolve parse tree root node"); goto ErrorExit; } + + /* Flush out any remaining source after parse tree is complete */ + + Event = UtBeginEvent ("Flush source input"); + CmFlushSourceCode (); + /* Optional parse tree dump, compiler debug output only */ LsDumpParseTree (); |
