Skip to content

Commit

Permalink
Moved Subscript and ComponentRef to exp.rml
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@182 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
x97davka committed Mar 12, 1998
1 parent 46237f0 commit c11ab8c
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions modeq/absyn.rml
Expand Up @@ -3,17 +3,12 @@
module Absyn:

with "exp.rml"
with "types.rml"

type Ident = Exp.Ident

type Path = Exp.Path

type Subscript = (Exp.Exp * ((Exp.Exp * (Exp.Exp option)) option)) option

type ComponentRef = (string * (Subscript list)) list

datatype ArrayDim = ONEDIM of Subscript
| TWODIM of Subscript*Subscript
type Subscript = Exp.Subscript
type ArrayDim = Types.ArrayDim

datatype ElementArg = MODIFICATION of bool * Path * Modification
| REDECLARATION of bool * ElementSpec
Expand All @@ -22,17 +17,13 @@ module Absyn:
| EQUALMOD of Exp.Exp

and Component = COMPONENT of Ident (* component name *)
* ArrayDim option
* ArrayDim
* Modification option

and ElementSpec = CLASSDEF of bool (* replaceable *)
* Class
| EXTENDS of Path * ElementArg list
| COMPONENTS of bool (* flow *)
* bool (* parameter *)
* bool (* constant *)
* bool (* input *)
* bool (* output *)
| COMPONENTS of Types.VarAttr
* Path (* type name *)
* Component list

Expand Down Expand Up @@ -66,7 +57,7 @@ module Absyn:

and Equation = EQ_EXPR of Exp.Exp (* more later *)
| EQ_EQUALS of Exp.Exp * Exp.Exp
| EQ_CONNECT of ComponentRef * ComponentRef
| EQ_CONNECT of Exp.ComponentRef * Exp.ComponentRef

and Algorithm = ALGORITHM (* Fill in later *)

Expand All @@ -82,7 +73,7 @@ relation element_spec_name : ElementSpec => Ident =

axiom element_spec_name CLASSDEF(_,CLASS(n,_,_,_)) => n

axiom element_spec_name COMPONENTS(_,_,_,_,_,_,[COMPONENT(n,_,_)]) => n
axiom element_spec_name COMPONENTS(_,_,[COMPONENT(n,_,_)]) => n

rule print "# element_spec_name EXTENDS\n" & fail
--------------------------------------------
Expand Down

0 comments on commit c11ab8c

Please sign in to comment.