diff options
author | markm <markm@FreeBSD.org> | 2013-08-24 13:42:20 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2013-08-24 13:42:20 +0000 |
commit | 6228164acab21e650d8ce41758f11a9188cdcf9d (patch) | |
tree | f402d81e3fb54380b80e4c1a1d1d5bfe58f4f519 /sys/contrib/dev/acpica/compiler/aslcompile.c | |
parent | 7afe86e84d4eb4f4ecfc090764da8acb5f214ae6 (diff) | |
parent | 413bf347cd8d75b5cc702edaa5b26ae8b14c9f6b (diff) | |
download | FreeBSD-src-6228164acab21e650d8ce41758f11a9188cdcf9d.zip FreeBSD-src-6228164acab21e650d8ce41758f11a9188cdcf9d.tar.gz |
MFC
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/aslcompile.c')
-rw-r--r-- | sys/contrib/dev/acpica/compiler/aslcompile.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/sys/contrib/dev/acpica/compiler/aslcompile.c b/sys/contrib/dev/acpica/compiler/aslcompile.c index 7b2393c..48ccfa3 100644 --- a/sys/contrib/dev/acpica/compiler/aslcompile.c +++ b/sys/contrib/dev/acpica/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 (); |