From 3c69f3c3e475a399444840a220f7dc60b5f21dc6 Mon Sep 17 00:00:00 2001 From: Rodin Aarssen Date: Mon, 16 Nov 2026 16:44:09 +0100 Subject: [PATCH 1/9] Removed local path from the parser generator compilation module and added a Java wrapper --- .../compiler/CompileParserGenerator.rsc | 24 +++++++++---------- .../shell/RascalGenerateSources.java | 19 +++++++++++++++ 2 files changed, 31 insertions(+), 12 deletions(-) create mode 100644 src/org/rascalmpl/shell/RascalGenerateSources.java diff --git a/src/org/rascalmpl/compiler/CompileParserGenerator.rsc b/src/org/rascalmpl/compiler/CompileParserGenerator.rsc index d653f40af78..adbda11b347 100644 --- a/src/org/rascalmpl/compiler/CompileParserGenerator.rsc +++ b/src/org/rascalmpl/compiler/CompileParserGenerator.rsc @@ -30,21 +30,21 @@ import IO; import lang::rascalcore::compile::Compile; @synopsis{Compile the parser generator including all needed library modules} -void main(loc REPO = |file:///Users/paulklint/git/|, - loc COMPILED = REPO + "compiled-rascal"){ +void main(loc rascalRepo = |project://rascal|, + loc generatedDir = rascalRepo + "generated"){ pcfg = pathConfig( - srcs = [ REPO + "rascal/src/org/rascalmpl/library", - REPO + "rascal/test/org/rascalmpl/benchmark/", - REPO + "rascal/src/org/rascalmpl/compiler", - REPO + "rascal/src/org/rascalmpl/tutor"], - bin = COMPILED + "/target/classes", - generatedSources = COMPILED + "/src/main/java", - generatedTestSources = COMPILED + "/src/test/java/", - generatedResources = COMPILED + "/src/main/java", - generatedTestResources = COMPILED + "/src/test/java/", + srcs = [ rascalRepo + "src/org/rascalmpl/library", + rascalRepo + "test/org/rascalmpl/benchmark/", + rascalRepo + "src/org/rascalmpl/compiler", + rascalRepo + "src/org/rascalmpl/tutor"], + bin = generatedDir + "/target/classes", + generatedSources = generatedDir + "/src/main/java", + generatedTestSources = generatedDir + "/src/test/java/", + generatedResources = generatedDir + "/src/main/java", + generatedTestResources = generatedDir + "/src/test/java/", libs = [ ] - ); + ); ccfg = rascalCompilerConfig(pcfg)[verbose = true][logWrittenFiles=true]; msgs = compile(["lang::rascal::grammar::ParserGenerator"], ccfg); diff --git a/src/org/rascalmpl/shell/RascalGenerateSources.java b/src/org/rascalmpl/shell/RascalGenerateSources.java new file mode 100644 index 00000000000..3a9283f346f --- /dev/null +++ b/src/org/rascalmpl/shell/RascalGenerateSources.java @@ -0,0 +1,19 @@ +package org.rascalmpl.shell; + +import java.io.IOException; +import java.io.PrintWriter; +import java.io.Writer; + +import org.rascalmpl.debug.IRascalMonitor; +import org.rascalmpl.repl.streams.StreamUtil; + +public class RascalGenerateSources extends AbstractCommandlineTool { + public static void main(String[] args) throws IOException { + var term = RascalShell.connectToTerminal(); + var monitor = IRascalMonitor.buildConsoleMonitor(term); + var err = (monitor instanceof Writer) ? StreamUtil.generateErrorStream(term, (Writer)monitor) : new PrintWriter(System.err, true); + var out = (monitor instanceof PrintWriter) ? (PrintWriter) monitor : new PrintWriter(System.out, false); + + System.exit(main("CompileParserGenerator", new String[] { "org/rascalmpl/compiler", "org/rascalmpl/typepal" }, args, term, monitor, err, out)); + } +} From 07fceed327953c580695ecff5769bdda49e20a79 Mon Sep 17 00:00:00 2001 From: Rodin Aarssen Date: Mon, 16 Nov 2026 16:44:54 +0100 Subject: [PATCH 2/9] Added license to code generation --- .../compiler/CompileParserGenerator.rsc | 41 +++++++++++++++++-- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/src/org/rascalmpl/compiler/CompileParserGenerator.rsc b/src/org/rascalmpl/compiler/CompileParserGenerator.rsc index adbda11b347..9cd59f9a50c 100644 --- a/src/org/rascalmpl/compiler/CompileParserGenerator.rsc +++ b/src/org/rascalmpl/compiler/CompileParserGenerator.rsc @@ -31,7 +31,8 @@ import lang::rascalcore::compile::Compile; @synopsis{Compile the parser generator including all needed library modules} void main(loc rascalRepo = |project://rascal|, - loc generatedDir = rascalRepo + "generated"){ + loc generatedDir = rascalRepo + "generated", + loc license = |memory:///LICENSE|){ pcfg = pathConfig( srcs = [ rascalRepo + "src/org/rascalmpl/library", @@ -46,11 +47,45 @@ void main(loc rascalRepo = |project://rascal|, libs = [ ] ); - ccfg = rascalCompilerConfig(pcfg)[verbose = true][logWrittenFiles=true]; + if (!license?) { + saveDefaultLicense(); + } + + ccfg = rascalCompilerConfig(pcfg)[verbose = true][logWrittenFiles=true][license=license]; msgs = compile(["lang::rascal::grammar::ParserGenerator"], ccfg); if(isEmpty(msgs)){ println("ok"); } else { iprintln(msgs); } -} \ No newline at end of file +} + +private void saveDefaultLicense() { + writeFile(|memory:///LICENSE|, + "Copyright (c) 2018-2025, NWO-I CWI and Swat.engineering + 'All rights reserved. + ' + 'Redistribution and use in source and binary forms, with or without + 'modification, are permitted provided that the following conditions are met: + ' + '1. Redistributions of source code must retain the above copyright notice, + 'this list of conditions and the following disclaimer. + ' + '2. Redistributions in binary form must reproduce the above copyright notice, + 'this list of conditions and the following disclaimer in the documentation + 'and/or other materials provided with the distribution. + ' + 'THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" + 'AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + 'IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + 'ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + 'LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + 'CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + 'SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + 'INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + 'CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + 'ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + 'POSSIBILITY OF SUCH DAMAGE. + '" + ); +} From 50aae4ff59ade231676a663441bf0a769f9371bf Mon Sep 17 00:00:00 2001 From: Rodin Aarssen Date: Mon, 16 Nov 2026 16:45:21 +0100 Subject: [PATCH 3/9] Updated lib:// location to project:// --- src/org/rascalmpl/compiler/CompileTestSources.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/rascalmpl/compiler/CompileTestSources.rsc b/src/org/rascalmpl/compiler/CompileTestSources.rsc index f9ce0e4b87a..5bd92aef95f 100644 --- a/src/org/rascalmpl/compiler/CompileTestSources.rsc +++ b/src/org/rascalmpl/compiler/CompileTestSources.rsc @@ -54,7 +54,7 @@ void compileTestSources(PathConfig pcfg) { testCompilerConfig = getAllSrcCompilerConfig()[logPathConfig=false]; total = 0; - println(readFile(|lib://rascal/META-INF/MANIFEST.MF|)); + println(readFile(|project://rascal/META-INF/MANIFEST.MF|)); libraryModules = ["Boolean", "DateTime", From 5c0c7e0b9fc528627ccc483a7bac6d1979543f14 Mon Sep 17 00:00:00 2001 From: Rodin Aarssen Date: Tue, 24 Nov 2026 11:14:26 +0100 Subject: [PATCH 4/9] Added explicit type to local variable --- .../library/lang/rascal/grammar/definition/Parameters.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/rascalmpl/library/lang/rascal/grammar/definition/Parameters.rsc b/src/org/rascalmpl/library/lang/rascal/grammar/definition/Parameters.rsc index 2caf299c18f..5db891c02d9 100644 --- a/src/org/rascalmpl/library/lang/rascal/grammar/definition/Parameters.rsc +++ b/src/org/rascalmpl/library/lang/rascal/grammar/definition/Parameters.rsc @@ -37,7 +37,7 @@ set[Production] expand(set[Production] prods) { instantiated = {}; while (uses != {}) { - instances = {}; + set[Production] instances = {}; for (u <- uses, def <- defs, def.def.name == u.name) { name = u.name; actuals = u.parameters; From bd394e4115cb832b83af7d8057941df671567673 Mon Sep 17 00:00:00 2001 From: Rodin Aarssen Date: Tue, 24 Nov 2026 11:37:00 +0100 Subject: [PATCH 5/9] Made generate sources entry module more generic --- .../compiler/RascalGenerateSources.rsc | 34 +++++++++++++++++++ .../shell/RascalGenerateSources.java | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 src/org/rascalmpl/compiler/RascalGenerateSources.rsc diff --git a/src/org/rascalmpl/compiler/RascalGenerateSources.rsc b/src/org/rascalmpl/compiler/RascalGenerateSources.rsc new file mode 100644 index 00000000000..8c095959a15 --- /dev/null +++ b/src/org/rascalmpl/compiler/RascalGenerateSources.rsc @@ -0,0 +1,34 @@ +@license{ +Copyright (c) 2018-2025, NWO-I CWI, Swat.engineering and Paul Klint +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +} +module RascalGenerateSources + +import CompileParserGenerator; + +@synopsis{Entry point for code generation} +void main() { + CompileParserGenerator::main(); +} \ No newline at end of file diff --git a/src/org/rascalmpl/shell/RascalGenerateSources.java b/src/org/rascalmpl/shell/RascalGenerateSources.java index 3a9283f346f..cab4025a886 100644 --- a/src/org/rascalmpl/shell/RascalGenerateSources.java +++ b/src/org/rascalmpl/shell/RascalGenerateSources.java @@ -14,6 +14,6 @@ public static void main(String[] args) throws IOException { var err = (monitor instanceof Writer) ? StreamUtil.generateErrorStream(term, (Writer)monitor) : new PrintWriter(System.err, true); var out = (monitor instanceof PrintWriter) ? (PrintWriter) monitor : new PrintWriter(System.out, false); - System.exit(main("CompileParserGenerator", new String[] { "org/rascalmpl/compiler", "org/rascalmpl/typepal" }, args, term, monitor, err, out)); + System.exit(main("RascalGenerateSources", new String[] { "org/rascalmpl/compiler", "org/rascalmpl/typepal" }, args, term, monitor, err, out)); } } From 5552cb6827a1f09c9193593288f267d456f322b0 Mon Sep 17 00:00:00 2001 From: Rodin Aarssen Date: Tue, 1 Dec 2026 09:36:38 +0100 Subject: [PATCH 6/9] Implemented ambiguous tree support similar to error tree support (cf. #2987) --- src/org/rascalmpl/runtime/$RascalModule.java | 31 ++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/org/rascalmpl/runtime/$RascalModule.java b/src/org/rascalmpl/runtime/$RascalModule.java index cc718e0eea3..f52ed56109b 100644 --- a/src/org/rascalmpl/runtime/$RascalModule.java +++ b/src/org/rascalmpl/runtime/$RascalModule.java @@ -55,6 +55,7 @@ import org.rascalmpl.interpreter.utils.IResourceLocationProvider; import org.rascalmpl.interpreter.utils.RascalManifest; import org.rascalmpl.library.util.PathConfig; +import org.rascalmpl.library.util.ParseErrorRecovery; import org.rascalmpl.library.util.ToplevelType; import org.rascalmpl.parser.gtd.result.out.INodeFlattener; import org.rascalmpl.runtime.traverse.Traverse; @@ -914,6 +915,10 @@ private IValueInputStream constructValueReader(ISourceLocation loc) throws IOExc protected final IValue $aadt_get_field(final IConstructor cons, final String fieldName) { Type consType = cons.getConstructorType(); + + if (consType == RascalValueFactory.Tree_Amb) { + throwOnAmbFieldAccess(cons, fieldName); + } if(TreeAdapter.isTree(cons) && TreeAdapter.isAppl((ITree) cons)) { FieldResult fldres = TreeAdapter.getLabeledField((ITree) cons, fieldName); @@ -948,6 +953,28 @@ private IValueInputStream constructValueReader(ISourceLocation loc) throws IOExc } } + private void throwOnAmbFieldAccess(final IConstructor cons, final String fieldName) { + ITree tree = (ITree) cons; + ISet alts = (ISet) tree.get(0); + for (IValue alt : alts) { + if (TreeAdapter.getLabeledField((ITree) alt, fieldName) != null) { + // If the ambiguity is generated by error recovery we throw an ParseErrorRecovery exception, + // otherwise we throw an Ambiguity exception + if ((new ParseErrorRecovery($RVF)).hasParseErrors(tree).getValue()) { + throw RuntimeExceptionFactory.parseErrorRecoveryNoSuchField(fieldName, TreeAdapter.getLocation(tree)); + } + else { + IString typeString = $RVF.string(SymbolAdapter.toString(tree, false)); + IString treeString = $RVF.string(TreeAdapter.yield(tree)); + ISourceLocation loc = TreeAdapter.getLocation(tree); + throw RuntimeExceptionFactory.ambiguity(loc, typeString, treeString); + } + } + } + + throw RuntimeExceptionFactory.noSuchField(fieldName); + } + protected final IValue $aloc_get_field(final ISourceLocation sloc, final String field) { IValue v; switch (field) { @@ -1783,6 +1810,10 @@ else if (iEndLine != -1 || iEndColumn != -1) { Type consType = cons.getConstructorType(); + if (consType == RascalValueFactory.Tree_Amb) { + throwOnAmbFieldAccess(cons, fieldName); + } + // Does fieldName exist as field in a parse tree? if(TreeAdapter.isTree(cons)) { if(TreeAdapter.isAppl((ITree) cons) && TreeAdapter.getLabeledField((ITree)cons, fieldName) != null) { From 1efd12e6c2267a2bb5a65d1058a38b14eec9d4fd Mon Sep 17 00:00:00 2001 From: Rodin Aarssen Date: Tue, 24 Nov 2026 12:12:38 +0100 Subject: [PATCH 7/9] Fixed the main function for code generation --- .../compiler/CompileParserGenerator.rsc | 34 --------------- .../compiler/RascalGenerateSources.rsc | 42 +++++++++++++++++-- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/src/org/rascalmpl/compiler/CompileParserGenerator.rsc b/src/org/rascalmpl/compiler/CompileParserGenerator.rsc index 9cd59f9a50c..f424fd2db02 100644 --- a/src/org/rascalmpl/compiler/CompileParserGenerator.rsc +++ b/src/org/rascalmpl/compiler/CompileParserGenerator.rsc @@ -47,10 +47,6 @@ void main(loc rascalRepo = |project://rascal|, libs = [ ] ); - if (!license?) { - saveDefaultLicense(); - } - ccfg = rascalCompilerConfig(pcfg)[verbose = true][logWrittenFiles=true][license=license]; msgs = compile(["lang::rascal::grammar::ParserGenerator"], ccfg); if(isEmpty(msgs)){ @@ -59,33 +55,3 @@ void main(loc rascalRepo = |project://rascal|, iprintln(msgs); } } - -private void saveDefaultLicense() { - writeFile(|memory:///LICENSE|, - "Copyright (c) 2018-2025, NWO-I CWI and Swat.engineering - 'All rights reserved. - ' - 'Redistribution and use in source and binary forms, with or without - 'modification, are permitted provided that the following conditions are met: - ' - '1. Redistributions of source code must retain the above copyright notice, - 'this list of conditions and the following disclaimer. - ' - '2. Redistributions in binary form must reproduce the above copyright notice, - 'this list of conditions and the following disclaimer in the documentation - 'and/or other materials provided with the distribution. - ' - 'THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" - 'AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - 'IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - 'ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - 'LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - 'CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - 'SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - 'INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - 'CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - 'ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - 'POSSIBILITY OF SUCH DAMAGE. - '" - ); -} diff --git a/src/org/rascalmpl/compiler/RascalGenerateSources.rsc b/src/org/rascalmpl/compiler/RascalGenerateSources.rsc index 8c095959a15..0ff982cadd0 100644 --- a/src/org/rascalmpl/compiler/RascalGenerateSources.rsc +++ b/src/org/rascalmpl/compiler/RascalGenerateSources.rsc @@ -26,9 +26,45 @@ POSSIBILITY OF SUCH DAMAGE. } module RascalGenerateSources +import IO; + import CompileParserGenerator; @synopsis{Entry point for code generation} -void main() { - CompileParserGenerator::main(); -} \ No newline at end of file +void main(loc rascalRepo = |project://rascal|, loc generatedDir = rascalRepo + "generated", loc license = |memory:///LICENSE|) { + if (!license?) { + saveDefaultLicense(); + } + + CompileParserGenerator::main(rascalRepo=rascalRepo, generatedDir=generatedDir, license=license); +} + +private void saveDefaultLicense() { + writeFile(|memory:///LICENSE|, + "Copyright (c) 2018-2025, NWO-I CWI and Swat.engineering + 'All rights reserved. + ' + 'Redistribution and use in source and binary forms, with or without + 'modification, are permitted provided that the following conditions are met: + ' + '1. Redistributions of source code must retain the above copyright notice, + 'this list of conditions and the following disclaimer. + ' + '2. Redistributions in binary form must reproduce the above copyright notice, + 'this list of conditions and the following disclaimer in the documentation + 'and/or other materials provided with the distribution. + ' + 'THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" + 'AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + 'IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + 'ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + 'LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + 'CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + 'SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + 'INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + 'CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + 'ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + 'POSSIBILITY OF SUCH DAMAGE. + '" + ); +} From 24baa7b676079a1c2e115a4c7af3272137818df0 Mon Sep 17 00:00:00 2001 From: Rodin Aarssen Date: Thu, 3 Dec 2026 17:16:57 +0100 Subject: [PATCH 8/9] Removed constructor argument --- src/org/rascalmpl/runtime/RascalExecutionContext.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/org/rascalmpl/runtime/RascalExecutionContext.java b/src/org/rascalmpl/runtime/RascalExecutionContext.java index f0d24603a15..3a2963afcd2 100644 --- a/src/org/rascalmpl/runtime/RascalExecutionContext.java +++ b/src/org/rascalmpl/runtime/RascalExecutionContext.java @@ -71,8 +71,7 @@ public RascalExecutionContext( PrintWriter outwriter, PrintWriter errwriter, PathConfig pcfg, - IDEServices ideServices, - Class clazz + IDEServices ideServices ){ currentModuleName = "UNDEFINED"; @@ -82,7 +81,7 @@ public RascalExecutionContext( this.errwriter = errwriter; this.pcfg = pcfg == null ? new PathConfig() : pcfg; - ISourceLocation projectRoot = inferProjectRoot(clazz); + ISourceLocation projectRoot = URIUtil.rootLocation("cwd"); this.ideServices = ideServices == null ? new BasicIDEServices(errwriter, this, null, projectRoot) : ideServices; $RVF = new RascalRuntimeValueFactory(this); $TF = TypeFactory.getInstance(); From d08e888f93a6e89afb6a1de4e5ff935ef7b70562 Mon Sep 17 00:00:00 2001 From: Rodin Aarssen Date: Fri, 4 Dec 2026 09:05:47 +0100 Subject: [PATCH 9/9] Removed function argument during generation --- .../compiler/lang/rascalcore/compile/muRascal2Java/CodeGen.rsc | 2 +- .../compiler/lang/rascalcore/compile/muRascal2Java/Tests.rsc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/CodeGen.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/CodeGen.rsc index 7c0cbdbd024..9333dbd9b2e 100644 --- a/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/CodeGen.rsc +++ b/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/CodeGen.rsc @@ -214,7 +214,7 @@ tuple[JCode, JCode, JCode, list[value]] muRascal2Java(MuModule m, ModuleStatus m main_method = "public static void main(String[] args) { ' long start_time = System.currentTimeMillis(); - ' RascalExecutionContext rex = new RascalExecutionContext(new InputStreamReader(System.in), new PrintWriter(System.out), new PrintWriter(System.err), null, null, ..class); + ' RascalExecutionContext rex = new RascalExecutionContext(new InputStreamReader(System.in), new PrintWriter(System.out), new PrintWriter(System.err), null, null); ' instance = new (rex); ' long init_time = System.currentTimeMillis(); ' diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/Tests.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/Tests.rsc index 93a6e7e6784..6e8b91d7e42 100644 --- a/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/Tests.rsc +++ b/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/Tests.rsc @@ -82,7 +82,7 @@ str generateTestClass(str preamble, str packageName, str className, list[MuFunct ' final GenerateActuals generator = new GenerateActuals(5, 5, 10); ' ' public Tests(){ - ' super(new RascalExecutionContext(new InputStreamReader(System.in), new PrintWriter(System.out), new PrintWriter(System.err), null, null, ..class)); + ' super(new RascalExecutionContext(new InputStreamReader(System.in), new PrintWriter(System.out), new PrintWriter(System.err), null, null)); ' ModuleStore store = $rex.getModuleStore(); ' store.importModule(.class, this.$rex, ::new); ' $me = store.getModule(.class);