diff options
author | Dejan Jovanović <dejan.jovanovic@gmail.com> | 2010-02-02 21:00:02 +0000 |
---|---|---|
committer | Dejan Jovanović <dejan.jovanovic@gmail.com> | 2010-02-02 21:00:02 +0000 |
commit | cea1eb23c8a0c8088bd1db9baad0567c3dbdbfa0 (patch) | |
tree | 76ab569a73e79045ed5cef223b28e963543df1c8 /src/parser/smt | |
parent | a8588cb23c5257bb11a70348346476b55317faa3 (diff) |
Rethrow rewrite in antlr_parser. Taking LT(0) to locate the error causes the build to break on 64-bit machines. Changed to LT(1), it works now, but i'll ask around how this actually works.
Diffstat (limited to 'src/parser/smt')
-rw-r--r-- | src/parser/smt/smt_parser.g | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/parser/smt/smt_parser.g b/src/parser/smt/smt_parser.g index 84b38c5cf..0db89d4f1 100644 --- a/src/parser/smt/smt_parser.g +++ b/src/parser/smt/smt_parser.g @@ -96,10 +96,9 @@ benchAttribute returns [Command* smt_command = 0] * @return the id string */ identifier[DeclarationCheck check = CHECK_NONE] returns [std::string id] - : x:IDENTIFIER { checkDeclation(x->getText(), check) }? - { - id = x->getText(); - } + : x:IDENTIFIER + { id = x->getText(); } + { checkDeclaration(id, check) }? exception catch [antlr::SemanticException& ex] { switch (check) { case CHECK_DECLARED: rethrow(ex, "Symbol " + id + " not declared"); |