blob: abe3c4f9e653c8447fc7dccc1cbb813500711a21 (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
-- File: Units_Sentence.cdl
-- Created: Mon Jun 22 17:29:32 1992
-- Author: Gilles DEBARBOUILLE
-- <gde@phobox>
---Copyright: Matra Datavision 1992
private class Sentence from Units
---Purpose: This class describes all the methods to create and
-- compute an expression contained in a string.
uses
Token from Units,
TokensSequence from Units,
Lexicon from Units
--raises
is
Create(alexicon : Lexicon from Units ; astring : CString)
---Level: Internal
---Purpose: Creates and returns a Sentence, by analyzing the
-- string <astring> with the lexicon <alexicon>.
returns Sentence from Units;
SetConstants(me : in out)
---Level: Internal
---Purpose: For each constant encountered, sets the value.
is static;
Sequence(me) returns any TokensSequence from Units
---Level: Internal
---C++: inline
---Purpose: Returns <thesequenceoftokens>.
is static;
Sequence(me : in out ; asequenceoftokens : any TokensSequence from Units)
---Level: Internal
---C++: inline
---Purpose: Sets the field <thesequenceoftokens> to <asequenceoftokens>.
is static;
Evaluate(me : in out)returns mutable Token from Units
---Level: Internal
---Purpose: Computes and returns in a token the result of the
-- expression.
is static;
IsDone(me) returns Boolean from Standard
---Level: Internal
---C++: inline
---Purpose: Return True if number of created tokens > 0
-- (i.e creation of sentence is succesfull)
is static;
Dump(me)
---Level: Internal
---C++: inline
---Purpose: Useful for debugging.
is static;
fields
thesequenceoftokens : TokensSequence from Units;
end Sentence;
|