Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 8c10f65

Browse files
committed
Evolving trial cases
1 parent dce0793 commit 8c10f65

File tree

3 files changed

+29
-27
lines changed

3 files changed

+29
-27
lines changed
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
module lang::rascalcore::compile::Examples::Tst0
2-
3-
4-
import util::Reflective;
5-
6-
int XX1 = 14 ;
7-
int XXX = 13;
8-
9-
int main() = XX1;
2+
3+
syntax A = "a";
4+
5+
value X = #A;
Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,29 @@
11
module lang::rascalcore::compile::Examples::Tst1
22

3-
import ValueIO;
3+
import lang::rascalcore::check::ATypeBase;
4+
import lang::rascalcore::check::ATypeUtils;
45
import IO;
56

6-
data D(bool K = false) = d1(int n);
7+
map[AType, set[AType]] defs = (
8+
aadt(
9+
"A",
10+
[],
11+
contextFreeSyntax()):{aprod(achoice(
12+
aadt(
13+
"A",
14+
[],
15+
contextFreeSyntax()),
16+
{prod(
17+
aadt(
18+
"A",
19+
[],
20+
contextFreeSyntax()),
21+
[alit("a")])}))});
722

8-
void main(){
9-
v = readBinaryValueFile(#D, |home:///tmp.txt|);
10-
println("K = <v.K>, <v.K?>");
23+
24+
value main() {
25+
res = adefinitions2definitions(defs);
26+
println("main:"); iprintln(res);
27+
return res;
28+
//return aprod2prod(p);
1129
}
Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
//@bootstrapParser
22
module lang::rascalcore::compile::Examples::Tst2
33

4-
import IO;
5-
import ValueIO;
6-
extend lang::rascalcore::check::CheckerCommon;
7-
8-
loc EXCEPTIONTPL1
9-
= |jar+file:///Users/paulklint/.m2/repository/org/rascalmpl/rascal/0.40.8-SNAPSHOT/rascal-0.40.8-SNAPSHOT.jar!rascal/$Exception.tpl|;
10-
11-
loc VersionTPL = |file:///Users/paulklint/git/generated-sources/target/typepal/generated-resources/src/main/java/rascal/analysis/typepal/$Version.tpl|;
12-
void main(){
13-
tm = readBinaryValueFile(#TModel, VersionTPL);
14-
iprintln(tm.logical2physical);
15-
println("usesPhysicalLocs: <tm.usesPhysicalLocs?>, <tm has usesPhysicalLocs>, <tm.usesPhysicalLocs>");
16-
// println("convertedToPhysical: <tm.convertedToPhysical?>, <tm has convertedToPhysical>, <tm.convertedToPhysical>");
17-
}
4+
extend ParseTree;
5+
value main() = choice(sort("A"), {choice(sort("A"),{prod(sort("A"),[lit("a")],{})})});

0 commit comments

Comments
 (0)