diff options
Diffstat (limited to 'src/piglet/piglet2spiglet/GenSpigletCtl.java')
-rw-r--r-- | src/piglet/piglet2spiglet/GenSpigletCtl.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/piglet/piglet2spiglet/GenSpigletCtl.java b/src/piglet/piglet2spiglet/GenSpigletCtl.java new file mode 100644 index 0000000..a95dcc4 --- /dev/null +++ b/src/piglet/piglet2spiglet/GenSpigletCtl.java @@ -0,0 +1,25 @@ +package piglet.piglet2spiglet; + +import java.util.Vector; + +public class GenSpigletCtl { + /* DEFAULT: return a PigletExpr + * PRINT: used with procedure, print the StmtExp + * LIST: used with call, add things to list, return null + */ + public enum Control { DEFAULT, PRINT, LIST }; + Control c; + public Vector<PigletExpr> call_list; + + public GenSpigletCtl(Control _c) { + c = _c; + call_list = new Vector<PigletExpr>(); + } + public boolean isPrint() { + return c==Control.PRINT; + } + + public boolean isList() { + return c==Control.LIST; + } +} |