summaryrefslogtreecommitdiff
path: root/src/parser/cvc
diff options
context:
space:
mode:
authorDejan Jovanović <dejan.jovanovic@gmail.com>2010-02-02 21:00:02 +0000
committerDejan Jovanović <dejan.jovanovic@gmail.com>2010-02-02 21:00:02 +0000
commitcea1eb23c8a0c8088bd1db9baad0567c3dbdbfa0 (patch)
tree76ab569a73e79045ed5cef223b28e963543df1c8 /src/parser/cvc
parenta8588cb23c5257bb11a70348346476b55317faa3 (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/cvc')
-rw-r--r--src/parser/cvc/cvc_parser.g7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/parser/cvc/cvc_parser.g b/src/parser/cvc/cvc_parser.g
index cb9c9b160..1cbdbd067 100644
--- a/src/parser/cvc/cvc_parser.g
+++ b/src/parser/cvc/cvc_parser.g
@@ -87,10 +87,9 @@ identifierList[std::vector<std::string>& idList, DeclarationCheck check = CHECK_
* Matches an identifier and returns a 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");
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback