Commit eb3ac192 authored by Sebastian Pretscher's avatar Sebastian Pretscher

Merge branch 'master' of git@github.com:jroith/cup-eclipse.git

parents 361c7558 a9659ddf
......@@ -240,9 +240,11 @@ parser code {:
Object info)
{
done_parsing();
if (info instanceof Symbol) errMan.Fatal(message+ "\nCan't recover from previous error(s), giving up.",(Symbol)info);
else errMan.Fatal(message + "\nCan't recover from previous error(s), giving up.",cur_token);
System.exit(1);
if (info instanceof Symbol)
errMan.Fatal(message+ "\nCan't recover from previous error(s), giving up.",(Symbol)info);
else
errMan.Fatal(message + "\nCan't recover from previous error(s), giving up.",cur_token);
throw new ParserAbortException();
}
public void report_error(String message, Object info)
......
......@@ -5,6 +5,7 @@ import java.io.FileInputStream;
import de.in.tum.www2.cup.ast.*;
import de.in.tum.www2.cup.internal.Parser;
import de.in.tum.www2.cup.internal.ParserAbortException;
public class CupParser
{
......@@ -29,7 +30,12 @@ public class CupParser
public ParserResult parse() throws Exception {
if (result != null)
return result;
parser.parse();
try {
parser.parse();
} catch (ParserAbortException e) {
this.context = null;
return null;
}
result = parser.getResult();
return result;
}
......
......@@ -60,6 +60,7 @@ Export-Package: EDU.oswego.cs.dl.util.concurrent,
corejava,
de.in.tum.www2.cup,
de.in.tum.www2.cup.ast,
de.in.tum.www2.cup.analysis,
de.in.tum.www2.cup.internal,
edu.uci.ics.jung.algorithms.blockmodel,
edu.uci.ics.jung.algorithms.cluster,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment