diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index ec8897de12d..bd96fe9c579 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -20,6 +20,8 @@ jobs:
runs-on: ubicloud-standard-4
steps:
- uses: actions/checkout@v5
+ with:
+ submodules: true
- uses: actions/setup-java@v5
id: java
@@ -68,6 +70,8 @@ jobs:
- run: which chromedriver
- uses: actions/checkout@v5
+ with:
+ submodules: true
- uses: actions/setup-java@v5
with:
@@ -155,6 +159,8 @@ jobs:
MAVEN_OPTS: "-Xmx512M -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
steps:
- uses: actions/checkout@v5
+ with:
+ submodules: true
- uses: actions/setup-java@v5
with:
@@ -187,6 +193,8 @@ jobs:
MAVEN_OPTS: "-Xmx512M -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
steps:
- uses: actions/checkout@v5
+ with:
+ submodules: true
- uses: actions/setup-java@v5
with:
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 00000000000..5dddf201017
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "generated"]
+ path = generated
+ url = git@github.com:usethesource/rascal-generated-java.git
diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs
index 1d4bcb41c23..3063ac4334d 100644
--- a/.settings/org.eclipse.core.resources.prefs
+++ b/.settings/org.eclipse.core.resources.prefs
@@ -1,4 +1,5 @@
eclipse.preferences.version=1
+encoding//generated/src/main/java=UTF-8
encoding//src/org/rascalmpl/library=UTF-8
encoding//src/org/rascalmpl/library/experiments/vis2/lib/MarkdownConverter.js=UTF-8
encoding//src/org/rascalmpl/library/experiments/vis2/lib/nv.d3.css=UTF-8
diff --git a/DEVELOPERS.md b/DEVELOPERS.md
new file mode 100644
index 00000000000..1e5cb7ff7e1
--- /dev/null
+++ b/DEVELOPERS.md
@@ -0,0 +1,18 @@
+# Rascal Developer Manual
+
+## Working with the repository
+
+The Rascal project makes use of Java code that is generated from Rascal modules.
+To avoid pollution of the Rascal repository itself, the generated code is not committed to this repository, but to a [separate repository](https://github.com/usethesource/rascal-generated-java).
+This secondary repository is "linked in" using Git's submodule system, in the `generated` directory in the root of the repository.
+
+To start working on Rascal, check out the Rascal repository (`git clone --recurse-submodules git@github.com:usethesource/rascal.git`).
+Note: for existing (local) repositories, initialize the submodule through `git submodule update --init`.
+
+By default, `git` operations (such as `git pull`) will reel in changes to submodules, but will not actually alter the content of submodule directories.
+To bring the contents up to date, run `git submodule update` after a pull, or add the `--recurse-submodules` to `git pull`.
+To automate this, set the configuration option `submodule.recurse` to `true` for the Rascal project.
+
+## Updating the submodule
+
+Instructions for updating the submodule contents can be found in the `DEVELOPERS.md` in the `rascal-generated-java` project.
diff --git a/generated b/generated
new file mode 160000
index 00000000000..6a3831a1188
--- /dev/null
+++ b/generated
@@ -0,0 +1 @@
+Subproject commit 6a3831a1188bd173d64739d6fa9201920c1b4c79
diff --git a/pom.xml b/pom.xml
index a63f0b32787..4c23f308169 100644
--- a/pom.xml
+++ b/pom.xml
@@ -65,7 +65,7 @@
false
- ${project.build.directory}/generated-resources
+ generated/src/main/java
test
@@ -414,6 +414,25 @@
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 3.6.2
+
+
+ add-source
+ generate-sources
+
+ add-source
+
+
+
+ generated/src/main/java
+
+
+
+
+
diff --git a/src/org/rascalmpl/interpreter/Evaluator.java b/src/org/rascalmpl/interpreter/Evaluator.java
index f43c7461ccc..cdea082b541 100755
--- a/src/org/rascalmpl/interpreter/Evaluator.java
+++ b/src/org/rascalmpl/interpreter/Evaluator.java
@@ -719,17 +719,6 @@ public IConstructor getGrammar(Environment env) {
return getParserGenerator().getGrammarFromModules(monitor, root.getName(), root.getSyntaxDefinition());
}
- public IValue diagnoseAmbiguity(IRascalMonitor monitor, IConstructor parseTree) {
- IRascalMonitor old = setMonitor(monitor);
- try {
- ParserGenerator pgen = getParserGenerator();
- return pgen.diagnoseAmbiguity(parseTree);
- }
- finally {
- setMonitor(old);
- }
- }
-
public IConstructor getExpandedGrammar(IRascalMonitor monitor, ISourceLocation uri) {
IRascalMonitor old = setMonitor(monitor);
try {
diff --git a/src/org/rascalmpl/library/lang/java/JavaRunner.java b/src/org/rascalmpl/library/lang/java/JavaRunner.java
index c0826068314..01560eefe79 100644
--- a/src/org/rascalmpl/library/lang/java/JavaRunner.java
+++ b/src/org/rascalmpl/library/lang/java/JavaRunner.java
@@ -72,7 +72,7 @@ public void testIgnored(Description description) throws Exception {
public ISourceLocation getJUnitClassPath(IConstructor version) {
try {
assert version.getName().equals("junit4");
- return vf.sourceLocation(JUnit4.class.getProtectionDomain().getCodeSource().getLocation().toURI());
+ return vf.sourceLocation(URIUtil.fromURL(JUnit4.class.getProtectionDomain().getCodeSource().getLocation()));
}
catch (URISyntaxException e) {
throw RuntimeExceptionFactory.illegalArgument(vf.string(e.getMessage()));
diff --git a/src/org/rascalmpl/parser/ParserGenerator.java b/src/org/rascalmpl/parser/ParserGenerator.java
index dd56d4abfdf..42aad2b8170 100644
--- a/src/org/rascalmpl/parser/ParserGenerator.java
+++ b/src/org/rascalmpl/parser/ParserGenerator.java
@@ -25,16 +25,15 @@
import org.rascalmpl.debug.IRascalMonitor;
import org.rascalmpl.exceptions.ImplementationError;
import org.rascalmpl.exceptions.Throw;
+import org.rascalmpl.ideservices.IDEServices;
import org.rascalmpl.interpreter.Configuration;
import org.rascalmpl.interpreter.Evaluator;
import org.rascalmpl.interpreter.utils.JavaBridge;
-import org.rascalmpl.interpreter.utils.Profiler;
import org.rascalmpl.parser.gtd.IGTD;
-import org.rascalmpl.shell.ShellEvaluatorFactory;
+import org.rascalmpl.runtime.RascalExecutionContext;
import org.rascalmpl.uri.URIResolverRegistry;
import org.rascalmpl.values.IRascalValueFactory;
import org.rascalmpl.values.parsetrees.ITree;
-import org.rascalmpl.values.parsetrees.SymbolAdapter;
import io.usethesource.vallang.IConstructor;
import io.usethesource.vallang.IInteger;
@@ -44,43 +43,48 @@
import io.usethesource.vallang.IString;
import io.usethesource.vallang.IValue;
import io.usethesource.vallang.IValueFactory;
+import rascal.lang.rascal.grammar.$ConcreteSyntax;
+import rascal.lang.rascal.grammar.$ParserGenerator;
+import rascal.lang.rascal.grammar.definition.$Keywords;
+import rascal.lang.rascal.grammar.definition.$Literals;
+import rascal.lang.rascal.grammar.definition.$Modules;
+import rascal.lang.rascal.grammar.definition.$Parameters;
+import rascal.lang.rascal.grammar.definition.$Priorities;
+import rascal.lang.rascal.grammar.definition.$Regular;
+import rascal.lang.rascal.grammar.definition.$Symbols;
public class ParserGenerator {
- private final Evaluator evaluator;
private final JavaBridge bridge;
private final IValueFactory vf;
private static final String packageName = "org.rascalmpl.test.parser";
private static final boolean debug = false;
+ private final $ParserGenerator parserGenerator;
+ private final $ConcreteSyntax concreteSyntax;
+ private final $Modules modules;
+ private final $Priorities priorities;
+ private final $Regular regular;
+ private final $Keywords keywords;
+ private final $Literals literals;
+ private final $Parameters parameters;
+ private final $Symbols symbols;
+
+ private final RascalExecutionContext rex;
+
public ParserGenerator(IRascalMonitor monitor, PrintWriter out, IValueFactory factory, Configuration config) {
- this.evaluator = ShellEvaluatorFactory.getBasicEvaluator(Reader.nullReader(), out, out, monitor, "$parsergenerator$");
- this.evaluator.getConfiguration().setGeneratorProfiling(config.getGeneratorProfilingProperty());
- this.evaluator.setBootstrapperProperty(true);
+ rex = new RascalExecutionContext(Reader.nullReader(), out, out, null, monitor instanceof IDEServices ? (IDEServices) monitor : null);
+ var ms = rex.getModuleStore();
+ parserGenerator = new $ParserGenerator(rex);
+ concreteSyntax = ms.getModule($ConcreteSyntax.class);
+ modules = ms.getModule($Modules.class);
+ priorities = ms.getModule($Priorities.class);
+ regular = ms.getModule($Regular.class);
+ keywords = ms.getModule($Keywords.class);
+ literals = ms.getModule($Literals.class);
+ parameters = ms.getModule($Parameters.class);
+ symbols = ms.getModule($Symbols.class);
this.bridge = new JavaBridge(Collections.singletonList(Evaluator.class.getClassLoader()), factory, config);
this.vf = factory;
-
- evaluator.doImport(monitor,
- "lang::rascal::grammar::ParserGenerator",
- "lang::rascal::grammar::ConcreteSyntax",
- "lang::rascal::grammar::definition::Modules",
- "lang::rascal::grammar::definition::Priorities",
- "lang::rascal::grammar::definition::Regular",
- "lang::rascal::grammar::definition::Keywords",
- "lang::rascal::grammar::definition::Literals",
- "lang::rascal::grammar::definition::Parameters",
- "lang::rascal::grammar::definition::Symbols",
- "analysis::grammars::Ambiguity"
- );
- }
-
- public void setGeneratorProfiling(boolean f) {
- evaluator.getConfiguration().setGeneratorProfiling(f);
- }
-
- public IValue diagnoseAmbiguity(IConstructor parseForest) {
- synchronized(evaluator) {
- return evaluator.call("diagnose", parseForest);
- }
}
private void debugOutput(String kind, Object thing, String file) {
@@ -88,7 +92,7 @@ private void debugOutput(String kind, Object thing, String file) {
String classString = thing.toString();
FileOutputStream s = null;
try {
- evaluator.getErrorPrinter().println("\nWriting " + kind + " to " + file);
+ rex.getErrWriter().println("\nWriting " + kind + " to " + file);
s = new FileOutputStream(file);
s.write(classString.getBytes());
@@ -109,69 +113,41 @@ private void debugOutput(String kind, Object thing, String file) {
}
}
- public IConstructor getGrammarFromModules(IRascalMonitor monitor, String main, IMap modules) {
- synchronized(evaluator) {
- return (IConstructor) evaluator.call(monitor, "modules2grammar", vf.string(main), modules);
- }
+ public IConstructor getGrammarFromModules(IRascalMonitor monitor, String main, IMap mods) {
+ return modules.modules2grammar(vf.string(main), mods);
}
public IConstructor getExpandedGrammar(IRascalMonitor monitor, String main, IMap definition) {
- synchronized(evaluator) {
- IConstructor g = getGrammarFromModules(monitor, main, definition);
- g = (IConstructor) evaluator.call(monitor, "expandKeywords", g);
- g = (IConstructor) evaluator.call(monitor, "makeRegularStubs", g);
- g = (IConstructor) evaluator.call(monitor, "expandRegularSymbols", g);
- g = (IConstructor) evaluator.call(monitor, "expandParameterizedSymbols", g);
- g = (IConstructor) evaluator.call(monitor, "literals", g);
- return g;
- }
+ var g = getGrammarFromModules(monitor, main, definition);
+ g = keywords.expandKeywords(g);
+ g = (IConstructor) regular.makeRegularStubs(g);
+ g = regular.expandRegularSymbols(g);
+ g = parameters.expandParameterizedSymbols(g);
+ g = literals.literals(g);
+
+ return g;
}
- public ISet getNestingRestrictions(IRascalMonitor monitor,
- IConstructor g) {
- synchronized (evaluator) {
- return (ISet) evaluator.call(monitor, "doNotNest", g);
- }
+ public ISet getNestingRestrictions(IRascalMonitor monitor, IConstructor g) {
+ return priorities.doNotNest(g);
}
/**
* Produces the name generated by the parser generator for a parse method for the given symbol
*/
public String getParserMethodName(IConstructor symbol) {
- // we use a fast non-synchronized path for simple cases;
- // this is to prevent locking the evaluator in IDE contexts
- // where many calls into the evaluator/parser are fired in rapid
- // succession.
-
- switch (symbol.getName()) {
- case "start":
- return "$start_" + getParserMethodName(SymbolAdapter.getStart(symbol));
- case "layouts":
- return "$l_" + SymbolAdapter.getName(symbol);
- case "sort":
- return SymbolAdapter.getName(symbol);
- case "lex":
- return SymbolAdapter.getName(symbol);
- case "keywords":
- return "$k_" + SymbolAdapter.getName(symbol);
- }
-
- synchronized (evaluator) {
- // TODO we assume here this is a context-free non-terminal for now.
- // Later with the syntax role modifiers we can implement parsing for lexical regulars too
- Map kwArgs = Map.of("withLayout", vf.bool(true));
- return ((IString) evaluator.call("getParserMethodName", "lang::rascal::grammar::ParserGenerator", kwArgs, symbol)).getValue();
- }
+ // TODO we assume here this is a context-free non-terminal for now.
+ // Later with the syntax role modifiers we can implement parsing for lexical regulars too
+ Map kwArgs = Map.of("withLayout", vf.bool(true));
+ return parserGenerator.getParserMethodName(symbol, kwArgs).getValue();
}
/**
* Converts the parse tree of a symbol to a UPTR symbol
*/
public IConstructor symbolTreeToSymbol(IConstructor symbol, boolean withLayout) {
- synchronized (evaluator) {
- Map kws = Map.of("withLayout", vf.bool(withLayout));
- return (IConstructor) evaluator.call("sym2symbol", "lang::rascal::grammar::definition::Symbols", kws, symbol);
- }
+ Map kwArgs = Map.of("withLayout", vf.bool(withLayout));
+ return symbols.sym2symbol(symbol, kwArgs);
}
/**
@@ -184,12 +160,7 @@ public IConstructor symbolTreeToSymbol(IConstructor symbol, boolean withLayout)
* @return A parser class, ready for instantiation
*/
public Class> getNewParser(IRascalMonitor monitor, ISourceLocation loc, String name, IMap definition) {
- Profiler profiler = evaluator.getConfiguration().getGeneratorProfilingProperty() ? new Profiler(evaluator) : null;
-
try {
- if (profiler != null) {
- profiler.start();
- }
IConstructor grammar = IRascalValueFactory.getInstance().grammar(definition);
debugOutput("grammar", grammar, System.getProperty("java.io.tmpdir") + "/grammar.trm");
return getNewParser(monitor, loc, name, grammar);
@@ -200,14 +171,6 @@ public Class> getNewParser(IRascalMon
catch (Throw e) {
throw new ImplementationError("parser generator: " + e.getMessage() + e.getTrace());
}
- finally {
- if (profiler != null) {
- profiler.pleaseStop();
- evaluator.getOutPrinter().println("PROFILE:");
- profiler.report();
- profiler = null;
- }
- }
}
/**
@@ -223,13 +186,10 @@ public Class> getNewParser(IRascalMon
try {
String normName = name.replaceAll("::", "_").replaceAll("\\\\", "_");
- IString classString;
- synchronized (evaluator) {
- classString = (IString) evaluator.call(monitor, "newGenerate", vf.string(packageName), vf.string(normName), grammar);
- }
- debugOutput("java code", classString.getValue(), "./test/org/rascalmpl/test/parser/" + normName + ".java");
+ var classString = parserGenerator.newGenerate(vf.string(packageName), vf.string(normName), grammar).getValue();
+ debugOutput("java code", classString, System.getProperty("java.io.tmpdir") + "/parser.java");
- return bridge.compileJava(loc, packageName + "." + normName, classString.getValue());
+ return bridge.compileJava(loc, packageName + "." + normName, classString);
} catch (ClassCastException e) {
throw new ImplementationError("parser generator:" + e.getMessage(), e);
} catch (Throw e) {
@@ -250,15 +210,12 @@ public Class> getNewParser(IRascalMon
public void writeNewParser(IRascalMonitor monitor, ISourceLocation loc, String name, IMap definition, ISourceLocation target) throws IOException {
try (OutputStream out = URIResolverRegistry.getInstance().getOutputStream(target, false)) {
String normName = name.replaceAll("::", "_").replaceAll("\\\\", "_");
- IString classString;
IConstructor grammar = IRascalValueFactory.getInstance().grammar(definition);
-
- synchronized (evaluator) {
- classString = (IString) evaluator.call(monitor, "newGenerate", vf.string(packageName), vf.string(normName), grammar);
- }
- debugOutput("java code", classString.getValue(), System.getProperty("java.io.tmpdir") + "/parser.java");
- bridge.compileJava(loc, packageName + "." + normName, classString.getValue(), out);
+ var classString = parserGenerator.newGenerate(vf.string(packageName), vf.string(normName), grammar).getValue();
+ debugOutput("java code", classString, System.getProperty("java.io.tmpdir") + "/parser.java");
+
+ bridge.compileJava(loc, packageName + "." + normName, classString, out);
} catch (ClassCastException e) {
throw new ImplementationError("parser generator:" + e.getMessage(), e);
} catch (Throw e) {
@@ -267,8 +224,6 @@ public void writeNewParser(IRascalMonitor monitor, ISourceLocation loc, String n
}
public IString createHole(IConstructor part, IInteger size) {
- synchronized (evaluator) {
- return (IString) evaluator.call("createHole", part, size);
- }
+ return concreteSyntax.createHole(part, size);
}
}
diff --git a/src/org/rascalmpl/runtime/$RascalModule.java b/src/org/rascalmpl/runtime/$RascalModule.java
index f52ed56109b..41407b7b2ba 100644
--- a/src/org/rascalmpl/runtime/$RascalModule.java
+++ b/src/org/rascalmpl/runtime/$RascalModule.java
@@ -276,7 +276,7 @@ public Set findResources(String fileName) {
try {
for (URL found : Collections.list(getClass().getClassLoader().getResources(fileName))) {
try {
- result.add($RVF.sourceLocation(found.toURI()));
+ result.add($RVF.sourceLocation(URIUtil.fromURL(found)));
} catch (URISyntaxException e) {
$MONITOR.warning("WARNING: skipping " + found + " due to URI syntax exception", URIUtil.rootLocation("module-init"));
}
@@ -475,7 +475,7 @@ public IList readBinaryConstantsFile(Class> c, String path, int expected_lengt
if(url == null) {
throw RuntimeExceptionFactory.io($RVF.string("Cannot find resource " + path));
}
- loc = $RVF.sourceLocation(url.toURI());
+ loc = $RVF.sourceLocation(URIUtil.fromURL(url));
} catch (URISyntaxException e) {
System.err.println("readBinaryConstantsFile: " + path + " throws " + e.getMessage());
}
diff --git a/src/org/rascalmpl/runtime/RascalExecutionContext.java b/src/org/rascalmpl/runtime/RascalExecutionContext.java
index 3a2963afcd2..5c3ec36e65b 100644
--- a/src/org/rascalmpl/runtime/RascalExecutionContext.java
+++ b/src/org/rascalmpl/runtime/RascalExecutionContext.java
@@ -31,21 +31,23 @@
import java.io.Reader;
import java.net.URISyntaxException;
-import java.io.IOException;
import org.rascalmpl.debug.IRascalMonitor;
+import org.rascalmpl.debug.NullRascalMonitor;
import org.rascalmpl.ideservices.BasicIDEServices;
import org.rascalmpl.ideservices.IDEServices;
import org.rascalmpl.interpreter.load.RascalSearchPath;
-import org.rascalmpl.interpreter.load.SourceLocationListContributor;
import org.rascalmpl.interpreter.utils.RascalManifest;
import org.rascalmpl.library.util.PathConfig;
import org.rascalmpl.runtime.traverse.Traverse;
import org.rascalmpl.types.RascalTypeFactory;
import org.rascalmpl.uri.URIResolverRegistry;
import org.rascalmpl.uri.URIUtil;
+import org.rascalmpl.uri.project.IDEProjectURIResolver;
+import org.rascalmpl.uri.project.IDETargetURIResolver;
import org.rascalmpl.uri.project.ProjectURIResolver;
import org.rascalmpl.uri.project.TargetURIResolver;
import org.rascalmpl.values.IRascalValueFactory;
+
import io.usethesource.vallang.ISourceLocation;
import io.usethesource.vallang.type.TypeFactory;
import io.usethesource.vallang.type.TypeStore;
@@ -82,7 +84,7 @@ public RascalExecutionContext(
this.pcfg = pcfg == null ? new PathConfig() : pcfg;
ISourceLocation projectRoot = URIUtil.rootLocation("cwd");
- this.ideServices = ideServices == null ? new BasicIDEServices(errwriter, this, null, projectRoot) : ideServices;
+ this.ideServices = ideServices == null ? new BasicIDEServices(errwriter, new NullRascalMonitor(), null, projectRoot) : ideServices;
$RVF = new RascalRuntimeValueFactory(this);
$TF = TypeFactory.getInstance();
$RTF = RascalTypeFactory.getInstance();
@@ -92,38 +94,8 @@ public RascalExecutionContext(
rascalSearchPath = new RascalSearchPath();
URIResolverRegistry reg = URIResolverRegistry.getInstance();
- String projectName = new RascalManifest().getProjectName(projectRoot);
- if(!projectName.isEmpty()) {
- reg.registerLogical(new ProjectURIResolver(projectRoot, projectName));
- reg.registerLogical(new TargetURIResolver(projectRoot, projectName));
- }
-
- String projectPath = projectRoot.getPath();
- String projectsDirPath = projectPath.substring(0, projectPath.length() - projectName.length()-1);
-
- try {
- ISourceLocation projectsDir = $RVF.sourceLocation(projectRoot.getScheme(), projectRoot.getAuthority(),projectsDirPath);
- String[]entries = URIResolverRegistry.getInstance().listEntries(projectsDir);
- if (entries != null) {
- //System.err.print("INFO adding projects: ");
- for(String entryName : entries) {
- if(entryName.charAt(0) != '.' && !(entryName.equals("pom-parent") || entryName.equals("bin") || entryName.equals("src") || entryName.equals("META-INF"))) {
- ISourceLocation entryRoot = $RVF.sourceLocation(projectsDir.getScheme(), projectsDir.getAuthority(), projectsDir.getPath() + "/" + entryName);
- if(URIResolverRegistry.getInstance().isDirectory(entryRoot)) {
- reg.registerLogical(new ProjectURIResolver(entryRoot, entryName));
- reg.registerLogical(new TargetURIResolver(entryRoot, entryName));
- rascalSearchPath.addPathContributor(new SourceLocationListContributor(entryName, $RVF.list(entryRoot)));
- //System.err.print(entryName + " ");
- }
- }
- }
- //System.err.println("");
- }
- } catch (IOException e) {
- return;
- } catch (URISyntaxException e) {
- return;
- }
+ reg.registerLogical(new IDEProjectURIResolver(this.ideServices::resolveProjectLocation));
+ reg.registerLogical(new IDETargetURIResolver(this.ideServices::resolveProjectLocation));
}
IRascalValueFactory getRascalRuntimeValueFactory() { return $RVF; }
@@ -164,40 +136,33 @@ public RascalExecutionContext(
@Override
public int jobEnd(String name, boolean succeeded) {
- errwriter.println(name + " ends");
- return 0;
- //return ideServices.jobEnd(name, succeeded);
+ return ideServices.jobEnd(name, succeeded);
}
@Override
public void jobStep(String name, String message, int worked) {
- //errstream.println(name + ": " + message);
- //ideServices.jobStep(name, message, worked);
+ ideServices.jobStep(name, message, worked);
}
@Override
public void jobStart(String name, int workShare, int totalWork) {
- errwriter.println(name + " starts");
- //ideServices.jobStart(name, workShare, totalWork);
+ ideServices.jobStart(name, workShare, totalWork);
}
@Override
public void jobTodo(String name, int work) {
- //ideServices.jobTodo(name, work);
+ ideServices.jobTodo(name, work);
}
@Override
public boolean jobIsCanceled(String name) {
- errwriter.println(name + " canceled");
- return true;
- //return ideServices.jobIsCanceled(name);
+ return ideServices.jobIsCanceled(name);
}
@Override
public void warning(String message, ISourceLocation src) {
- errwriter.println(message);
- //ideServices.warning(message, src);;
+ ideServices.warning(message, src);;
}
public static ISourceLocation inferProjectRoot(Class> clazz) {
diff --git a/src/org/rascalmpl/semantics/dynamic/ShellCommand.java b/src/org/rascalmpl/semantics/dynamic/ShellCommand.java
index a836d90cb63..06fc6d895ee 100644
--- a/src/org/rascalmpl/semantics/dynamic/ShellCommand.java
+++ b/src/org/rascalmpl/semantics/dynamic/ShellCommand.java
@@ -235,7 +235,6 @@ private static void setOption(IEvaluator> __eval, String name, IV
switch (name) {
case Configuration.GENERATOR_PROFILING_PROPERTY:
__eval.getConfiguration().setGeneratorProfiling(toBoolean(value));
- __eval.getParserGenerator().setGeneratorProfiling(toBoolean(value));
break;
case Configuration.PROFILING_PROPERTY:
__eval.getConfiguration().setProfiling(toBoolean(value));
diff --git a/src/org/rascalmpl/shell/RascalCompile.java b/src/org/rascalmpl/shell/RascalCompile.java
index e3ab017ea03..b834e95a558 100644
--- a/src/org/rascalmpl/shell/RascalCompile.java
+++ b/src/org/rascalmpl/shell/RascalCompile.java
@@ -12,7 +12,6 @@
import java.nio.file.StandardCopyOption;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
@@ -31,7 +30,6 @@
import org.apache.commons.io.FileExistsException;
import org.jline.terminal.Terminal;
import org.rascalmpl.debug.IRascalMonitor;
-import org.rascalmpl.interpreter.Evaluator;
import org.rascalmpl.library.util.PathConfig;
import org.rascalmpl.repl.streams.StreamUtil;
import org.rascalmpl.uri.URIResolverRegistry;
@@ -43,7 +41,6 @@
import io.usethesource.vallang.IInteger;
import io.usethesource.vallang.IList;
import io.usethesource.vallang.IMap;
-import io.usethesource.vallang.INumber;
import io.usethesource.vallang.ISet;
import io.usethesource.vallang.ISourceLocation;
import io.usethesource.vallang.ITuple;