citrus 2.2.2 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/benchmark/before.dat DELETED
@@ -1,192 +0,0 @@
1
- 12 0
2
- 30 0
3
- 35 0
4
- 1749 20
5
- 1962 20
6
- 2383 30
7
- 3728 39
8
- 3919 49
9
- 3952 99
10
- 3995 120
11
- 4063 49
12
- 4325 49
13
- 4527 109
14
- 4570 89
15
- 4607 100
16
- 4654 59
17
- 4679 80
18
- 4774 130
19
- 4968 59
20
- 5059 60
21
- 5383 90
22
- 5915 70
23
- 6109 70
24
- 6122 150
25
- 6218 190
26
- 6332 89
27
- 6681 160
28
- 7440 149
29
- 7530 100
30
- 7605 129
31
- 8155 169
32
- 8402 210
33
- 8420 160
34
- 8617 179
35
- 8635 200
36
- 8841 129
37
- 8843 159
38
- 8852 140
39
- 9151 100
40
- 9271 170
41
- 9521 200
42
- 9525 179
43
- 9566 119
44
- 9584 149
45
- 9642 119
46
- 10138 200
47
- 10181 120
48
- 10225 160
49
- 10338 149
50
- 10449 160
51
- 10629 179
52
- 10763 190
53
- 10817 200
54
- 11059 169
55
- 11062 200
56
- 11215 179
57
- 11698 179
58
- 11891 219
59
- 11945 229
60
- 11956 209
61
- 12018 219
62
- 12053 179
63
- 12178 239
64
- 12283 150
65
- 12326 239
66
- 12430 210
67
- 12438 160
68
- 12572 190
69
- 12638 250
70
- 12687 219
71
- 12703 219
72
- 12896 190
73
- 12922 239
74
- 12996 189
75
- 13137 230
76
- 13211 230
77
- 13462 230
78
- 13477 199
79
- 13576 209
80
- 13577 219
81
- 13584 279
82
- 13605 210
83
- 13631 219
84
- 14216 230
85
- 14237 240
86
- 14260 190
87
- 14367 210
88
- 14371 240
89
- 14741 269
90
- 14893 229
91
- 14910 239
92
- 14917 239
93
- 14977 260
94
- 15049 260
95
- 15191 199
96
- 15382 260
97
- 15618 230
98
- 15623 250
99
- 15629 239
100
- 15856 269
101
- 16496 300
102
- 16512 250
103
- 16956 300
104
- 17074 250
105
- 17237 259
106
- 17371 300
107
- 17568 290
108
- 17945 300
109
- 18147 270
110
- 18343 269
111
- 18417 279
112
- 18823 400
113
- 18970 280
114
- 19285 269
115
- 19333 329
116
- 19500 269
117
- 19548 299
118
- 19634 280
119
- 19673 330
120
- 19689 359
121
- 19909 300
122
- 20054 280
123
- 20107 359
124
- 20248 319
125
- 20580 320
126
- 20744 299
127
- 20806 320
128
- 20954 359
129
- 21034 299
130
- 21187 309
131
- 21303 429
132
- 21450 310
133
- 21626 340
134
- 21931 369
135
- 21950 320
136
- 22359 370
137
- 22626 339
138
- 22638 359
139
- 22772 359
140
- 22885 350
141
- 22897 339
142
- 23114 320
143
- 23242 310
144
- 23428 359
145
- 23452 359
146
- 23495 379
147
- 23499 370
148
- 23558 350
149
- 23744 380
150
- 23881 400
151
- 23945 330
152
- 24361 350
153
- 24501 370
154
- 24642 369
155
- 24672 360
156
- 24694 429
157
- 24706 359
158
- 24931 370
159
- 25065 400
160
- 25140 330
161
- 25402 349
162
- 25702 380
163
- 25743 339
164
- 27139 410
165
- 27316 449
166
- 27333 430
167
- 27414 349
168
- 27771 390
169
- 27798 399
170
- 28583 370
171
- 28906 410
172
- 29025 490
173
- 29209 399
174
- 29272 460
175
- 29273 460
176
- 29359 420
177
- 29577 459
178
- 30886 500
179
- 31170 459
180
- 31593 500
181
- 32460 510
182
- 32486 509
183
- 32630 509
184
- 33010 480
185
- 33137 510
186
- 33142 470
187
- 33739 530
188
- 39880 629
189
- 39940 619
190
- 42952 659
191
- 43227 619
192
- 52855 780
@@ -1,112 +0,0 @@
1
- grammar Calc
2
- # If "additive" were not already the first rule declared in this grammar, we
3
- # could use the following line to make it the root rule.
4
- #root additive
5
-
6
- rule additive
7
- (multitive_additive | multitive) {
8
- def value
9
- first.value
10
- end
11
- }
12
- end
13
-
14
- rule multitive_additive
15
- (multitive additive_op additive) {
16
- def value
17
- if additive_op == '+'
18
- multitive.value + additive.value
19
- else
20
- multitive.value - additive.value
21
- end
22
- end
23
- }
24
- end
25
-
26
- rule multitive
27
- (primary_multitive | primary) {
28
- def value
29
- first.value
30
- end
31
- }
32
- end
33
-
34
- rule primary_multitive
35
- (primary multitive_op multitive) {
36
- def value
37
- if multitive_op == '*'
38
- primary.value * multitive.value
39
- else
40
- primary.value / multitive.value
41
- end
42
- end
43
- }
44
- end
45
-
46
- rule primary
47
- (additive_paren | number) {
48
- def value
49
- first.value
50
- end
51
- }
52
- end
53
-
54
- rule additive_paren
55
- ('(' additive ')') {
56
- def value
57
- additive.value
58
- end
59
- }
60
- end
61
-
62
- rule additive_op
63
- (plus | minus) {
64
- def ==(other)
65
- text.strip == other
66
- end
67
- }
68
- end
69
-
70
- rule multitive_op
71
- (star | slash) {
72
- def ==(other)
73
- text.strip == other
74
- end
75
- }
76
- end
77
-
78
- rule number
79
- (float | integer) {
80
- def value
81
- first.value
82
- end
83
- }
84
- end
85
-
86
- rule float
87
- (integer '.' integer) {
88
- def value
89
- text.to_f
90
- end
91
- }
92
- end
93
-
94
- rule integer
95
- [0-9]+ {
96
- def value
97
- text.to_i
98
- end
99
- }
100
- end
101
-
102
- rule lparen '(' space end
103
- rule rparen ')' space end
104
- rule plus '+' space end
105
- rule minus '-' space end
106
- rule star '*' space end
107
- rule slash '/' space end
108
-
109
- rule space
110
- /[ \t\n\r]*/
111
- end
112
- end