dbc 1.3.0 → 2.0.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/bin/caphir.rb +152 -0
- data/bin/dbcparse.rb +139 -285
- data/lib/{dbc → caphir}/ctokenizer.rb +48 -41
- data/lib/caphir/ctype.rb +2640 -0
- data/lib/caphir/define.rb +488 -0
- data/lib/{dbc → caphir}/parseerrorhandler.rb +0 -0
- data/lib/caphir/parser.rb +125 -0
- data/lib/caphir/parsersettings.rb +175 -0
- data/lib/caphir/preprocessor.rb +2173 -0
- data/lib/caphir/preprocessor_conf.rb +153 -0
- data/lib/{dbc → caphir}/searchpath.rb +0 -0
- data/lib/dbc/dbc.rb +65 -129
- data/lib/dbc/expand_function.rb +43 -46
- data/lib/dbc/ocl.rb +600 -577
- metadata +13 -9
- data/lib/dbc/ctype.rb +0 -2569
- data/lib/dbc/define.rb +0 -282
- data/lib/dbc/parameters.rb +0 -434
- data/lib/dbc/preprocessor.rb +0 -2078
data/lib/dbc/define.rb
DELETED
@@ -1,282 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# DO NOT MODIFY!!!!
|
3
|
-
# This file is automatically generated by racc 1.4.4
|
4
|
-
# from racc grammer file "src/define.y".
|
5
|
-
#
|
6
|
-
|
7
|
-
require 'racc/parser'
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
require 'dbc/parameters'
|
12
|
-
require 'dbc/parseerrorhandler'
|
13
|
-
|
14
|
-
|
15
|
-
module Preprocessor
|
16
|
-
|
17
|
-
class Define < Racc::Parser
|
18
|
-
|
19
|
-
module_eval <<'..end src/define.y modeval..idcc3778cf05', 'src/define.y', 74
|
20
|
-
|
21
|
-
include ParseErrorHandler
|
22
|
-
|
23
|
-
tmp = '#'.freeze
|
24
|
-
STRINGIFY_TOKEN = [tmp, tmp].freeze
|
25
|
-
tmp = '##'.freeze
|
26
|
-
PASTE_TOKEN = [tmp, tmp].freeze
|
27
|
-
|
28
|
-
def initialize(params, tokens)
|
29
|
-
if params and not params.class == Parameters
|
30
|
-
@params = Parameters.new
|
31
|
-
params.each { |p| @params << p }
|
32
|
-
else
|
33
|
-
@params = params
|
34
|
-
end
|
35
|
-
scanner = CTokenizer::Lexer.new(tokens.to_s)
|
36
|
-
@value = []
|
37
|
-
until scanner.empty?
|
38
|
-
# this works because all spaces, comments and newlines were
|
39
|
-
# replaced by a single space by the preprocessor
|
40
|
-
@value.push( \
|
41
|
-
if scanner.scan(/[ \t]*##[ \t]*/)
|
42
|
-
PASTE_TOKEN
|
43
|
-
elsif scanner.scan(/#[ \t]*/)
|
44
|
-
STRINGIFY_TOKEN
|
45
|
-
else
|
46
|
-
scanner.shift
|
47
|
-
end ) # if
|
48
|
-
end # until
|
49
|
-
@value.push(CTokenizer::EOF_TOKEN)
|
50
|
-
end
|
51
|
-
|
52
|
-
def takes_args?
|
53
|
-
@params != nil and not @params.empty?
|
54
|
-
end
|
55
|
-
|
56
|
-
# get the value of the macro
|
57
|
-
# 1) substitute macro function parameters if any
|
58
|
-
# note function parameters should NOT be resolved
|
59
|
-
# 2) stringify macro function parameters
|
60
|
-
# 3) concat tokens using ## operator
|
61
|
-
# 4) (happens after call to tokens) repeat 1) for each identifier
|
62
|
-
def value(stack)
|
63
|
-
@pos = 0
|
64
|
-
if takes_args?
|
65
|
-
args = @params.arguments(stack, :PARAMETER)
|
66
|
-
tokens = @value.collect do |t|
|
67
|
-
if t.at(0) == :IDENTIFIER and idx = @params.index(t.at(1))
|
68
|
-
args.at(idx)
|
69
|
-
else
|
70
|
-
t
|
71
|
-
end
|
72
|
-
end
|
73
|
-
yyparse(tokens, :each)
|
74
|
-
else
|
75
|
-
yyparse(@value, :each)
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
..end src/define.y modeval..idcc3778cf05
|
80
|
-
|
81
|
-
##### racc 1.4.4 generates ###
|
82
|
-
|
83
|
-
racc_reduce_table = [
|
84
|
-
0, 0, :racc_error,
|
85
|
-
1, 14, :_reduce_none,
|
86
|
-
1, 14, :_reduce_none,
|
87
|
-
0, 16, :_reduce_3,
|
88
|
-
1, 15, :_reduce_4,
|
89
|
-
2, 15, :_reduce_5,
|
90
|
-
1, 17, :_reduce_none,
|
91
|
-
1, 17, :_reduce_none,
|
92
|
-
1, 17, :_reduce_none,
|
93
|
-
1, 18, :_reduce_none,
|
94
|
-
3, 18, :_reduce_10,
|
95
|
-
1, 21, :_reduce_none,
|
96
|
-
1, 21, :_reduce_none,
|
97
|
-
1, 21, :_reduce_none,
|
98
|
-
1, 21, :_reduce_none,
|
99
|
-
1, 21, :_reduce_none,
|
100
|
-
1, 21, :_reduce_none,
|
101
|
-
1, 21, :_reduce_none,
|
102
|
-
1, 21, :_reduce_none,
|
103
|
-
2, 20, :_reduce_19,
|
104
|
-
1, 22, :_reduce_none,
|
105
|
-
1, 19, :_reduce_none ]
|
106
|
-
|
107
|
-
racc_reduce_n = 22
|
108
|
-
|
109
|
-
racc_shift_n = 26
|
110
|
-
|
111
|
-
racc_action_table = [
|
112
|
-
3, 5, 7, 9, 11, 13, 15, 17, 22, 2,
|
113
|
-
3, 5, 7, 9, 11, 13, 15, 17, 17, 2,
|
114
|
-
5, 7, 9, 11, 13, 15, 17, 23, 24, 20 ]
|
115
|
-
|
116
|
-
racc_action_check = [
|
117
|
-
0, 0, 0, 0, 0, 0, 0, 0, 12, 0,
|
118
|
-
6, 6, 6, 6, 6, 6, 6, 6, 2, 6,
|
119
|
-
22, 22, 22, 22, 22, 22, 22, 20, 22, 4 ]
|
120
|
-
|
121
|
-
racc_action_pointer = [
|
122
|
-
-3, nil, 8, nil, 29, nil, 7, nil, nil, nil,
|
123
|
-
nil, nil, -3, nil, nil, nil, nil, nil, nil, nil,
|
124
|
-
27, nil, 16, nil, nil, nil ]
|
125
|
-
|
126
|
-
racc_action_default = [
|
127
|
-
-3, -17, -18, -21, -22, -11, -1, -16, -2, -12,
|
128
|
-
-4, -13, -6, -14, -7, -15, -8, -20, -9, -19,
|
129
|
-
-22, -5, -22, 26, -18, -10 ]
|
130
|
-
|
131
|
-
racc_goto_table = [
|
132
|
-
10, 4, 8, 6, 25, 19, 21 ]
|
133
|
-
|
134
|
-
racc_goto_check = [
|
135
|
-
4, 1, 3, 2, 8, 9, 4 ]
|
136
|
-
|
137
|
-
racc_goto_pointer = [
|
138
|
-
nil, 1, 3, 2, 0, nil, nil, nil, -18, 3 ]
|
139
|
-
|
140
|
-
racc_goto_default = [
|
141
|
-
nil, nil, nil, nil, nil, 12, 14, 16, 18, 1 ]
|
142
|
-
|
143
|
-
racc_token_table = {
|
144
|
-
false => 0,
|
145
|
-
Object.new => 1,
|
146
|
-
:STRINGIFY => 2,
|
147
|
-
:SPACE => 3,
|
148
|
-
:SYMBOL => 4,
|
149
|
-
:UNKNOWN => 5,
|
150
|
-
:CHARACTER => 6,
|
151
|
-
:STRING => 7,
|
152
|
-
:CONSTANT => 8,
|
153
|
-
:IDENTIFIER => 9,
|
154
|
-
:PARAMETER => 10,
|
155
|
-
"##" => 11,
|
156
|
-
"#" => 12 }
|
157
|
-
|
158
|
-
racc_use_result_var = true
|
159
|
-
|
160
|
-
racc_nt_base = 13
|
161
|
-
|
162
|
-
Racc_arg = [
|
163
|
-
racc_action_table,
|
164
|
-
racc_action_check,
|
165
|
-
racc_action_default,
|
166
|
-
racc_action_pointer,
|
167
|
-
racc_goto_table,
|
168
|
-
racc_goto_check,
|
169
|
-
racc_goto_default,
|
170
|
-
racc_goto_pointer,
|
171
|
-
racc_nt_base,
|
172
|
-
racc_reduce_table,
|
173
|
-
racc_token_table,
|
174
|
-
racc_shift_n,
|
175
|
-
racc_reduce_n,
|
176
|
-
racc_use_result_var ]
|
177
|
-
|
178
|
-
Racc_token_to_s_table = [
|
179
|
-
'$end',
|
180
|
-
'error',
|
181
|
-
'STRINGIFY',
|
182
|
-
'SPACE',
|
183
|
-
'SYMBOL',
|
184
|
-
'UNKNOWN',
|
185
|
-
'CHARACTER',
|
186
|
-
'STRING',
|
187
|
-
'CONSTANT',
|
188
|
-
'IDENTIFIER',
|
189
|
-
'PARAMETER',
|
190
|
-
'"##"',
|
191
|
-
'"#"',
|
192
|
-
'$start',
|
193
|
-
'target',
|
194
|
-
'token_sequence',
|
195
|
-
'empty_target',
|
196
|
-
'token',
|
197
|
-
'token_expression',
|
198
|
-
'white_space',
|
199
|
-
'stringify_parameter',
|
200
|
-
'basic_token',
|
201
|
-
'parameter']
|
202
|
-
|
203
|
-
Racc_debug_parser = false
|
204
|
-
|
205
|
-
##### racc system variables end #####
|
206
|
-
|
207
|
-
# reduce 0 omitted
|
208
|
-
|
209
|
-
# reduce 1 omitted
|
210
|
-
|
211
|
-
# reduce 2 omitted
|
212
|
-
|
213
|
-
module_eval <<'.,.,', 'src/define.y', 23
|
214
|
-
def _reduce_3( val, _values, result )
|
215
|
-
result = ''
|
216
|
-
result
|
217
|
-
end
|
218
|
-
.,.,
|
219
|
-
|
220
|
-
module_eval <<'.,.,', 'src/define.y', 27
|
221
|
-
def _reduce_4( val, _values, result )
|
222
|
-
result = val[0].dup
|
223
|
-
result
|
224
|
-
end
|
225
|
-
.,.,
|
226
|
-
|
227
|
-
module_eval <<'.,.,', 'src/define.y', 28
|
228
|
-
def _reduce_5( val, _values, result )
|
229
|
-
result = val[0] << val[1]
|
230
|
-
result
|
231
|
-
end
|
232
|
-
.,.,
|
233
|
-
|
234
|
-
# reduce 6 omitted
|
235
|
-
|
236
|
-
# reduce 7 omitted
|
237
|
-
|
238
|
-
# reduce 8 omitted
|
239
|
-
|
240
|
-
# reduce 9 omitted
|
241
|
-
|
242
|
-
module_eval <<'.,.,', 'src/define.y', 39
|
243
|
-
def _reduce_10( val, _values, result )
|
244
|
-
result = val[0] + val[2]
|
245
|
-
result
|
246
|
-
end
|
247
|
-
.,.,
|
248
|
-
|
249
|
-
# reduce 11 omitted
|
250
|
-
|
251
|
-
# reduce 12 omitted
|
252
|
-
|
253
|
-
# reduce 13 omitted
|
254
|
-
|
255
|
-
# reduce 14 omitted
|
256
|
-
|
257
|
-
# reduce 15 omitted
|
258
|
-
|
259
|
-
# reduce 16 omitted
|
260
|
-
|
261
|
-
# reduce 17 omitted
|
262
|
-
|
263
|
-
# reduce 18 omitted
|
264
|
-
|
265
|
-
module_eval <<'.,.,', 'src/define.y', 55
|
266
|
-
def _reduce_19( val, _values, result )
|
267
|
-
result = "\"#{val[1]}\""
|
268
|
-
result
|
269
|
-
end
|
270
|
-
.,.,
|
271
|
-
|
272
|
-
# reduce 20 omitted
|
273
|
-
|
274
|
-
# reduce 21 omitted
|
275
|
-
|
276
|
-
def _reduce_none( val, _values, result )
|
277
|
-
result
|
278
|
-
end
|
279
|
-
|
280
|
-
end # class Define
|
281
|
-
|
282
|
-
end # module Preprocessor
|
data/lib/dbc/parameters.rb
DELETED
@@ -1,434 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# DO NOT MODIFY!!!!
|
3
|
-
# This file is automatically generated by racc 1.4.4
|
4
|
-
# from racc grammer file "src/parameters.y".
|
5
|
-
#
|
6
|
-
|
7
|
-
require 'racc/parser'
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
require 'dbc/parseerrorhandler'
|
12
|
-
|
13
|
-
module Preprocessor
|
14
|
-
|
15
|
-
class Parameters < Array
|
16
|
-
VA_ARGS = '__VA_ARGS__'.freeze
|
17
|
-
ELLIPSIS = '...'.freeze
|
18
|
-
|
19
|
-
def initialize
|
20
|
-
super
|
21
|
-
@ellipses = nil
|
22
|
-
end
|
23
|
-
|
24
|
-
def with_ellipses(arg=nil)
|
25
|
-
raise "already has ellipses: #{self}" if ellipses?
|
26
|
-
if arg and arg != ELLIPSIS
|
27
|
-
self << arg
|
28
|
-
@ellipses = arg + ELLIPSIS # if arg is 'i' then 'i...'
|
29
|
-
else
|
30
|
-
self << VA_ARGS
|
31
|
-
@ellipses = ELLIPSIS
|
32
|
-
end
|
33
|
-
self
|
34
|
-
end
|
35
|
-
|
36
|
-
def ellipses?
|
37
|
-
@ellipses
|
38
|
-
end
|
39
|
-
|
40
|
-
def to_s
|
41
|
-
if ellipses?
|
42
|
-
self[0, self.length - 1] << @ellipses
|
43
|
-
else
|
44
|
-
self
|
45
|
-
end.join(',')
|
46
|
-
end
|
47
|
-
|
48
|
-
def inspect
|
49
|
-
"\#<#{self.class}:#{self.to_s}>"
|
50
|
-
end
|
51
|
-
|
52
|
-
def arguments(tokens, t_sym)
|
53
|
-
args = Preprocessor::ArgumentParser.parse(tokens)
|
54
|
-
if args.length < self.length
|
55
|
-
expected = self.length
|
56
|
-
got = args.length
|
57
|
-
tokens.error("wrong number of arguments (#{got} for #{expected})") unless ellipses?
|
58
|
-
expected -= 1 # the variable argument list can be blank
|
59
|
-
tokens.error("wrong number of arguments (#{got} for #{expected}+)") \
|
60
|
-
unless got == expected
|
61
|
-
args[expected] = '' # last arg is blank
|
62
|
-
elsif args.length > self.length
|
63
|
-
#tokens.warning("extra arguments given for macro") unless self.ellipses?
|
64
|
-
args[self.length - 1] = args[self.length..-1].join(',')
|
65
|
-
end
|
66
|
-
args.collect do |a|
|
67
|
-
a.strip! # remove leading/trailing whitespace
|
68
|
-
[t_sym, a.freeze].freeze
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
end # Parameters
|
73
|
-
|
74
|
-
end # Preprocessor
|
75
|
-
|
76
|
-
|
77
|
-
module Preprocessor
|
78
|
-
|
79
|
-
class ArgumentParser < Racc::Parser
|
80
|
-
|
81
|
-
module_eval <<'..end src/parameters.y modeval..id3684a7940b', 'src/parameters.y', 150
|
82
|
-
|
83
|
-
def ArgumentParser.parse(tokens)
|
84
|
-
self.new.parse(tokens)
|
85
|
-
end
|
86
|
-
|
87
|
-
def parse(tokens)
|
88
|
-
@q = tokens
|
89
|
-
do_parse
|
90
|
-
end
|
91
|
-
|
92
|
-
protected
|
93
|
-
|
94
|
-
include ParseErrorHandler
|
95
|
-
|
96
|
-
RESERVED = {}
|
97
|
-
['(', ')', '{', '}', ','].each do |t|
|
98
|
-
t.freeze
|
99
|
-
RESERVED[t] = [t, t].freeze
|
100
|
-
end
|
101
|
-
RESERVED.freeze
|
102
|
-
|
103
|
-
def next_token
|
104
|
-
t = @q.shift
|
105
|
-
case t.at(0)
|
106
|
-
when :SPACE, :NEWLINE, :COMMENT
|
107
|
-
t
|
108
|
-
else
|
109
|
-
# everything else is just a TOKEN
|
110
|
-
RESERVED.fetch(t.at(1)) { |str| [:TOKEN, str].freeze }
|
111
|
-
end # case
|
112
|
-
end
|
113
|
-
|
114
|
-
..end src/parameters.y modeval..id3684a7940b
|
115
|
-
|
116
|
-
##### racc 1.4.4 generates ###
|
117
|
-
|
118
|
-
racc_reduce_table = [
|
119
|
-
0, 0, :racc_error,
|
120
|
-
0, 12, :_reduce_none,
|
121
|
-
1, 12, :_reduce_2,
|
122
|
-
3, 13, :_reduce_3,
|
123
|
-
4, 13, :_reduce_4,
|
124
|
-
2, 13, :_reduce_5,
|
125
|
-
3, 13, :_reduce_6,
|
126
|
-
1, 15, :_reduce_none,
|
127
|
-
2, 15, :_reduce_8,
|
128
|
-
1, 14, :_reduce_9,
|
129
|
-
2, 14, :_reduce_10,
|
130
|
-
1, 14, :_reduce_11,
|
131
|
-
3, 14, :_reduce_12,
|
132
|
-
2, 14, :_reduce_13,
|
133
|
-
1, 17, :_reduce_none,
|
134
|
-
2, 17, :_reduce_15,
|
135
|
-
1, 18, :_reduce_none,
|
136
|
-
1, 18, :_reduce_none,
|
137
|
-
2, 20, :_reduce_18,
|
138
|
-
2, 20, :_reduce_19,
|
139
|
-
3, 20, :_reduce_20,
|
140
|
-
3, 20, :_reduce_21,
|
141
|
-
1, 21, :_reduce_none,
|
142
|
-
2, 21, :_reduce_23,
|
143
|
-
1, 22, :_reduce_none,
|
144
|
-
1, 22, :_reduce_none,
|
145
|
-
1, 22, :_reduce_none,
|
146
|
-
1, 19, :_reduce_none,
|
147
|
-
1, 19, :_reduce_28,
|
148
|
-
1, 16, :_reduce_none,
|
149
|
-
1, 16, :_reduce_none,
|
150
|
-
1, 16, :_reduce_none ]
|
151
|
-
|
152
|
-
racc_reduce_n = 32
|
153
|
-
|
154
|
-
racc_shift_n = 43
|
155
|
-
|
156
|
-
racc_action_table = [
|
157
|
-
12, 3, 4, 6, 15, 9, 31, 21, 42, 12,
|
158
|
-
3, 4, 6, 15, 23, 31, 21, 37, 12, 3,
|
159
|
-
4, 6, 15, 25, 20, 21, 12, 3, 4, 6,
|
160
|
-
15, 18, 20, 21, 12, 3, 4, 6, 15, 41,
|
161
|
-
31, 21, 12, 3, 4, 6, 15, 38, 27, 21,
|
162
|
-
12, 3, 4, 6, 15, 26, 27, 21, 12, 3,
|
163
|
-
4, 6, 15, 29, 31, 21, 12, 3, 4, 6,
|
164
|
-
15, nil, nil, 21, 12, 3, 4, 6, 15, nil,
|
165
|
-
nil, 21, 12, 3, 4, 6, 15, nil, nil, 21,
|
166
|
-
3, 4, 6, 8, 3, 4, 6, 11 ]
|
167
|
-
|
168
|
-
racc_action_check = [
|
169
|
-
36, 36, 36, 36, 36, 1, 36, 36, 36, 21,
|
170
|
-
21, 21, 21, 21, 9, 21, 21, 21, 11, 11,
|
171
|
-
11, 11, 11, 11, 11, 11, 8, 8, 8, 8,
|
172
|
-
8, 8, 8, 8, 33, 33, 33, 33, 33, 33,
|
173
|
-
33, 33, 35, 35, 35, 35, 35, 24, 24, 35,
|
174
|
-
27, 27, 27, 27, 27, 13, 13, 27, 15, 15,
|
175
|
-
15, 15, 15, 15, 15, 15, 39, 39, 39, 39,
|
176
|
-
39, nil, nil, 39, 20, 20, 20, 20, 20, nil,
|
177
|
-
nil, 20, 16, 16, 16, 16, 16, nil, nil, 16,
|
178
|
-
0, 0, 0, 0, 5, 5, 5, 5 ]
|
179
|
-
|
180
|
-
racc_action_pointer = [
|
181
|
-
87, 5, nil, nil, nil, 91, nil, nil, 24, 14,
|
182
|
-
nil, 16, nil, 48, nil, 56, 80, nil, nil, nil,
|
183
|
-
72, 7, nil, nil, 40, nil, nil, 48, nil, nil,
|
184
|
-
nil, nil, nil, 32, nil, 40, -2, nil, nil, 64,
|
185
|
-
nil, nil, nil ]
|
186
|
-
|
187
|
-
racc_action_default = [
|
188
|
-
-1, -32, -2, -29, -30, -32, -31, -7, -32, -32,
|
189
|
-
-8, -32, -27, -32, -28, -32, -9, -14, -5, -16,
|
190
|
-
-11, -32, -17, 43, -32, -6, -3, -13, -22, -18,
|
191
|
-
-25, -24, -26, -32, -15, -10, -32, -19, -4, -12,
|
192
|
-
-23, -20, -21 ]
|
193
|
-
|
194
|
-
racc_goto_table = [
|
195
|
-
34, 35, 7, 30, 32, 33, 5, 10, 39, 30,
|
196
|
-
32, 36, 13, 40, 2, 24, 40, 1, nil, 34,
|
197
|
-
nil, 30, 32, 34, 30, 32 ]
|
198
|
-
|
199
|
-
racc_goto_check = [
|
200
|
-
7, 6, 5, 8, 9, 10, 4, 5, 6, 8,
|
201
|
-
9, 10, 3, 11, 2, 3, 11, 1, nil, 7,
|
202
|
-
nil, 8, 9, 7, 8, 9 ]
|
203
|
-
|
204
|
-
racc_goto_pointer = [
|
205
|
-
nil, 17, 14, 4, 6, 2, -19, -16, -12, -11,
|
206
|
-
-10, -20 ]
|
207
|
-
|
208
|
-
racc_goto_default = [
|
209
|
-
nil, nil, nil, nil, nil, 14, 16, 17, 19, 22,
|
210
|
-
nil, 28 ]
|
211
|
-
|
212
|
-
racc_token_table = {
|
213
|
-
false => 0,
|
214
|
-
Object.new => 1,
|
215
|
-
:TOKEN => 2,
|
216
|
-
:SPACE => 3,
|
217
|
-
:NEWLINE => 4,
|
218
|
-
:COMMENT => 5,
|
219
|
-
"(" => 6,
|
220
|
-
")" => 7,
|
221
|
-
"," => 8,
|
222
|
-
"{" => 9,
|
223
|
-
"}" => 10 }
|
224
|
-
|
225
|
-
racc_use_result_var = true
|
226
|
-
|
227
|
-
racc_nt_base = 11
|
228
|
-
|
229
|
-
Racc_arg = [
|
230
|
-
racc_action_table,
|
231
|
-
racc_action_check,
|
232
|
-
racc_action_default,
|
233
|
-
racc_action_pointer,
|
234
|
-
racc_goto_table,
|
235
|
-
racc_goto_check,
|
236
|
-
racc_goto_default,
|
237
|
-
racc_goto_pointer,
|
238
|
-
racc_nt_base,
|
239
|
-
racc_reduce_table,
|
240
|
-
racc_token_table,
|
241
|
-
racc_shift_n,
|
242
|
-
racc_reduce_n,
|
243
|
-
racc_use_result_var ]
|
244
|
-
|
245
|
-
Racc_token_to_s_table = [
|
246
|
-
'$end',
|
247
|
-
'error',
|
248
|
-
'TOKEN',
|
249
|
-
'SPACE',
|
250
|
-
'NEWLINE',
|
251
|
-
'COMMENT',
|
252
|
-
'"("',
|
253
|
-
'")"',
|
254
|
-
'","',
|
255
|
-
'"{"',
|
256
|
-
'"}"',
|
257
|
-
'$start',
|
258
|
-
'target',
|
259
|
-
'arguments',
|
260
|
-
'argument_list',
|
261
|
-
'space',
|
262
|
-
'whitespace',
|
263
|
-
'argument',
|
264
|
-
'nested_token',
|
265
|
-
'basic_token',
|
266
|
-
'nested_sequence',
|
267
|
-
'unnested_sequence',
|
268
|
-
'any_token']
|
269
|
-
|
270
|
-
Racc_debug_parser = false
|
271
|
-
|
272
|
-
##### racc system variables end #####
|
273
|
-
|
274
|
-
# reduce 0 omitted
|
275
|
-
|
276
|
-
# reduce 1 omitted
|
277
|
-
|
278
|
-
module_eval <<'.,.,', 'src/parameters.y', 13
|
279
|
-
def _reduce_2( val, _values, result )
|
280
|
-
result = val[0]; yyaccept()
|
281
|
-
result
|
282
|
-
end
|
283
|
-
.,.,
|
284
|
-
|
285
|
-
module_eval <<'.,.,', 'src/parameters.y', 17
|
286
|
-
def _reduce_3( val, _values, result )
|
287
|
-
result = val[1]
|
288
|
-
result
|
289
|
-
end
|
290
|
-
.,.,
|
291
|
-
|
292
|
-
module_eval <<'.,.,', 'src/parameters.y', 18
|
293
|
-
def _reduce_4( val, _values, result )
|
294
|
-
result = val[2]
|
295
|
-
result
|
296
|
-
end
|
297
|
-
.,.,
|
298
|
-
|
299
|
-
module_eval <<'.,.,', 'src/parameters.y', 20
|
300
|
-
def _reduce_5( val, _values, result )
|
301
|
-
result = ['']
|
302
|
-
result
|
303
|
-
end
|
304
|
-
.,.,
|
305
|
-
|
306
|
-
module_eval <<'.,.,', 'src/parameters.y', 21
|
307
|
-
def _reduce_6( val, _values, result )
|
308
|
-
result = ['']
|
309
|
-
result
|
310
|
-
end
|
311
|
-
.,.,
|
312
|
-
|
313
|
-
# reduce 7 omitted
|
314
|
-
|
315
|
-
module_eval <<'.,.,', 'src/parameters.y', 26
|
316
|
-
def _reduce_8( val, _values, result )
|
317
|
-
result = val[0,2].join
|
318
|
-
result
|
319
|
-
end
|
320
|
-
.,.,
|
321
|
-
|
322
|
-
module_eval <<'.,.,', 'src/parameters.y', 30
|
323
|
-
def _reduce_9( val, _values, result )
|
324
|
-
result = val[0,1]
|
325
|
-
result
|
326
|
-
end
|
327
|
-
.,.,
|
328
|
-
|
329
|
-
module_eval <<'.,.,', 'src/parameters.y', 31
|
330
|
-
def _reduce_10( val, _values, result )
|
331
|
-
result = ['', val[1]]
|
332
|
-
result
|
333
|
-
end
|
334
|
-
.,.,
|
335
|
-
|
336
|
-
module_eval <<'.,.,', 'src/parameters.y', 32
|
337
|
-
def _reduce_11( val, _values, result )
|
338
|
-
result = ['']
|
339
|
-
result
|
340
|
-
end
|
341
|
-
.,.,
|
342
|
-
|
343
|
-
module_eval <<'.,.,', 'src/parameters.y', 33
|
344
|
-
def _reduce_12( val, _values, result )
|
345
|
-
result = val[0] << val[2]
|
346
|
-
result
|
347
|
-
end
|
348
|
-
.,.,
|
349
|
-
|
350
|
-
module_eval <<'.,.,', 'src/parameters.y', 34
|
351
|
-
def _reduce_13( val, _values, result )
|
352
|
-
result = result = val[0] << ''
|
353
|
-
result
|
354
|
-
end
|
355
|
-
.,.,
|
356
|
-
|
357
|
-
# reduce 14 omitted
|
358
|
-
|
359
|
-
module_eval <<'.,.,', 'src/parameters.y', 39
|
360
|
-
def _reduce_15( val, _values, result )
|
361
|
-
result = val[0,2].join
|
362
|
-
result
|
363
|
-
end
|
364
|
-
.,.,
|
365
|
-
|
366
|
-
# reduce 16 omitted
|
367
|
-
|
368
|
-
# reduce 17 omitted
|
369
|
-
|
370
|
-
module_eval <<'.,.,', 'src/parameters.y', 48
|
371
|
-
def _reduce_18( val, _values, result )
|
372
|
-
result = val[0,2].join
|
373
|
-
result
|
374
|
-
end
|
375
|
-
.,.,
|
376
|
-
|
377
|
-
module_eval <<'.,.,', 'src/parameters.y', 49
|
378
|
-
def _reduce_19( val, _values, result )
|
379
|
-
result = val[0,2].join
|
380
|
-
result
|
381
|
-
end
|
382
|
-
.,.,
|
383
|
-
|
384
|
-
module_eval <<'.,.,', 'src/parameters.y', 50
|
385
|
-
def _reduce_20( val, _values, result )
|
386
|
-
result = val[0,3].join
|
387
|
-
result
|
388
|
-
end
|
389
|
-
.,.,
|
390
|
-
|
391
|
-
module_eval <<'.,.,', 'src/parameters.y', 51
|
392
|
-
def _reduce_21( val, _values, result )
|
393
|
-
result = val[0,3].join
|
394
|
-
result
|
395
|
-
end
|
396
|
-
.,.,
|
397
|
-
|
398
|
-
# reduce 22 omitted
|
399
|
-
|
400
|
-
module_eval <<'.,.,', 'src/parameters.y', 56
|
401
|
-
def _reduce_23( val, _values, result )
|
402
|
-
result = val[0,2].join
|
403
|
-
result
|
404
|
-
end
|
405
|
-
.,.,
|
406
|
-
|
407
|
-
# reduce 24 omitted
|
408
|
-
|
409
|
-
# reduce 25 omitted
|
410
|
-
|
411
|
-
# reduce 26 omitted
|
412
|
-
|
413
|
-
# reduce 27 omitted
|
414
|
-
|
415
|
-
module_eval <<'.,.,', 'src/parameters.y', 70
|
416
|
-
def _reduce_28( val, _values, result )
|
417
|
-
result = ' '
|
418
|
-
result
|
419
|
-
end
|
420
|
-
.,.,
|
421
|
-
|
422
|
-
# reduce 29 omitted
|
423
|
-
|
424
|
-
# reduce 30 omitted
|
425
|
-
|
426
|
-
# reduce 31 omitted
|
427
|
-
|
428
|
-
def _reduce_none( val, _values, result )
|
429
|
-
result
|
430
|
-
end
|
431
|
-
|
432
|
-
end # class ArgumentParser
|
433
|
-
|
434
|
-
end # module Preprocessor
|