diff options
author | Jason Koenig <unknown> | 2012-07-10 16:08:44 -0700 |
---|---|---|
committer | Jason Koenig <unknown> | 2012-07-10 16:08:44 -0700 |
commit | e2fa35ca7a769e483014ec03a7c91faf2196f678 (patch) | |
tree | c87bd120340c44d55119ef603cb83dcbf6a6aeb7 /Util | |
parent | 326e42ddf27bec7b8eff9909143a012a250a787d (diff) |
Dafny: fixed ghost checking for labeled (i.e. named) expressions, changed to parallel syntax, other minor fixes
Diffstat (limited to 'Util')
-rw-r--r-- | Util/Emacs/dafny-mode.el | 4 | ||||
-rw-r--r-- | Util/VS2010/Dafny/DafnyLanguageService/Grammar.cs | 3 | ||||
-rw-r--r-- | Util/latex/dafny.sty | 4 | ||||
-rw-r--r-- | Util/vim/syntax/dafny.vim | 4 |
4 files changed, 8 insertions, 7 deletions
diff --git a/Util/Emacs/dafny-mode.el b/Util/Emacs/dafny-mode.el index cf2b357f..e4a8c5d0 100644 --- a/Util/Emacs/dafny-mode.el +++ b/Util/Emacs/dafny-mode.el @@ -37,10 +37,10 @@ "invariant" "decreases"
)) . font-lock-builtin-face)
`(,(dafny-regexp-opt '(
- "assert" "assume" "break" "choose" "then" "else" "havoc" "if" "label" "return" "while" "print"
+ "assert" "assume" "break" "choose" "then" "else" "havoc" "if" "label" "return" "while" "print" "where"
"old" "forall" "exists" "new" "parallel" "in" "this" "fresh" "allocated"
"match" "case" "false" "true" "null")) . font-lock-keyword-face)
- `(,(dafny-regexp-opt '("array" "array2" "array3" "bool" "multiset" "nat" "int" "object" "set" "seq")) . font-lock-type-face)
+ `(,(dafny-regexp-opt '("array" "array2" "array3" "bool" "multiset" "map" "nat" "int" "object" "set" "seq")) . font-lock-type-face)
)
"Minimal highlighting for Dafny mode")
diff --git a/Util/VS2010/Dafny/DafnyLanguageService/Grammar.cs b/Util/VS2010/Dafny/DafnyLanguageService/Grammar.cs index 01767ca6..4d8e2df1 100644 --- a/Util/VS2010/Dafny/DafnyLanguageService/Grammar.cs +++ b/Util/VS2010/Dafny/DafnyLanguageService/Grammar.cs @@ -28,7 +28,7 @@ namespace Demo "in", "forall", "exists",
"seq", "set", "map", "multiset", "array", "array2", "array3",
"match", "case",
- "fresh", "allocated", "old", "choose"
+ "fresh", "allocated", "old", "choose", "where"
);
StringLiteral s = new StringLiteral("String", "'", StringFlags.AllowsDoubledQuote);
@@ -321,6 +321,7 @@ namespace Demo | "allocated"
| "old"
| "choose"
+ | "where"
| ident
| "}"
| "{"
diff --git a/Util/latex/dafny.sty b/Util/latex/dafny.sty index cfd8863f..74bfa65a 100644 --- a/Util/latex/dafny.sty +++ b/Util/latex/dafny.sty @@ -5,7 +5,7 @@ \usepackage{listings}
\lstdefinelanguage{dafny}{
- morekeywords={class,datatype,codatatype,type,bool,nat,int,object,set,multiset,seq,array,array2,array3,%
+ morekeywords={class,datatype,codatatype,type,bool,nat,int,object,set,multiset,seq,array,array2,array3,map%
function,predicate,copredicate,
ghost,var,static,refines,
method,constructor,returns,module,imports,in,
@@ -13,7 +13,7 @@ % expressions
match,case,false,true,null,old,fresh,allocated,choose,this,
% statements
- assert,assume,print,new,havoc,if,then,else,while,invariant,break,label,return,parallel,
+ assert,assume,print,new,havoc,if,then,else,while,invariant,break,label,return,parallel,where
},
literate=%
{:}{$\colon$}1
diff --git a/Util/vim/syntax/dafny.vim b/Util/vim/syntax/dafny.vim index 33d447fe..37ec7be0 100644 --- a/Util/vim/syntax/dafny.vim +++ b/Util/vim/syntax/dafny.vim @@ -9,9 +9,9 @@ syntax keyword dafnyFunction function predicate copredicate method constructor syntax keyword dafnyTypeDef class datatype codatatype type syntax keyword dafnyConditional if then else match case syntax keyword dafnyRepeat while parallel -syntax keyword dafnyStatement havoc assume assert return new print break label +syntax keyword dafnyStatement havoc assume assert return new print break label where syntax keyword dafnyKeyword var ghost returns null static this refines -syntax keyword dafnyType bool nat int seq set multiset object array array2 array3 +syntax keyword dafnyType bool nat int seq set multiset object array array2 array3 map syntax keyword dafnyLogic requires ensures modifies reads decreases invariant syntax keyword dafnyOperator forall exists old fresh allocated choose syntax keyword dafnyBoolean true false |