7fd59977 |
1 | -- File: GenRel.cdl |
2 | -- Created: Tue Aug 18 11:32:35 1992 |
3 | -- Author: Arnaud BOUZY |
4 | -- <adn@bravox> |
5 | ---Copyright: Matra Datavision 1992 |
6 | |
7 | class GenRel from ExprIntrp inherits Generator from ExprIntrp |
8 | |
9 | ---Purpose: Implements an interpreter for equations or system |
10 | -- of equations made of expressions of package Expr. |
11 | |
12 | uses GeneralRelation from Expr, |
13 | AsciiString from TCollection |
14 | |
15 | raises NoSuchObject |
16 | |
17 | is |
18 | |
19 | Create |
20 | ---Purpose: Creates an empty generator |
21 | ---Level: Advanced |
22 | returns mutable GenRel is private; |
23 | |
24 | Create( myclass ) returns GenRel; |
25 | |
26 | Process(me : mutable; str : AsciiString) |
27 | ---Purpose: Processes given string. |
28 | ---Level: Advanced |
29 | is static; |
30 | |
31 | IsDone(me) |
32 | ---Purpose: Returns false if any syntax error has occurred during |
33 | -- process. |
34 | ---Level: Advanced |
35 | returns Boolean |
36 | is static; |
37 | |
38 | Relation(me) |
39 | ---Purpose: Returns relation generated. Raises an exception if |
40 | -- IsDone answers false. |
41 | ---Level: Advanced |
42 | returns mutable GeneralRelation |
43 | raises NoSuchObject |
44 | is static; |
45 | |
46 | fields |
47 | |
48 | done : Boolean; |
49 | myRelation : GeneralRelation; |
50 | |
51 | end GenRel; |