occi 2.0.6 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.yardopts +1 -1
- data/Gemfile +3 -20
- data/Gemfile.lock +10 -59
- data/README.md +64 -2
- data/etc/model/infrastructure/compute.json +115 -0
- data/etc/model/infrastructure/ipnetwork.json +43 -0
- data/etc/model/infrastructure/ipnetworkinterface.json +43 -0
- data/etc/model/infrastructure/network.json +56 -0
- data/etc/model/infrastructure/networkinterface.json +40 -0
- data/etc/model/infrastructure/os_template.json +9 -0
- data/etc/model/infrastructure/resource_template.json +9 -0
- data/etc/model/infrastructure/storage.json +75 -0
- data/etc/model/infrastructure/storagelink.json +38 -0
- data/lib/occi/collection.rb +34 -0
- data/lib/occi/core/action.rb +0 -21
- data/lib/occi/core/attribute_properties.rb +0 -21
- data/lib/occi/core/attributes.rb +1 -20
- data/lib/occi/core/category.rb +0 -21
- data/lib/occi/core/entity.rb +7 -28
- data/lib/occi/core/kind.rb +1 -22
- data/lib/occi/core/link.rb +3 -23
- data/lib/occi/core/mixin.rb +0 -22
- data/lib/occi/core/resource.rb +3 -24
- data/lib/occi/log.rb +24 -22
- data/lib/occi/model.rb +102 -0
- data/lib/occi/{parse.rb → parser.rb} +73 -56
- data/lib/occi/version.rb +1 -1
- data/lib/occi.rb +17 -17
- data/lib/{occi/antlr → occiantlr}/.gitignore +0 -0
- data/lib/{occi/antlr/OCCI.g → occiantlr/OCCIANTLR.g} +17 -50
- data/lib/{occi/antlr/OCCI.tokens → occiantlr/OCCIANTLR.tokens} +4 -2
- data/lib/{occi/antlr/OCCILexer.rb → occiantlr/OCCIANTLRLexer.rb} +597 -555
- data/lib/occiantlr/OCCIANTLRParser.rb +2232 -0
- data/lib/{occi/antlr → occiantlr}/README.md +0 -0
- data/occi.gemspec +3 -0
- data/spec/occi/collection_spec.rb +19 -0
- data/spec/occi/log_spec.rb +16 -0
- data/spec/occi/model_spec.rb +26 -0
- data/spec/occi/parser_spec.rb +12 -0
- data/spec/occiantlr/parser_spec.rb +84 -0
- metadata +78 -14
- data/lib/occi/antlr/OCCIParser.rb +0 -2472
- data/lib/occi/core/collection.rb +0 -27
- data/lib/occi/exceptions.rb +0 -59
- data/lib/occi/registry.rb +0 -87
- data/spec/occi/antlr/parser_spec.rb +0 -82
@@ -0,0 +1,2232 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# OCCIANTLR.g
|
4
|
+
# --
|
5
|
+
# Generated using ANTLR version: 3.2.1-SNAPSHOT Jul 31, 2010 19:34:52
|
6
|
+
# Ruby runtime library version: 1.8.11
|
7
|
+
# Input grammar file: OCCIANTLR.g
|
8
|
+
# Generated at: 2012-06-09 10:31:15
|
9
|
+
#
|
10
|
+
|
11
|
+
# ~~~> start load path setup
|
12
|
+
this_directory = File.expand_path( File.dirname( __FILE__ ) )
|
13
|
+
$LOAD_PATH.unshift( this_directory ) unless $LOAD_PATH.include?( this_directory )
|
14
|
+
|
15
|
+
antlr_load_failed = proc do
|
16
|
+
load_path = $LOAD_PATH.map { |dir| ' - ' << dir }.join( $/ )
|
17
|
+
raise LoadError, <<-END.strip!
|
18
|
+
|
19
|
+
Failed to load the ANTLR3 runtime library (version 1.8.11):
|
20
|
+
|
21
|
+
Ensure the library has been installed on your system and is available
|
22
|
+
on the load path. If rubygems is available on your system, this can
|
23
|
+
be done with the command:
|
24
|
+
|
25
|
+
gem install antlr3
|
26
|
+
|
27
|
+
Current load path:
|
28
|
+
#{ load_path }
|
29
|
+
|
30
|
+
END
|
31
|
+
end
|
32
|
+
|
33
|
+
defined?( ANTLR3 ) or begin
|
34
|
+
|
35
|
+
# 1: try to load the ruby antlr3 runtime library from the system path
|
36
|
+
require 'antlr3'
|
37
|
+
|
38
|
+
rescue LoadError
|
39
|
+
|
40
|
+
# 2: try to load rubygems if it isn't already loaded
|
41
|
+
defined?( Gem ) or begin
|
42
|
+
require 'rubygems'
|
43
|
+
rescue LoadError
|
44
|
+
antlr_load_failed.call
|
45
|
+
end
|
46
|
+
|
47
|
+
# 3: try to activate the antlr3 gem
|
48
|
+
begin
|
49
|
+
Gem.activate( 'antlr3', '~> 1.8.11' )
|
50
|
+
rescue Gem::LoadError
|
51
|
+
antlr_load_failed.call
|
52
|
+
end
|
53
|
+
|
54
|
+
require 'antlr3'
|
55
|
+
|
56
|
+
end
|
57
|
+
# <~~~ end load path setup
|
58
|
+
|
59
|
+
# - - - - - - begin action @parser::header - - - - - -
|
60
|
+
# OCCIANTLR.g
|
61
|
+
|
62
|
+
|
63
|
+
require 'uri'
|
64
|
+
require 'hashie'
|
65
|
+
ATTRIBUTE = { :mutable => true, :required => false, :type => "string" }
|
66
|
+
|
67
|
+
# - - - - - - end action @parser::header - - - - - - -
|
68
|
+
|
69
|
+
|
70
|
+
module OCCIANTLR
|
71
|
+
# TokenData defines all of the token type integer values
|
72
|
+
# as constants, which will be included in all
|
73
|
+
# ANTLR-generated recognizers.
|
74
|
+
const_defined?( :TokenData ) or TokenData = ANTLR3::TokenScheme.new
|
75
|
+
|
76
|
+
module TokenData
|
77
|
+
|
78
|
+
# define the token constants
|
79
|
+
define_tokens( :T__29 => 29, :T__28 => 28, :T__27 => 27, :T__26 => 26,
|
80
|
+
:T__25 => 25, :T__24 => 24, :T__23 => 23, :ESC => 8,
|
81
|
+
:T__22 => 22, :T__21 => 21, :T__20 => 20, :EOF => -1,
|
82
|
+
:T__9 => 9, :T__19 => 19, :T__16 => 16, :T__15 => 15,
|
83
|
+
:T__18 => 18, :T__17 => 17, :T__12 => 12, :T__11 => 11,
|
84
|
+
:T__14 => 14, :T__13 => 13, :T__10 => 10, :DIGIT => 7,
|
85
|
+
:LOALPHA => 5, :T__42 => 42, :T__43 => 43, :T__40 => 40,
|
86
|
+
:T__41 => 41, :T__44 => 44, :T__30 => 30, :T__31 => 31,
|
87
|
+
:T__32 => 32, :T__33 => 33, :WS => 4, :T__34 => 34, :T__35 => 35,
|
88
|
+
:T__36 => 36, :T__37 => 37, :UPALPHA => 6, :T__38 => 38,
|
89
|
+
:T__39 => 39 )
|
90
|
+
|
91
|
+
# register the proper human-readable name or literal value
|
92
|
+
# for each token type
|
93
|
+
#
|
94
|
+
# this is necessary because anonymous tokens, which are
|
95
|
+
# created from literal values in the grammar, do not
|
96
|
+
# have descriptive names
|
97
|
+
register_names( "WS", "LOALPHA", "UPALPHA", "DIGIT", "ESC", "'Category'",
|
98
|
+
"':'", "';'", "'scheme'", "'='", "'\"'", "'class'",
|
99
|
+
"'title'", "'rel'", "'location'", "'attributes'", "'actions'",
|
100
|
+
"'Link'", "'<'", "'>'", "'self'", "'category'", "'X-OCCI-Attribute'",
|
101
|
+
"'X-OCCI-Location'", "'@'", "'%'", "'_'", "'\\\\'",
|
102
|
+
"'+'", "'.'", "'~'", "'#'", "'?'", "'&'", "'/'", "'-'",
|
103
|
+
"'action'", "'kind'", "'mixin'", "'term'", "'\\''" )
|
104
|
+
|
105
|
+
end
|
106
|
+
|
107
|
+
|
108
|
+
class Parser < ANTLR3::Parser
|
109
|
+
@grammar_home = OCCIANTLR
|
110
|
+
|
111
|
+
RULE_METHODS = [ :category, :category_value, :category_term, :category_scheme,
|
112
|
+
:category_class, :category_title, :category_rel, :category_location,
|
113
|
+
:category_attributes, :category_actions, :link, :link_value,
|
114
|
+
:link_target, :link_rel, :link_self, :link_category,
|
115
|
+
:link_attributes, :x_occi_attribute, :x_occi_location,
|
116
|
+
:uri, :term, :scheme, :class_type, :title, :attribute,
|
117
|
+
:attribute_name, :attribute_component, :attribute_value,
|
118
|
+
:string, :number ].freeze
|
119
|
+
|
120
|
+
|
121
|
+
include TokenData
|
122
|
+
|
123
|
+
begin
|
124
|
+
generated_using( "OCCIANTLR.g", "3.2.1-SNAPSHOT Jul 31, 2010 19:34:52", "1.8.11" )
|
125
|
+
rescue NoMethodError => error
|
126
|
+
# ignore
|
127
|
+
end
|
128
|
+
|
129
|
+
def initialize( input, options = {} )
|
130
|
+
super( input, options )
|
131
|
+
|
132
|
+
|
133
|
+
end
|
134
|
+
# - - - - - - - - - - - - Rules - - - - - - - - - - - - -
|
135
|
+
|
136
|
+
#
|
137
|
+
# parser rule category
|
138
|
+
#
|
139
|
+
# (in OCCIANTLR.g)
|
140
|
+
# 25:1: category returns [hash] : 'Category' ':' category_value ;
|
141
|
+
#
|
142
|
+
def category
|
143
|
+
# -> uncomment the next line to manually enable rule tracing
|
144
|
+
# trace_in( __method__, 1 )
|
145
|
+
hash = nil
|
146
|
+
category_value1 = nil
|
147
|
+
|
148
|
+
begin
|
149
|
+
# at line 26:4: 'Category' ':' category_value
|
150
|
+
match( T__9, TOKENS_FOLLOWING_T__9_IN_category_39 )
|
151
|
+
match( T__10, TOKENS_FOLLOWING_T__10_IN_category_41 )
|
152
|
+
@state.following.push( TOKENS_FOLLOWING_category_value_IN_category_43 )
|
153
|
+
category_value1 = category_value
|
154
|
+
@state.following.pop
|
155
|
+
# --> action
|
156
|
+
hash = category_value1
|
157
|
+
# <-- action
|
158
|
+
|
159
|
+
rescue ANTLR3::Error::RecognitionError => re
|
160
|
+
report_error(re)
|
161
|
+
recover(re)
|
162
|
+
|
163
|
+
ensure
|
164
|
+
# -> uncomment the next line to manually enable rule tracing
|
165
|
+
# trace_out( __method__, 1 )
|
166
|
+
|
167
|
+
end
|
168
|
+
|
169
|
+
return hash
|
170
|
+
end
|
171
|
+
|
172
|
+
|
173
|
+
#
|
174
|
+
# parser rule category_value
|
175
|
+
#
|
176
|
+
# (in OCCIANTLR.g)
|
177
|
+
# 27:3: category_value returns [hash] : category_term category_scheme category_class ( category_title )? ( category_rel )? ( category_location )? ( category_attributes )? ( category_actions )? ( ';' )? ;
|
178
|
+
#
|
179
|
+
def category_value
|
180
|
+
# -> uncomment the next line to manually enable rule tracing
|
181
|
+
# trace_in( __method__, 2 )
|
182
|
+
hash = nil
|
183
|
+
category_class2 = nil
|
184
|
+
category_term3 = nil
|
185
|
+
category_scheme4 = nil
|
186
|
+
category_title5 = nil
|
187
|
+
category_rel6 = nil
|
188
|
+
category_location7 = nil
|
189
|
+
category_attributes8 = nil
|
190
|
+
category_actions9 = nil
|
191
|
+
# - - - - @init action - - - -
|
192
|
+
hash = Hashie::Mash.new( {:kinds=>[],:mixins=>[],:actions=>[] } )
|
193
|
+
|
194
|
+
begin
|
195
|
+
# at line 29:15: category_term category_scheme category_class ( category_title )? ( category_rel )? ( category_location )? ( category_attributes )? ( category_actions )? ( ';' )?
|
196
|
+
@state.following.push( TOKENS_FOLLOWING_category_term_IN_category_value_75 )
|
197
|
+
category_term3 = category_term
|
198
|
+
@state.following.pop
|
199
|
+
@state.following.push( TOKENS_FOLLOWING_category_scheme_IN_category_value_77 )
|
200
|
+
category_scheme4 = category_scheme
|
201
|
+
@state.following.pop
|
202
|
+
@state.following.push( TOKENS_FOLLOWING_category_class_IN_category_value_79 )
|
203
|
+
category_class2 = category_class
|
204
|
+
@state.following.pop
|
205
|
+
# at line 29:60: ( category_title )?
|
206
|
+
alt_1 = 2
|
207
|
+
look_1_0 = @input.peek( 1 )
|
208
|
+
|
209
|
+
if ( look_1_0 == T__11 )
|
210
|
+
look_1_1 = @input.peek( 2 )
|
211
|
+
|
212
|
+
if ( look_1_1 == WS )
|
213
|
+
look_1_3 = @input.peek( 3 )
|
214
|
+
|
215
|
+
if ( look_1_3 == T__16 )
|
216
|
+
alt_1 = 1
|
217
|
+
end
|
218
|
+
elsif ( look_1_1 == T__16 )
|
219
|
+
alt_1 = 1
|
220
|
+
end
|
221
|
+
end
|
222
|
+
case alt_1
|
223
|
+
when 1
|
224
|
+
# at line 29:60: category_title
|
225
|
+
@state.following.push( TOKENS_FOLLOWING_category_title_IN_category_value_81 )
|
226
|
+
category_title5 = category_title
|
227
|
+
@state.following.pop
|
228
|
+
|
229
|
+
end
|
230
|
+
# at line 29:76: ( category_rel )?
|
231
|
+
alt_2 = 2
|
232
|
+
look_2_0 = @input.peek( 1 )
|
233
|
+
|
234
|
+
if ( look_2_0 == T__11 )
|
235
|
+
look_2_1 = @input.peek( 2 )
|
236
|
+
|
237
|
+
if ( look_2_1 == WS )
|
238
|
+
look_2_3 = @input.peek( 3 )
|
239
|
+
|
240
|
+
if ( look_2_3 == T__17 )
|
241
|
+
alt_2 = 1
|
242
|
+
end
|
243
|
+
elsif ( look_2_1 == T__17 )
|
244
|
+
alt_2 = 1
|
245
|
+
end
|
246
|
+
end
|
247
|
+
case alt_2
|
248
|
+
when 1
|
249
|
+
# at line 29:76: category_rel
|
250
|
+
@state.following.push( TOKENS_FOLLOWING_category_rel_IN_category_value_84 )
|
251
|
+
category_rel6 = category_rel
|
252
|
+
@state.following.pop
|
253
|
+
|
254
|
+
end
|
255
|
+
# at line 29:90: ( category_location )?
|
256
|
+
alt_3 = 2
|
257
|
+
look_3_0 = @input.peek( 1 )
|
258
|
+
|
259
|
+
if ( look_3_0 == T__11 )
|
260
|
+
look_3_1 = @input.peek( 2 )
|
261
|
+
|
262
|
+
if ( look_3_1 == WS )
|
263
|
+
look_3_3 = @input.peek( 3 )
|
264
|
+
|
265
|
+
if ( look_3_3 == T__18 )
|
266
|
+
alt_3 = 1
|
267
|
+
end
|
268
|
+
elsif ( look_3_1 == T__18 )
|
269
|
+
alt_3 = 1
|
270
|
+
end
|
271
|
+
end
|
272
|
+
case alt_3
|
273
|
+
when 1
|
274
|
+
# at line 29:90: category_location
|
275
|
+
@state.following.push( TOKENS_FOLLOWING_category_location_IN_category_value_87 )
|
276
|
+
category_location7 = category_location
|
277
|
+
@state.following.pop
|
278
|
+
|
279
|
+
end
|
280
|
+
# at line 29:109: ( category_attributes )?
|
281
|
+
alt_4 = 2
|
282
|
+
look_4_0 = @input.peek( 1 )
|
283
|
+
|
284
|
+
if ( look_4_0 == T__11 )
|
285
|
+
look_4_1 = @input.peek( 2 )
|
286
|
+
|
287
|
+
if ( look_4_1 == WS )
|
288
|
+
look_4_3 = @input.peek( 3 )
|
289
|
+
|
290
|
+
if ( look_4_3 == T__19 )
|
291
|
+
alt_4 = 1
|
292
|
+
end
|
293
|
+
elsif ( look_4_1 == T__19 )
|
294
|
+
alt_4 = 1
|
295
|
+
end
|
296
|
+
end
|
297
|
+
case alt_4
|
298
|
+
when 1
|
299
|
+
# at line 29:109: category_attributes
|
300
|
+
@state.following.push( TOKENS_FOLLOWING_category_attributes_IN_category_value_90 )
|
301
|
+
category_attributes8 = category_attributes
|
302
|
+
@state.following.pop
|
303
|
+
|
304
|
+
end
|
305
|
+
# at line 29:130: ( category_actions )?
|
306
|
+
alt_5 = 2
|
307
|
+
look_5_0 = @input.peek( 1 )
|
308
|
+
|
309
|
+
if ( look_5_0 == T__11 )
|
310
|
+
look_5_1 = @input.peek( 2 )
|
311
|
+
|
312
|
+
if ( look_5_1 == WS || look_5_1 == T__20 )
|
313
|
+
alt_5 = 1
|
314
|
+
end
|
315
|
+
end
|
316
|
+
case alt_5
|
317
|
+
when 1
|
318
|
+
# at line 29:130: category_actions
|
319
|
+
@state.following.push( TOKENS_FOLLOWING_category_actions_IN_category_value_93 )
|
320
|
+
category_actions9 = category_actions
|
321
|
+
@state.following.pop
|
322
|
+
|
323
|
+
end
|
324
|
+
# at line 29:148: ( ';' )?
|
325
|
+
alt_6 = 2
|
326
|
+
look_6_0 = @input.peek( 1 )
|
327
|
+
|
328
|
+
if ( look_6_0 == T__11 )
|
329
|
+
alt_6 = 1
|
330
|
+
end
|
331
|
+
case alt_6
|
332
|
+
when 1
|
333
|
+
# at line 29:148: ';'
|
334
|
+
match( T__11, TOKENS_FOLLOWING_T__11_IN_category_value_96 )
|
335
|
+
|
336
|
+
end
|
337
|
+
# --> action
|
338
|
+
type = category_class2
|
339
|
+
cat = Hashie::Mash.new
|
340
|
+
cat.term = category_term3
|
341
|
+
cat.scheme = category_scheme4
|
342
|
+
cat.title = category_title5
|
343
|
+
cat.related = category_rel6
|
344
|
+
cat.location = category_location7
|
345
|
+
cat.attributes = category_attributes8
|
346
|
+
cat.actions = category_actions9
|
347
|
+
hash[(type+'s').to_sym] << cat
|
348
|
+
|
349
|
+
# <-- action
|
350
|
+
|
351
|
+
rescue ANTLR3::Error::RecognitionError => re
|
352
|
+
report_error(re)
|
353
|
+
recover(re)
|
354
|
+
|
355
|
+
ensure
|
356
|
+
# -> uncomment the next line to manually enable rule tracing
|
357
|
+
# trace_out( __method__, 2 )
|
358
|
+
|
359
|
+
end
|
360
|
+
|
361
|
+
return hash
|
362
|
+
end
|
363
|
+
|
364
|
+
|
365
|
+
#
|
366
|
+
# parser rule category_term
|
367
|
+
#
|
368
|
+
# (in OCCIANTLR.g)
|
369
|
+
# 41:3: category_term returns [value] : ( WS )? term ;
|
370
|
+
#
|
371
|
+
def category_term
|
372
|
+
# -> uncomment the next line to manually enable rule tracing
|
373
|
+
# trace_in( __method__, 3 )
|
374
|
+
value = nil
|
375
|
+
term10 = nil
|
376
|
+
|
377
|
+
begin
|
378
|
+
# at line 41:37: ( WS )? term
|
379
|
+
# at line 41:37: ( WS )?
|
380
|
+
alt_7 = 2
|
381
|
+
look_7_0 = @input.peek( 1 )
|
382
|
+
|
383
|
+
if ( look_7_0 == WS )
|
384
|
+
alt_7 = 1
|
385
|
+
end
|
386
|
+
case alt_7
|
387
|
+
when 1
|
388
|
+
# at line 41:37: WS
|
389
|
+
match( WS, TOKENS_FOLLOWING_WS_IN_category_term_128 )
|
390
|
+
|
391
|
+
end
|
392
|
+
@state.following.push( TOKENS_FOLLOWING_term_IN_category_term_131 )
|
393
|
+
term10 = term
|
394
|
+
@state.following.pop
|
395
|
+
# --> action
|
396
|
+
value = ( term10 && @input.to_s( term10.start, term10.stop ) )
|
397
|
+
# <-- action
|
398
|
+
|
399
|
+
rescue ANTLR3::Error::RecognitionError => re
|
400
|
+
report_error(re)
|
401
|
+
recover(re)
|
402
|
+
|
403
|
+
ensure
|
404
|
+
# -> uncomment the next line to manually enable rule tracing
|
405
|
+
# trace_out( __method__, 3 )
|
406
|
+
|
407
|
+
end
|
408
|
+
|
409
|
+
return value
|
410
|
+
end
|
411
|
+
|
412
|
+
|
413
|
+
#
|
414
|
+
# parser rule category_scheme
|
415
|
+
#
|
416
|
+
# (in OCCIANTLR.g)
|
417
|
+
# 43:3: category_scheme returns [value] : ';' ( WS )? 'scheme' '=' '\"' scheme '\"' ;
|
418
|
+
#
|
419
|
+
def category_scheme
|
420
|
+
# -> uncomment the next line to manually enable rule tracing
|
421
|
+
# trace_in( __method__, 4 )
|
422
|
+
value = nil
|
423
|
+
scheme11 = nil
|
424
|
+
|
425
|
+
begin
|
426
|
+
# at line 43:37: ';' ( WS )? 'scheme' '=' '\"' scheme '\"'
|
427
|
+
match( T__11, TOKENS_FOLLOWING_T__11_IN_category_scheme_157 )
|
428
|
+
# at line 43:41: ( WS )?
|
429
|
+
alt_8 = 2
|
430
|
+
look_8_0 = @input.peek( 1 )
|
431
|
+
|
432
|
+
if ( look_8_0 == WS )
|
433
|
+
alt_8 = 1
|
434
|
+
end
|
435
|
+
case alt_8
|
436
|
+
when 1
|
437
|
+
# at line 43:41: WS
|
438
|
+
match( WS, TOKENS_FOLLOWING_WS_IN_category_scheme_159 )
|
439
|
+
|
440
|
+
end
|
441
|
+
match( T__12, TOKENS_FOLLOWING_T__12_IN_category_scheme_162 )
|
442
|
+
match( T__13, TOKENS_FOLLOWING_T__13_IN_category_scheme_164 )
|
443
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_category_scheme_166 )
|
444
|
+
@state.following.push( TOKENS_FOLLOWING_scheme_IN_category_scheme_168 )
|
445
|
+
scheme11 = scheme
|
446
|
+
@state.following.pop
|
447
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_category_scheme_170 )
|
448
|
+
# --> action
|
449
|
+
value = ( scheme11 && @input.to_s( scheme11.start, scheme11.stop ) )
|
450
|
+
# <-- action
|
451
|
+
|
452
|
+
rescue ANTLR3::Error::RecognitionError => re
|
453
|
+
report_error(re)
|
454
|
+
recover(re)
|
455
|
+
|
456
|
+
ensure
|
457
|
+
# -> uncomment the next line to manually enable rule tracing
|
458
|
+
# trace_out( __method__, 4 )
|
459
|
+
|
460
|
+
end
|
461
|
+
|
462
|
+
return value
|
463
|
+
end
|
464
|
+
|
465
|
+
|
466
|
+
#
|
467
|
+
# parser rule category_class
|
468
|
+
#
|
469
|
+
# (in OCCIANTLR.g)
|
470
|
+
# 45:3: category_class returns [value] : ';' ( WS )? 'class' '=' '\"' class_type '\"' ;
|
471
|
+
#
|
472
|
+
def category_class
|
473
|
+
# -> uncomment the next line to manually enable rule tracing
|
474
|
+
# trace_in( __method__, 5 )
|
475
|
+
value = nil
|
476
|
+
class_type12 = nil
|
477
|
+
|
478
|
+
begin
|
479
|
+
# at line 45:37: ';' ( WS )? 'class' '=' '\"' class_type '\"'
|
480
|
+
match( T__11, TOKENS_FOLLOWING_T__11_IN_category_class_199 )
|
481
|
+
# at line 45:41: ( WS )?
|
482
|
+
alt_9 = 2
|
483
|
+
look_9_0 = @input.peek( 1 )
|
484
|
+
|
485
|
+
if ( look_9_0 == WS )
|
486
|
+
alt_9 = 1
|
487
|
+
end
|
488
|
+
case alt_9
|
489
|
+
when 1
|
490
|
+
# at line 45:41: WS
|
491
|
+
match( WS, TOKENS_FOLLOWING_WS_IN_category_class_201 )
|
492
|
+
|
493
|
+
end
|
494
|
+
match( T__15, TOKENS_FOLLOWING_T__15_IN_category_class_204 )
|
495
|
+
match( T__13, TOKENS_FOLLOWING_T__13_IN_category_class_206 )
|
496
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_category_class_208 )
|
497
|
+
@state.following.push( TOKENS_FOLLOWING_class_type_IN_category_class_210 )
|
498
|
+
class_type12 = class_type
|
499
|
+
@state.following.pop
|
500
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_category_class_212 )
|
501
|
+
# --> action
|
502
|
+
value = ( class_type12 && @input.to_s( class_type12.start, class_type12.stop ) )
|
503
|
+
# <-- action
|
504
|
+
|
505
|
+
rescue ANTLR3::Error::RecognitionError => re
|
506
|
+
report_error(re)
|
507
|
+
recover(re)
|
508
|
+
|
509
|
+
ensure
|
510
|
+
# -> uncomment the next line to manually enable rule tracing
|
511
|
+
# trace_out( __method__, 5 )
|
512
|
+
|
513
|
+
end
|
514
|
+
|
515
|
+
return value
|
516
|
+
end
|
517
|
+
|
518
|
+
|
519
|
+
#
|
520
|
+
# parser rule category_title
|
521
|
+
#
|
522
|
+
# (in OCCIANTLR.g)
|
523
|
+
# 47:3: category_title returns [value] : ';' ( WS )? 'title' '=' '\"' title '\"' ;
|
524
|
+
#
|
525
|
+
def category_title
|
526
|
+
# -> uncomment the next line to manually enable rule tracing
|
527
|
+
# trace_in( __method__, 6 )
|
528
|
+
value = nil
|
529
|
+
title13 = nil
|
530
|
+
|
531
|
+
begin
|
532
|
+
# at line 47:37: ';' ( WS )? 'title' '=' '\"' title '\"'
|
533
|
+
match( T__11, TOKENS_FOLLOWING_T__11_IN_category_title_237 )
|
534
|
+
# at line 47:41: ( WS )?
|
535
|
+
alt_10 = 2
|
536
|
+
look_10_0 = @input.peek( 1 )
|
537
|
+
|
538
|
+
if ( look_10_0 == WS )
|
539
|
+
alt_10 = 1
|
540
|
+
end
|
541
|
+
case alt_10
|
542
|
+
when 1
|
543
|
+
# at line 47:41: WS
|
544
|
+
match( WS, TOKENS_FOLLOWING_WS_IN_category_title_239 )
|
545
|
+
|
546
|
+
end
|
547
|
+
match( T__16, TOKENS_FOLLOWING_T__16_IN_category_title_242 )
|
548
|
+
match( T__13, TOKENS_FOLLOWING_T__13_IN_category_title_244 )
|
549
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_category_title_246 )
|
550
|
+
@state.following.push( TOKENS_FOLLOWING_title_IN_category_title_248 )
|
551
|
+
title13 = title
|
552
|
+
@state.following.pop
|
553
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_category_title_250 )
|
554
|
+
# --> action
|
555
|
+
value = ( title13 && @input.to_s( title13.start, title13.stop ) )
|
556
|
+
# <-- action
|
557
|
+
|
558
|
+
rescue ANTLR3::Error::RecognitionError => re
|
559
|
+
report_error(re)
|
560
|
+
recover(re)
|
561
|
+
|
562
|
+
ensure
|
563
|
+
# -> uncomment the next line to manually enable rule tracing
|
564
|
+
# trace_out( __method__, 6 )
|
565
|
+
|
566
|
+
end
|
567
|
+
|
568
|
+
return value
|
569
|
+
end
|
570
|
+
|
571
|
+
|
572
|
+
#
|
573
|
+
# parser rule category_rel
|
574
|
+
#
|
575
|
+
# (in OCCIANTLR.g)
|
576
|
+
# 49:3: category_rel returns [value] : ';' ( WS )? 'rel' '=' '\"' uri '\"' ;
|
577
|
+
#
|
578
|
+
def category_rel
|
579
|
+
# -> uncomment the next line to manually enable rule tracing
|
580
|
+
# trace_in( __method__, 7 )
|
581
|
+
value = nil
|
582
|
+
uri14 = nil
|
583
|
+
|
584
|
+
begin
|
585
|
+
# at line 49:35: ';' ( WS )? 'rel' '=' '\"' uri '\"'
|
586
|
+
match( T__11, TOKENS_FOLLOWING_T__11_IN_category_rel_277 )
|
587
|
+
# at line 49:39: ( WS )?
|
588
|
+
alt_11 = 2
|
589
|
+
look_11_0 = @input.peek( 1 )
|
590
|
+
|
591
|
+
if ( look_11_0 == WS )
|
592
|
+
alt_11 = 1
|
593
|
+
end
|
594
|
+
case alt_11
|
595
|
+
when 1
|
596
|
+
# at line 49:39: WS
|
597
|
+
match( WS, TOKENS_FOLLOWING_WS_IN_category_rel_279 )
|
598
|
+
|
599
|
+
end
|
600
|
+
match( T__17, TOKENS_FOLLOWING_T__17_IN_category_rel_282 )
|
601
|
+
match( T__13, TOKENS_FOLLOWING_T__13_IN_category_rel_284 )
|
602
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_category_rel_286 )
|
603
|
+
@state.following.push( TOKENS_FOLLOWING_uri_IN_category_rel_288 )
|
604
|
+
uri14 = uri
|
605
|
+
@state.following.pop
|
606
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_category_rel_290 )
|
607
|
+
# --> action
|
608
|
+
value = ( uri14 && @input.to_s( uri14.start, uri14.stop ) )
|
609
|
+
# <-- action
|
610
|
+
|
611
|
+
rescue ANTLR3::Error::RecognitionError => re
|
612
|
+
report_error(re)
|
613
|
+
recover(re)
|
614
|
+
|
615
|
+
ensure
|
616
|
+
# -> uncomment the next line to manually enable rule tracing
|
617
|
+
# trace_out( __method__, 7 )
|
618
|
+
|
619
|
+
end
|
620
|
+
|
621
|
+
return value
|
622
|
+
end
|
623
|
+
|
624
|
+
|
625
|
+
#
|
626
|
+
# parser rule category_location
|
627
|
+
#
|
628
|
+
# (in OCCIANTLR.g)
|
629
|
+
# 51:3: category_location returns [value] : ';' ( WS )? 'location' '=' '\"' uri '\"' ;
|
630
|
+
#
|
631
|
+
def category_location
|
632
|
+
# -> uncomment the next line to manually enable rule tracing
|
633
|
+
# trace_in( __method__, 8 )
|
634
|
+
value = nil
|
635
|
+
uri15 = nil
|
636
|
+
|
637
|
+
begin
|
638
|
+
# at line 51:39: ';' ( WS )? 'location' '=' '\"' uri '\"'
|
639
|
+
match( T__11, TOKENS_FOLLOWING_T__11_IN_category_location_315 )
|
640
|
+
# at line 51:43: ( WS )?
|
641
|
+
alt_12 = 2
|
642
|
+
look_12_0 = @input.peek( 1 )
|
643
|
+
|
644
|
+
if ( look_12_0 == WS )
|
645
|
+
alt_12 = 1
|
646
|
+
end
|
647
|
+
case alt_12
|
648
|
+
when 1
|
649
|
+
# at line 51:43: WS
|
650
|
+
match( WS, TOKENS_FOLLOWING_WS_IN_category_location_317 )
|
651
|
+
|
652
|
+
end
|
653
|
+
match( T__18, TOKENS_FOLLOWING_T__18_IN_category_location_320 )
|
654
|
+
match( T__13, TOKENS_FOLLOWING_T__13_IN_category_location_322 )
|
655
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_category_location_324 )
|
656
|
+
@state.following.push( TOKENS_FOLLOWING_uri_IN_category_location_326 )
|
657
|
+
uri15 = uri
|
658
|
+
@state.following.pop
|
659
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_category_location_328 )
|
660
|
+
# --> action
|
661
|
+
value = ( uri15 && @input.to_s( uri15.start, uri15.stop ) )
|
662
|
+
# <-- action
|
663
|
+
|
664
|
+
rescue ANTLR3::Error::RecognitionError => re
|
665
|
+
report_error(re)
|
666
|
+
recover(re)
|
667
|
+
|
668
|
+
ensure
|
669
|
+
# -> uncomment the next line to manually enable rule tracing
|
670
|
+
# trace_out( __method__, 8 )
|
671
|
+
|
672
|
+
end
|
673
|
+
|
674
|
+
return value
|
675
|
+
end
|
676
|
+
|
677
|
+
|
678
|
+
#
|
679
|
+
# parser rule category_attributes
|
680
|
+
#
|
681
|
+
# (in OCCIANTLR.g)
|
682
|
+
# 53:3: category_attributes returns [hash] : ';' ( WS )? 'attributes' '=' '\"' attr= attribute_name ( WS next_attr= attribute_name )* '\"' ;
|
683
|
+
#
|
684
|
+
def category_attributes
|
685
|
+
# -> uncomment the next line to manually enable rule tracing
|
686
|
+
# trace_in( __method__, 9 )
|
687
|
+
hash = nil
|
688
|
+
attr = nil
|
689
|
+
next_attr = nil
|
690
|
+
# - - - - @init action - - - -
|
691
|
+
hash = Hashie::Mash.new
|
692
|
+
|
693
|
+
begin
|
694
|
+
# at line 54:10: ';' ( WS )? 'attributes' '=' '\"' attr= attribute_name ( WS next_attr= attribute_name )* '\"'
|
695
|
+
match( T__11, TOKENS_FOLLOWING_T__11_IN_category_attributes_367 )
|
696
|
+
# at line 54:14: ( WS )?
|
697
|
+
alt_13 = 2
|
698
|
+
look_13_0 = @input.peek( 1 )
|
699
|
+
|
700
|
+
if ( look_13_0 == WS )
|
701
|
+
alt_13 = 1
|
702
|
+
end
|
703
|
+
case alt_13
|
704
|
+
when 1
|
705
|
+
# at line 54:14: WS
|
706
|
+
match( WS, TOKENS_FOLLOWING_WS_IN_category_attributes_369 )
|
707
|
+
|
708
|
+
end
|
709
|
+
match( T__19, TOKENS_FOLLOWING_T__19_IN_category_attributes_372 )
|
710
|
+
match( T__13, TOKENS_FOLLOWING_T__13_IN_category_attributes_374 )
|
711
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_category_attributes_376 )
|
712
|
+
@state.following.push( TOKENS_FOLLOWING_attribute_name_IN_category_attributes_380 )
|
713
|
+
attr = attribute_name
|
714
|
+
@state.following.pop
|
715
|
+
# --> action
|
716
|
+
hash.merge!(attr)
|
717
|
+
# <-- action
|
718
|
+
# at line 55:10: ( WS next_attr= attribute_name )*
|
719
|
+
while true # decision 14
|
720
|
+
alt_14 = 2
|
721
|
+
look_14_0 = @input.peek( 1 )
|
722
|
+
|
723
|
+
if ( look_14_0 == WS )
|
724
|
+
alt_14 = 1
|
725
|
+
|
726
|
+
end
|
727
|
+
case alt_14
|
728
|
+
when 1
|
729
|
+
# at line 55:12: WS next_attr= attribute_name
|
730
|
+
match( WS, TOKENS_FOLLOWING_WS_IN_category_attributes_395 )
|
731
|
+
@state.following.push( TOKENS_FOLLOWING_attribute_name_IN_category_attributes_399 )
|
732
|
+
next_attr = attribute_name
|
733
|
+
@state.following.pop
|
734
|
+
# --> action
|
735
|
+
hash.merge!(next_attr)
|
736
|
+
# <-- action
|
737
|
+
|
738
|
+
else
|
739
|
+
break # out of loop for decision 14
|
740
|
+
end
|
741
|
+
end # loop for decision 14
|
742
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_category_attributes_407 )
|
743
|
+
|
744
|
+
rescue ANTLR3::Error::RecognitionError => re
|
745
|
+
report_error(re)
|
746
|
+
recover(re)
|
747
|
+
|
748
|
+
ensure
|
749
|
+
# -> uncomment the next line to manually enable rule tracing
|
750
|
+
# trace_out( __method__, 9 )
|
751
|
+
|
752
|
+
end
|
753
|
+
|
754
|
+
return hash
|
755
|
+
end
|
756
|
+
|
757
|
+
|
758
|
+
#
|
759
|
+
# parser rule category_actions
|
760
|
+
#
|
761
|
+
# (in OCCIANTLR.g)
|
762
|
+
# 56:3: category_actions returns [array] : ';' ( WS )? 'actions' '=' '\"' act= uri ( WS next_act= uri )* '\"' ;
|
763
|
+
#
|
764
|
+
def category_actions
|
765
|
+
# -> uncomment the next line to manually enable rule tracing
|
766
|
+
# trace_in( __method__, 10 )
|
767
|
+
array = nil
|
768
|
+
act = nil
|
769
|
+
next_act = nil
|
770
|
+
# - - - - @init action - - - -
|
771
|
+
array = Array.new
|
772
|
+
|
773
|
+
begin
|
774
|
+
# at line 57:10: ';' ( WS )? 'actions' '=' '\"' act= uri ( WS next_act= uri )* '\"'
|
775
|
+
match( T__11, TOKENS_FOLLOWING_T__11_IN_category_actions_437 )
|
776
|
+
# at line 57:14: ( WS )?
|
777
|
+
alt_15 = 2
|
778
|
+
look_15_0 = @input.peek( 1 )
|
779
|
+
|
780
|
+
if ( look_15_0 == WS )
|
781
|
+
alt_15 = 1
|
782
|
+
end
|
783
|
+
case alt_15
|
784
|
+
when 1
|
785
|
+
# at line 57:14: WS
|
786
|
+
match( WS, TOKENS_FOLLOWING_WS_IN_category_actions_439 )
|
787
|
+
|
788
|
+
end
|
789
|
+
match( T__20, TOKENS_FOLLOWING_T__20_IN_category_actions_442 )
|
790
|
+
match( T__13, TOKENS_FOLLOWING_T__13_IN_category_actions_444 )
|
791
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_category_actions_446 )
|
792
|
+
@state.following.push( TOKENS_FOLLOWING_uri_IN_category_actions_450 )
|
793
|
+
act = uri
|
794
|
+
@state.following.pop
|
795
|
+
# --> action
|
796
|
+
array << ( act && @input.to_s( act.start, act.stop ) )
|
797
|
+
# <-- action
|
798
|
+
# at line 58:10: ( WS next_act= uri )*
|
799
|
+
while true # decision 16
|
800
|
+
alt_16 = 2
|
801
|
+
look_16_0 = @input.peek( 1 )
|
802
|
+
|
803
|
+
if ( look_16_0 == WS )
|
804
|
+
alt_16 = 1
|
805
|
+
|
806
|
+
end
|
807
|
+
case alt_16
|
808
|
+
when 1
|
809
|
+
# at line 58:12: WS next_act= uri
|
810
|
+
match( WS, TOKENS_FOLLOWING_WS_IN_category_actions_466 )
|
811
|
+
@state.following.push( TOKENS_FOLLOWING_uri_IN_category_actions_470 )
|
812
|
+
next_act = uri
|
813
|
+
@state.following.pop
|
814
|
+
# --> action
|
815
|
+
array << ( next_act && @input.to_s( next_act.start, next_act.stop ) )
|
816
|
+
# <-- action
|
817
|
+
|
818
|
+
else
|
819
|
+
break # out of loop for decision 16
|
820
|
+
end
|
821
|
+
end # loop for decision 16
|
822
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_category_actions_477 )
|
823
|
+
|
824
|
+
rescue ANTLR3::Error::RecognitionError => re
|
825
|
+
report_error(re)
|
826
|
+
recover(re)
|
827
|
+
|
828
|
+
ensure
|
829
|
+
# -> uncomment the next line to manually enable rule tracing
|
830
|
+
# trace_out( __method__, 10 )
|
831
|
+
|
832
|
+
end
|
833
|
+
|
834
|
+
return array
|
835
|
+
end
|
836
|
+
|
837
|
+
|
838
|
+
#
|
839
|
+
# parser rule link
|
840
|
+
#
|
841
|
+
# (in OCCIANTLR.g)
|
842
|
+
# 69:1: link returns [hash] : 'Link' ':' link_value ;
|
843
|
+
#
|
844
|
+
def link
|
845
|
+
# -> uncomment the next line to manually enable rule tracing
|
846
|
+
# trace_in( __method__, 11 )
|
847
|
+
hash = nil
|
848
|
+
link_value16 = nil
|
849
|
+
|
850
|
+
begin
|
851
|
+
# at line 70:4: 'Link' ':' link_value
|
852
|
+
match( T__21, TOKENS_FOLLOWING_T__21_IN_link_494 )
|
853
|
+
match( T__10, TOKENS_FOLLOWING_T__10_IN_link_496 )
|
854
|
+
@state.following.push( TOKENS_FOLLOWING_link_value_IN_link_498 )
|
855
|
+
link_value16 = link_value
|
856
|
+
@state.following.pop
|
857
|
+
# --> action
|
858
|
+
hash = link_value16
|
859
|
+
# <-- action
|
860
|
+
|
861
|
+
rescue ANTLR3::Error::RecognitionError => re
|
862
|
+
report_error(re)
|
863
|
+
recover(re)
|
864
|
+
|
865
|
+
ensure
|
866
|
+
# -> uncomment the next line to manually enable rule tracing
|
867
|
+
# trace_out( __method__, 11 )
|
868
|
+
|
869
|
+
end
|
870
|
+
|
871
|
+
return hash
|
872
|
+
end
|
873
|
+
|
874
|
+
|
875
|
+
#
|
876
|
+
# parser rule link_value
|
877
|
+
#
|
878
|
+
# (in OCCIANTLR.g)
|
879
|
+
# 71:2: link_value returns [hash] : link_target link_rel ( link_self )? ( link_category )? link_attributes ( ';' )? ;
|
880
|
+
#
|
881
|
+
def link_value
|
882
|
+
# -> uncomment the next line to manually enable rule tracing
|
883
|
+
# trace_in( __method__, 12 )
|
884
|
+
hash = nil
|
885
|
+
link_target17 = nil
|
886
|
+
link_rel18 = nil
|
887
|
+
link_self19 = nil
|
888
|
+
link_category20 = nil
|
889
|
+
link_attributes21 = nil
|
890
|
+
# - - - - @init action - - - -
|
891
|
+
hash = Hashie::Mash.new
|
892
|
+
|
893
|
+
begin
|
894
|
+
# at line 73:6: link_target link_rel ( link_self )? ( link_category )? link_attributes ( ';' )?
|
895
|
+
@state.following.push( TOKENS_FOLLOWING_link_target_IN_link_value_520 )
|
896
|
+
link_target17 = link_target
|
897
|
+
@state.following.pop
|
898
|
+
# --> action
|
899
|
+
hash[:target] = link_target17
|
900
|
+
# <-- action
|
901
|
+
@state.following.push( TOKENS_FOLLOWING_link_rel_IN_link_value_529 )
|
902
|
+
link_rel18 = link_rel
|
903
|
+
@state.following.pop
|
904
|
+
# --> action
|
905
|
+
hash[:rel] = link_rel18
|
906
|
+
# <-- action
|
907
|
+
# at line 75:6: ( link_self )?
|
908
|
+
alt_17 = 2
|
909
|
+
look_17_0 = @input.peek( 1 )
|
910
|
+
|
911
|
+
if ( look_17_0 == T__11 )
|
912
|
+
look_17_1 = @input.peek( 2 )
|
913
|
+
|
914
|
+
if ( look_17_1 == WS )
|
915
|
+
look_17_3 = @input.peek( 3 )
|
916
|
+
|
917
|
+
if ( look_17_3 == T__24 )
|
918
|
+
alt_17 = 1
|
919
|
+
end
|
920
|
+
elsif ( look_17_1 == T__24 )
|
921
|
+
alt_17 = 1
|
922
|
+
end
|
923
|
+
end
|
924
|
+
case alt_17
|
925
|
+
when 1
|
926
|
+
# at line 75:6: link_self
|
927
|
+
@state.following.push( TOKENS_FOLLOWING_link_self_IN_link_value_538 )
|
928
|
+
link_self19 = link_self
|
929
|
+
@state.following.pop
|
930
|
+
|
931
|
+
end
|
932
|
+
# --> action
|
933
|
+
hash[:self] = link_self19
|
934
|
+
# <-- action
|
935
|
+
# at line 76:6: ( link_category )?
|
936
|
+
alt_18 = 2
|
937
|
+
look_18_0 = @input.peek( 1 )
|
938
|
+
|
939
|
+
if ( look_18_0 == T__11 )
|
940
|
+
look_18_1 = @input.peek( 2 )
|
941
|
+
|
942
|
+
if ( look_18_1 == WS )
|
943
|
+
look_18_3 = @input.peek( 3 )
|
944
|
+
|
945
|
+
if ( look_18_3 == T__25 )
|
946
|
+
alt_18 = 1
|
947
|
+
end
|
948
|
+
elsif ( look_18_1 == T__25 )
|
949
|
+
alt_18 = 1
|
950
|
+
end
|
951
|
+
end
|
952
|
+
case alt_18
|
953
|
+
when 1
|
954
|
+
# at line 76:6: link_category
|
955
|
+
@state.following.push( TOKENS_FOLLOWING_link_category_IN_link_value_548 )
|
956
|
+
link_category20 = link_category
|
957
|
+
@state.following.pop
|
958
|
+
|
959
|
+
end
|
960
|
+
# --> action
|
961
|
+
hash[:category] = link_category20
|
962
|
+
# <-- action
|
963
|
+
@state.following.push( TOKENS_FOLLOWING_link_attributes_IN_link_value_558 )
|
964
|
+
link_attributes21 = link_attributes
|
965
|
+
@state.following.pop
|
966
|
+
# --> action
|
967
|
+
hash[:attributes] = link_attributes21
|
968
|
+
# <-- action
|
969
|
+
# at line 78:6: ( ';' )?
|
970
|
+
alt_19 = 2
|
971
|
+
look_19_0 = @input.peek( 1 )
|
972
|
+
|
973
|
+
if ( look_19_0 == T__11 )
|
974
|
+
alt_19 = 1
|
975
|
+
end
|
976
|
+
case alt_19
|
977
|
+
when 1
|
978
|
+
# at line 78:6: ';'
|
979
|
+
match( T__11, TOKENS_FOLLOWING_T__11_IN_link_value_567 )
|
980
|
+
|
981
|
+
end
|
982
|
+
|
983
|
+
rescue ANTLR3::Error::RecognitionError => re
|
984
|
+
report_error(re)
|
985
|
+
recover(re)
|
986
|
+
|
987
|
+
ensure
|
988
|
+
# -> uncomment the next line to manually enable rule tracing
|
989
|
+
# trace_out( __method__, 12 )
|
990
|
+
|
991
|
+
end
|
992
|
+
|
993
|
+
return hash
|
994
|
+
end
|
995
|
+
|
996
|
+
|
997
|
+
#
|
998
|
+
# parser rule link_target
|
999
|
+
#
|
1000
|
+
# (in OCCIANTLR.g)
|
1001
|
+
# 80:2: link_target returns [value] : ( WS )? '<' uri '>' ;
|
1002
|
+
#
|
1003
|
+
def link_target
|
1004
|
+
# -> uncomment the next line to manually enable rule tracing
|
1005
|
+
# trace_in( __method__, 13 )
|
1006
|
+
value = nil
|
1007
|
+
uri22 = nil
|
1008
|
+
|
1009
|
+
begin
|
1010
|
+
# at line 80:32: ( WS )? '<' uri '>'
|
1011
|
+
# at line 80:32: ( WS )?
|
1012
|
+
alt_20 = 2
|
1013
|
+
look_20_0 = @input.peek( 1 )
|
1014
|
+
|
1015
|
+
if ( look_20_0 == WS )
|
1016
|
+
alt_20 = 1
|
1017
|
+
end
|
1018
|
+
case alt_20
|
1019
|
+
when 1
|
1020
|
+
# at line 80:32: WS
|
1021
|
+
match( WS, TOKENS_FOLLOWING_WS_IN_link_target_586 )
|
1022
|
+
|
1023
|
+
end
|
1024
|
+
match( T__22, TOKENS_FOLLOWING_T__22_IN_link_target_589 )
|
1025
|
+
@state.following.push( TOKENS_FOLLOWING_uri_IN_link_target_591 )
|
1026
|
+
uri22 = uri
|
1027
|
+
@state.following.pop
|
1028
|
+
match( T__23, TOKENS_FOLLOWING_T__23_IN_link_target_593 )
|
1029
|
+
# --> action
|
1030
|
+
value = ( uri22 && @input.to_s( uri22.start, uri22.stop ) )
|
1031
|
+
# <-- action
|
1032
|
+
|
1033
|
+
rescue ANTLR3::Error::RecognitionError => re
|
1034
|
+
report_error(re)
|
1035
|
+
recover(re)
|
1036
|
+
|
1037
|
+
ensure
|
1038
|
+
# -> uncomment the next line to manually enable rule tracing
|
1039
|
+
# trace_out( __method__, 13 )
|
1040
|
+
|
1041
|
+
end
|
1042
|
+
|
1043
|
+
return value
|
1044
|
+
end
|
1045
|
+
|
1046
|
+
|
1047
|
+
#
|
1048
|
+
# parser rule link_rel
|
1049
|
+
#
|
1050
|
+
# (in OCCIANTLR.g)
|
1051
|
+
# 81:2: link_rel returns [value] : ';' ( WS )? 'rel' '=' '\"' uri '\"' ;
|
1052
|
+
#
|
1053
|
+
def link_rel
|
1054
|
+
# -> uncomment the next line to manually enable rule tracing
|
1055
|
+
# trace_in( __method__, 14 )
|
1056
|
+
value = nil
|
1057
|
+
uri23 = nil
|
1058
|
+
|
1059
|
+
begin
|
1060
|
+
# at line 81:30: ';' ( WS )? 'rel' '=' '\"' uri '\"'
|
1061
|
+
match( T__11, TOKENS_FOLLOWING_T__11_IN_link_rel_608 )
|
1062
|
+
# at line 81:34: ( WS )?
|
1063
|
+
alt_21 = 2
|
1064
|
+
look_21_0 = @input.peek( 1 )
|
1065
|
+
|
1066
|
+
if ( look_21_0 == WS )
|
1067
|
+
alt_21 = 1
|
1068
|
+
end
|
1069
|
+
case alt_21
|
1070
|
+
when 1
|
1071
|
+
# at line 81:34: WS
|
1072
|
+
match( WS, TOKENS_FOLLOWING_WS_IN_link_rel_610 )
|
1073
|
+
|
1074
|
+
end
|
1075
|
+
match( T__17, TOKENS_FOLLOWING_T__17_IN_link_rel_613 )
|
1076
|
+
match( T__13, TOKENS_FOLLOWING_T__13_IN_link_rel_615 )
|
1077
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_link_rel_617 )
|
1078
|
+
@state.following.push( TOKENS_FOLLOWING_uri_IN_link_rel_619 )
|
1079
|
+
uri23 = uri
|
1080
|
+
@state.following.pop
|
1081
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_link_rel_621 )
|
1082
|
+
# --> action
|
1083
|
+
value = ( uri23 && @input.to_s( uri23.start, uri23.stop ) )
|
1084
|
+
# <-- action
|
1085
|
+
|
1086
|
+
rescue ANTLR3::Error::RecognitionError => re
|
1087
|
+
report_error(re)
|
1088
|
+
recover(re)
|
1089
|
+
|
1090
|
+
ensure
|
1091
|
+
# -> uncomment the next line to manually enable rule tracing
|
1092
|
+
# trace_out( __method__, 14 )
|
1093
|
+
|
1094
|
+
end
|
1095
|
+
|
1096
|
+
return value
|
1097
|
+
end
|
1098
|
+
|
1099
|
+
|
1100
|
+
#
|
1101
|
+
# parser rule link_self
|
1102
|
+
#
|
1103
|
+
# (in OCCIANTLR.g)
|
1104
|
+
# 82:2: link_self returns [value] : ';' ( WS )? 'self' '=' '\"' uri '\"' ;
|
1105
|
+
#
|
1106
|
+
def link_self
|
1107
|
+
# -> uncomment the next line to manually enable rule tracing
|
1108
|
+
# trace_in( __method__, 15 )
|
1109
|
+
value = nil
|
1110
|
+
uri24 = nil
|
1111
|
+
|
1112
|
+
begin
|
1113
|
+
# at line 82:31: ';' ( WS )? 'self' '=' '\"' uri '\"'
|
1114
|
+
match( T__11, TOKENS_FOLLOWING_T__11_IN_link_self_636 )
|
1115
|
+
# at line 82:35: ( WS )?
|
1116
|
+
alt_22 = 2
|
1117
|
+
look_22_0 = @input.peek( 1 )
|
1118
|
+
|
1119
|
+
if ( look_22_0 == WS )
|
1120
|
+
alt_22 = 1
|
1121
|
+
end
|
1122
|
+
case alt_22
|
1123
|
+
when 1
|
1124
|
+
# at line 82:35: WS
|
1125
|
+
match( WS, TOKENS_FOLLOWING_WS_IN_link_self_638 )
|
1126
|
+
|
1127
|
+
end
|
1128
|
+
match( T__24, TOKENS_FOLLOWING_T__24_IN_link_self_641 )
|
1129
|
+
match( T__13, TOKENS_FOLLOWING_T__13_IN_link_self_643 )
|
1130
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_link_self_645 )
|
1131
|
+
@state.following.push( TOKENS_FOLLOWING_uri_IN_link_self_647 )
|
1132
|
+
uri24 = uri
|
1133
|
+
@state.following.pop
|
1134
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_link_self_649 )
|
1135
|
+
# --> action
|
1136
|
+
value = ( uri24 && @input.to_s( uri24.start, uri24.stop ) )
|
1137
|
+
# <-- action
|
1138
|
+
|
1139
|
+
rescue ANTLR3::Error::RecognitionError => re
|
1140
|
+
report_error(re)
|
1141
|
+
recover(re)
|
1142
|
+
|
1143
|
+
ensure
|
1144
|
+
# -> uncomment the next line to manually enable rule tracing
|
1145
|
+
# trace_out( __method__, 15 )
|
1146
|
+
|
1147
|
+
end
|
1148
|
+
|
1149
|
+
return value
|
1150
|
+
end
|
1151
|
+
|
1152
|
+
|
1153
|
+
#
|
1154
|
+
# parser rule link_category
|
1155
|
+
#
|
1156
|
+
# (in OCCIANTLR.g)
|
1157
|
+
# 83:2: link_category returns [value] : ';' ( WS )? 'category' '=' '\"' uri '\"' ;
|
1158
|
+
#
|
1159
|
+
def link_category
|
1160
|
+
# -> uncomment the next line to manually enable rule tracing
|
1161
|
+
# trace_in( __method__, 16 )
|
1162
|
+
value = nil
|
1163
|
+
uri25 = nil
|
1164
|
+
|
1165
|
+
begin
|
1166
|
+
# at line 83:35: ';' ( WS )? 'category' '=' '\"' uri '\"'
|
1167
|
+
match( T__11, TOKENS_FOLLOWING_T__11_IN_link_category_664 )
|
1168
|
+
# at line 83:39: ( WS )?
|
1169
|
+
alt_23 = 2
|
1170
|
+
look_23_0 = @input.peek( 1 )
|
1171
|
+
|
1172
|
+
if ( look_23_0 == WS )
|
1173
|
+
alt_23 = 1
|
1174
|
+
end
|
1175
|
+
case alt_23
|
1176
|
+
when 1
|
1177
|
+
# at line 83:39: WS
|
1178
|
+
match( WS, TOKENS_FOLLOWING_WS_IN_link_category_666 )
|
1179
|
+
|
1180
|
+
end
|
1181
|
+
match( T__25, TOKENS_FOLLOWING_T__25_IN_link_category_669 )
|
1182
|
+
match( T__13, TOKENS_FOLLOWING_T__13_IN_link_category_671 )
|
1183
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_link_category_673 )
|
1184
|
+
@state.following.push( TOKENS_FOLLOWING_uri_IN_link_category_675 )
|
1185
|
+
uri25 = uri
|
1186
|
+
@state.following.pop
|
1187
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_link_category_677 )
|
1188
|
+
# --> action
|
1189
|
+
value = ( uri25 && @input.to_s( uri25.start, uri25.stop ) )
|
1190
|
+
# <-- action
|
1191
|
+
|
1192
|
+
rescue ANTLR3::Error::RecognitionError => re
|
1193
|
+
report_error(re)
|
1194
|
+
recover(re)
|
1195
|
+
|
1196
|
+
ensure
|
1197
|
+
# -> uncomment the next line to manually enable rule tracing
|
1198
|
+
# trace_out( __method__, 16 )
|
1199
|
+
|
1200
|
+
end
|
1201
|
+
|
1202
|
+
return value
|
1203
|
+
end
|
1204
|
+
|
1205
|
+
|
1206
|
+
#
|
1207
|
+
# parser rule link_attributes
|
1208
|
+
#
|
1209
|
+
# (in OCCIANTLR.g)
|
1210
|
+
# 84:2: link_attributes returns [hash] : ( ';' ( WS )? attribute )* ;
|
1211
|
+
#
|
1212
|
+
def link_attributes
|
1213
|
+
# -> uncomment the next line to manually enable rule tracing
|
1214
|
+
# trace_in( __method__, 17 )
|
1215
|
+
hash = nil
|
1216
|
+
attribute26 = nil
|
1217
|
+
# - - - - @init action - - - -
|
1218
|
+
hash = Hashie::Mash.new
|
1219
|
+
|
1220
|
+
begin
|
1221
|
+
# at line 85:8: ( ';' ( WS )? attribute )*
|
1222
|
+
# at line 85:8: ( ';' ( WS )? attribute )*
|
1223
|
+
while true # decision 25
|
1224
|
+
alt_25 = 2
|
1225
|
+
look_25_0 = @input.peek( 1 )
|
1226
|
+
|
1227
|
+
if ( look_25_0 == T__11 )
|
1228
|
+
look_25_1 = @input.peek( 2 )
|
1229
|
+
|
1230
|
+
if ( look_25_1.between?( WS, LOALPHA ) )
|
1231
|
+
alt_25 = 1
|
1232
|
+
|
1233
|
+
end
|
1234
|
+
|
1235
|
+
end
|
1236
|
+
case alt_25
|
1237
|
+
when 1
|
1238
|
+
# at line 85:9: ';' ( WS )? attribute
|
1239
|
+
match( T__11, TOKENS_FOLLOWING_T__11_IN_link_attributes_703 )
|
1240
|
+
# at line 85:13: ( WS )?
|
1241
|
+
alt_24 = 2
|
1242
|
+
look_24_0 = @input.peek( 1 )
|
1243
|
+
|
1244
|
+
if ( look_24_0 == WS )
|
1245
|
+
alt_24 = 1
|
1246
|
+
end
|
1247
|
+
case alt_24
|
1248
|
+
when 1
|
1249
|
+
# at line 85:13: WS
|
1250
|
+
match( WS, TOKENS_FOLLOWING_WS_IN_link_attributes_705 )
|
1251
|
+
|
1252
|
+
end
|
1253
|
+
@state.following.push( TOKENS_FOLLOWING_attribute_IN_link_attributes_708 )
|
1254
|
+
attribute26 = attribute
|
1255
|
+
@state.following.pop
|
1256
|
+
# --> action
|
1257
|
+
hash.merge!(attribute26)
|
1258
|
+
# <-- action
|
1259
|
+
|
1260
|
+
else
|
1261
|
+
break # out of loop for decision 25
|
1262
|
+
end
|
1263
|
+
end # loop for decision 25
|
1264
|
+
|
1265
|
+
rescue ANTLR3::Error::RecognitionError => re
|
1266
|
+
report_error(re)
|
1267
|
+
recover(re)
|
1268
|
+
|
1269
|
+
ensure
|
1270
|
+
# -> uncomment the next line to manually enable rule tracing
|
1271
|
+
# trace_out( __method__, 17 )
|
1272
|
+
|
1273
|
+
end
|
1274
|
+
|
1275
|
+
return hash
|
1276
|
+
end
|
1277
|
+
|
1278
|
+
|
1279
|
+
#
|
1280
|
+
# parser rule x_occi_attribute
|
1281
|
+
#
|
1282
|
+
# (in OCCIANTLR.g)
|
1283
|
+
# 97:1: x_occi_attribute returns [hash] : 'X-OCCI-Attribute' ':' ( WS )? attribute ( ';' )? ;
|
1284
|
+
#
|
1285
|
+
def x_occi_attribute
|
1286
|
+
# -> uncomment the next line to manually enable rule tracing
|
1287
|
+
# trace_in( __method__, 18 )
|
1288
|
+
hash = nil
|
1289
|
+
attribute27 = nil
|
1290
|
+
|
1291
|
+
begin
|
1292
|
+
# at line 98:4: 'X-OCCI-Attribute' ':' ( WS )? attribute ( ';' )?
|
1293
|
+
match( T__26, TOKENS_FOLLOWING_T__26_IN_x_occi_attribute_729 )
|
1294
|
+
match( T__10, TOKENS_FOLLOWING_T__10_IN_x_occi_attribute_731 )
|
1295
|
+
# at line 98:27: ( WS )?
|
1296
|
+
alt_26 = 2
|
1297
|
+
look_26_0 = @input.peek( 1 )
|
1298
|
+
|
1299
|
+
if ( look_26_0 == WS )
|
1300
|
+
alt_26 = 1
|
1301
|
+
end
|
1302
|
+
case alt_26
|
1303
|
+
when 1
|
1304
|
+
# at line 98:27: WS
|
1305
|
+
match( WS, TOKENS_FOLLOWING_WS_IN_x_occi_attribute_733 )
|
1306
|
+
|
1307
|
+
end
|
1308
|
+
@state.following.push( TOKENS_FOLLOWING_attribute_IN_x_occi_attribute_736 )
|
1309
|
+
attribute27 = attribute
|
1310
|
+
@state.following.pop
|
1311
|
+
# at line 98:41: ( ';' )?
|
1312
|
+
alt_27 = 2
|
1313
|
+
look_27_0 = @input.peek( 1 )
|
1314
|
+
|
1315
|
+
if ( look_27_0 == T__11 )
|
1316
|
+
alt_27 = 1
|
1317
|
+
end
|
1318
|
+
case alt_27
|
1319
|
+
when 1
|
1320
|
+
# at line 98:41: ';'
|
1321
|
+
match( T__11, TOKENS_FOLLOWING_T__11_IN_x_occi_attribute_738 )
|
1322
|
+
|
1323
|
+
end
|
1324
|
+
# --> action
|
1325
|
+
hash = attribute27
|
1326
|
+
# <-- action
|
1327
|
+
|
1328
|
+
rescue ANTLR3::Error::RecognitionError => re
|
1329
|
+
report_error(re)
|
1330
|
+
recover(re)
|
1331
|
+
|
1332
|
+
ensure
|
1333
|
+
# -> uncomment the next line to manually enable rule tracing
|
1334
|
+
# trace_out( __method__, 18 )
|
1335
|
+
|
1336
|
+
end
|
1337
|
+
|
1338
|
+
return hash
|
1339
|
+
end
|
1340
|
+
|
1341
|
+
|
1342
|
+
#
|
1343
|
+
# parser rule x_occi_location
|
1344
|
+
#
|
1345
|
+
# (in OCCIANTLR.g)
|
1346
|
+
# 106:1: x_occi_location returns [location] : 'X-OCCI-Location' ':' ( WS )? uri ( ';' )? ;
|
1347
|
+
#
|
1348
|
+
def x_occi_location
|
1349
|
+
# -> uncomment the next line to manually enable rule tracing
|
1350
|
+
# trace_in( __method__, 19 )
|
1351
|
+
location = nil
|
1352
|
+
uri28 = nil
|
1353
|
+
|
1354
|
+
begin
|
1355
|
+
# at line 107:4: 'X-OCCI-Location' ':' ( WS )? uri ( ';' )?
|
1356
|
+
match( T__27, TOKENS_FOLLOWING_T__27_IN_x_occi_location_758 )
|
1357
|
+
match( T__10, TOKENS_FOLLOWING_T__10_IN_x_occi_location_760 )
|
1358
|
+
# at line 107:26: ( WS )?
|
1359
|
+
alt_28 = 2
|
1360
|
+
look_28_0 = @input.peek( 1 )
|
1361
|
+
|
1362
|
+
if ( look_28_0 == WS )
|
1363
|
+
alt_28 = 1
|
1364
|
+
end
|
1365
|
+
case alt_28
|
1366
|
+
when 1
|
1367
|
+
# at line 107:26: WS
|
1368
|
+
match( WS, TOKENS_FOLLOWING_WS_IN_x_occi_location_762 )
|
1369
|
+
|
1370
|
+
end
|
1371
|
+
@state.following.push( TOKENS_FOLLOWING_uri_IN_x_occi_location_765 )
|
1372
|
+
uri28 = uri
|
1373
|
+
@state.following.pop
|
1374
|
+
# at line 107:34: ( ';' )?
|
1375
|
+
alt_29 = 2
|
1376
|
+
look_29_0 = @input.peek( 1 )
|
1377
|
+
|
1378
|
+
if ( look_29_0 == T__11 )
|
1379
|
+
alt_29 = 1
|
1380
|
+
end
|
1381
|
+
case alt_29
|
1382
|
+
when 1
|
1383
|
+
# at line 107:34: ';'
|
1384
|
+
match( T__11, TOKENS_FOLLOWING_T__11_IN_x_occi_location_767 )
|
1385
|
+
|
1386
|
+
end
|
1387
|
+
# --> action
|
1388
|
+
location = URI.parse(( uri28 && @input.to_s( uri28.start, uri28.stop ) ))
|
1389
|
+
# <-- action
|
1390
|
+
|
1391
|
+
rescue ANTLR3::Error::RecognitionError => re
|
1392
|
+
report_error(re)
|
1393
|
+
recover(re)
|
1394
|
+
|
1395
|
+
ensure
|
1396
|
+
# -> uncomment the next line to manually enable rule tracing
|
1397
|
+
# trace_out( __method__, 19 )
|
1398
|
+
|
1399
|
+
end
|
1400
|
+
|
1401
|
+
return location
|
1402
|
+
end
|
1403
|
+
|
1404
|
+
UriReturnValue = define_return_scope
|
1405
|
+
|
1406
|
+
#
|
1407
|
+
# parser rule uri
|
1408
|
+
#
|
1409
|
+
# (in OCCIANTLR.g)
|
1410
|
+
# 109:1: uri : ( LOALPHA | UPALPHA | DIGIT | '@' | ':' | '%' | '_' | '\\\\' | '+' | '.' | '~' | '#' | '?' | '&' | '/' | '=' | '-' | 'action' | 'kind' | 'mixin' | 'location' | 'attributes' | 'rel' | 'title' | 'actions' | 'scheme' | 'term' | 'category' | 'self' | 'Link' )+ ;
|
1411
|
+
#
|
1412
|
+
def uri
|
1413
|
+
# -> uncomment the next line to manually enable rule tracing
|
1414
|
+
# trace_in( __method__, 20 )
|
1415
|
+
return_value = UriReturnValue.new
|
1416
|
+
|
1417
|
+
# $rule.start = the first token seen before matching
|
1418
|
+
return_value.start = @input.look
|
1419
|
+
|
1420
|
+
begin
|
1421
|
+
# at line 109:9: ( LOALPHA | UPALPHA | DIGIT | '@' | ':' | '%' | '_' | '\\\\' | '+' | '.' | '~' | '#' | '?' | '&' | '/' | '=' | '-' | 'action' | 'kind' | 'mixin' | 'location' | 'attributes' | 'rel' | 'title' | 'actions' | 'scheme' | 'term' | 'category' | 'self' | 'Link' )+
|
1422
|
+
# at file 109:9: ( LOALPHA | UPALPHA | DIGIT | '@' | ':' | '%' | '_' | '\\\\' | '+' | '.' | '~' | '#' | '?' | '&' | '/' | '=' | '-' | 'action' | 'kind' | 'mixin' | 'location' | 'attributes' | 'rel' | 'title' | 'actions' | 'scheme' | 'term' | 'category' | 'self' | 'Link' )+
|
1423
|
+
match_count_30 = 0
|
1424
|
+
while true
|
1425
|
+
alt_30 = 2
|
1426
|
+
look_30_0 = @input.peek( 1 )
|
1427
|
+
|
1428
|
+
if ( look_30_0.between?( LOALPHA, DIGIT ) || look_30_0 == T__10 || look_30_0.between?( T__12, T__13 ) || look_30_0.between?( T__16, T__21 ) || look_30_0.between?( T__24, T__25 ) || look_30_0.between?( T__28, T__43 ) )
|
1429
|
+
alt_30 = 1
|
1430
|
+
|
1431
|
+
end
|
1432
|
+
case alt_30
|
1433
|
+
when 1
|
1434
|
+
# at line
|
1435
|
+
if @input.peek( 1 ).between?( LOALPHA, DIGIT ) || @input.peek(1) == T__10 || @input.peek( 1 ).between?( T__12, T__13 ) || @input.peek( 1 ).between?( T__16, T__21 ) || @input.peek( 1 ).between?( T__24, T__25 ) || @input.peek( 1 ).between?( T__28, T__43 )
|
1436
|
+
@input.consume
|
1437
|
+
@state.error_recovery = false
|
1438
|
+
else
|
1439
|
+
mse = MismatchedSet( nil )
|
1440
|
+
raise mse
|
1441
|
+
end
|
1442
|
+
|
1443
|
+
|
1444
|
+
|
1445
|
+
else
|
1446
|
+
match_count_30 > 0 and break
|
1447
|
+
eee = EarlyExit(30)
|
1448
|
+
|
1449
|
+
|
1450
|
+
raise eee
|
1451
|
+
end
|
1452
|
+
match_count_30 += 1
|
1453
|
+
end
|
1454
|
+
|
1455
|
+
# - - - - - - - rule clean up - - - - - - - -
|
1456
|
+
return_value.stop = @input.look( -1 )
|
1457
|
+
|
1458
|
+
rescue ANTLR3::Error::RecognitionError => re
|
1459
|
+
report_error(re)
|
1460
|
+
recover(re)
|
1461
|
+
|
1462
|
+
ensure
|
1463
|
+
# -> uncomment the next line to manually enable rule tracing
|
1464
|
+
# trace_out( __method__, 20 )
|
1465
|
+
|
1466
|
+
end
|
1467
|
+
|
1468
|
+
return return_value
|
1469
|
+
end
|
1470
|
+
|
1471
|
+
TermReturnValue = define_return_scope
|
1472
|
+
|
1473
|
+
#
|
1474
|
+
# parser rule term
|
1475
|
+
#
|
1476
|
+
# (in OCCIANTLR.g)
|
1477
|
+
# 110:1: term : LOALPHA ( LOALPHA | DIGIT | '-' | '_' )* ;
|
1478
|
+
#
|
1479
|
+
def term
|
1480
|
+
# -> uncomment the next line to manually enable rule tracing
|
1481
|
+
# trace_in( __method__, 21 )
|
1482
|
+
return_value = TermReturnValue.new
|
1483
|
+
|
1484
|
+
# $rule.start = the first token seen before matching
|
1485
|
+
return_value.start = @input.look
|
1486
|
+
|
1487
|
+
begin
|
1488
|
+
# at line 110:10: LOALPHA ( LOALPHA | DIGIT | '-' | '_' )*
|
1489
|
+
match( LOALPHA, TOKENS_FOLLOWING_LOALPHA_IN_term_911 )
|
1490
|
+
# at line 110:18: ( LOALPHA | DIGIT | '-' | '_' )*
|
1491
|
+
while true # decision 31
|
1492
|
+
alt_31 = 2
|
1493
|
+
look_31_0 = @input.peek( 1 )
|
1494
|
+
|
1495
|
+
if ( look_31_0 == LOALPHA || look_31_0 == DIGIT || look_31_0 == T__30 || look_31_0 == T__39 )
|
1496
|
+
alt_31 = 1
|
1497
|
+
|
1498
|
+
end
|
1499
|
+
case alt_31
|
1500
|
+
when 1
|
1501
|
+
# at line
|
1502
|
+
if @input.peek(1) == LOALPHA || @input.peek(1) == DIGIT || @input.peek(1) == T__30 || @input.peek(1) == T__39
|
1503
|
+
@input.consume
|
1504
|
+
@state.error_recovery = false
|
1505
|
+
else
|
1506
|
+
mse = MismatchedSet( nil )
|
1507
|
+
raise mse
|
1508
|
+
end
|
1509
|
+
|
1510
|
+
|
1511
|
+
|
1512
|
+
else
|
1513
|
+
break # out of loop for decision 31
|
1514
|
+
end
|
1515
|
+
end # loop for decision 31
|
1516
|
+
# - - - - - - - rule clean up - - - - - - - -
|
1517
|
+
return_value.stop = @input.look( -1 )
|
1518
|
+
|
1519
|
+
rescue ANTLR3::Error::RecognitionError => re
|
1520
|
+
report_error(re)
|
1521
|
+
recover(re)
|
1522
|
+
|
1523
|
+
ensure
|
1524
|
+
# -> uncomment the next line to manually enable rule tracing
|
1525
|
+
# trace_out( __method__, 21 )
|
1526
|
+
|
1527
|
+
end
|
1528
|
+
|
1529
|
+
return return_value
|
1530
|
+
end
|
1531
|
+
|
1532
|
+
SchemeReturnValue = define_return_scope
|
1533
|
+
|
1534
|
+
#
|
1535
|
+
# parser rule scheme
|
1536
|
+
#
|
1537
|
+
# (in OCCIANTLR.g)
|
1538
|
+
# 111:1: scheme : uri ;
|
1539
|
+
#
|
1540
|
+
def scheme
|
1541
|
+
# -> uncomment the next line to manually enable rule tracing
|
1542
|
+
# trace_in( __method__, 22 )
|
1543
|
+
return_value = SchemeReturnValue.new
|
1544
|
+
|
1545
|
+
# $rule.start = the first token seen before matching
|
1546
|
+
return_value.start = @input.look
|
1547
|
+
|
1548
|
+
begin
|
1549
|
+
# at line 111:20: uri
|
1550
|
+
@state.following.push( TOKENS_FOLLOWING_uri_IN_scheme_946 )
|
1551
|
+
uri
|
1552
|
+
@state.following.pop
|
1553
|
+
# - - - - - - - rule clean up - - - - - - - -
|
1554
|
+
return_value.stop = @input.look( -1 )
|
1555
|
+
|
1556
|
+
rescue ANTLR3::Error::RecognitionError => re
|
1557
|
+
report_error(re)
|
1558
|
+
recover(re)
|
1559
|
+
|
1560
|
+
ensure
|
1561
|
+
# -> uncomment the next line to manually enable rule tracing
|
1562
|
+
# trace_out( __method__, 22 )
|
1563
|
+
|
1564
|
+
end
|
1565
|
+
|
1566
|
+
return return_value
|
1567
|
+
end
|
1568
|
+
|
1569
|
+
ClassTypeReturnValue = define_return_scope
|
1570
|
+
|
1571
|
+
#
|
1572
|
+
# parser rule class_type
|
1573
|
+
#
|
1574
|
+
# (in OCCIANTLR.g)
|
1575
|
+
# 112:1: class_type : ( 'kind' | 'mixin' | 'action' ) ;
|
1576
|
+
#
|
1577
|
+
def class_type
|
1578
|
+
# -> uncomment the next line to manually enable rule tracing
|
1579
|
+
# trace_in( __method__, 23 )
|
1580
|
+
return_value = ClassTypeReturnValue.new
|
1581
|
+
|
1582
|
+
# $rule.start = the first token seen before matching
|
1583
|
+
return_value.start = @input.look
|
1584
|
+
|
1585
|
+
begin
|
1586
|
+
# at line 112:15: ( 'kind' | 'mixin' | 'action' )
|
1587
|
+
if @input.peek( 1 ).between?( T__40, T__42 )
|
1588
|
+
@input.consume
|
1589
|
+
@state.error_recovery = false
|
1590
|
+
else
|
1591
|
+
mse = MismatchedSet( nil )
|
1592
|
+
raise mse
|
1593
|
+
end
|
1594
|
+
|
1595
|
+
|
1596
|
+
# - - - - - - - rule clean up - - - - - - - -
|
1597
|
+
return_value.stop = @input.look( -1 )
|
1598
|
+
|
1599
|
+
rescue ANTLR3::Error::RecognitionError => re
|
1600
|
+
report_error(re)
|
1601
|
+
recover(re)
|
1602
|
+
|
1603
|
+
ensure
|
1604
|
+
# -> uncomment the next line to manually enable rule tracing
|
1605
|
+
# trace_out( __method__, 23 )
|
1606
|
+
|
1607
|
+
end
|
1608
|
+
|
1609
|
+
return return_value
|
1610
|
+
end
|
1611
|
+
|
1612
|
+
TitleReturnValue = define_return_scope
|
1613
|
+
|
1614
|
+
#
|
1615
|
+
# parser rule title
|
1616
|
+
#
|
1617
|
+
# (in OCCIANTLR.g)
|
1618
|
+
# 113:1: title : ( ESC | ~ ( '\\\\' | '\"' | '\\'' ) | '\\'' )* ;
|
1619
|
+
#
|
1620
|
+
def title
|
1621
|
+
# -> uncomment the next line to manually enable rule tracing
|
1622
|
+
# trace_in( __method__, 24 )
|
1623
|
+
return_value = TitleReturnValue.new
|
1624
|
+
|
1625
|
+
# $rule.start = the first token seen before matching
|
1626
|
+
return_value.start = @input.look
|
1627
|
+
|
1628
|
+
begin
|
1629
|
+
# at line 113:11: ( ESC | ~ ( '\\\\' | '\"' | '\\'' ) | '\\'' )*
|
1630
|
+
# at line 113:11: ( ESC | ~ ( '\\\\' | '\"' | '\\'' ) | '\\'' )*
|
1631
|
+
while true # decision 32
|
1632
|
+
alt_32 = 2
|
1633
|
+
look_32_0 = @input.peek( 1 )
|
1634
|
+
|
1635
|
+
if ( look_32_0.between?( WS, T__13 ) || look_32_0.between?( T__15, T__30 ) || look_32_0.between?( T__32, T__44 ) )
|
1636
|
+
alt_32 = 1
|
1637
|
+
|
1638
|
+
end
|
1639
|
+
case alt_32
|
1640
|
+
when 1
|
1641
|
+
# at line
|
1642
|
+
if @input.peek( 1 ).between?( WS, T__13 ) || @input.peek( 1 ).between?( T__15, T__30 ) || @input.peek( 1 ).between?( T__32, T__44 )
|
1643
|
+
@input.consume
|
1644
|
+
@state.error_recovery = false
|
1645
|
+
else
|
1646
|
+
mse = MismatchedSet( nil )
|
1647
|
+
raise mse
|
1648
|
+
end
|
1649
|
+
|
1650
|
+
|
1651
|
+
|
1652
|
+
else
|
1653
|
+
break # out of loop for decision 32
|
1654
|
+
end
|
1655
|
+
end # loop for decision 32
|
1656
|
+
# - - - - - - - rule clean up - - - - - - - -
|
1657
|
+
return_value.stop = @input.look( -1 )
|
1658
|
+
|
1659
|
+
rescue ANTLR3::Error::RecognitionError => re
|
1660
|
+
report_error(re)
|
1661
|
+
recover(re)
|
1662
|
+
|
1663
|
+
ensure
|
1664
|
+
# -> uncomment the next line to manually enable rule tracing
|
1665
|
+
# trace_out( __method__, 24 )
|
1666
|
+
|
1667
|
+
end
|
1668
|
+
|
1669
|
+
return return_value
|
1670
|
+
end
|
1671
|
+
|
1672
|
+
|
1673
|
+
#
|
1674
|
+
# parser rule attribute
|
1675
|
+
#
|
1676
|
+
# (in OCCIANTLR.g)
|
1677
|
+
# 114:1: attribute returns [hash] : comp_first= attribute_component ( '.' comp_next= attribute_component )* '=' attribute_value ;
|
1678
|
+
#
|
1679
|
+
def attribute
|
1680
|
+
# -> uncomment the next line to manually enable rule tracing
|
1681
|
+
# trace_in( __method__, 25 )
|
1682
|
+
hash = nil
|
1683
|
+
comp_first = nil
|
1684
|
+
comp_next = nil
|
1685
|
+
attribute_value29 = nil
|
1686
|
+
# - - - - @init action - - - -
|
1687
|
+
hash = Hashie::Mash.new
|
1688
|
+
|
1689
|
+
begin
|
1690
|
+
# at line 115:6: comp_first= attribute_component ( '.' comp_next= attribute_component )* '=' attribute_value
|
1691
|
+
@state.following.push( TOKENS_FOLLOWING_attribute_component_IN_attribute_1023 )
|
1692
|
+
comp_first = attribute_component
|
1693
|
+
@state.following.pop
|
1694
|
+
# --> action
|
1695
|
+
cur_hash = hash; comp = ( comp_first && @input.to_s( comp_first.start, comp_first.stop ) )
|
1696
|
+
# <-- action
|
1697
|
+
# at line 116:6: ( '.' comp_next= attribute_component )*
|
1698
|
+
while true # decision 33
|
1699
|
+
alt_33 = 2
|
1700
|
+
look_33_0 = @input.peek( 1 )
|
1701
|
+
|
1702
|
+
if ( look_33_0 == T__33 )
|
1703
|
+
alt_33 = 1
|
1704
|
+
|
1705
|
+
end
|
1706
|
+
case alt_33
|
1707
|
+
when 1
|
1708
|
+
# at line 116:8: '.' comp_next= attribute_component
|
1709
|
+
match( T__33, TOKENS_FOLLOWING_T__33_IN_attribute_1034 )
|
1710
|
+
@state.following.push( TOKENS_FOLLOWING_attribute_component_IN_attribute_1038 )
|
1711
|
+
comp_next = attribute_component
|
1712
|
+
@state.following.pop
|
1713
|
+
# --> action
|
1714
|
+
cur_hash[comp.to_sym] = Hashie::Mash.new; cur_hash = cur_hash[comp.to_sym]; comp = ( comp_next && @input.to_s( comp_next.start, comp_next.stop ) )
|
1715
|
+
# <-- action
|
1716
|
+
|
1717
|
+
else
|
1718
|
+
break # out of loop for decision 33
|
1719
|
+
end
|
1720
|
+
end # loop for decision 33
|
1721
|
+
match( T__13, TOKENS_FOLLOWING_T__13_IN_attribute_1049 )
|
1722
|
+
@state.following.push( TOKENS_FOLLOWING_attribute_value_IN_attribute_1051 )
|
1723
|
+
attribute_value29 = attribute_value
|
1724
|
+
@state.following.pop
|
1725
|
+
# --> action
|
1726
|
+
cur_hash[comp.to_sym] = attribute_value29
|
1727
|
+
# <-- action
|
1728
|
+
|
1729
|
+
rescue ANTLR3::Error::RecognitionError => re
|
1730
|
+
report_error(re)
|
1731
|
+
recover(re)
|
1732
|
+
|
1733
|
+
ensure
|
1734
|
+
# -> uncomment the next line to manually enable rule tracing
|
1735
|
+
# trace_out( __method__, 25 )
|
1736
|
+
|
1737
|
+
end
|
1738
|
+
|
1739
|
+
return hash
|
1740
|
+
end
|
1741
|
+
|
1742
|
+
|
1743
|
+
#
|
1744
|
+
# parser rule attribute_name
|
1745
|
+
#
|
1746
|
+
# (in OCCIANTLR.g)
|
1747
|
+
# 118:1: attribute_name returns [hash] : comp_first= attribute_component ( '.' comp_next= attribute_component )* ;
|
1748
|
+
#
|
1749
|
+
def attribute_name
|
1750
|
+
# -> uncomment the next line to manually enable rule tracing
|
1751
|
+
# trace_in( __method__, 26 )
|
1752
|
+
hash = nil
|
1753
|
+
comp_first = nil
|
1754
|
+
comp_next = nil
|
1755
|
+
# - - - - @init action - - - -
|
1756
|
+
hash = Hashie::Mash.new
|
1757
|
+
|
1758
|
+
begin
|
1759
|
+
# at line 119:27: comp_first= attribute_component ( '.' comp_next= attribute_component )*
|
1760
|
+
@state.following.push( TOKENS_FOLLOWING_attribute_component_IN_attribute_name_1095 )
|
1761
|
+
comp_first = attribute_component
|
1762
|
+
@state.following.pop
|
1763
|
+
# --> action
|
1764
|
+
cur_hash = hash; comp = ( comp_first && @input.to_s( comp_first.start, comp_first.stop ) )
|
1765
|
+
# <-- action
|
1766
|
+
# at line 120:6: ( '.' comp_next= attribute_component )*
|
1767
|
+
while true # decision 34
|
1768
|
+
alt_34 = 2
|
1769
|
+
look_34_0 = @input.peek( 1 )
|
1770
|
+
|
1771
|
+
if ( look_34_0 == T__33 )
|
1772
|
+
alt_34 = 1
|
1773
|
+
|
1774
|
+
end
|
1775
|
+
case alt_34
|
1776
|
+
when 1
|
1777
|
+
# at line 120:8: '.' comp_next= attribute_component
|
1778
|
+
match( T__33, TOKENS_FOLLOWING_T__33_IN_attribute_name_1106 )
|
1779
|
+
@state.following.push( TOKENS_FOLLOWING_attribute_component_IN_attribute_name_1110 )
|
1780
|
+
comp_next = attribute_component
|
1781
|
+
@state.following.pop
|
1782
|
+
# --> action
|
1783
|
+
cur_hash[comp.to_sym] = Hashie::Mash.new; cur_hash = cur_hash[comp.to_sym]; comp = ( comp_next && @input.to_s( comp_next.start, comp_next.stop ) )
|
1784
|
+
# <-- action
|
1785
|
+
|
1786
|
+
else
|
1787
|
+
break # out of loop for decision 34
|
1788
|
+
end
|
1789
|
+
end # loop for decision 34
|
1790
|
+
# --> action
|
1791
|
+
cur_hash[comp.to_sym] = ATTRIBUTE
|
1792
|
+
# <-- action
|
1793
|
+
|
1794
|
+
rescue ANTLR3::Error::RecognitionError => re
|
1795
|
+
report_error(re)
|
1796
|
+
recover(re)
|
1797
|
+
|
1798
|
+
ensure
|
1799
|
+
# -> uncomment the next line to manually enable rule tracing
|
1800
|
+
# trace_out( __method__, 26 )
|
1801
|
+
|
1802
|
+
end
|
1803
|
+
|
1804
|
+
return hash
|
1805
|
+
end
|
1806
|
+
|
1807
|
+
AttributeComponentReturnValue = define_return_scope
|
1808
|
+
|
1809
|
+
#
|
1810
|
+
# parser rule attribute_component
|
1811
|
+
#
|
1812
|
+
# (in OCCIANTLR.g)
|
1813
|
+
# 122:1: attribute_component : LOALPHA ( LOALPHA | DIGIT | '-' | '_' )* ;
|
1814
|
+
#
|
1815
|
+
def attribute_component
|
1816
|
+
# -> uncomment the next line to manually enable rule tracing
|
1817
|
+
# trace_in( __method__, 27 )
|
1818
|
+
return_value = AttributeComponentReturnValue.new
|
1819
|
+
|
1820
|
+
# $rule.start = the first token seen before matching
|
1821
|
+
return_value.start = @input.look
|
1822
|
+
|
1823
|
+
begin
|
1824
|
+
# at line 122:23: LOALPHA ( LOALPHA | DIGIT | '-' | '_' )*
|
1825
|
+
match( LOALPHA, TOKENS_FOLLOWING_LOALPHA_IN_attribute_component_1128 )
|
1826
|
+
# at line 122:31: ( LOALPHA | DIGIT | '-' | '_' )*
|
1827
|
+
while true # decision 35
|
1828
|
+
alt_35 = 2
|
1829
|
+
look_35_0 = @input.peek( 1 )
|
1830
|
+
|
1831
|
+
if ( look_35_0 == LOALPHA || look_35_0 == DIGIT || look_35_0 == T__30 || look_35_0 == T__39 )
|
1832
|
+
alt_35 = 1
|
1833
|
+
|
1834
|
+
end
|
1835
|
+
case alt_35
|
1836
|
+
when 1
|
1837
|
+
# at line
|
1838
|
+
if @input.peek(1) == LOALPHA || @input.peek(1) == DIGIT || @input.peek(1) == T__30 || @input.peek(1) == T__39
|
1839
|
+
@input.consume
|
1840
|
+
@state.error_recovery = false
|
1841
|
+
else
|
1842
|
+
mse = MismatchedSet( nil )
|
1843
|
+
raise mse
|
1844
|
+
end
|
1845
|
+
|
1846
|
+
|
1847
|
+
|
1848
|
+
else
|
1849
|
+
break # out of loop for decision 35
|
1850
|
+
end
|
1851
|
+
end # loop for decision 35
|
1852
|
+
# - - - - - - - rule clean up - - - - - - - -
|
1853
|
+
return_value.stop = @input.look( -1 )
|
1854
|
+
|
1855
|
+
rescue ANTLR3::Error::RecognitionError => re
|
1856
|
+
report_error(re)
|
1857
|
+
recover(re)
|
1858
|
+
|
1859
|
+
ensure
|
1860
|
+
# -> uncomment the next line to manually enable rule tracing
|
1861
|
+
# trace_out( __method__, 27 )
|
1862
|
+
|
1863
|
+
end
|
1864
|
+
|
1865
|
+
return return_value
|
1866
|
+
end
|
1867
|
+
|
1868
|
+
|
1869
|
+
#
|
1870
|
+
# parser rule attribute_value
|
1871
|
+
#
|
1872
|
+
# (in OCCIANTLR.g)
|
1873
|
+
# 123:1: attribute_value returns [value] : ( string | number ) ;
|
1874
|
+
#
|
1875
|
+
def attribute_value
|
1876
|
+
# -> uncomment the next line to manually enable rule tracing
|
1877
|
+
# trace_in( __method__, 28 )
|
1878
|
+
value = nil
|
1879
|
+
string30 = nil
|
1880
|
+
number31 = nil
|
1881
|
+
|
1882
|
+
begin
|
1883
|
+
# at line 123:35: ( string | number )
|
1884
|
+
# at line 123:35: ( string | number )
|
1885
|
+
alt_36 = 2
|
1886
|
+
look_36_0 = @input.peek( 1 )
|
1887
|
+
|
1888
|
+
if ( look_36_0 == T__14 )
|
1889
|
+
alt_36 = 1
|
1890
|
+
elsif ( look_36_0 == EOF || look_36_0 == DIGIT || look_36_0 == T__11 || look_36_0 == T__33 )
|
1891
|
+
alt_36 = 2
|
1892
|
+
else
|
1893
|
+
raise NoViableAlternative( "", 36, 0 )
|
1894
|
+
end
|
1895
|
+
case alt_36
|
1896
|
+
when 1
|
1897
|
+
# at line 123:37: string
|
1898
|
+
@state.following.push( TOKENS_FOLLOWING_string_IN_attribute_value_1160 )
|
1899
|
+
string30 = string
|
1900
|
+
@state.following.pop
|
1901
|
+
# --> action
|
1902
|
+
value = ( string30 && @input.to_s( string30.start, string30.stop ) )
|
1903
|
+
# <-- action
|
1904
|
+
|
1905
|
+
when 2
|
1906
|
+
# at line 123:71: number
|
1907
|
+
@state.following.push( TOKENS_FOLLOWING_number_IN_attribute_value_1166 )
|
1908
|
+
number31 = number
|
1909
|
+
@state.following.pop
|
1910
|
+
# --> action
|
1911
|
+
value = ( number31 && @input.to_s( number31.start, number31.stop ) ).to_i
|
1912
|
+
# <-- action
|
1913
|
+
|
1914
|
+
end
|
1915
|
+
|
1916
|
+
rescue ANTLR3::Error::RecognitionError => re
|
1917
|
+
report_error(re)
|
1918
|
+
recover(re)
|
1919
|
+
|
1920
|
+
ensure
|
1921
|
+
# -> uncomment the next line to manually enable rule tracing
|
1922
|
+
# trace_out( __method__, 28 )
|
1923
|
+
|
1924
|
+
end
|
1925
|
+
|
1926
|
+
return value
|
1927
|
+
end
|
1928
|
+
|
1929
|
+
StringReturnValue = define_return_scope
|
1930
|
+
|
1931
|
+
#
|
1932
|
+
# parser rule string
|
1933
|
+
#
|
1934
|
+
# (in OCCIANTLR.g)
|
1935
|
+
# 124:1: string : ( '\"' ( ESC | ~ ( '\\\\' | '\"' | '\\'' ) | '\\'' )* '\"' ) ;
|
1936
|
+
#
|
1937
|
+
def string
|
1938
|
+
# -> uncomment the next line to manually enable rule tracing
|
1939
|
+
# trace_in( __method__, 29 )
|
1940
|
+
return_value = StringReturnValue.new
|
1941
|
+
|
1942
|
+
# $rule.start = the first token seen before matching
|
1943
|
+
return_value.start = @input.look
|
1944
|
+
|
1945
|
+
begin
|
1946
|
+
# at line 124:12: ( '\"' ( ESC | ~ ( '\\\\' | '\"' | '\\'' ) | '\\'' )* '\"' )
|
1947
|
+
# at line 124:12: ( '\"' ( ESC | ~ ( '\\\\' | '\"' | '\\'' ) | '\\'' )* '\"' )
|
1948
|
+
# at line 124:14: '\"' ( ESC | ~ ( '\\\\' | '\"' | '\\'' ) | '\\'' )* '\"'
|
1949
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_string_1181 )
|
1950
|
+
# at line 124:18: ( ESC | ~ ( '\\\\' | '\"' | '\\'' ) | '\\'' )*
|
1951
|
+
while true # decision 37
|
1952
|
+
alt_37 = 2
|
1953
|
+
look_37_0 = @input.peek( 1 )
|
1954
|
+
|
1955
|
+
if ( look_37_0.between?( WS, T__13 ) || look_37_0.between?( T__15, T__30 ) || look_37_0.between?( T__32, T__44 ) )
|
1956
|
+
alt_37 = 1
|
1957
|
+
|
1958
|
+
end
|
1959
|
+
case alt_37
|
1960
|
+
when 1
|
1961
|
+
# at line
|
1962
|
+
if @input.peek( 1 ).between?( WS, T__13 ) || @input.peek( 1 ).between?( T__15, T__30 ) || @input.peek( 1 ).between?( T__32, T__44 )
|
1963
|
+
@input.consume
|
1964
|
+
@state.error_recovery = false
|
1965
|
+
else
|
1966
|
+
mse = MismatchedSet( nil )
|
1967
|
+
raise mse
|
1968
|
+
end
|
1969
|
+
|
1970
|
+
|
1971
|
+
|
1972
|
+
else
|
1973
|
+
break # out of loop for decision 37
|
1974
|
+
end
|
1975
|
+
end # loop for decision 37
|
1976
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_string_1211 )
|
1977
|
+
|
1978
|
+
# - - - - - - - rule clean up - - - - - - - -
|
1979
|
+
return_value.stop = @input.look( -1 )
|
1980
|
+
|
1981
|
+
rescue ANTLR3::Error::RecognitionError => re
|
1982
|
+
report_error(re)
|
1983
|
+
recover(re)
|
1984
|
+
|
1985
|
+
ensure
|
1986
|
+
# -> uncomment the next line to manually enable rule tracing
|
1987
|
+
# trace_out( __method__, 29 )
|
1988
|
+
|
1989
|
+
end
|
1990
|
+
|
1991
|
+
return return_value
|
1992
|
+
end
|
1993
|
+
|
1994
|
+
NumberReturnValue = define_return_scope
|
1995
|
+
|
1996
|
+
#
|
1997
|
+
# parser rule number
|
1998
|
+
#
|
1999
|
+
# (in OCCIANTLR.g)
|
2000
|
+
# 125:1: number : ( ( DIGIT )* ( '.' ( DIGIT )+ )? ) ;
|
2001
|
+
#
|
2002
|
+
def number
|
2003
|
+
# -> uncomment the next line to manually enable rule tracing
|
2004
|
+
# trace_in( __method__, 30 )
|
2005
|
+
return_value = NumberReturnValue.new
|
2006
|
+
|
2007
|
+
# $rule.start = the first token seen before matching
|
2008
|
+
return_value.start = @input.look
|
2009
|
+
|
2010
|
+
begin
|
2011
|
+
# at line 125:12: ( ( DIGIT )* ( '.' ( DIGIT )+ )? )
|
2012
|
+
# at line 125:12: ( ( DIGIT )* ( '.' ( DIGIT )+ )? )
|
2013
|
+
# at line 125:14: ( DIGIT )* ( '.' ( DIGIT )+ )?
|
2014
|
+
# at line 125:14: ( DIGIT )*
|
2015
|
+
while true # decision 38
|
2016
|
+
alt_38 = 2
|
2017
|
+
look_38_0 = @input.peek( 1 )
|
2018
|
+
|
2019
|
+
if ( look_38_0 == DIGIT )
|
2020
|
+
alt_38 = 1
|
2021
|
+
|
2022
|
+
end
|
2023
|
+
case alt_38
|
2024
|
+
when 1
|
2025
|
+
# at line 125:14: DIGIT
|
2026
|
+
match( DIGIT, TOKENS_FOLLOWING_DIGIT_IN_number_1223 )
|
2027
|
+
|
2028
|
+
else
|
2029
|
+
break # out of loop for decision 38
|
2030
|
+
end
|
2031
|
+
end # loop for decision 38
|
2032
|
+
# at line 125:21: ( '.' ( DIGIT )+ )?
|
2033
|
+
alt_40 = 2
|
2034
|
+
look_40_0 = @input.peek( 1 )
|
2035
|
+
|
2036
|
+
if ( look_40_0 == T__33 )
|
2037
|
+
alt_40 = 1
|
2038
|
+
end
|
2039
|
+
case alt_40
|
2040
|
+
when 1
|
2041
|
+
# at line 125:23: '.' ( DIGIT )+
|
2042
|
+
match( T__33, TOKENS_FOLLOWING_T__33_IN_number_1228 )
|
2043
|
+
# at file 125:27: ( DIGIT )+
|
2044
|
+
match_count_39 = 0
|
2045
|
+
while true
|
2046
|
+
alt_39 = 2
|
2047
|
+
look_39_0 = @input.peek( 1 )
|
2048
|
+
|
2049
|
+
if ( look_39_0 == DIGIT )
|
2050
|
+
alt_39 = 1
|
2051
|
+
|
2052
|
+
end
|
2053
|
+
case alt_39
|
2054
|
+
when 1
|
2055
|
+
# at line 125:27: DIGIT
|
2056
|
+
match( DIGIT, TOKENS_FOLLOWING_DIGIT_IN_number_1230 )
|
2057
|
+
|
2058
|
+
else
|
2059
|
+
match_count_39 > 0 and break
|
2060
|
+
eee = EarlyExit(39)
|
2061
|
+
|
2062
|
+
|
2063
|
+
raise eee
|
2064
|
+
end
|
2065
|
+
match_count_39 += 1
|
2066
|
+
end
|
2067
|
+
|
2068
|
+
|
2069
|
+
end
|
2070
|
+
|
2071
|
+
# - - - - - - - rule clean up - - - - - - - -
|
2072
|
+
return_value.stop = @input.look( -1 )
|
2073
|
+
|
2074
|
+
rescue ANTLR3::Error::RecognitionError => re
|
2075
|
+
report_error(re)
|
2076
|
+
recover(re)
|
2077
|
+
|
2078
|
+
ensure
|
2079
|
+
# -> uncomment the next line to manually enable rule tracing
|
2080
|
+
# trace_out( __method__, 30 )
|
2081
|
+
|
2082
|
+
end
|
2083
|
+
|
2084
|
+
return return_value
|
2085
|
+
end
|
2086
|
+
|
2087
|
+
|
2088
|
+
|
2089
|
+
TOKENS_FOLLOWING_T__9_IN_category_39 = Set[ 10 ]
|
2090
|
+
TOKENS_FOLLOWING_T__10_IN_category_41 = Set[ 4, 5 ]
|
2091
|
+
TOKENS_FOLLOWING_category_value_IN_category_43 = Set[ 1 ]
|
2092
|
+
TOKENS_FOLLOWING_category_term_IN_category_value_75 = Set[ 11 ]
|
2093
|
+
TOKENS_FOLLOWING_category_scheme_IN_category_value_77 = Set[ 11 ]
|
2094
|
+
TOKENS_FOLLOWING_category_class_IN_category_value_79 = Set[ 1, 11 ]
|
2095
|
+
TOKENS_FOLLOWING_category_title_IN_category_value_81 = Set[ 1, 11 ]
|
2096
|
+
TOKENS_FOLLOWING_category_rel_IN_category_value_84 = Set[ 1, 11 ]
|
2097
|
+
TOKENS_FOLLOWING_category_location_IN_category_value_87 = Set[ 1, 11 ]
|
2098
|
+
TOKENS_FOLLOWING_category_attributes_IN_category_value_90 = Set[ 1, 11 ]
|
2099
|
+
TOKENS_FOLLOWING_category_actions_IN_category_value_93 = Set[ 1, 11 ]
|
2100
|
+
TOKENS_FOLLOWING_T__11_IN_category_value_96 = Set[ 1 ]
|
2101
|
+
TOKENS_FOLLOWING_WS_IN_category_term_128 = Set[ 4, 5 ]
|
2102
|
+
TOKENS_FOLLOWING_term_IN_category_term_131 = Set[ 1 ]
|
2103
|
+
TOKENS_FOLLOWING_T__11_IN_category_scheme_157 = Set[ 4, 12 ]
|
2104
|
+
TOKENS_FOLLOWING_WS_IN_category_scheme_159 = Set[ 12 ]
|
2105
|
+
TOKENS_FOLLOWING_T__12_IN_category_scheme_162 = Set[ 13 ]
|
2106
|
+
TOKENS_FOLLOWING_T__13_IN_category_scheme_164 = Set[ 14 ]
|
2107
|
+
TOKENS_FOLLOWING_T__14_IN_category_scheme_166 = Set[ 5, 6, 7, 10, 12, 13, 16, 17, 18, 19, 20, 21, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 ]
|
2108
|
+
TOKENS_FOLLOWING_scheme_IN_category_scheme_168 = Set[ 14 ]
|
2109
|
+
TOKENS_FOLLOWING_T__14_IN_category_scheme_170 = Set[ 1 ]
|
2110
|
+
TOKENS_FOLLOWING_T__11_IN_category_class_199 = Set[ 4, 15 ]
|
2111
|
+
TOKENS_FOLLOWING_WS_IN_category_class_201 = Set[ 15 ]
|
2112
|
+
TOKENS_FOLLOWING_T__15_IN_category_class_204 = Set[ 13 ]
|
2113
|
+
TOKENS_FOLLOWING_T__13_IN_category_class_206 = Set[ 14 ]
|
2114
|
+
TOKENS_FOLLOWING_T__14_IN_category_class_208 = Set[ 40, 41, 42 ]
|
2115
|
+
TOKENS_FOLLOWING_class_type_IN_category_class_210 = Set[ 14 ]
|
2116
|
+
TOKENS_FOLLOWING_T__14_IN_category_class_212 = Set[ 1 ]
|
2117
|
+
TOKENS_FOLLOWING_T__11_IN_category_title_237 = Set[ 4, 16 ]
|
2118
|
+
TOKENS_FOLLOWING_WS_IN_category_title_239 = Set[ 16 ]
|
2119
|
+
TOKENS_FOLLOWING_T__16_IN_category_title_242 = Set[ 13 ]
|
2120
|
+
TOKENS_FOLLOWING_T__13_IN_category_title_244 = Set[ 14 ]
|
2121
|
+
TOKENS_FOLLOWING_T__14_IN_category_title_246 = Set[ 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, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 ]
|
2122
|
+
TOKENS_FOLLOWING_title_IN_category_title_248 = Set[ 14 ]
|
2123
|
+
TOKENS_FOLLOWING_T__14_IN_category_title_250 = Set[ 1 ]
|
2124
|
+
TOKENS_FOLLOWING_T__11_IN_category_rel_277 = Set[ 4, 17 ]
|
2125
|
+
TOKENS_FOLLOWING_WS_IN_category_rel_279 = Set[ 17 ]
|
2126
|
+
TOKENS_FOLLOWING_T__17_IN_category_rel_282 = Set[ 13 ]
|
2127
|
+
TOKENS_FOLLOWING_T__13_IN_category_rel_284 = Set[ 14 ]
|
2128
|
+
TOKENS_FOLLOWING_T__14_IN_category_rel_286 = Set[ 5, 6, 7, 10, 12, 13, 16, 17, 18, 19, 20, 21, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 ]
|
2129
|
+
TOKENS_FOLLOWING_uri_IN_category_rel_288 = Set[ 14 ]
|
2130
|
+
TOKENS_FOLLOWING_T__14_IN_category_rel_290 = Set[ 1 ]
|
2131
|
+
TOKENS_FOLLOWING_T__11_IN_category_location_315 = Set[ 4, 18 ]
|
2132
|
+
TOKENS_FOLLOWING_WS_IN_category_location_317 = Set[ 18 ]
|
2133
|
+
TOKENS_FOLLOWING_T__18_IN_category_location_320 = Set[ 13 ]
|
2134
|
+
TOKENS_FOLLOWING_T__13_IN_category_location_322 = Set[ 14 ]
|
2135
|
+
TOKENS_FOLLOWING_T__14_IN_category_location_324 = Set[ 5, 6, 7, 10, 12, 13, 16, 17, 18, 19, 20, 21, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 ]
|
2136
|
+
TOKENS_FOLLOWING_uri_IN_category_location_326 = Set[ 14 ]
|
2137
|
+
TOKENS_FOLLOWING_T__14_IN_category_location_328 = Set[ 1 ]
|
2138
|
+
TOKENS_FOLLOWING_T__11_IN_category_attributes_367 = Set[ 4, 19 ]
|
2139
|
+
TOKENS_FOLLOWING_WS_IN_category_attributes_369 = Set[ 19 ]
|
2140
|
+
TOKENS_FOLLOWING_T__19_IN_category_attributes_372 = Set[ 13 ]
|
2141
|
+
TOKENS_FOLLOWING_T__13_IN_category_attributes_374 = Set[ 14 ]
|
2142
|
+
TOKENS_FOLLOWING_T__14_IN_category_attributes_376 = Set[ 5 ]
|
2143
|
+
TOKENS_FOLLOWING_attribute_name_IN_category_attributes_380 = Set[ 4, 14 ]
|
2144
|
+
TOKENS_FOLLOWING_WS_IN_category_attributes_395 = Set[ 5 ]
|
2145
|
+
TOKENS_FOLLOWING_attribute_name_IN_category_attributes_399 = Set[ 4, 14 ]
|
2146
|
+
TOKENS_FOLLOWING_T__14_IN_category_attributes_407 = Set[ 1 ]
|
2147
|
+
TOKENS_FOLLOWING_T__11_IN_category_actions_437 = Set[ 4, 20 ]
|
2148
|
+
TOKENS_FOLLOWING_WS_IN_category_actions_439 = Set[ 20 ]
|
2149
|
+
TOKENS_FOLLOWING_T__20_IN_category_actions_442 = Set[ 13 ]
|
2150
|
+
TOKENS_FOLLOWING_T__13_IN_category_actions_444 = Set[ 14 ]
|
2151
|
+
TOKENS_FOLLOWING_T__14_IN_category_actions_446 = Set[ 5, 6, 7, 10, 12, 13, 16, 17, 18, 19, 20, 21, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 ]
|
2152
|
+
TOKENS_FOLLOWING_uri_IN_category_actions_450 = Set[ 4, 14 ]
|
2153
|
+
TOKENS_FOLLOWING_WS_IN_category_actions_466 = Set[ 5, 6, 7, 10, 12, 13, 16, 17, 18, 19, 20, 21, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 ]
|
2154
|
+
TOKENS_FOLLOWING_uri_IN_category_actions_470 = Set[ 4, 14 ]
|
2155
|
+
TOKENS_FOLLOWING_T__14_IN_category_actions_477 = Set[ 1 ]
|
2156
|
+
TOKENS_FOLLOWING_T__21_IN_link_494 = Set[ 10 ]
|
2157
|
+
TOKENS_FOLLOWING_T__10_IN_link_496 = Set[ 4, 22 ]
|
2158
|
+
TOKENS_FOLLOWING_link_value_IN_link_498 = Set[ 1 ]
|
2159
|
+
TOKENS_FOLLOWING_link_target_IN_link_value_520 = Set[ 11 ]
|
2160
|
+
TOKENS_FOLLOWING_link_rel_IN_link_value_529 = Set[ 11 ]
|
2161
|
+
TOKENS_FOLLOWING_link_self_IN_link_value_538 = Set[ 11 ]
|
2162
|
+
TOKENS_FOLLOWING_link_category_IN_link_value_548 = Set[ 11 ]
|
2163
|
+
TOKENS_FOLLOWING_link_attributes_IN_link_value_558 = Set[ 1, 11 ]
|
2164
|
+
TOKENS_FOLLOWING_T__11_IN_link_value_567 = Set[ 1 ]
|
2165
|
+
TOKENS_FOLLOWING_WS_IN_link_target_586 = Set[ 22 ]
|
2166
|
+
TOKENS_FOLLOWING_T__22_IN_link_target_589 = Set[ 5, 6, 7, 10, 12, 13, 16, 17, 18, 19, 20, 21, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 ]
|
2167
|
+
TOKENS_FOLLOWING_uri_IN_link_target_591 = Set[ 23 ]
|
2168
|
+
TOKENS_FOLLOWING_T__23_IN_link_target_593 = Set[ 1 ]
|
2169
|
+
TOKENS_FOLLOWING_T__11_IN_link_rel_608 = Set[ 4, 17 ]
|
2170
|
+
TOKENS_FOLLOWING_WS_IN_link_rel_610 = Set[ 17 ]
|
2171
|
+
TOKENS_FOLLOWING_T__17_IN_link_rel_613 = Set[ 13 ]
|
2172
|
+
TOKENS_FOLLOWING_T__13_IN_link_rel_615 = Set[ 14 ]
|
2173
|
+
TOKENS_FOLLOWING_T__14_IN_link_rel_617 = Set[ 5, 6, 7, 10, 12, 13, 16, 17, 18, 19, 20, 21, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 ]
|
2174
|
+
TOKENS_FOLLOWING_uri_IN_link_rel_619 = Set[ 14 ]
|
2175
|
+
TOKENS_FOLLOWING_T__14_IN_link_rel_621 = Set[ 1 ]
|
2176
|
+
TOKENS_FOLLOWING_T__11_IN_link_self_636 = Set[ 4, 24 ]
|
2177
|
+
TOKENS_FOLLOWING_WS_IN_link_self_638 = Set[ 24 ]
|
2178
|
+
TOKENS_FOLLOWING_T__24_IN_link_self_641 = Set[ 13 ]
|
2179
|
+
TOKENS_FOLLOWING_T__13_IN_link_self_643 = Set[ 14 ]
|
2180
|
+
TOKENS_FOLLOWING_T__14_IN_link_self_645 = Set[ 5, 6, 7, 10, 12, 13, 16, 17, 18, 19, 20, 21, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 ]
|
2181
|
+
TOKENS_FOLLOWING_uri_IN_link_self_647 = Set[ 14 ]
|
2182
|
+
TOKENS_FOLLOWING_T__14_IN_link_self_649 = Set[ 1 ]
|
2183
|
+
TOKENS_FOLLOWING_T__11_IN_link_category_664 = Set[ 4, 25 ]
|
2184
|
+
TOKENS_FOLLOWING_WS_IN_link_category_666 = Set[ 25 ]
|
2185
|
+
TOKENS_FOLLOWING_T__25_IN_link_category_669 = Set[ 13 ]
|
2186
|
+
TOKENS_FOLLOWING_T__13_IN_link_category_671 = Set[ 14 ]
|
2187
|
+
TOKENS_FOLLOWING_T__14_IN_link_category_673 = Set[ 5, 6, 7, 10, 12, 13, 16, 17, 18, 19, 20, 21, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 ]
|
2188
|
+
TOKENS_FOLLOWING_uri_IN_link_category_675 = Set[ 14 ]
|
2189
|
+
TOKENS_FOLLOWING_T__14_IN_link_category_677 = Set[ 1 ]
|
2190
|
+
TOKENS_FOLLOWING_T__11_IN_link_attributes_703 = Set[ 4, 5 ]
|
2191
|
+
TOKENS_FOLLOWING_WS_IN_link_attributes_705 = Set[ 4, 5 ]
|
2192
|
+
TOKENS_FOLLOWING_attribute_IN_link_attributes_708 = Set[ 1, 11 ]
|
2193
|
+
TOKENS_FOLLOWING_T__26_IN_x_occi_attribute_729 = Set[ 10 ]
|
2194
|
+
TOKENS_FOLLOWING_T__10_IN_x_occi_attribute_731 = Set[ 4, 5 ]
|
2195
|
+
TOKENS_FOLLOWING_WS_IN_x_occi_attribute_733 = Set[ 4, 5 ]
|
2196
|
+
TOKENS_FOLLOWING_attribute_IN_x_occi_attribute_736 = Set[ 1, 11 ]
|
2197
|
+
TOKENS_FOLLOWING_T__11_IN_x_occi_attribute_738 = Set[ 1 ]
|
2198
|
+
TOKENS_FOLLOWING_T__27_IN_x_occi_location_758 = Set[ 10 ]
|
2199
|
+
TOKENS_FOLLOWING_T__10_IN_x_occi_location_760 = Set[ 4, 5, 6, 7, 10, 12, 13, 16, 17, 18, 19, 20, 21, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 ]
|
2200
|
+
TOKENS_FOLLOWING_WS_IN_x_occi_location_762 = Set[ 5, 6, 7, 10, 12, 13, 16, 17, 18, 19, 20, 21, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 ]
|
2201
|
+
TOKENS_FOLLOWING_uri_IN_x_occi_location_765 = Set[ 1, 11 ]
|
2202
|
+
TOKENS_FOLLOWING_T__11_IN_x_occi_location_767 = Set[ 1 ]
|
2203
|
+
TOKENS_FOLLOWING_set_IN_uri_781 = Set[ 1, 5, 6, 7, 10, 12, 13, 16, 17, 18, 19, 20, 21, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 ]
|
2204
|
+
TOKENS_FOLLOWING_LOALPHA_IN_term_911 = Set[ 1, 5, 7, 30, 39 ]
|
2205
|
+
TOKENS_FOLLOWING_set_IN_term_913 = Set[ 1, 5, 7, 30, 39 ]
|
2206
|
+
TOKENS_FOLLOWING_uri_IN_scheme_946 = Set[ 1 ]
|
2207
|
+
TOKENS_FOLLOWING_set_IN_class_type_955 = Set[ 1 ]
|
2208
|
+
TOKENS_FOLLOWING_set_IN_title_976 = Set[ 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 ]
|
2209
|
+
TOKENS_FOLLOWING_attribute_component_IN_attribute_1023 = Set[ 13, 33 ]
|
2210
|
+
TOKENS_FOLLOWING_T__33_IN_attribute_1034 = Set[ 5 ]
|
2211
|
+
TOKENS_FOLLOWING_attribute_component_IN_attribute_1038 = Set[ 13, 33 ]
|
2212
|
+
TOKENS_FOLLOWING_T__13_IN_attribute_1049 = Set[ 7, 14, 33 ]
|
2213
|
+
TOKENS_FOLLOWING_attribute_value_IN_attribute_1051 = Set[ 1 ]
|
2214
|
+
TOKENS_FOLLOWING_attribute_component_IN_attribute_name_1095 = Set[ 1, 33 ]
|
2215
|
+
TOKENS_FOLLOWING_T__33_IN_attribute_name_1106 = Set[ 5 ]
|
2216
|
+
TOKENS_FOLLOWING_attribute_component_IN_attribute_name_1110 = Set[ 1, 33 ]
|
2217
|
+
TOKENS_FOLLOWING_LOALPHA_IN_attribute_component_1128 = Set[ 1, 5, 7, 30, 39 ]
|
2218
|
+
TOKENS_FOLLOWING_set_IN_attribute_component_1130 = Set[ 1, 5, 7, 30, 39 ]
|
2219
|
+
TOKENS_FOLLOWING_string_IN_attribute_value_1160 = Set[ 1 ]
|
2220
|
+
TOKENS_FOLLOWING_number_IN_attribute_value_1166 = Set[ 1 ]
|
2221
|
+
TOKENS_FOLLOWING_T__14_IN_string_1181 = Set[ 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, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 ]
|
2222
|
+
TOKENS_FOLLOWING_set_IN_string_1183 = Set[ 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, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 ]
|
2223
|
+
TOKENS_FOLLOWING_T__14_IN_string_1211 = Set[ 1 ]
|
2224
|
+
TOKENS_FOLLOWING_DIGIT_IN_number_1223 = Set[ 1, 7, 33 ]
|
2225
|
+
TOKENS_FOLLOWING_T__33_IN_number_1228 = Set[ 7 ]
|
2226
|
+
TOKENS_FOLLOWING_DIGIT_IN_number_1230 = Set[ 1, 7 ]
|
2227
|
+
|
2228
|
+
end # class Parser < ANTLR3::Parser
|
2229
|
+
|
2230
|
+
at_exit { Parser.main( ARGV ) } if __FILE__ == $0
|
2231
|
+
end
|
2232
|
+
|