diff options
author | Jason Gross <jgross@mit.edu> | 2017-04-14 18:14:39 -0400 |
---|---|---|
committer | Jason Gross <jgross@mit.edu> | 2017-04-14 18:14:39 -0400 |
commit | e3d27bfc58b601d4c3f344670ce7d04597ac5e61 (patch) | |
tree | 2a6a3c5f974bd5ac5f9efe4f4e5fb4605d84ec46 /src/Util/Notations.v | |
parent | 8dc2c5c001b9b0e63ecf8324969b603694486d8b (diff) |
Add for-loop combinator
Diffstat (limited to 'src/Util/Notations.v')
-rw-r--r-- | src/Util/Notations.v | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Util/Notations.v b/src/Util/Notations.v index 962117925..7570533ea 100644 --- a/src/Util/Notations.v +++ b/src/Util/Notations.v @@ -84,3 +84,13 @@ Reserved Notation "x ::> ( max_bitwidth = v )" (at level 70, no associativity, format "x ::> ( max_bitwidth = v )"). Reserved Notation "r[ l ~> u ]" (format "r[ l ~> u ]"). Reserved Notation "b[ l ~> u ]" (format "b[ l ~> u ]"). +Reserved Notation "'for' i (:= i0 ; += step ; < finish ) 'updating' ( state := initial ) {{ body }}" + (at level 70, format "'[v ' 'for' i (:= i0 ; += step ; < finish ) 'updating' ( state := initial ) {{ '//' body ']' '//' }}"). +Reserved Notation "'for' ( 'int' i = i0 ; step_expr ; finish_expr ) 'updating' ( state1 .. staten = initial ) {{ body }}" + (at level 70, i at level 10, state1 binder, staten binder, format "'[v ' 'for' ( 'int' i = i0 ; step_expr ; finish_expr ) 'updating' ( state1 .. staten = initial ) {{ '//' body ']' '//' }}"). +Reserved Notation "x += y" (at level 70, no associativity). +Reserved Notation "x -= y" (at level 70, no associativity). +Reserved Notation "x ++" (at level 60, format "x ++"). +Reserved Notation "x --" (at level 60, format "x --"). +Reserved Notation "++ x" (at level 60, format "++ x"). +Reserved Notation "-- x" (at level 60, format "-- x"). |