summaryrefslogtreecommitdiff
path: root/Util/VS2010
diff options
context:
space:
mode:
authorGravatar boehmes <unknown>2012-09-27 17:13:42 +0200
committerGravatar boehmes <unknown>2012-09-27 17:13:42 +0200
commit623a87c132abec61b5c74a6a00a7b162073a6a8d (patch)
treeb95ba791592cf395ce99035715de98578a5519ee /Util/VS2010
parented83becd12d7079e6ce2853fbebace20b1e7df5a (diff)
Boogie: new syntax for integer division and modulus: use div and mod instead of / and %
Diffstat (limited to 'Util/VS2010')
-rw-r--r--Util/VS2010/Boogie/BoogieLanguageService/Grammar.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Util/VS2010/Boogie/BoogieLanguageService/Grammar.cs b/Util/VS2010/Boogie/BoogieLanguageService/Grammar.cs
index 02d14b93..4e38f654 100644
--- a/Util/VS2010/Boogie/BoogieLanguageService/Grammar.cs
+++ b/Util/VS2010/Boogie/BoogieLanguageService/Grammar.cs
@@ -23,13 +23,14 @@ namespace Demo
"bv30", "bv31", "bv32",
"bv64",
"call", "complete", "const",
+ "div",
"else", "ensures", "exists", "extends",
"false", "forall", "free", "function",
"goto",
"havoc",
"if", "implementation", "int", "invariant",
"lambda",
- "modifies",
+ "mod", "modifies",
"old",
"procedure",
"requires",
@@ -181,7 +182,7 @@ namespace Demo
identList.Rule = MakePlusRule(identList, comma, ident);
NewStmt.Rule = "new" + QualifiedName + GenericsPostfix.Q() + LParen + expressionList.Q() + RParen;
NewArrStmt.Rule = "new" + QualifiedName + GenericsPostfix.Q() + LBracket + expressionList.Q() + RBracket;
- BinOp.Rule = ToTerm("+") | "-" | "*" | "/" | "%" | "^" | "&" | "|"
+ BinOp.Rule = ToTerm("+") | "-" | "*" | "div" | "mod" | "^" | "&" | "|"
| "&&" | "||" | "==" | "!=" | greater | less
| ">=" | "<=" | "is"
| "=" | "+=" | "-="
@@ -376,7 +377,7 @@ namespace Demo
#region 5. Operators precedence
RegisterOperators(1, "<==>");
RegisterOperators(2, "+", "-");
- RegisterOperators(3, "*", "/", "%", "!!");
+ RegisterOperators(3, "*", "div", "mod", "!!");
RegisterOperators(4, Associativity.Right, "^");
RegisterOperators(5, "||");
RegisterOperators(6, "&&");