diff --git a/build.gradle b/build.gradle index 538572adba68c76af9a82dafb21a5ea1c5a0c22a..d93faf13b05c46f29a9284156ad042874ee3a1fc 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'maven' -project.version = '3.2.5' +project.version = '3.2.6' project.group = 'de.stups' repositories { diff --git a/src/main/resources/org/sablecc/sablecc/parser.txt b/src/main/resources/org/sablecc/sablecc/parser.txt index abccfcf66d8552d86945c2bbddea46108f98e5cf..a94ab0c7a056b3e02dfa419572ce2b39695bccea 100644 --- a/src/main/resources/org/sablecc/sablecc/parser.txt +++ b/src/main/resources/org/sablecc/sablecc/parser.txt @@ -382,7 +382,7 @@ Macro:ParserParseTail } case ERROR: throw new ParserException(this.last_token, - "[" + this.last_line + "," + this.last_pos + "] " + + "[" + this.last_line + "," + this.last_pos + "] " , Parser.errorMessages[Parser.errors[this.action[1]]]); } } @@ -673,6 +673,7 @@ import $1$.*; public class ParserException extends Exception { Token token; + String realMsg; public ParserException( Token token, String message) { @@ -680,10 +681,22 @@ public class ParserException extends Exception this.token = token; } + public ParserException( Token token, String prefix, String message) + { + super(prefix+message); + this.realMsg = message; + this.token = token; + } + public Token getToken() { return this.token; } + + public String getRealMsg() + { + return this.realMsg; + } } $