dbc 1.1.0 → 1.1.1
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/bin/dbcparse.rb +14 -16
- data/lib/dbc/ctype.rb +779 -744
- data/lib/dbc/define.rb +2 -2
- data/lib/dbc/ocl.rb +2 -2
- data/lib/dbc/parameters.rb +107 -81
- data/lib/dbc/preprocessor.rb +5 -4
- metadata +3 -3
data/lib/dbc/define.rb
CHANGED
@@ -16,7 +16,7 @@ module Preprocessor
|
|
16
16
|
|
17
17
|
class Define < Racc::Parser
|
18
18
|
|
19
|
-
module_eval <<'..end src/define.y modeval..
|
19
|
+
module_eval <<'..end src/define.y modeval..idb7d5e99f61', 'src/define.y', 75
|
20
20
|
|
21
21
|
def initialize(params, tokens)
|
22
22
|
if params and not params.class == Parameters
|
@@ -89,7 +89,7 @@ protected
|
|
89
89
|
@q.shift
|
90
90
|
end
|
91
91
|
|
92
|
-
..end src/define.y modeval..
|
92
|
+
..end src/define.y modeval..idb7d5e99f61
|
93
93
|
|
94
94
|
##### racc 1.4.4 generates ###
|
95
95
|
|
data/lib/dbc/ocl.rb
CHANGED
@@ -413,7 +413,7 @@ module OCL
|
|
413
413
|
|
414
414
|
class Parser < Racc::Parser
|
415
415
|
|
416
|
-
module_eval <<'..end src/ocl.y modeval..
|
416
|
+
module_eval <<'..end src/ocl.y modeval..id75b06ff026', 'src/ocl.y', 849
|
417
417
|
|
418
418
|
def Parser.reserved_word?(str)
|
419
419
|
(str =~ /\A(?:context|forall|exists|in|and|or|implies|not|xor)\Z/o) != nil
|
@@ -509,7 +509,7 @@ protected
|
|
509
509
|
t
|
510
510
|
end
|
511
511
|
|
512
|
-
..end src/ocl.y modeval..
|
512
|
+
..end src/ocl.y modeval..id75b06ff026
|
513
513
|
|
514
514
|
##### racc 1.4.4 generates ###
|
515
515
|
|
data/lib/dbc/parameters.rb
CHANGED
@@ -72,7 +72,7 @@ module Preprocessor
|
|
72
72
|
|
73
73
|
class ArgumentParser < Racc::Parser
|
74
74
|
|
75
|
-
module_eval <<'..end src/parameters.y modeval..
|
75
|
+
module_eval <<'..end src/parameters.y modeval..id315b0f7ad9', 'src/parameters.y', 144
|
76
76
|
|
77
77
|
def ArgumentParser.parse(tokens)
|
78
78
|
self.new.parse(tokens)
|
@@ -103,7 +103,7 @@ protected
|
|
103
103
|
end # case
|
104
104
|
end
|
105
105
|
|
106
|
-
..end src/parameters.y modeval..
|
106
|
+
..end src/parameters.y modeval..id315b0f7ad9
|
107
107
|
|
108
108
|
##### racc 1.4.4 generates ###
|
109
109
|
|
@@ -118,83 +118,88 @@ racc_reduce_table = [
|
|
118
118
|
1, 15, :_reduce_none,
|
119
119
|
2, 15, :_reduce_8,
|
120
120
|
1, 14, :_reduce_9,
|
121
|
-
|
121
|
+
2, 14, :_reduce_10,
|
122
|
+
1, 14, :_reduce_11,
|
123
|
+
3, 14, :_reduce_12,
|
124
|
+
2, 14, :_reduce_13,
|
122
125
|
1, 17, :_reduce_none,
|
123
|
-
2, 17, :
|
126
|
+
2, 17, :_reduce_15,
|
124
127
|
1, 18, :_reduce_none,
|
125
128
|
1, 18, :_reduce_none,
|
126
|
-
2, 20, :
|
127
|
-
2, 20, :
|
128
|
-
3, 20, :
|
129
|
-
3, 20, :
|
129
|
+
2, 20, :_reduce_18,
|
130
|
+
2, 20, :_reduce_19,
|
131
|
+
3, 20, :_reduce_20,
|
132
|
+
3, 20, :_reduce_21,
|
130
133
|
1, 21, :_reduce_none,
|
131
|
-
2, 21, :
|
134
|
+
2, 21, :_reduce_23,
|
132
135
|
1, 22, :_reduce_none,
|
133
136
|
1, 22, :_reduce_none,
|
134
137
|
1, 22, :_reduce_none,
|
135
138
|
1, 19, :_reduce_none,
|
136
|
-
1, 19, :
|
139
|
+
1, 19, :_reduce_28,
|
137
140
|
1, 16, :_reduce_none,
|
138
141
|
1, 16, :_reduce_none,
|
139
142
|
1, 16, :_reduce_none ]
|
140
143
|
|
141
|
-
racc_reduce_n =
|
144
|
+
racc_reduce_n = 32
|
142
145
|
|
143
|
-
racc_shift_n =
|
146
|
+
racc_shift_n = 43
|
144
147
|
|
145
148
|
racc_action_table = [
|
146
|
-
12, 3, 4, 6, 15, 9,
|
147
|
-
3, 4, 6, 15,
|
148
|
-
4, 6, 15, 25,
|
149
|
-
15, 18,
|
150
|
-
|
151
|
-
12, 3, 4, 6, 15,
|
152
|
-
4, 6, 15,
|
153
|
-
15,
|
154
|
-
6,
|
149
|
+
12, 3, 4, 6, 15, 9, 31, 21, 42, 12,
|
150
|
+
3, 4, 6, 15, 23, 31, 21, 37, 12, 3,
|
151
|
+
4, 6, 15, 25, 20, 21, 12, 3, 4, 6,
|
152
|
+
15, 18, 20, 21, 12, 3, 4, 6, 15, 41,
|
153
|
+
31, 21, 12, 3, 4, 6, 15, 38, 27, 21,
|
154
|
+
12, 3, 4, 6, 15, 26, 27, 21, 12, 3,
|
155
|
+
4, 6, 15, 29, 31, 21, 12, 3, 4, 6,
|
156
|
+
15, nil, nil, 21, 12, 3, 4, 6, 15, nil,
|
157
|
+
nil, 21, 12, 3, 4, 6, 15, nil, nil, 21,
|
158
|
+
3, 4, 6, 8, 3, 4, 6, 11 ]
|
155
159
|
|
156
160
|
racc_action_check = [
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
8, 8,
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
161
|
+
36, 36, 36, 36, 36, 1, 36, 36, 36, 21,
|
162
|
+
21, 21, 21, 21, 9, 21, 21, 21, 11, 11,
|
163
|
+
11, 11, 11, 11, 11, 11, 8, 8, 8, 8,
|
164
|
+
8, 8, 8, 8, 33, 33, 33, 33, 33, 33,
|
165
|
+
33, 33, 35, 35, 35, 35, 35, 24, 24, 35,
|
166
|
+
27, 27, 27, 27, 27, 13, 13, 27, 15, 15,
|
167
|
+
15, 15, 15, 15, 15, 15, 39, 39, 39, 39,
|
168
|
+
39, nil, nil, 39, 20, 20, 20, 20, 20, nil,
|
169
|
+
nil, 20, 16, 16, 16, 16, 16, nil, nil, 16,
|
170
|
+
0, 0, 0, 0, 5, 5, 5, 5 ]
|
166
171
|
|
167
172
|
racc_action_pointer = [
|
168
|
-
|
169
|
-
nil,
|
170
|
-
7, nil, nil,
|
171
|
-
nil, nil, 32, nil, -2, nil, nil,
|
172
|
-
nil ]
|
173
|
+
87, 5, nil, nil, nil, 91, nil, nil, 24, 14,
|
174
|
+
nil, 16, nil, 48, nil, 56, 80, nil, nil, nil,
|
175
|
+
72, 7, nil, nil, 40, nil, nil, 48, nil, nil,
|
176
|
+
nil, nil, nil, 32, nil, 40, -2, nil, nil, 64,
|
177
|
+
nil, nil, nil ]
|
173
178
|
|
174
179
|
racc_action_default = [
|
175
|
-
-1, -
|
176
|
-
-8, -
|
177
|
-
-
|
178
|
-
-
|
179
|
-
-
|
180
|
+
-1, -32, -2, -29, -30, -32, -31, -7, -32, -32,
|
181
|
+
-8, -32, -27, -32, -28, -32, -9, -14, -5, -16,
|
182
|
+
-11, -32, -17, 43, -32, -6, -3, -13, -22, -18,
|
183
|
+
-25, -24, -26, -32, -15, -10, -32, -19, -4, -12,
|
184
|
+
-23, -20, -21 ]
|
180
185
|
|
181
186
|
racc_goto_table = [
|
182
|
-
|
183
|
-
|
184
|
-
|
187
|
+
34, 35, 7, 30, 32, 33, 5, 10, 39, 30,
|
188
|
+
32, 36, 13, 40, 2, 24, 40, 1, nil, 34,
|
189
|
+
nil, 30, 32, 34, 30, 32 ]
|
185
190
|
|
186
191
|
racc_goto_check = [
|
187
|
-
7,
|
188
|
-
9,
|
189
|
-
8, 7,
|
192
|
+
7, 6, 5, 8, 9, 10, 4, 5, 6, 8,
|
193
|
+
9, 10, 3, 11, 2, 3, 11, 1, nil, 7,
|
194
|
+
nil, 8, 9, 7, 8, 9 ]
|
190
195
|
|
191
196
|
racc_goto_pointer = [
|
192
|
-
nil,
|
193
|
-
-
|
197
|
+
nil, 17, 14, 4, 6, 2, -19, -16, -12, -11,
|
198
|
+
-10, -20 ]
|
194
199
|
|
195
200
|
racc_goto_default = [
|
196
|
-
nil, nil, nil, nil, nil, 14, 16, 17, 19,
|
197
|
-
nil,
|
201
|
+
nil, nil, nil, nil, nil, 14, 16, 17, 19, 22,
|
202
|
+
nil, 28 ]
|
198
203
|
|
199
204
|
racc_token_table = {
|
200
205
|
false => 0,
|
@@ -283,113 +288,134 @@ module_eval <<'.,.,', 'src/parameters.y', 18
|
|
283
288
|
end
|
284
289
|
.,.,
|
285
290
|
|
286
|
-
module_eval <<'.,.,', 'src/parameters.y',
|
291
|
+
module_eval <<'.,.,', 'src/parameters.y', 20
|
287
292
|
def _reduce_5( val, _values, result )
|
288
|
-
result = []
|
293
|
+
result = ['']
|
289
294
|
result
|
290
295
|
end
|
291
296
|
.,.,
|
292
297
|
|
293
|
-
module_eval <<'.,.,', 'src/parameters.y',
|
298
|
+
module_eval <<'.,.,', 'src/parameters.y', 21
|
294
299
|
def _reduce_6( val, _values, result )
|
295
|
-
result = []
|
300
|
+
result = ['']
|
296
301
|
result
|
297
302
|
end
|
298
303
|
.,.,
|
299
304
|
|
300
305
|
# reduce 7 omitted
|
301
306
|
|
302
|
-
module_eval <<'.,.,', 'src/parameters.y',
|
307
|
+
module_eval <<'.,.,', 'src/parameters.y', 26
|
303
308
|
def _reduce_8( val, _values, result )
|
304
309
|
result = val[0,2].join
|
305
310
|
result
|
306
311
|
end
|
307
312
|
.,.,
|
308
313
|
|
309
|
-
module_eval <<'.,.,', 'src/parameters.y',
|
314
|
+
module_eval <<'.,.,', 'src/parameters.y', 30
|
310
315
|
def _reduce_9( val, _values, result )
|
311
316
|
result = val[0,1]
|
312
317
|
result
|
313
318
|
end
|
314
319
|
.,.,
|
315
320
|
|
316
|
-
module_eval <<'.,.,', 'src/parameters.y',
|
321
|
+
module_eval <<'.,.,', 'src/parameters.y', 31
|
317
322
|
def _reduce_10( val, _values, result )
|
318
|
-
result =
|
323
|
+
result = ['', val[1]]
|
319
324
|
result
|
320
325
|
end
|
321
326
|
.,.,
|
322
327
|
|
323
|
-
|
328
|
+
module_eval <<'.,.,', 'src/parameters.y', 32
|
329
|
+
def _reduce_11( val, _values, result )
|
330
|
+
result = ['']
|
331
|
+
result
|
332
|
+
end
|
333
|
+
.,.,
|
324
334
|
|
325
|
-
module_eval <<'.,.,', 'src/parameters.y',
|
335
|
+
module_eval <<'.,.,', 'src/parameters.y', 33
|
326
336
|
def _reduce_12( val, _values, result )
|
327
|
-
result = val[0
|
337
|
+
result = val[0] << val[2]
|
328
338
|
result
|
329
339
|
end
|
330
340
|
.,.,
|
331
341
|
|
332
|
-
|
342
|
+
module_eval <<'.,.,', 'src/parameters.y', 34
|
343
|
+
def _reduce_13( val, _values, result )
|
344
|
+
result = result = val[0] << ''
|
345
|
+
result
|
346
|
+
end
|
347
|
+
.,.,
|
333
348
|
|
334
349
|
# reduce 14 omitted
|
335
350
|
|
336
|
-
module_eval <<'.,.,', 'src/parameters.y',
|
351
|
+
module_eval <<'.,.,', 'src/parameters.y', 39
|
337
352
|
def _reduce_15( val, _values, result )
|
338
353
|
result = val[0,2].join
|
339
354
|
result
|
340
355
|
end
|
341
356
|
.,.,
|
342
357
|
|
343
|
-
|
344
|
-
|
358
|
+
# reduce 16 omitted
|
359
|
+
|
360
|
+
# reduce 17 omitted
|
361
|
+
|
362
|
+
module_eval <<'.,.,', 'src/parameters.y', 48
|
363
|
+
def _reduce_18( val, _values, result )
|
364
|
+
result = val[0,2].join
|
365
|
+
result
|
366
|
+
end
|
367
|
+
.,.,
|
368
|
+
|
369
|
+
module_eval <<'.,.,', 'src/parameters.y', 49
|
370
|
+
def _reduce_19( val, _values, result )
|
345
371
|
result = val[0,2].join
|
346
372
|
result
|
347
373
|
end
|
348
374
|
.,.,
|
349
375
|
|
350
|
-
module_eval <<'.,.,', 'src/parameters.y',
|
351
|
-
def
|
376
|
+
module_eval <<'.,.,', 'src/parameters.y', 50
|
377
|
+
def _reduce_20( val, _values, result )
|
352
378
|
result = val[0,3].join
|
353
379
|
result
|
354
380
|
end
|
355
381
|
.,.,
|
356
382
|
|
357
|
-
module_eval <<'.,.,', 'src/parameters.y',
|
358
|
-
def
|
383
|
+
module_eval <<'.,.,', 'src/parameters.y', 51
|
384
|
+
def _reduce_21( val, _values, result )
|
359
385
|
result = val[0,3].join
|
360
386
|
result
|
361
387
|
end
|
362
388
|
.,.,
|
363
389
|
|
364
|
-
# reduce
|
390
|
+
# reduce 22 omitted
|
365
391
|
|
366
|
-
module_eval <<'.,.,', 'src/parameters.y',
|
367
|
-
def
|
392
|
+
module_eval <<'.,.,', 'src/parameters.y', 56
|
393
|
+
def _reduce_23( val, _values, result )
|
368
394
|
result = val[0,2].join
|
369
395
|
result
|
370
396
|
end
|
371
397
|
.,.,
|
372
398
|
|
373
|
-
# reduce
|
399
|
+
# reduce 24 omitted
|
374
400
|
|
375
|
-
# reduce
|
401
|
+
# reduce 25 omitted
|
376
402
|
|
377
|
-
# reduce
|
403
|
+
# reduce 26 omitted
|
378
404
|
|
379
|
-
# reduce
|
405
|
+
# reduce 27 omitted
|
380
406
|
|
381
|
-
module_eval <<'.,.,', 'src/parameters.y',
|
382
|
-
def
|
407
|
+
module_eval <<'.,.,', 'src/parameters.y', 70
|
408
|
+
def _reduce_28( val, _values, result )
|
383
409
|
result = ' '
|
384
410
|
result
|
385
411
|
end
|
386
412
|
.,.,
|
387
413
|
|
388
|
-
# reduce
|
414
|
+
# reduce 29 omitted
|
389
415
|
|
390
|
-
# reduce
|
416
|
+
# reduce 30 omitted
|
391
417
|
|
392
|
-
# reduce
|
418
|
+
# reduce 31 omitted
|
393
419
|
|
394
420
|
def _reduce_none( val, _values, result )
|
395
421
|
result
|
data/lib/dbc/preprocessor.rb
CHANGED
@@ -226,7 +226,8 @@ protected
|
|
226
226
|
@cond_comp.pop
|
227
227
|
end # case
|
228
228
|
end #if
|
229
|
-
CTokenizer.create_newlines(start, self.line)
|
229
|
+
#CTokenizer.create_newlines(start, self.line)
|
230
|
+
[:SPACE, ''].freeze
|
230
231
|
end
|
231
232
|
end # Parser
|
232
233
|
|
@@ -237,7 +238,7 @@ module Preprocessor
|
|
237
238
|
|
238
239
|
class StatementParser < Racc::Parser
|
239
240
|
|
240
|
-
module_eval <<'..end src/preprocessor.y modeval..
|
241
|
+
module_eval <<'..end src/preprocessor.y modeval..id0dc8e10bd3', 'src/preprocessor.y', 606
|
241
242
|
|
242
243
|
include Resolve
|
243
244
|
|
@@ -259,7 +260,7 @@ module_eval <<'..end src/preprocessor.y modeval..id1cfa2334fc', 'src/preprocesso
|
|
259
260
|
begin
|
260
261
|
do_parse
|
261
262
|
rescue ParseError
|
262
|
-
@
|
263
|
+
@source.error($!)
|
263
264
|
end
|
264
265
|
end
|
265
266
|
|
@@ -307,7 +308,7 @@ protected
|
|
307
308
|
CTokenizer::CPLexer.convert_token(t)
|
308
309
|
end
|
309
310
|
|
310
|
-
..end src/preprocessor.y modeval..
|
311
|
+
..end src/preprocessor.y modeval..id0dc8e10bd3
|
311
312
|
|
312
313
|
##### racc 1.4.4 generates ###
|
313
314
|
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.1
|
|
3
3
|
specification_version: 1
|
4
4
|
name: dbc
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.1.
|
7
|
-
date: 2004-
|
6
|
+
version: 1.1.1
|
7
|
+
date: 2004-11-01
|
8
8
|
summary: Design by Contract (DBC) for C
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -14,7 +14,7 @@ email: cmills@freeshell.org
|
|
14
14
|
homepage: http://dbc.rubyforge.org
|
15
15
|
rubyforge_project: dbc
|
16
16
|
description:
|
17
|
-
autorequire:
|
17
|
+
autorequire:
|
18
18
|
default_executable: dbcparse.rb
|
19
19
|
bindir: bin
|
20
20
|
has_rdoc: false
|