Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis15/doc/syntax.md
ViewVC logotype

Diff of /branches/vis15/doc/syntax.md

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4462, Mon Aug 29 18:09:53 2016 UTC revision 4463, Mon Aug 29 22:17:04 2016 UTC
# Line 11  Line 11 
11  | | | |  | | | |
12  _InputDcl_ | ::= | **input** _ValueType_ Id [ `(` String `)` ] [ `=` _ConstExpr_ ] `;`  _InputDcl_ | ::= | **input** _ValueType_ Id [ `(` String `)` ] [ `=` _ConstExpr_ ] `;`
13  | | | |  | | | |
14  _ConstDcl_ | ::= | **const** _ValueType_ Id [ `=` _ConstExpr_ ] `;`  _ConstDcl_ | ::= | **const** _ConcreteType_ Id [ `=` _ConstExpr_ ] `;`
15  | | | |  | | | |
16  _GlobalVarDcl_ | ::= | _Type_ Id [ `=` _Expression_ ] `;`  _GlobalVarDcl_ | ::= | _Type_ Id [ `=` _Expression_ ] `;`
17  | | | |  | | | |
# Line 24  Line 24 
24  | | | |  | | | |
25  _StrandDcl_ | ::= | **strand** Id _Parameters_ `{` { _StateVarDcl_ } [ _Block_ ] { _MethodDcl_ } `}`  _StrandDcl_ | ::= | **strand** Id _Parameters_ `{` { _StateVarDcl_ } [ _Block_ ] { _MethodDcl_ } `}`
26  | | | |  | | | |
27    _StateVarDcl_ | ::= | _ConcreteType_ Id [ `=` _Expression_ ] `;`
28    | | | |
29  _MethodDcl_ | ::= | _MethodName_ _Block_  _MethodDcl_ | ::= | _MethodName_ _Block_
30  | | | |  | | | |
31  _MethodName_ | ::= | **initially** \| **update** \| **stabilize**  _MethodName_ | ::= | **initially** \| **update** \| **stabilize**
# Line 53  Line 55 
55  | | | |  | | | |
56  _AssignOp_ | ::= | `=` \| `+=` \| `-=` \| `*=` \| `/=` \| `%=`  _AssignOp_ | ::= | `=` \| `+=` \| `-=` \| `*=` \| `/=` \| `%=`
57  | | | |  | | | |
58  _Type_ | ::= | **image** `(` _ConstExpr_ `)` _Shape_  _Type_ | ::= | **field** `#` _Dimension_ `(` _ConstExpr_ `)` _Shape_
   | \| | **field** `#` _Dimension_ `(` _ConstExpr_ `)` _Shape_  
59    | \| | **kernel** `#` _Dimension_    | \| | **kernel** `#` _Dimension_
60    | \| | _ConcreteType_    | \| | _ValueType_
61  | | | |  | | | |
62  _Dimension_ | ::= | Int  _Dimension_ | ::= | Int
63  | | | |  | | | |
64  _ConcreteType_ | ::= | _PrimitiveType_ [ _SequenceDims_ ]  _ValueType_ | ::= | **image** `(` _ConstExpr_ `)` _Shape_
65      | \| | _ConcreteType_
66    | | | |
67    _ConcreteType_ | ::= | _PrimitiveType_ { _SequenceDims_ }
68  | | | |  | | | |
69  _SequenceDims_ | ::= |  _SequenceDims_ | ::= |
70    | \| | `[` `]`    | \| | `[` `]`
# Line 158  Line 162 
162  * Constant expressions (_ConstExpr_) are restricted to have a concrete type (_ConcreteType_)  * Constant expressions (_ConstExpr_) are restricted to have a concrete type (_ConcreteType_)
163    and be can be evaluated statically.    and be can be evaluated statically.
164    
165    * A sequence type can have at most one dynamic dimension (*e.g.*, `int [][3]` or
166      `int [3][]`, but not `int[][]`).
167    
168  * When indexing a tensor or field (e.g., `e1[e2]`), the index expression must be a constant  * When indexing a tensor or field (e.g., `e1[e2]`), the index expression must be a constant
169    expression.    expression.
170    

Legend:
Removed from v.4462  
changed lines
  Added in v.4463

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0