Skip to content

Commit 41276b3

Browse files
author
x97davka
committed
Expanded Class.
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@44 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 408dc6d commit 41276b3

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

modeq/class.rml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,36 +20,43 @@ and Modification = CLASSMOD of ElementArg list
2020
| EQUALMOD of Exp.Exp
2121

2222
and ElementSpec = CLASSDEF of bool (* replaceable *)
23-
* Class
23+
* Class
2424
| EXTENDS of string * ElementArg list
2525
| COMPONENT of bool (* flow *)
2626
* bool (* parameter *)
2727
* bool (* constant *)
2828
* bool (* input *)
2929
* bool (* output *)
30-
* string (* type name *)
31-
* string (* component name *)
30+
* Exp.Path (* type name *)
31+
* Exp.Ident (* component name *)
3232
* ArrayDim option
33-
* Modification option (* optional? *)
33+
* Modification option
3434

3535
and Element = ELEMENT of bool (* final *)
3636
* ElementSpec
3737

38-
and ElementListType = PUBLIC
39-
| PROTECTED
40-
| EQUATION
41-
| ALGORITHM
42-
4338
and ClassRestriction = CL_CLASS
44-
| CL_TYPE
45-
| CL_CONNECTOR
4639
| CL_MODEL
40+
| CL_RECORD
4741
| CL_BLOCK
42+
| CL_CONNECTOR
43+
| CL_TYPE
4844
| CL_PACKAGE
4945
| CL_FUNCTION
5046

51-
and Class = CLASS of ClassRestriction*(ElementList list)
47+
and Class = CLASS of Exp.Ident (* Name *)
48+
* bool (* Partial *)
49+
* ClassRestriction (* Restricion *)
50+
* (ClassPart list) (* Parts *)
51+
52+
and ClassPart = PUBLIC of Element list
53+
| PROTECTED of Element list
54+
| EQUATIONS of Equation list
55+
| ALGORITHMS of Algorithm list
56+
57+
and Equation = EQ_EXPR of Exp.Exp (* more later *)
58+
| EQ_ASSIGN of Exp.Exp * Exp.Exp
5259

53-
withtype ElementList = ElementListType*(Element list)
60+
and Algorithm = ALGORITHM (* Fill in later *)
5461

5562
end (* module Class *)

0 commit comments

Comments
 (0)