For PR797:
authorReid Spencer <rspencer@reidspencer.com>
Fri, 18 Aug 2006 08:43:06 +0000 (08:43 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Fri, 18 Aug 2006 08:43:06 +0000 (08:43 +0000)
commit61c83e023fe618ca7b4fdc846039933e61a00ec9
treee491ad2dc8f630614952fa612f602a39c34bed1e
parentfd90dd5d5513f9e7130bab0da334ad2ad8ef4e02
For PR797:
Rid the Assembly Parser of exceptions. This is a really gross hack but it
will do until the Assembly Parser is re-written as a recursive descent.
The basic premise is that wherever the old "ThrowException" function was
called (new name: GenerateError) we set a flag (TriggerError). Every
production checks that flag and calls YYERROR if it is set. Additionally,
each call to ThrowException in the grammar is replaced with GEN_ERROR
which calls GenerateError and then YYERROR immediately. This prevents
the remaining production from continuing after an error condition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29763 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
include/llvm/Assembly/Parser.h
lib/AsmParser/Lexer.cpp.cvs
lib/AsmParser/Lexer.l
lib/AsmParser/Lexer.l.cvs
lib/AsmParser/Parser.cpp
lib/AsmParser/ParserInternals.h
lib/AsmParser/llvmAsmParser.cpp.cvs
lib/AsmParser/llvmAsmParser.h.cvs
lib/AsmParser/llvmAsmParser.y
lib/AsmParser/llvmAsmParser.y.cvs
tools/bugpoint/BugDriver.cpp
tools/gccas/gccas.cpp
tools/llvm-as/llvm-as.cpp
tools/opt/opt.cpp