diff options
author | kyessenov <unknown> | 2010-07-20 22:52:45 +0000 |
---|---|---|
committer | kyessenov <unknown> | 2010-07-20 22:52:45 +0000 |
commit | ed9396346b50035dd22c557238a02f7123eaa6b1 (patch) | |
tree | 0bcccbd8ead05da30c37e8281f1a139322ad593d /Chalice/src/PrettyPrinter.scala | |
parent | 66734f56a52eaf9113043bee85991a94ff0ac834 (diff) |
Chalice: added surface syntax for acc(s[*].*) and acc(s[*].f); extended AST, resolver, printer; translation is not yet done
Diffstat (limited to 'Chalice/src/PrettyPrinter.scala')
-rw-r--r-- | Chalice/src/PrettyPrinter.scala | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Chalice/src/PrettyPrinter.scala b/Chalice/src/PrettyPrinter.scala index ef775b2a..00545103 100644 --- a/Chalice/src/PrettyPrinter.scala +++ b/Chalice/src/PrettyPrinter.scala @@ -221,7 +221,20 @@ object PrintProgram { perm match { case None => case Some(perm) => print(", "); Expr(perm) }
print(")")
case RdAccessAll(obj, p) =>
- print("rd("); Expr(e); print(".*");
+ print("rd("); Expr(e); print(".*");
+ p match {
+ case None => print(")")
+ case Some(None) => print(", *)")
+ case Some(Some(e)) => print(", "); Expr(e); print(")")
+ }
+ case AccessSeq(s, f, perm) =>
+ print("acc("); Expr(s); print("[*].");
+ f match { case None => print("*"); case Some(x) => print(x)}
+ perm match { case None => case Some(perm) => print(", "); Expr(perm) }
+ print(")")
+ case RdAccessSeq(s, f, p) =>
+ print("rd("); Expr(s); print("[*].*");
+ f match { case None => print("*"); case Some(x) => print(x)}
p match {
case None => print(")")
case Some(None) => print(", *)")
|