Skip to content
Snippets Groups Projects
Commit 210b9b4c authored by Jens Bendisposto's avatar Jens Bendisposto
Browse files

split off the position information

parent 625379ca
No related branches found
No related tags found
No related merge requests found
......@@ -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 Token getRealMsg()
{
return this.realMsg;
}
}
$
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment