Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a632e6b
commit 78ebbcd
Showing
25 changed files
with
1,031 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
era_bcb_sample/ | ||
.DS_Store | ||
.classpath | ||
.gradle | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
public class Foreach { | ||
|
||
public void f() { | ||
final List<Integer> l = new ArrayList<>(); | ||
for (Integer i : l) { | ||
System.out.println(i); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import java.util.ArrayList; | ||
import java.util.Iterator; | ||
import java.util.List; | ||
|
||
public class Norm2 { | ||
|
||
public void f(int a, int b, int c) { | ||
// int i = it.next(a + b + c, it.next(a) + 1, m(c - b)) + 2; | ||
|
||
// E e = null; | ||
// while ((e = it.next()) != null) { | ||
// a = 8; | ||
// c = -1 - 3 - 4; | ||
// b = 4 + 2; | ||
// } | ||
|
||
// while (4 + 3 > 3 - 2 + 1) { | ||
// } | ||
|
||
int a = 0; | ||
do { | ||
a++; | ||
} while (4 > (a + 1) / 2); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import java.util.ArrayList; | ||
import java.util.Iterator; | ||
import java.util.List; | ||
|
||
public class Norm2 { | ||
|
||
public void f() { | ||
final List<Integer> l = new ArrayList<>(); | ||
final Iterator<Integer> it = l.iterator(); | ||
Integer i = 0; | ||
while (it.hasNext() && (i = it.next(a + b + c)) != null) { | ||
System.out.println(i); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package edu.rit.goal.sdg.interpreter.stmt; | ||
|
||
public class Decl extends BaseStmt { | ||
|
||
public String t; | ||
public String x; | ||
|
||
public Decl(final String t, final String x) { | ||
this.t = t; | ||
this.x = x; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return t + " " + x; | ||
} | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/edu/rit/goal/sdg/interpreter/stmt/ForControl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package edu.rit.goal.sdg.interpreter.stmt; | ||
|
||
public class ForControl extends BaseStmt { | ||
|
||
public Stmt si, sc, su; | ||
|
||
public ForControl(final Stmt si, final Stmt sc, final Stmt su) { | ||
super(); | ||
this.si = si; | ||
this.sc = sc; | ||
this.su = su; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.