blob: 8e0fbe381c1883e6193caefccdfaf6684952a2dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
-- File: GenExp.cdl
-- Created: Thu Jul 18 18:13:12 1991
-- Author: Arnaud BOUZY
-- <adn@topsn2>
---Copyright: Matra Datavision 1991
class GenExp from ExprIntrp inherits Generator from ExprIntrp
---Purpose: This class permits, from a string, to create any
-- kind of expression of package Expr by using
-- built-in functions such as Sin,Cos, etc, and by
-- creating variables.
uses GeneralExpression from Expr,
AsciiString from TCollection
raises NoSuchObject
is
Create
---Purpose: Creates an empty generator
---Level: Advanced
returns mutable GenExp is private;
Create( myclass ) returns GenExp;
Process(me : mutable; str : AsciiString)
---Purpose: Processes given string.
---Level: Advanced
is static;
IsDone(me)
---Purpose: Returns false if any syntax error has occurred during
-- process.
---Level: Advanced
returns Boolean
is static;
Expression(me)
---Purpose: Returns expression generated. Raises an exception if
-- IsDone answers false.
---Level: Advanced
returns any GeneralExpression
raises NoSuchObject
is static;
fields
done : Boolean;
myExpression : GeneralExpression;
end GenExp;
|