puppet 0.16.0 → 0.18.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- data/CHANGELOG +98 -0
- data/Rakefile +5 -1
- data/bin/puppet +1 -1
- data/bin/puppetca +25 -11
- data/bin/puppetd +189 -66
- data/bin/puppetdoc +79 -62
- data/bin/puppetmasterd +93 -49
- data/bin/puppetrun +385 -0
- data/conf/redhat/client.init +5 -2
- data/conf/redhat/fileserver.conf +1 -1
- data/conf/redhat/lsb-config.patch +51 -0
- data/conf/redhat/puppet.spec +45 -18
- data/conf/redhat/puppetd.conf +32 -4
- data/conf/redhat/server.init +5 -2
- data/conf/solaris/pkginfo +7 -0
- data/conf/solaris/smf/puppetd.xml +77 -0
- data/conf/solaris/smf/puppetmasterd.xml +77 -0
- data/conf/solaris/smf/svc-puppetd +66 -0
- data/conf/solaris/smf/svc-puppetmasterd +62 -0
- data/examples/code/failers/noobjectrvalue +1 -0
- data/examples/code/snippets/deepclassheirarchy.pp +23 -0
- data/examples/code/snippets/defineoverrides.pp +17 -0
- data/examples/code/snippets/emptyexec.pp +3 -0
- data/examples/code/snippets/selectorvalues.pp +6 -1
- data/examples/code/snippets/tagged.pp +35 -0
- data/ext/ldap/puppet.schema +2 -2
- data/install.rb +4 -2
- data/lib/puppet.rb +206 -15
- data/lib/puppet/client.rb +30 -20
- data/lib/puppet/client/ca.rb +2 -2
- data/lib/puppet/client/dipper.rb +5 -9
- data/lib/puppet/client/master.rb +224 -44
- data/lib/puppet/client/pelement.rb +54 -9
- data/lib/puppet/client/proxy.rb +3 -2
- data/lib/puppet/client/reporter.rb +34 -0
- data/lib/puppet/client/runner.rb +17 -0
- data/lib/puppet/config.rb +136 -55
- data/lib/puppet/daemon.rb +59 -37
- data/lib/puppet/element.rb +2 -1
- data/lib/puppet/event.rb +14 -3
- data/lib/puppet/filetype.rb +28 -19
- data/lib/puppet/log.rb +297 -132
- data/lib/puppet/metric.rb +31 -131
- data/lib/puppet/networkclient.rb +73 -46
- data/lib/puppet/parameter.rb +49 -1
- data/lib/puppet/parsedfile.rb +32 -12
- data/lib/puppet/parser/ast.rb +6 -1
- data/lib/puppet/parser/ast/astarray.rb +32 -6
- data/lib/puppet/parser/ast/collection.rb +91 -0
- data/lib/puppet/parser/ast/compdef.rb +2 -2
- data/lib/puppet/parser/ast/component.rb +24 -11
- data/lib/puppet/parser/ast/function.rb +50 -0
- data/lib/puppet/parser/ast/hostclass.rb +70 -22
- data/lib/puppet/parser/ast/node.rb +17 -8
- data/lib/puppet/parser/ast/nodedef.rb +1 -1
- data/lib/puppet/parser/ast/objectdef.rb +28 -10
- data/lib/puppet/parser/ast/selector.rb +4 -1
- data/lib/puppet/parser/functions.rb +145 -0
- data/lib/puppet/parser/interpreter.rb +243 -86
- data/lib/puppet/parser/lexer.rb +5 -4
- data/lib/puppet/parser/parser.rb +586 -505
- data/lib/puppet/parser/scope.rb +337 -187
- data/lib/puppet/rails.rb +115 -0
- data/lib/puppet/rails/database.rb +40 -0
- data/lib/puppet/rails/host.rb +83 -0
- data/lib/puppet/rails/rails_object.rb +42 -0
- data/lib/puppet/rails/rails_parameter.rb +5 -0
- data/lib/puppet/reports/rrdgraph.rb +20 -0
- data/lib/puppet/reports/tagmail.rb +94 -0
- data/lib/puppet/server.rb +20 -4
- data/lib/puppet/server/authconfig.rb +14 -3
- data/lib/puppet/server/authstore.rb +2 -2
- data/lib/puppet/server/ca.rb +23 -11
- data/lib/puppet/server/filebucket.rb +10 -10
- data/lib/puppet/server/fileserver.rb +4 -8
- data/lib/puppet/server/master.rb +19 -22
- data/lib/puppet/server/pelement.rb +28 -16
- data/lib/puppet/server/report.rb +184 -0
- data/lib/puppet/server/runner.rb +62 -0
- data/lib/puppet/server/servlet.rb +23 -9
- data/lib/puppet/sslcertificates/ca.rb +25 -1
- data/lib/puppet/statechange.rb +34 -53
- data/lib/puppet/storage.rb +1 -2
- data/lib/puppet/transaction.rb +305 -133
- data/lib/puppet/transaction/report.rb +42 -0
- data/lib/puppet/transportable.rb +57 -33
- data/lib/puppet/type.rb +260 -127
- data/lib/puppet/type/component.rb +9 -21
- data/lib/puppet/type/cron.rb +367 -116
- data/lib/puppet/type/exec.rb +15 -16
- data/lib/puppet/type/group.rb +9 -1
- data/lib/puppet/type/nameservice.rb +2 -5
- data/lib/puppet/type/nameservice/netinfo.rb +3 -0
- data/lib/puppet/type/nameservice/objectadd.rb +23 -10
- data/lib/puppet/type/nameservice/pw.rb +16 -3
- data/lib/puppet/type/package.rb +25 -75
- data/lib/puppet/type/package/apple.rb +15 -1
- data/lib/puppet/type/package/apt.rb +37 -2
- data/lib/puppet/type/package/blastwave.rb +136 -0
- data/lib/puppet/type/package/dpkg.rb +4 -4
- data/lib/puppet/type/package/gem.rb +119 -0
- data/lib/puppet/type/package/openbsd.rb +7 -6
- data/lib/puppet/type/package/ports.rb +7 -2
- data/lib/puppet/type/package/rpm.rb +1 -1
- data/lib/puppet/type/package/sun.rb +23 -9
- data/lib/puppet/type/package/sunfreeware.rb +7 -0
- data/lib/puppet/type/package/yum.rb +16 -9
- data/lib/puppet/type/parsedtype.rb +7 -5
- data/lib/puppet/type/parsedtype/mount.rb +55 -34
- data/lib/puppet/type/parsedtype/port.rb +7 -1
- data/lib/puppet/type/parsedtype/sshkey.rb +6 -16
- data/lib/puppet/type/pfile.rb +115 -23
- data/lib/puppet/type/pfile/checksum.rb +18 -5
- data/lib/puppet/type/pfile/content.rb +2 -2
- data/lib/puppet/type/pfile/ensure.rb +3 -3
- data/lib/puppet/type/pfile/group.rb +2 -2
- data/lib/puppet/type/pfile/source.rb +28 -17
- data/lib/puppet/type/pfile/target.rb +25 -17
- data/lib/puppet/type/pfilebucket.rb +25 -6
- data/lib/puppet/type/schedule.rb +6 -6
- data/lib/puppet/type/service.rb +24 -14
- data/lib/puppet/type/service/debian.rb +1 -1
- data/lib/puppet/type/service/redhat.rb +13 -10
- data/lib/puppet/type/service/smf.rb +3 -3
- data/lib/puppet/type/state.rb +1 -2
- data/lib/puppet/type/symlink.rb +3 -4
- data/lib/puppet/type/user.rb +22 -10
- data/lib/puppet/type/yumrepo.rb +6 -1
- data/lib/puppet/type/zone.rb +595 -0
- data/lib/puppet/util.rb +58 -12
- data/test/client/client.rb +2 -2
- data/test/client/master.rb +92 -3
- data/test/client/pelement.rb +99 -0
- data/test/executables/puppetbin.rb +3 -4
- data/test/executables/puppetca.rb +3 -3
- data/test/executables/puppetd.rb +3 -3
- data/test/executables/puppetmasterd.rb +1 -5
- data/test/executables/puppetmodule.rb +2 -2
- data/test/language/ast.rb +200 -11
- data/test/language/functions.rb +245 -0
- data/test/language/interpreter.rb +155 -6
- data/test/language/lexer.rb +35 -2
- data/test/language/node.rb +48 -1
- data/test/language/parser.rb +250 -1
- data/test/language/rails.rb +105 -0
- data/test/language/scope.rb +304 -10
- data/test/language/snippets.rb +54 -5
- data/test/language/transportable.rb +60 -28
- data/test/other/config.rb +214 -1
- data/test/other/events.rb +67 -9
- data/test/other/log.rb +31 -5
- data/test/other/metrics.rb +23 -21
- data/test/other/parsedfile.rb +29 -2
- data/test/other/puppet.rb +79 -0
- data/test/other/report.rb +106 -0
- data/test/other/storage.rb +2 -2
- data/test/other/transactions.rb +128 -2
- data/test/puppet/utiltest.rb +10 -5
- data/test/puppettest.rb +193 -21
- data/test/server/authstore.rb +13 -4
- data/test/server/bucket.rb +33 -8
- data/test/server/ca.rb +44 -6
- data/test/server/master.rb +6 -7
- data/test/server/pelement.rb +15 -5
- data/test/server/report.rb +93 -0
- data/test/server/runner.rb +107 -0
- data/test/server/server.rb +28 -1
- data/test/types/cron.rb +339 -31
- data/test/types/file.rb +256 -24
- data/test/types/filebucket.rb +6 -2
- data/test/types/filesources.rb +41 -92
- data/test/types/group.rb +31 -1
- data/test/types/host.rb +2 -1
- data/test/types/mount.rb +18 -1
- data/test/types/package.rb +200 -18
- data/test/types/service.rb +5 -1
- data/test/types/sshkey.rb +2 -1
- data/test/types/symlink.rb +3 -2
- data/test/types/type.rb +180 -1
- data/test/types/user.rb +65 -27
- data/test/types/yumrepo.rb +15 -0
- data/test/types/zone.rb +437 -0
- metadata +43 -4
- data/bin/cf2puppet +0 -186
- data/conf/redhat/puppetmasterd.conf +0 -5
data/lib/puppet/parser/lexer.rb
CHANGED
@@ -34,6 +34,9 @@ module Puppet
|
|
34
34
|
%r{,} => :COMMA,
|
35
35
|
%r{\.} => :DOT,
|
36
36
|
%r{:} => :COLON,
|
37
|
+
%r{@} => :AT,
|
38
|
+
%r{<\|} => :LCOLLECT,
|
39
|
+
%r{\|>} => :RCOLLECT,
|
37
40
|
%r{;} => :SEMIC,
|
38
41
|
%r{\?} => :QMARK,
|
39
42
|
%r{\\} => :BACKSLASH,
|
@@ -51,10 +54,8 @@ module Puppet
|
|
51
54
|
"define" => :DEFINE,
|
52
55
|
"false" => :BOOLEAN,
|
53
56
|
"import" => :IMPORT,
|
54
|
-
"include" => :INCLUDE,
|
55
57
|
"inherits" => :INHERITS,
|
56
58
|
"node" => :NODE,
|
57
|
-
"tag" => :TAG,
|
58
59
|
"true" => :BOOLEAN
|
59
60
|
}
|
60
61
|
|
@@ -193,9 +194,9 @@ module Puppet
|
|
193
194
|
#stoken = :DQTEXT
|
194
195
|
#Puppet.debug("got string '%s' => '%s'" % [:DQTEXT,value])
|
195
196
|
else
|
197
|
+
#Puppet.debug("got token '%s' => '%s'" % [stoken,value])
|
196
198
|
yield [stoken,value]
|
197
199
|
@last = value
|
198
|
-
#Puppet.debug("got token '%s' => '%s'" % [stoken,value])
|
199
200
|
end
|
200
201
|
@scanner.skip(@skip)
|
201
202
|
end
|
@@ -229,4 +230,4 @@ module Puppet
|
|
229
230
|
end
|
230
231
|
end
|
231
232
|
|
232
|
-
# $Id: lexer.rb
|
233
|
+
# $Id: lexer.rb 1245 2006-06-08 20:06:41Z luke $
|
data/lib/puppet/parser/parser.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# DO NOT MODIFY!!!!
|
3
|
-
# This file is automatically generated by racc 1.4.
|
3
|
+
# This file is automatically generated by racc 1.4.5
|
4
4
|
# from racc grammer file "grammar.ra".
|
5
5
|
#
|
6
6
|
|
@@ -29,7 +29,9 @@ module Puppet
|
|
29
29
|
|
30
30
|
class Parser < Racc::Parser
|
31
31
|
|
32
|
-
module_eval <<'..end grammar.ra modeval..
|
32
|
+
module_eval <<'..end grammar.ra modeval..id99c9ad765d', 'grammar.ra', 787
|
33
|
+
require 'puppet/parser/functions'
|
34
|
+
|
33
35
|
attr_reader :file
|
34
36
|
attr_accessor :files
|
35
37
|
|
@@ -51,7 +53,12 @@ end
|
|
51
53
|
|
52
54
|
def file=(file)
|
53
55
|
unless FileTest.exists?(file)
|
54
|
-
|
56
|
+
unless file =~ /\.pp$/
|
57
|
+
file = file + ".pp"
|
58
|
+
end
|
59
|
+
unless FileTest.exists?(file)
|
60
|
+
raise Puppet::Error, "Could not find file %s" % file
|
61
|
+
end
|
55
62
|
end
|
56
63
|
if @files.detect { |f| f.file == file }
|
57
64
|
raise Puppet::ImportError.new("Import loop detected")
|
@@ -148,298 +155,325 @@ end
|
|
148
155
|
# mode: ruby
|
149
156
|
# End:
|
150
157
|
|
151
|
-
# $Id: parser.rb
|
158
|
+
# $Id: parser.rb 1418 2006-07-21 19:38:29Z luke $
|
152
159
|
|
153
|
-
..end grammar.ra modeval..
|
160
|
+
..end grammar.ra modeval..id99c9ad765d
|
154
161
|
|
155
|
-
##### racc 1.4.
|
162
|
+
##### racc 1.4.5 generates ###
|
156
163
|
|
157
164
|
racc_reduce_table = [
|
158
165
|
0, 0, :racc_error,
|
159
|
-
1,
|
166
|
+
1, 44, :_reduce_1,
|
160
167
|
1, 44, :_reduce_none,
|
161
|
-
2, 44, :_reduce_3,
|
162
|
-
1, 45, :_reduce_none,
|
163
|
-
1, 45, :_reduce_none,
|
164
|
-
1, 45, :_reduce_none,
|
165
|
-
1, 45, :_reduce_none,
|
166
168
|
1, 45, :_reduce_none,
|
167
|
-
|
168
|
-
1,
|
169
|
-
1,
|
170
|
-
1,
|
171
|
-
|
172
|
-
|
173
|
-
1,
|
174
|
-
|
175
|
-
1,
|
176
|
-
1,
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
169
|
+
2, 45, :_reduce_4,
|
170
|
+
1, 47, :_reduce_none,
|
171
|
+
1, 47, :_reduce_none,
|
172
|
+
1, 47, :_reduce_none,
|
173
|
+
1, 47, :_reduce_none,
|
174
|
+
1, 47, :_reduce_none,
|
175
|
+
1, 47, :_reduce_none,
|
176
|
+
1, 47, :_reduce_none,
|
177
|
+
1, 47, :_reduce_none,
|
178
|
+
1, 47, :_reduce_none,
|
179
|
+
1, 47, :_reduce_none,
|
180
|
+
4, 54, :_reduce_15,
|
181
|
+
2, 54, :_reduce_16,
|
182
|
+
1, 58, :_reduce_none,
|
183
|
+
3, 58, :_reduce_18,
|
181
184
|
1, 59, :_reduce_none,
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
1,
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
1,
|
196
|
-
3, 61, :_reduce_38,
|
197
|
-
3, 70, :_reduce_39,
|
198
|
-
1, 71, :_reduce_none,
|
199
|
-
3, 71, :_reduce_41,
|
200
|
-
1, 69, :_reduce_none,
|
201
|
-
1, 69, :_reduce_none,
|
202
|
-
1, 69, :_reduce_none,
|
185
|
+
1, 59, :_reduce_none,
|
186
|
+
1, 59, :_reduce_none,
|
187
|
+
5, 48, :_reduce_22,
|
188
|
+
5, 48, :_reduce_23,
|
189
|
+
5, 48, :_reduce_24,
|
190
|
+
2, 49, :_reduce_25,
|
191
|
+
3, 50, :_reduce_26,
|
192
|
+
4, 68, :_reduce_27,
|
193
|
+
1, 63, :_reduce_none,
|
194
|
+
3, 63, :_reduce_29,
|
195
|
+
0, 64, :_reduce_none,
|
196
|
+
1, 64, :_reduce_none,
|
197
|
+
1, 60, :_reduce_32,
|
198
|
+
1, 67, :_reduce_33,
|
203
199
|
1, 69, :_reduce_none,
|
204
200
|
1, 69, :_reduce_none,
|
205
201
|
1, 69, :_reduce_none,
|
206
202
|
1, 69, :_reduce_none,
|
207
203
|
1, 69, :_reduce_none,
|
208
204
|
1, 69, :_reduce_none,
|
209
|
-
|
210
|
-
|
211
|
-
1,
|
212
|
-
|
213
|
-
|
214
|
-
1,
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
1,
|
219
|
-
|
220
|
-
|
205
|
+
3, 51, :_reduce_40,
|
206
|
+
0, 65, :_reduce_41,
|
207
|
+
1, 65, :_reduce_42,
|
208
|
+
3, 65, :_reduce_43,
|
209
|
+
3, 73, :_reduce_44,
|
210
|
+
1, 74, :_reduce_none,
|
211
|
+
3, 74, :_reduce_46,
|
212
|
+
1, 72, :_reduce_none,
|
213
|
+
1, 72, :_reduce_none,
|
214
|
+
1, 72, :_reduce_none,
|
215
|
+
1, 72, :_reduce_none,
|
216
|
+
1, 72, :_reduce_none,
|
217
|
+
1, 72, :_reduce_none,
|
218
|
+
1, 72, :_reduce_none,
|
219
|
+
1, 72, :_reduce_none,
|
220
|
+
1, 72, :_reduce_none,
|
221
|
+
4, 78, :_reduce_56,
|
222
|
+
1, 62, :_reduce_57,
|
223
|
+
1, 62, :_reduce_58,
|
224
|
+
1, 76, :_reduce_59,
|
225
|
+
4, 77, :_reduce_60,
|
226
|
+
5, 52, :_reduce_61,
|
221
227
|
1, 79, :_reduce_none,
|
222
|
-
|
228
|
+
2, 79, :_reduce_63,
|
229
|
+
5, 80, :_reduce_64,
|
230
|
+
4, 80, :_reduce_65,
|
223
231
|
1, 81, :_reduce_none,
|
224
|
-
3, 81, :
|
225
|
-
3,
|
226
|
-
1,
|
227
|
-
|
228
|
-
1,
|
229
|
-
|
230
|
-
|
231
|
-
1, 78, :_reduce_none,
|
232
|
-
2, 49, :_reduce_74,
|
233
|
-
6, 52, :_reduce_75,
|
234
|
-
5, 52, :_reduce_76,
|
235
|
-
6, 53, :_reduce_77,
|
236
|
-
5, 53, :_reduce_78,
|
237
|
-
6, 54, :_reduce_79,
|
238
|
-
5, 54, :_reduce_80,
|
239
|
-
1, 84, :_reduce_none,
|
240
|
-
2, 84, :_reduce_82,
|
241
|
-
1, 85, :_reduce_83,
|
242
|
-
1, 85, :_reduce_84,
|
243
|
-
0, 86, :_reduce_85,
|
232
|
+
3, 81, :_reduce_67,
|
233
|
+
3, 70, :_reduce_68,
|
234
|
+
1, 83, :_reduce_none,
|
235
|
+
3, 83, :_reduce_70,
|
236
|
+
1, 85, :_reduce_none,
|
237
|
+
3, 85, :_reduce_72,
|
238
|
+
3, 84, :_reduce_73,
|
244
239
|
1, 82, :_reduce_none,
|
245
|
-
|
246
|
-
|
240
|
+
1, 82, :_reduce_none,
|
241
|
+
1, 82, :_reduce_none,
|
242
|
+
1, 82, :_reduce_none,
|
243
|
+
1, 82, :_reduce_none,
|
244
|
+
1, 82, :_reduce_none,
|
245
|
+
1, 82, :_reduce_80,
|
246
|
+
2, 53, :_reduce_81,
|
247
|
+
6, 55, :_reduce_82,
|
248
|
+
5, 55, :_reduce_83,
|
249
|
+
6, 56, :_reduce_84,
|
250
|
+
5, 56, :_reduce_85,
|
251
|
+
6, 57, :_reduce_86,
|
252
|
+
5, 57, :_reduce_87,
|
253
|
+
1, 88, :_reduce_none,
|
254
|
+
3, 88, :_reduce_89,
|
255
|
+
1, 89, :_reduce_90,
|
256
|
+
1, 89, :_reduce_91,
|
257
|
+
1, 89, :_reduce_92,
|
258
|
+
0, 46, :_reduce_93,
|
259
|
+
1, 86, :_reduce_none,
|
260
|
+
3, 86, :_reduce_95,
|
261
|
+
3, 86, :_reduce_96,
|
262
|
+
1, 90, :_reduce_none,
|
263
|
+
3, 90, :_reduce_98,
|
264
|
+
3, 91, :_reduce_99,
|
265
|
+
1, 91, :_reduce_100,
|
247
266
|
1, 87, :_reduce_none,
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
1,
|
254
|
-
|
255
|
-
1,
|
256
|
-
1, 72, :_reduce_none,
|
257
|
-
0, 62, :_reduce_none,
|
258
|
-
1, 62, :_reduce_100 ]
|
267
|
+
2, 87, :_reduce_102,
|
268
|
+
1, 61, :_reduce_103,
|
269
|
+
3, 71, :_reduce_104,
|
270
|
+
2, 71, :_reduce_105,
|
271
|
+
1, 75, :_reduce_none,
|
272
|
+
1, 75, :_reduce_none,
|
273
|
+
0, 66, :_reduce_none,
|
274
|
+
1, 66, :_reduce_109 ]
|
259
275
|
|
260
|
-
racc_reduce_n =
|
276
|
+
racc_reduce_n = 110
|
261
277
|
|
262
|
-
racc_shift_n =
|
278
|
+
racc_shift_n = 181
|
263
279
|
|
264
280
|
racc_action_table = [
|
265
|
-
|
266
|
-
34,
|
267
|
-
34,
|
268
|
-
|
269
|
-
|
270
|
-
47,
|
271
|
-
|
272
|
-
29,
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
nil, nil, nil,
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
nil,
|
293
|
-
|
294
|
-
nil,
|
295
|
-
nil,
|
296
|
-
|
297
|
-
nil,
|
298
|
-
|
299
|
-
nil,
|
300
|
-
|
301
|
-
nil, nil,
|
281
|
+
47, 34, 37, 153, 149, 18, 47, 34, 37, 59,
|
282
|
+
152, -76, 47, 34, 37, 77, 18, 34, 37, 70,
|
283
|
+
34, 37, 18, 35, -75, 59, 34, 37, 18, 42,
|
284
|
+
82, 129, -74, 48, 49, 42, 30, 54, 30, 48,
|
285
|
+
49, 42, 68, 54, 60, 48, 49, -74, 42, 54,
|
286
|
+
47, 34, 37, 35, 42, -77, 47, 34, 37, 35,
|
287
|
+
-76, 130, 47, 34, 37, 75, 18, 108, 29, 158,
|
288
|
+
29, 31, 18, 31, 35, 75, 110, 106, 18, 42,
|
289
|
+
159, 137, 138, 48, 49, 42, 145, 54, 80, 48,
|
290
|
+
87, 42, -77, 54, 83, 48, 49, 34, 37, 54,
|
291
|
+
47, 34, 37, 34, 37, 111, 47, 34, 37, 112,
|
292
|
+
114, 142, 47, 34, 37, 168, 18, 112, 114, 72,
|
293
|
+
43, 108, 18, 106, 146, 42, 81, -79, 18, 42,
|
294
|
+
35, 42, 80, 48, 49, 42, 35, 54, -75, 48,
|
295
|
+
49, 42, 72, 54, -78, 48, 49, 156, 157, 54,
|
296
|
+
47, 34, 37, 34, 37, 105, 160, 161, 75, 72,
|
297
|
+
34, 37, 34, 37, 67, 120, 18, 66, 18, 97,
|
298
|
+
170, 65, 108, 35, 68, 18, 62, 18, 99, 42,
|
299
|
+
32, 42, 26, 48, 49, 48, 49, 54, 42, 54,
|
300
|
+
42, 103, 48, 49, 48, 49, 54, nil, 54, 34,
|
301
|
+
37, 34, 37, nil, nil, 151, nil, nil, 34, 37,
|
302
|
+
nil, nil, nil, nil, 18, nil, 18, nil, nil, nil,
|
303
|
+
nil, nil, nil, 18, nil, nil, nil, 42, 163, 42,
|
304
|
+
nil, 48, 49, 48, 49, 54, 42, 54, nil, 18,
|
305
|
+
48, 49, nil, 165, 54, nil, nil, nil, nil, 15,
|
306
|
+
17, nil, 22, 24, 18, 3, nil, 9, 180, 12,
|
307
|
+
nil, 19, nil, nil, 15, 17, nil, 22, 24, 18,
|
308
|
+
3, nil, 9, 166, 12, nil, 19, nil, nil, 15,
|
309
|
+
17, nil, 22, 24, 18, 3, nil, 9, 175, 12,
|
310
|
+
nil, 19, nil, nil, 15, 17, nil, 22, 24, 18,
|
311
|
+
3, nil, 9, 140, 12, nil, 19, nil, nil, 15,
|
312
|
+
17, nil, 22, 24, 18, 3, nil, 9, 179, 12,
|
313
|
+
nil, 19, nil, nil, 15, 17, nil, 22, 24, 18,
|
314
|
+
3, nil, 9, 176, 12, nil, 19, nil, nil, 15,
|
315
|
+
17, nil, 22, 24, 18, 3, nil, 9, nil, 12,
|
316
|
+
nil, 19, nil, nil, 15, 17, nil, 22, 24, 18,
|
317
|
+
3, nil, 9, nil, 12, nil, 19, nil, nil, 15,
|
318
|
+
17, nil, 22, 24, 18, 3, nil, 9, nil, 12,
|
319
|
+
nil, 19, nil, nil, 15, 17, nil, 22, 24, nil,
|
320
|
+
3, nil, 9, nil, 12, nil, 19 ]
|
302
321
|
|
303
322
|
racc_action_check = [
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
81, 81,
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
nil, nil, nil,
|
327
|
-
|
328
|
-
|
329
|
-
nil,
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
nil,
|
334
|
-
|
335
|
-
|
336
|
-
nil,
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
323
|
+
65, 65, 65, 127, 124, 19, 130, 130, 130, 13,
|
324
|
+
127, 57, 47, 47, 47, 47, 65, 15, 15, 27,
|
325
|
+
43, 43, 130, 19, 85, 64, 80, 80, 47, 65,
|
326
|
+
53, 88, 91, 65, 65, 130, 3, 65, 70, 130,
|
327
|
+
130, 47, 27, 130, 13, 47, 47, 53, 43, 47,
|
328
|
+
113, 113, 113, 43, 80, 92, 59, 59, 59, 80,
|
329
|
+
93, 94, 82, 82, 82, 76, 113, 96, 3, 133,
|
330
|
+
70, 3, 59, 70, 99, 115, 76, 87, 82, 113,
|
331
|
+
133, 100, 102, 113, 113, 59, 115, 113, 87, 59,
|
332
|
+
59, 82, 56, 59, 55, 82, 82, 75, 75, 82,
|
333
|
+
12, 12, 12, 9, 9, 79, 146, 146, 146, 79,
|
334
|
+
79, 107, 161, 161, 161, 148, 12, 148, 148, 108,
|
335
|
+
9, 74, 146, 72, 118, 75, 51, 58, 161, 12,
|
336
|
+
75, 9, 49, 12, 12, 146, 9, 12, 46, 146,
|
337
|
+
146, 161, 129, 146, 45, 161, 161, 131, 132, 161,
|
338
|
+
106, 106, 106, 83, 83, 71, 134, 136, 36, 32,
|
339
|
+
153, 153, 81, 81, 26, 81, 106, 24, 83, 60,
|
340
|
+
152, 22, 154, 158, 66, 153, 17, 81, 62, 106,
|
341
|
+
4, 83, 2, 106, 106, 83, 83, 106, 153, 83,
|
342
|
+
81, 68, 153, 153, 81, 81, 153, nil, 81, 169,
|
343
|
+
169, 125, 125, nil, nil, 125, nil, nil, 120, 120,
|
344
|
+
nil, nil, nil, nil, 169, nil, 125, nil, nil, nil,
|
345
|
+
nil, nil, nil, 120, nil, nil, nil, 169, 137, 125,
|
346
|
+
nil, 169, 169, 125, 125, 169, 120, 125, nil, 137,
|
347
|
+
120, 120, nil, 138, 120, nil, nil, nil, nil, 137,
|
348
|
+
137, nil, 137, 137, 138, 137, nil, 137, 178, 137,
|
349
|
+
nil, 137, nil, nil, 138, 138, nil, 138, 138, 178,
|
350
|
+
138, nil, 138, 139, 138, nil, 138, nil, nil, 178,
|
351
|
+
178, nil, 178, 178, 139, 178, nil, 178, 162, 178,
|
352
|
+
nil, 178, nil, nil, 139, 139, nil, 139, 139, 162,
|
353
|
+
139, nil, 139, 105, 139, nil, 139, nil, nil, 162,
|
354
|
+
162, nil, 162, 162, 105, 162, nil, 162, 170, 162,
|
355
|
+
nil, 162, nil, nil, 105, 105, nil, 105, 105, 170,
|
356
|
+
105, nil, 105, 164, 105, nil, 105, nil, nil, 170,
|
357
|
+
170, nil, 170, 170, 164, 170, nil, 170, nil, 170,
|
358
|
+
nil, 170, nil, nil, 164, 164, nil, 164, 164, 6,
|
359
|
+
164, nil, 164, nil, 164, nil, 164, nil, nil, 6,
|
360
|
+
6, nil, 6, 6, 0, 6, nil, 6, nil, 6,
|
361
|
+
nil, 6, nil, nil, 0, 0, nil, 0, 0, nil,
|
362
|
+
0, nil, 0, nil, 0, nil, 0 ]
|
341
363
|
|
342
364
|
racc_action_pointer = [
|
343
|
-
|
344
|
-
nil,
|
345
|
-
nil,
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
nil,
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
nil, nil,
|
358
|
-
nil, nil,
|
359
|
-
nil, nil, nil,
|
365
|
+
356, nil, 182, 32, 174, nil, 341, nil, nil, 100,
|
366
|
+
nil, nil, 98, 3, nil, 14, nil, 140, nil, -13,
|
367
|
+
nil, nil, 158, nil, 131, nil, 164, 9, nil, nil,
|
368
|
+
nil, nil, 123, nil, nil, nil, 148, nil, nil, nil,
|
369
|
+
nil, nil, nil, 17, nil, 125, 119, 10, nil, 112,
|
370
|
+
nil, 107, nil, 28, nil, 88, 73, -8, 108, 54,
|
371
|
+
127, nil, 158, nil, 19, -2, 141, nil, 155, nil,
|
372
|
+
34, 149, 114, nil, 111, 94, 55, nil, nil, 100,
|
373
|
+
23, 159, 60, 150, nil, 5, nil, 68, 14, nil,
|
374
|
+
nil, 13, 36, 41, 24, nil, 57, nil, nil, 38,
|
375
|
+
75, nil, 76, nil, nil, 296, 148, 104, 83, nil,
|
376
|
+
nil, nil, nil, 48, nil, 65, nil, nil, 115, nil,
|
377
|
+
205, nil, nil, nil, -1, 198, nil, -7, nil, 106,
|
378
|
+
4, 140, 141, 59, 135, nil, 144, 221, 236, 266,
|
379
|
+
nil, nil, nil, nil, nil, nil, 104, nil, 108, nil,
|
380
|
+
nil, nil, 164, 157, 162, nil, nil, nil, 137, nil,
|
381
|
+
nil, 110, 281, nil, 326, nil, nil, nil, nil, 196,
|
382
|
+
311, nil, nil, nil, nil, nil, nil, nil, 251, nil,
|
383
|
+
nil ]
|
360
384
|
|
361
385
|
racc_action_default = [
|
362
|
-
|
363
|
-
-
|
364
|
-
|
365
|
-
-
|
366
|
-
-
|
367
|
-
-
|
368
|
-
-
|
369
|
-
|
370
|
-
-
|
371
|
-
-
|
372
|
-
-
|
373
|
-
|
374
|
-
-
|
375
|
-
-
|
376
|
-
-
|
377
|
-
-
|
378
|
-
-
|
386
|
+
-93, -12, -110, -110, -110, -13, -1, -14, -2, -32,
|
387
|
+
-3, -5, -110, -110, -6, -110, -7, -110, -33, -110,
|
388
|
+
-8, -9, -110, -10, -110, -11, -110, -93, -88, -90,
|
389
|
+
-91, -92, -41, -4, -57, -32, -16, -58, -17, -19,
|
390
|
+
-20, -21, -103, -110, -54, -55, -49, -110, -59, -32,
|
391
|
+
-51, -110, -53, -48, -80, -110, -52, -47, -50, -41,
|
392
|
+
-110, -81, -93, -25, -110, -110, -93, 181, -110, -101,
|
393
|
+
-110, -110, -110, -42, -108, -110, -110, -105, -45, -110,
|
394
|
+
-110, -110, -110, -110, -78, -36, -28, -32, -110, -37,
|
395
|
+
-39, -35, -38, -34, -30, -79, -108, -26, -94, -93,
|
396
|
+
-110, -40, -110, -102, -89, -110, -110, -110, -109, -18,
|
397
|
+
-15, -104, -106, -110, -107, -110, -75, -74, -110, -77,
|
398
|
+
-110, -68, -76, -69, -110, -110, -62, -110, -66, -41,
|
399
|
+
-31, -110, -110, -110, -110, -97, -100, -110, -110, -110,
|
400
|
+
-87, -44, -24, -43, -46, -56, -110, -71, -110, -60,
|
401
|
+
-63, -61, -110, -110, -108, -29, -22, -23, -110, -96,
|
402
|
+
-95, -110, -110, -83, -110, -85, -86, -73, -70, -110,
|
403
|
+
-110, -67, -27, -98, -99, -82, -84, -72, -110, -65,
|
404
|
+
-64 ]
|
379
405
|
|
380
406
|
racc_goto_table = [
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
nil,
|
387
|
-
nil, nil,
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
nil,
|
394
|
-
46, nil,
|
395
|
-
|
396
|
-
nil,
|
397
|
-
|
398
|
-
nil,
|
399
|
-
nil,
|
400
|
-
|
401
|
-
nil, nil, nil,
|
402
|
-
nil, nil, nil,
|
403
|
-
nil, nil,
|
407
|
+
33, 6, 74, 39, 8, 107, 53, 89, 135, 123,
|
408
|
+
126, 86, 36, 64, 109, 40, 71, 90, 125, 79,
|
409
|
+
94, 121, 113, 131, 148, 28, 100, 132, 143, 96,
|
410
|
+
41, 27, 63, 133, 2, nil, 61, 39, nil, nil,
|
411
|
+
118, 53, 128, nil, nil, nil, 76, nil, 147, 40,
|
412
|
+
nil, nil, 150, 91, nil, 102, nil, nil, nil, 53,
|
413
|
+
nil, nil, nil, nil, 41, 92, 98, 173, nil, 39,
|
414
|
+
nil, nil, nil, nil, 39, 117, 53, 117, 89, 118,
|
415
|
+
93, 40, 155, 115, 128, 172, 40, 119, 90, 119,
|
416
|
+
55, 169, 104, 136, nil, 46, 41, 177, nil, 154,
|
417
|
+
53, 41, 122, 134, 122, nil, 139, 53, nil, nil,
|
418
|
+
nil, nil, 171, nil, 117, nil, nil, nil, nil, 117,
|
419
|
+
nil, nil, nil, nil, 91, 78, 119, nil, 118, nil,
|
420
|
+
46, 119, nil, 33, nil, nil, 92, nil, 162, 164,
|
421
|
+
53, 122, 85, 101, nil, nil, 122, 117, 46, nil,
|
422
|
+
nil, 93, 136, nil, 84, 53, 33, 95, 33, 119,
|
423
|
+
124, nil, nil, 117, 116, 46, 116, nil, nil, nil,
|
424
|
+
nil, 178, 33, nil, 122, 119, 84, nil, 84, 95,
|
425
|
+
nil, 95, nil, nil, 141, nil, nil, nil, nil, 46,
|
426
|
+
122, 144, nil, nil, nil, nil, 46, nil, nil, nil,
|
427
|
+
nil, nil, nil, 116, nil, nil, nil, nil, 116, nil,
|
428
|
+
nil, nil, nil, 85, nil, 84, nil, nil, 95, nil,
|
429
|
+
84, nil, nil, 95, 167, 84, nil, nil, 95, 46,
|
430
|
+
nil, nil, nil, nil, nil, nil, 116, nil, nil, 174,
|
431
|
+
nil, nil, nil, nil, 46, nil, nil, nil, 84, nil,
|
432
|
+
nil, 95, 116, nil, nil, nil, nil, nil, nil, nil,
|
433
|
+
nil, nil, nil, nil, 84, nil, nil, 95 ]
|
404
434
|
|
405
435
|
racc_goto_check = [
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
nil,
|
412
|
-
nil, nil,
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
nil,
|
419
|
-
|
420
|
-
|
421
|
-
nil,
|
422
|
-
|
423
|
-
nil,
|
424
|
-
nil,
|
425
|
-
|
426
|
-
nil, nil, nil,
|
427
|
-
nil, nil, nil,
|
428
|
-
nil, nil,
|
436
|
+
4, 2, 22, 17, 3, 23, 17, 27, 48, 41,
|
437
|
+
37, 25, 15, 17, 16, 18, 44, 28, 36, 31,
|
438
|
+
20, 40, 32, 21, 42, 46, 43, 23, 30, 22,
|
439
|
+
19, 45, 5, 47, 1, nil, 19, 17, nil, nil,
|
440
|
+
39, 17, 39, nil, nil, nil, 15, nil, 41, 18,
|
441
|
+
nil, nil, 37, 17, nil, 44, nil, nil, nil, 17,
|
442
|
+
nil, nil, nil, nil, 19, 18, 3, 48, nil, 17,
|
443
|
+
nil, nil, nil, nil, 17, 17, 17, 17, 27, 39,
|
444
|
+
19, 18, 25, 15, 39, 23, 18, 18, 28, 18,
|
445
|
+
29, 32, 46, 17, nil, 24, 19, 41, nil, 22,
|
446
|
+
17, 19, 19, 3, 19, nil, 2, 17, nil, nil,
|
447
|
+
nil, nil, 39, nil, 17, nil, nil, nil, nil, 17,
|
448
|
+
nil, nil, nil, nil, 17, 29, 18, nil, 39, nil,
|
449
|
+
24, 18, nil, 4, nil, nil, 18, nil, 2, 2,
|
450
|
+
17, 19, 24, 29, nil, nil, 19, 17, 24, nil,
|
451
|
+
nil, 19, 17, nil, 35, 17, 4, 33, 4, 18,
|
452
|
+
29, nil, nil, 17, 24, 24, 24, nil, nil, nil,
|
453
|
+
nil, 2, 4, nil, 19, 18, 35, nil, 35, 33,
|
454
|
+
nil, 33, nil, nil, 29, nil, nil, nil, nil, 24,
|
455
|
+
19, 29, nil, nil, nil, nil, 24, nil, nil, nil,
|
456
|
+
nil, nil, nil, 24, nil, nil, nil, nil, 24, nil,
|
457
|
+
nil, nil, nil, 24, nil, 35, nil, nil, 33, nil,
|
458
|
+
35, nil, nil, 33, 29, 35, nil, nil, 33, 24,
|
459
|
+
nil, nil, nil, nil, nil, nil, 24, nil, nil, 29,
|
460
|
+
nil, nil, nil, nil, 24, nil, nil, nil, 35, nil,
|
461
|
+
nil, 33, 24, nil, nil, nil, nil, nil, nil, nil,
|
462
|
+
nil, nil, nil, nil, 35, nil, nil, 33 ]
|
429
463
|
|
430
464
|
racc_goto_pointer = [
|
431
|
-
nil,
|
432
|
-
nil, nil, nil,
|
433
|
-
-
|
434
|
-
-
|
435
|
-
|
465
|
+
nil, 34, 1, 4, -6, 13, nil, nil, nil, nil,
|
466
|
+
nil, nil, nil, nil, nil, 3, -61, -6, 6, 21,
|
467
|
+
-39, -71, -30, -69, 83, -48, nil, -52, -42, 78,
|
468
|
+
-80, -28, -57, 98, nil, 95, -65, -73, nil, -41,
|
469
|
+
-60, -72, -96, -36, -11, 28, 22, -66, -91 ]
|
436
470
|
|
437
471
|
racc_goto_default = [
|
438
|
-
nil, nil, nil,
|
439
|
-
|
440
|
-
nil,
|
441
|
-
nil, 44, 45, nil, nil,
|
442
|
-
nil, nil, nil, nil,
|
472
|
+
nil, nil, nil, 69, 10, 11, 14, 16, 20, 21,
|
473
|
+
23, 25, 1, 5, 7, nil, 38, 13, 56, 57,
|
474
|
+
nil, nil, nil, nil, 4, nil, 88, 50, 52, nil,
|
475
|
+
73, nil, nil, 58, 44, 45, nil, nil, 127, 51,
|
476
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil ]
|
443
477
|
|
444
478
|
racc_token_table = {
|
445
479
|
false => 0,
|
@@ -456,38 +490,39 @@ racc_token_table = {
|
|
456
490
|
:TRUE => 11,
|
457
491
|
:FALSE => 12,
|
458
492
|
:EQUALS => 13,
|
459
|
-
:
|
460
|
-
:
|
461
|
-
:
|
462
|
-
:
|
463
|
-
:
|
464
|
-
:
|
465
|
-
:
|
466
|
-
:
|
467
|
-
:
|
468
|
-
:
|
469
|
-
:
|
470
|
-
:
|
471
|
-
:
|
472
|
-
:
|
473
|
-
:
|
474
|
-
:
|
475
|
-
:
|
476
|
-
:
|
477
|
-
:
|
478
|
-
:
|
479
|
-
:
|
480
|
-
:
|
493
|
+
:LESSEQUAL => 14,
|
494
|
+
:NOTEQUAL => 15,
|
495
|
+
:DOT => 16,
|
496
|
+
:COLON => 17,
|
497
|
+
:TYPE => 18,
|
498
|
+
:QMARK => 19,
|
499
|
+
:LPAREN => 20,
|
500
|
+
:RPAREN => 21,
|
501
|
+
:ISEQUAL => 22,
|
502
|
+
:GREATEREQUAL => 23,
|
503
|
+
:GREATERTHAN => 24,
|
504
|
+
:LESSTHAN => 25,
|
505
|
+
:IF => 26,
|
506
|
+
:ELSE => 27,
|
507
|
+
:IMPORT => 28,
|
508
|
+
:DEFINE => 29,
|
509
|
+
:ELSIF => 30,
|
510
|
+
:VARIABLE => 31,
|
511
|
+
:CLASS => 32,
|
512
|
+
:INHERITS => 33,
|
513
|
+
:NODE => 34,
|
514
|
+
:BOOLEAN => 35,
|
481
515
|
:NAME => 36,
|
482
516
|
:SEMIC => 37,
|
483
517
|
:CASE => 38,
|
484
518
|
:DEFAULT => 39,
|
485
|
-
:
|
486
|
-
:
|
519
|
+
:AT => 40,
|
520
|
+
:LCOLLECT => 41,
|
521
|
+
:RCOLLECT => 42 }
|
487
522
|
|
488
523
|
racc_use_result_var = true
|
489
524
|
|
490
|
-
racc_nt_base =
|
525
|
+
racc_nt_base = 43
|
491
526
|
|
492
527
|
Racc_arg = [
|
493
528
|
racc_action_table,
|
@@ -520,6 +555,11 @@ Racc_token_to_s_table = [
|
|
520
555
|
'TRUE',
|
521
556
|
'FALSE',
|
522
557
|
'EQUALS',
|
558
|
+
'LESSEQUAL',
|
559
|
+
'NOTEQUAL',
|
560
|
+
'DOT',
|
561
|
+
'COLON',
|
562
|
+
'TYPE',
|
523
563
|
'QMARK',
|
524
564
|
'LPAREN',
|
525
565
|
'RPAREN',
|
@@ -527,8 +567,6 @@ Racc_token_to_s_table = [
|
|
527
567
|
'GREATEREQUAL',
|
528
568
|
'GREATERTHAN',
|
529
569
|
'LESSTHAN',
|
530
|
-
'LESSEQUAL',
|
531
|
-
'NOTEQUAL',
|
532
570
|
'IF',
|
533
571
|
'ELSE',
|
534
572
|
'IMPORT',
|
@@ -539,25 +577,25 @@ Racc_token_to_s_table = [
|
|
539
577
|
'INHERITS',
|
540
578
|
'NODE',
|
541
579
|
'BOOLEAN',
|
542
|
-
'DOT',
|
543
|
-
'COLON',
|
544
|
-
'TYPE',
|
545
580
|
'NAME',
|
546
581
|
'SEMIC',
|
547
582
|
'CASE',
|
548
583
|
'DEFAULT',
|
549
|
-
'
|
550
|
-
'
|
584
|
+
'AT',
|
585
|
+
'LCOLLECT',
|
586
|
+
'RCOLLECT',
|
551
587
|
'$start',
|
552
588
|
'program',
|
553
589
|
'statements',
|
590
|
+
'nothing',
|
554
591
|
'statement',
|
555
592
|
'object',
|
593
|
+
'collectable',
|
594
|
+
'collection',
|
556
595
|
'assignment',
|
557
596
|
'casestatement',
|
558
597
|
'import',
|
559
|
-
'
|
560
|
-
'tag',
|
598
|
+
'fstatement',
|
561
599
|
'definition',
|
562
600
|
'hostclass',
|
563
601
|
'nodedef',
|
@@ -565,6 +603,7 @@ Racc_token_to_s_table = [
|
|
565
603
|
'classname',
|
566
604
|
'name',
|
567
605
|
'variable',
|
606
|
+
'quotedtext',
|
568
607
|
'objectinstances',
|
569
608
|
'endsemi',
|
570
609
|
'params',
|
@@ -572,7 +611,6 @@ Racc_token_to_s_table = [
|
|
572
611
|
'type',
|
573
612
|
'objectinst',
|
574
613
|
'objectname',
|
575
|
-
'quotedtext',
|
576
614
|
'selector',
|
577
615
|
'array',
|
578
616
|
'rvalue',
|
@@ -581,6 +619,7 @@ Racc_token_to_s_table = [
|
|
581
619
|
'comma',
|
582
620
|
'boolean',
|
583
621
|
'objectref',
|
622
|
+
'funcrvalue',
|
584
623
|
'caseopts',
|
585
624
|
'caseopt',
|
586
625
|
'casevalues',
|
@@ -592,7 +631,6 @@ Racc_token_to_s_table = [
|
|
592
631
|
'parent',
|
593
632
|
'hostnames',
|
594
633
|
'hostname',
|
595
|
-
'nothing',
|
596
634
|
'arguments',
|
597
635
|
'argument']
|
598
636
|
|
@@ -602,7 +640,7 @@ Racc_debug_parser = false
|
|
602
640
|
|
603
641
|
# reduce 0 omitted
|
604
642
|
|
605
|
-
module_eval <<'.,.,', 'grammar.ra',
|
643
|
+
module_eval <<'.,.,', 'grammar.ra', 26
|
606
644
|
def _reduce_1( val, _values, result )
|
607
645
|
if val[0].is_a?(AST::ASTArray)
|
608
646
|
result = val[0]
|
@@ -612,29 +650,16 @@ module_eval <<'.,.,', 'grammar.ra', 40
|
|
612
650
|
:children => [val[0]]
|
613
651
|
)
|
614
652
|
end
|
615
|
-
|
616
|
-
# this is mainly so we can test the parser separately from the
|
617
|
-
# interpreter
|
618
|
-
# if Puppet[:parseonly]
|
619
|
-
# begin
|
620
|
-
# if Puppet[:debug]
|
621
|
-
# puts result.tree(0)
|
622
|
-
# end
|
623
|
-
# rescue NoMethodError => detail
|
624
|
-
# Puppet.err detail
|
625
|
-
# #exit(78)
|
626
|
-
# end
|
627
|
-
# #require 'puppet/parser/interpreter'
|
628
|
-
# #result = Puppet::Server.new(result)
|
629
|
-
# end
|
630
653
|
result
|
631
654
|
end
|
632
655
|
.,.,
|
633
656
|
|
634
657
|
# reduce 2 omitted
|
635
658
|
|
636
|
-
|
637
|
-
|
659
|
+
# reduce 3 omitted
|
660
|
+
|
661
|
+
module_eval <<'.,.,', 'grammar.ra', 41
|
662
|
+
def _reduce_4( val, _values, result )
|
638
663
|
if val[0].instance_of?(AST::ASTArray)
|
639
664
|
val[0].push(val[1])
|
640
665
|
result = val[0]
|
@@ -649,8 +674,6 @@ module_eval <<'.,.,', 'grammar.ra', 54
|
|
649
674
|
end
|
650
675
|
.,.,
|
651
676
|
|
652
|
-
# reduce 4 omitted
|
653
|
-
|
654
677
|
# reduce 5 omitted
|
655
678
|
|
656
679
|
# reduce 6 omitted
|
@@ -667,51 +690,42 @@ module_eval <<'.,.,', 'grammar.ra', 54
|
|
667
690
|
|
668
691
|
# reduce 12 omitted
|
669
692
|
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
# some kind of checking that the asked-for class is a defined class.
|
679
|
-
classnames.each { |classname|
|
680
|
-
emptyary = AST::ASTArray.new(:children => [])
|
681
|
-
klasses << AST::ObjectDef.new(
|
682
|
-
:pin => "{}",
|
683
|
-
:line => @lexer.line,
|
684
|
-
:file => @lexer.file,
|
685
|
-
:type => classname,
|
686
|
-
:params => emptyary
|
687
|
-
)
|
688
|
-
}
|
689
|
-
result = AST::ASTArray.new(
|
693
|
+
# reduce 13 omitted
|
694
|
+
|
695
|
+
# reduce 14 omitted
|
696
|
+
|
697
|
+
module_eval <<'.,.,', 'grammar.ra', 64
|
698
|
+
def _reduce_15( val, _values, result )
|
699
|
+
args = aryfy(val[2])
|
700
|
+
result = AST::Function.new(
|
690
701
|
:line => @lexer.line,
|
691
702
|
:file => @lexer.file,
|
692
|
-
:
|
703
|
+
:name => val[0],
|
704
|
+
:arguments => args,
|
705
|
+
:ftype => :statement
|
693
706
|
)
|
694
707
|
result
|
695
708
|
end
|
696
709
|
.,.,
|
697
710
|
|
698
|
-
module_eval <<'.,.,', 'grammar.ra',
|
699
|
-
def
|
700
|
-
|
701
|
-
|
702
|
-
result = AST::Tag.new(
|
711
|
+
module_eval <<'.,.,', 'grammar.ra', 74
|
712
|
+
def _reduce_16( val, _values, result )
|
713
|
+
args = aryfy(val[1])
|
714
|
+
result = AST::Function.new(
|
703
715
|
:line => @lexer.line,
|
704
716
|
:file => @lexer.file,
|
705
|
-
:
|
717
|
+
:name => val[0],
|
718
|
+
:arguments => args,
|
719
|
+
:ftype => :statement
|
706
720
|
)
|
707
721
|
result
|
708
722
|
end
|
709
723
|
.,.,
|
710
724
|
|
711
|
-
# reduce
|
725
|
+
# reduce 17 omitted
|
712
726
|
|
713
|
-
module_eval <<'.,.,', 'grammar.ra',
|
714
|
-
def
|
727
|
+
module_eval <<'.,.,', 'grammar.ra', 93
|
728
|
+
def _reduce_18( val, _values, result )
|
715
729
|
result = aryfy(val[0], val[2])
|
716
730
|
result.line = @lexer.line
|
717
731
|
result.file = @lexer.file
|
@@ -719,12 +733,14 @@ module_eval <<'.,.,', 'grammar.ra', 109
|
|
719
733
|
end
|
720
734
|
.,.,
|
721
735
|
|
722
|
-
# reduce
|
736
|
+
# reduce 19 omitted
|
737
|
+
|
738
|
+
# reduce 20 omitted
|
723
739
|
|
724
|
-
# reduce
|
740
|
+
# reduce 21 omitted
|
725
741
|
|
726
|
-
module_eval <<'.,.,', 'grammar.ra',
|
727
|
-
def
|
742
|
+
module_eval <<'.,.,', 'grammar.ra', 128
|
743
|
+
def _reduce_22( val, _values, result )
|
728
744
|
if val[0].instance_of?(AST::ASTArray)
|
729
745
|
raise Puppet::ParseError, "Invalid name"
|
730
746
|
end
|
@@ -756,8 +772,8 @@ module_eval <<'.,.,', 'grammar.ra', 143
|
|
756
772
|
end
|
757
773
|
.,.,
|
758
774
|
|
759
|
-
module_eval <<'.,.,', 'grammar.ra',
|
760
|
-
def
|
775
|
+
module_eval <<'.,.,', 'grammar.ra', 142
|
776
|
+
def _reduce_23( val, _values, result )
|
761
777
|
if val[0].instance_of?(AST::ASTArray)
|
762
778
|
Puppet.notice "invalid name"
|
763
779
|
raise Puppet::ParseError, "Invalid name"
|
@@ -775,8 +791,8 @@ module_eval <<'.,.,', 'grammar.ra', 157
|
|
775
791
|
end
|
776
792
|
.,.,
|
777
793
|
|
778
|
-
module_eval <<'.,.,', 'grammar.ra',
|
779
|
-
def
|
794
|
+
module_eval <<'.,.,', 'grammar.ra', 154
|
795
|
+
def _reduce_24( val, _values, result )
|
780
796
|
# a template setting for a type
|
781
797
|
if val[0].instance_of?(AST::ASTArray)
|
782
798
|
raise Puppet::ParseError, "Invalid type"
|
@@ -793,7 +809,45 @@ module_eval <<'.,.,', 'grammar.ra', 169
|
|
793
809
|
.,.,
|
794
810
|
|
795
811
|
module_eval <<'.,.,', 'grammar.ra', 177
|
796
|
-
def
|
812
|
+
def _reduce_25( val, _values, result )
|
813
|
+
unless Puppet[:storeconfigs]
|
814
|
+
raise Puppet::ParseError, "You cannot collect without storeconfigs being set"
|
815
|
+
end
|
816
|
+
|
817
|
+
if val[1].is_a? AST::TypeDefaults
|
818
|
+
raise Puppet::ParseError, "Defaults are not collectable"
|
819
|
+
end
|
820
|
+
|
821
|
+
# Just mark our objects as collectable and pass them through.
|
822
|
+
if val[1].instance_of?(AST::ASTArray)
|
823
|
+
val[1].each do |obj|
|
824
|
+
obj.collectable = true
|
825
|
+
end
|
826
|
+
else
|
827
|
+
val[1].collectable = true
|
828
|
+
end
|
829
|
+
|
830
|
+
result = val[1]
|
831
|
+
result
|
832
|
+
end
|
833
|
+
.,.,
|
834
|
+
|
835
|
+
module_eval <<'.,.,', 'grammar.ra', 190
|
836
|
+
def _reduce_26( val, _values, result )
|
837
|
+
unless Puppet[:storeconfigs]
|
838
|
+
raise Puppet::ParseError, "You cannot collect without storeconfigs being set"
|
839
|
+
end
|
840
|
+
result = AST::Collection.new(
|
841
|
+
:line => @lexer.line,
|
842
|
+
:file => @lexer.file,
|
843
|
+
:type => val[0]
|
844
|
+
)
|
845
|
+
result
|
846
|
+
end
|
847
|
+
.,.,
|
848
|
+
|
849
|
+
module_eval <<'.,.,', 'grammar.ra', 198
|
850
|
+
def _reduce_27( val, _values, result )
|
797
851
|
result = AST::ObjectInst.new(
|
798
852
|
:line => @lexer.line,
|
799
853
|
:file => @lexer.file,
|
@@ -803,10 +857,10 @@ module_eval <<'.,.,', 'grammar.ra', 177
|
|
803
857
|
end
|
804
858
|
.,.,
|
805
859
|
|
806
|
-
# reduce
|
860
|
+
# reduce 28 omitted
|
807
861
|
|
808
|
-
module_eval <<'.,.,', 'grammar.ra',
|
809
|
-
def
|
862
|
+
module_eval <<'.,.,', 'grammar.ra', 212
|
863
|
+
def _reduce_29( val, _values, result )
|
810
864
|
if val[0].instance_of?(AST::ObjectInst)
|
811
865
|
result = AST::ASTArray.new(
|
812
866
|
:line => @lexer.line,
|
@@ -821,12 +875,12 @@ module_eval <<'.,.,', 'grammar.ra', 191
|
|
821
875
|
end
|
822
876
|
.,.,
|
823
877
|
|
824
|
-
# reduce
|
878
|
+
# reduce 30 omitted
|
825
879
|
|
826
|
-
# reduce
|
880
|
+
# reduce 31 omitted
|
827
881
|
|
828
|
-
module_eval <<'.,.,', 'grammar.ra',
|
829
|
-
def
|
882
|
+
module_eval <<'.,.,', 'grammar.ra', 223
|
883
|
+
def _reduce_32( val, _values, result )
|
830
884
|
result = AST::Name.new(
|
831
885
|
:line => @lexer.line,
|
832
886
|
:file => @lexer.file,
|
@@ -836,8 +890,8 @@ module_eval <<'.,.,', 'grammar.ra', 202
|
|
836
890
|
end
|
837
891
|
.,.,
|
838
892
|
|
839
|
-
module_eval <<'.,.,', 'grammar.ra',
|
840
|
-
def
|
893
|
+
module_eval <<'.,.,', 'grammar.ra', 231
|
894
|
+
def _reduce_33( val, _values, result )
|
841
895
|
result = AST::Type.new(
|
842
896
|
:line => @lexer.line,
|
843
897
|
:file => @lexer.file,
|
@@ -847,20 +901,20 @@ module_eval <<'.,.,', 'grammar.ra', 210
|
|
847
901
|
end
|
848
902
|
.,.,
|
849
903
|
|
850
|
-
# reduce
|
904
|
+
# reduce 34 omitted
|
851
905
|
|
852
|
-
# reduce
|
906
|
+
# reduce 35 omitted
|
853
907
|
|
854
|
-
# reduce
|
908
|
+
# reduce 36 omitted
|
855
909
|
|
856
|
-
# reduce
|
910
|
+
# reduce 37 omitted
|
857
911
|
|
858
|
-
# reduce
|
912
|
+
# reduce 38 omitted
|
859
913
|
|
860
|
-
# reduce
|
914
|
+
# reduce 39 omitted
|
861
915
|
|
862
|
-
module_eval <<'.,.,', 'grammar.ra',
|
863
|
-
def
|
916
|
+
module_eval <<'.,.,', 'grammar.ra', 254
|
917
|
+
def _reduce_40( val, _values, result )
|
864
918
|
# this is distinct from referencing a variable
|
865
919
|
variable = AST::Name.new(
|
866
920
|
:line => @lexer.line,
|
@@ -878,8 +932,8 @@ module_eval <<'.,.,', 'grammar.ra', 233
|
|
878
932
|
end
|
879
933
|
.,.,
|
880
934
|
|
881
|
-
module_eval <<'.,.,', 'grammar.ra',
|
882
|
-
def
|
935
|
+
module_eval <<'.,.,', 'grammar.ra', 263
|
936
|
+
def _reduce_41( val, _values, result )
|
883
937
|
result = AST::ASTArray.new(
|
884
938
|
:line => @lexer.line,
|
885
939
|
:file => @lexer.file,
|
@@ -889,15 +943,15 @@ module_eval <<'.,.,', 'grammar.ra', 242
|
|
889
943
|
end
|
890
944
|
.,.,
|
891
945
|
|
892
|
-
module_eval <<'.,.,', 'grammar.ra',
|
893
|
-
def
|
946
|
+
module_eval <<'.,.,', 'grammar.ra', 263
|
947
|
+
def _reduce_42( val, _values, result )
|
894
948
|
result = val[0]
|
895
949
|
result
|
896
950
|
end
|
897
951
|
.,.,
|
898
952
|
|
899
|
-
module_eval <<'.,.,', 'grammar.ra',
|
900
|
-
def
|
953
|
+
module_eval <<'.,.,', 'grammar.ra', 276
|
954
|
+
def _reduce_43( val, _values, result )
|
901
955
|
if val[0].instance_of?(AST::ASTArray)
|
902
956
|
val[0].push(val[2])
|
903
957
|
result = val[0]
|
@@ -912,8 +966,8 @@ module_eval <<'.,.,', 'grammar.ra', 255
|
|
912
966
|
end
|
913
967
|
.,.,
|
914
968
|
|
915
|
-
module_eval <<'.,.,', 'grammar.ra',
|
916
|
-
def
|
969
|
+
module_eval <<'.,.,', 'grammar.ra', 291
|
970
|
+
def _reduce_44( val, _values, result )
|
917
971
|
leaf = AST::String.new(
|
918
972
|
:line => @lexer.line,
|
919
973
|
:file => @lexer.file,
|
@@ -930,10 +984,10 @@ module_eval <<'.,.,', 'grammar.ra', 270
|
|
930
984
|
end
|
931
985
|
.,.,
|
932
986
|
|
933
|
-
# reduce
|
987
|
+
# reduce 45 omitted
|
934
988
|
|
935
|
-
module_eval <<'.,.,', 'grammar.ra',
|
936
|
-
def
|
989
|
+
module_eval <<'.,.,', 'grammar.ra', 304
|
990
|
+
def _reduce_46( val, _values, result )
|
937
991
|
if val[0].instance_of?(AST::ASTArray)
|
938
992
|
result = val[0].push(val[2])
|
939
993
|
else
|
@@ -947,26 +1001,40 @@ module_eval <<'.,.,', 'grammar.ra', 283
|
|
947
1001
|
end
|
948
1002
|
.,.,
|
949
1003
|
|
950
|
-
# reduce
|
1004
|
+
# reduce 47 omitted
|
951
1005
|
|
952
|
-
# reduce
|
1006
|
+
# reduce 48 omitted
|
953
1007
|
|
954
|
-
# reduce
|
1008
|
+
# reduce 49 omitted
|
955
1009
|
|
956
|
-
# reduce
|
1010
|
+
# reduce 50 omitted
|
957
1011
|
|
958
|
-
# reduce
|
1012
|
+
# reduce 51 omitted
|
959
1013
|
|
960
|
-
# reduce
|
1014
|
+
# reduce 52 omitted
|
961
1015
|
|
962
|
-
# reduce
|
1016
|
+
# reduce 53 omitted
|
963
1017
|
|
964
|
-
# reduce
|
1018
|
+
# reduce 54 omitted
|
965
1019
|
|
966
|
-
# reduce
|
1020
|
+
# reduce 55 omitted
|
1021
|
+
|
1022
|
+
module_eval <<'.,.,', 'grammar.ra', 326
|
1023
|
+
def _reduce_56( val, _values, result )
|
1024
|
+
args = aryfy(val[2])
|
1025
|
+
result = AST::Function.new(
|
1026
|
+
:line => @lexer.line,
|
1027
|
+
:file => @lexer.file,
|
1028
|
+
:name => val[0],
|
1029
|
+
:arguments => args,
|
1030
|
+
:ftype => :rvalue
|
1031
|
+
)
|
1032
|
+
result
|
1033
|
+
end
|
1034
|
+
.,.,
|
967
1035
|
|
968
|
-
module_eval <<'.,.,', 'grammar.ra',
|
969
|
-
def
|
1036
|
+
module_eval <<'.,.,', 'grammar.ra', 334
|
1037
|
+
def _reduce_57( val, _values, result )
|
970
1038
|
result = AST::String.new(
|
971
1039
|
:line => @lexer.line,
|
972
1040
|
:file => @lexer.file,
|
@@ -976,8 +1044,8 @@ module_eval <<'.,.,', 'grammar.ra', 301
|
|
976
1044
|
end
|
977
1045
|
.,.,
|
978
1046
|
|
979
|
-
module_eval <<'.,.,', 'grammar.ra',
|
980
|
-
def
|
1047
|
+
module_eval <<'.,.,', 'grammar.ra', 340
|
1048
|
+
def _reduce_58( val, _values, result )
|
981
1049
|
result = AST::FlatString.new(
|
982
1050
|
:line => @lexer.line,
|
983
1051
|
:file => @lexer.file,
|
@@ -987,8 +1055,8 @@ module_eval <<'.,.,', 'grammar.ra', 307
|
|
987
1055
|
end
|
988
1056
|
.,.,
|
989
1057
|
|
990
|
-
module_eval <<'.,.,', 'grammar.ra',
|
991
|
-
def
|
1058
|
+
module_eval <<'.,.,', 'grammar.ra', 348
|
1059
|
+
def _reduce_59( val, _values, result )
|
992
1060
|
result = AST::Boolean.new(
|
993
1061
|
:line => @lexer.line,
|
994
1062
|
:file => @lexer.file,
|
@@ -998,8 +1066,8 @@ module_eval <<'.,.,', 'grammar.ra', 315
|
|
998
1066
|
end
|
999
1067
|
.,.,
|
1000
1068
|
|
1001
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1002
|
-
def
|
1069
|
+
module_eval <<'.,.,', 'grammar.ra', 358
|
1070
|
+
def _reduce_60( val, _values, result )
|
1003
1071
|
result = AST::ObjectRef.new(
|
1004
1072
|
:pin => '[]',
|
1005
1073
|
:line => @lexer.line,
|
@@ -1011,8 +1079,8 @@ module_eval <<'.,.,', 'grammar.ra', 325
|
|
1011
1079
|
end
|
1012
1080
|
.,.,
|
1013
1081
|
|
1014
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1015
|
-
def
|
1082
|
+
module_eval <<'.,.,', 'grammar.ra', 375
|
1083
|
+
def _reduce_61( val, _values, result )
|
1016
1084
|
options = val[3]
|
1017
1085
|
unless options.instance_of?(AST::ASTArray)
|
1018
1086
|
options = AST::ASTArray.new(
|
@@ -1031,10 +1099,10 @@ module_eval <<'.,.,', 'grammar.ra', 342
|
|
1031
1099
|
end
|
1032
1100
|
.,.,
|
1033
1101
|
|
1034
|
-
# reduce
|
1102
|
+
# reduce 62 omitted
|
1035
1103
|
|
1036
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1037
|
-
def
|
1104
|
+
module_eval <<'.,.,', 'grammar.ra', 389
|
1105
|
+
def _reduce_63( val, _values, result )
|
1038
1106
|
if val[0].instance_of?(AST::ASTArray)
|
1039
1107
|
val[0].push val[1]
|
1040
1108
|
result = val[0]
|
@@ -1049,8 +1117,8 @@ module_eval <<'.,.,', 'grammar.ra', 356
|
|
1049
1117
|
end
|
1050
1118
|
.,.,
|
1051
1119
|
|
1052
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1053
|
-
def
|
1120
|
+
module_eval <<'.,.,', 'grammar.ra', 399
|
1121
|
+
def _reduce_64( val, _values, result )
|
1054
1122
|
result = AST::CaseOpt.new(
|
1055
1123
|
:pin => ":",
|
1056
1124
|
:value => val[0],
|
@@ -1062,8 +1130,8 @@ module_eval <<'.,.,', 'grammar.ra', 366
|
|
1062
1130
|
end
|
1063
1131
|
.,.,
|
1064
1132
|
|
1065
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1066
|
-
def
|
1133
|
+
module_eval <<'.,.,', 'grammar.ra', 411
|
1134
|
+
def _reduce_65( val, _values, result )
|
1067
1135
|
result = AST::CaseOpt.new(
|
1068
1136
|
:pin => ":",
|
1069
1137
|
:value => val[0],
|
@@ -1079,10 +1147,10 @@ module_eval <<'.,.,', 'grammar.ra', 378
|
|
1079
1147
|
end
|
1080
1148
|
.,.,
|
1081
1149
|
|
1082
|
-
# reduce
|
1150
|
+
# reduce 66 omitted
|
1083
1151
|
|
1084
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1085
|
-
def
|
1152
|
+
module_eval <<'.,.,', 'grammar.ra', 425
|
1153
|
+
def _reduce_67( val, _values, result )
|
1086
1154
|
if val[0].instance_of?(AST::ASTArray)
|
1087
1155
|
val[0].push(val[2])
|
1088
1156
|
result = val[0]
|
@@ -1097,8 +1165,8 @@ module_eval <<'.,.,', 'grammar.ra', 392
|
|
1097
1165
|
end
|
1098
1166
|
.,.,
|
1099
1167
|
|
1100
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1101
|
-
def
|
1168
|
+
module_eval <<'.,.,', 'grammar.ra', 435
|
1169
|
+
def _reduce_68( val, _values, result )
|
1102
1170
|
result = AST::Selector.new(
|
1103
1171
|
:pin => "?",
|
1104
1172
|
:line => @lexer.line,
|
@@ -1110,19 +1178,19 @@ module_eval <<'.,.,', 'grammar.ra', 402
|
|
1110
1178
|
end
|
1111
1179
|
.,.,
|
1112
1180
|
|
1113
|
-
# reduce
|
1181
|
+
# reduce 69 omitted
|
1114
1182
|
|
1115
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1116
|
-
def
|
1183
|
+
module_eval <<'.,.,', 'grammar.ra', 437
|
1184
|
+
def _reduce_70( val, _values, result )
|
1117
1185
|
result = val[1]
|
1118
1186
|
result
|
1119
1187
|
end
|
1120
1188
|
.,.,
|
1121
1189
|
|
1122
|
-
# reduce
|
1190
|
+
# reduce 71 omitted
|
1123
1191
|
|
1124
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1125
|
-
def
|
1192
|
+
module_eval <<'.,.,', 'grammar.ra', 452
|
1193
|
+
def _reduce_72( val, _values, result )
|
1126
1194
|
if val[0].instance_of?(AST::ASTArray)
|
1127
1195
|
val[0].push(val[2])
|
1128
1196
|
result = val[0]
|
@@ -1137,8 +1205,8 @@ module_eval <<'.,.,', 'grammar.ra', 419
|
|
1137
1205
|
end
|
1138
1206
|
.,.,
|
1139
1207
|
|
1140
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1141
|
-
def
|
1208
|
+
module_eval <<'.,.,', 'grammar.ra', 462
|
1209
|
+
def _reduce_73( val, _values, result )
|
1142
1210
|
result = AST::ObjectParam.new(
|
1143
1211
|
:pin => "=>",
|
1144
1212
|
:line => @lexer.line,
|
@@ -1150,34 +1218,20 @@ module_eval <<'.,.,', 'grammar.ra', 429
|
|
1150
1218
|
end
|
1151
1219
|
.,.,
|
1152
1220
|
|
1153
|
-
|
1154
|
-
def _reduce_68( val, _values, result )
|
1155
|
-
result = AST::String.new(
|
1156
|
-
:line => @lexer.line,
|
1157
|
-
:file => @lexer.file,
|
1158
|
-
:value => val[0]
|
1159
|
-
)
|
1160
|
-
result
|
1161
|
-
end
|
1162
|
-
.,.,
|
1221
|
+
# reduce 74 omitted
|
1163
1222
|
|
1164
|
-
|
1165
|
-
def _reduce_69( val, _values, result )
|
1166
|
-
result = AST::String.new(
|
1167
|
-
:line => @lexer.line,
|
1168
|
-
:file => @lexer.file,
|
1169
|
-
:value => val[0]
|
1170
|
-
)
|
1171
|
-
result
|
1172
|
-
end
|
1173
|
-
.,.,
|
1223
|
+
# reduce 75 omitted
|
1174
1224
|
|
1175
|
-
# reduce
|
1225
|
+
# reduce 76 omitted
|
1176
1226
|
|
1177
|
-
# reduce
|
1227
|
+
# reduce 77 omitted
|
1178
1228
|
|
1179
|
-
|
1180
|
-
|
1229
|
+
# reduce 78 omitted
|
1230
|
+
|
1231
|
+
# reduce 79 omitted
|
1232
|
+
|
1233
|
+
module_eval <<'.,.,', 'grammar.ra', 476
|
1234
|
+
def _reduce_80( val, _values, result )
|
1181
1235
|
result = AST::Default.new(
|
1182
1236
|
:line => @lexer.line,
|
1183
1237
|
:file => @lexer.file,
|
@@ -1187,10 +1241,8 @@ module_eval <<'.,.,', 'grammar.ra', 453
|
|
1187
1241
|
end
|
1188
1242
|
.,.,
|
1189
1243
|
|
1190
|
-
|
1191
|
-
|
1192
|
-
module_eval <<'.,.,', 'grammar.ra', 506
|
1193
|
-
def _reduce_74( val, _values, result )
|
1244
|
+
module_eval <<'.,.,', 'grammar.ra', 535
|
1245
|
+
def _reduce_81( val, _values, result )
|
1194
1246
|
# importing files
|
1195
1247
|
# yuk, i hate keywords
|
1196
1248
|
# we'll probably have to have some kind of search path eventually
|
@@ -1203,6 +1255,7 @@ module_eval <<'.,.,', 'grammar.ra', 506
|
|
1203
1255
|
:file => @lexer.file,
|
1204
1256
|
:line => @lexer.line
|
1205
1257
|
)
|
1258
|
+
|
1206
1259
|
Dir.chdir(dir) {
|
1207
1260
|
# We can't interpolate at this point since we don't have any
|
1208
1261
|
# scopes set up. Warn the user if they use a variable reference
|
@@ -1213,39 +1266,45 @@ module_eval <<'.,.,', 'grammar.ra', 506
|
|
1213
1266
|
" variables are not interpolated for imports " +
|
1214
1267
|
"in file #{@lexer.file} at line #{@lexer.line}"
|
1215
1268
|
)
|
1216
|
-
end
|
1269
|
+
end
|
1217
1270
|
files = Dir.glob(pat)
|
1218
1271
|
if files.size == 0
|
1219
|
-
|
1220
|
-
|
1272
|
+
files = Dir.glob(pat + ".pp")
|
1273
|
+
if files.size == 0
|
1274
|
+
raise Puppet::ImportError.new("No file(s) found for import " +
|
1275
|
+
"of '#{pat}'")
|
1276
|
+
end
|
1221
1277
|
end
|
1278
|
+
|
1222
1279
|
files.each { |file|
|
1223
1280
|
parser = Puppet::Parser::Parser.new()
|
1224
1281
|
parser.files = self.files
|
1225
1282
|
Puppet.debug("importing '%s'" % file)
|
1283
|
+
|
1284
|
+
unless file =~ /^#{File::SEPARATOR}/
|
1285
|
+
file = File.join(dir, file)
|
1286
|
+
end
|
1226
1287
|
begin
|
1227
|
-
parser.file =
|
1288
|
+
parser.file = file
|
1228
1289
|
rescue Puppet::ImportError
|
1229
1290
|
Puppet.warning(
|
1230
1291
|
"Importing %s would result in an import loop" %
|
1231
1292
|
File.join(dir, file)
|
1232
1293
|
)
|
1233
|
-
result = AST::ASTArray.new(
|
1234
|
-
:file => @lexer.file,
|
1235
|
-
:line => @lexer.line
|
1236
|
-
)
|
1237
1294
|
next
|
1238
1295
|
end
|
1239
1296
|
# push the results into the main result array
|
1240
|
-
|
1297
|
+
parser.parse.each do |child|
|
1298
|
+
result.push child
|
1299
|
+
end
|
1241
1300
|
}
|
1242
1301
|
}
|
1243
1302
|
result
|
1244
1303
|
end
|
1245
1304
|
.,.,
|
1246
1305
|
|
1247
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1248
|
-
def
|
1306
|
+
module_eval <<'.,.,', 'grammar.ra', 546
|
1307
|
+
def _reduce_82( val, _values, result )
|
1249
1308
|
result = AST::CompDef.new(
|
1250
1309
|
:type => AST::Name.new(:value => val[1], :line => @lexer.line),
|
1251
1310
|
:args => val[2],
|
@@ -1258,8 +1317,8 @@ module_eval <<'.,.,', 'grammar.ra', 517
|
|
1258
1317
|
end
|
1259
1318
|
.,.,
|
1260
1319
|
|
1261
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1262
|
-
def
|
1320
|
+
module_eval <<'.,.,', 'grammar.ra', 559
|
1321
|
+
def _reduce_83( val, _values, result )
|
1263
1322
|
result = AST::CompDef.new(
|
1264
1323
|
:type => AST::Name.new(:value => val[1], :line => @lexer.line),
|
1265
1324
|
:args => val[2],
|
@@ -1276,8 +1335,8 @@ module_eval <<'.,.,', 'grammar.ra', 530
|
|
1276
1335
|
end
|
1277
1336
|
.,.,
|
1278
1337
|
|
1279
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1280
|
-
def
|
1338
|
+
module_eval <<'.,.,', 'grammar.ra', 576
|
1339
|
+
def _reduce_84( val, _values, result )
|
1281
1340
|
#:args => val[2],
|
1282
1341
|
args = {
|
1283
1342
|
:type => AST::Name.new(:value => val[1], :line => @lexer.line),
|
@@ -1295,8 +1354,8 @@ module_eval <<'.,.,', 'grammar.ra', 547
|
|
1295
1354
|
end
|
1296
1355
|
.,.,
|
1297
1356
|
|
1298
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1299
|
-
def
|
1357
|
+
module_eval <<'.,.,', 'grammar.ra', 593
|
1358
|
+
def _reduce_85( val, _values, result )
|
1300
1359
|
args = {
|
1301
1360
|
:type => AST::Name.new(:value => val[1], :line => @lexer.line),
|
1302
1361
|
:file => @lexer.file,
|
@@ -1317,8 +1376,8 @@ module_eval <<'.,.,', 'grammar.ra', 564
|
|
1317
1376
|
end
|
1318
1377
|
.,.,
|
1319
1378
|
|
1320
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1321
|
-
def
|
1379
|
+
module_eval <<'.,.,', 'grammar.ra', 614
|
1380
|
+
def _reduce_86( val, _values, result )
|
1322
1381
|
unless val[1].instance_of?(AST::ASTArray)
|
1323
1382
|
val[1] = AST::ASTArray.new(
|
1324
1383
|
:line => val[1].line,
|
@@ -1341,8 +1400,8 @@ module_eval <<'.,.,', 'grammar.ra', 585
|
|
1341
1400
|
end
|
1342
1401
|
.,.,
|
1343
1402
|
|
1344
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1345
|
-
def
|
1403
|
+
module_eval <<'.,.,', 'grammar.ra', 637
|
1404
|
+
def _reduce_87( val, _values, result )
|
1346
1405
|
unless val[1].instance_of?(AST::ASTArray)
|
1347
1406
|
val[1] = AST::ASTArray.new(
|
1348
1407
|
:line => val[1].line,
|
@@ -1369,26 +1428,26 @@ module_eval <<'.,.,', 'grammar.ra', 608
|
|
1369
1428
|
end
|
1370
1429
|
.,.,
|
1371
1430
|
|
1372
|
-
# reduce
|
1431
|
+
# reduce 88 omitted
|
1373
1432
|
|
1374
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1375
|
-
def
|
1433
|
+
module_eval <<'.,.,', 'grammar.ra', 652
|
1434
|
+
def _reduce_89( val, _values, result )
|
1376
1435
|
if val[0].instance_of?(AST::ASTArray)
|
1377
1436
|
result = val[0]
|
1378
|
-
result.push val[
|
1437
|
+
result.push val[2]
|
1379
1438
|
else
|
1380
1439
|
result = AST::ASTArray.new(
|
1381
1440
|
:line => @lexer.line,
|
1382
1441
|
:file => @lexer.file,
|
1383
|
-
:children => [val[0], val[
|
1442
|
+
:children => [val[0], val[2]]
|
1384
1443
|
)
|
1385
1444
|
end
|
1386
1445
|
result
|
1387
1446
|
end
|
1388
1447
|
.,.,
|
1389
1448
|
|
1390
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1391
|
-
def
|
1449
|
+
module_eval <<'.,.,', 'grammar.ra', 660
|
1450
|
+
def _reduce_90( val, _values, result )
|
1392
1451
|
result = AST::HostName.new(
|
1393
1452
|
:line => @lexer.line,
|
1394
1453
|
:file => @lexer.file,
|
@@ -1398,8 +1457,8 @@ module_eval <<'.,.,', 'grammar.ra', 630
|
|
1398
1457
|
end
|
1399
1458
|
.,.,
|
1400
1459
|
|
1401
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1402
|
-
def
|
1460
|
+
module_eval <<'.,.,', 'grammar.ra', 666
|
1461
|
+
def _reduce_91( val, _values, result )
|
1403
1462
|
result = AST::HostName.new(
|
1404
1463
|
:line => @lexer.line,
|
1405
1464
|
:file => @lexer.file,
|
@@ -1409,8 +1468,19 @@ module_eval <<'.,.,', 'grammar.ra', 636
|
|
1409
1468
|
end
|
1410
1469
|
.,.,
|
1411
1470
|
|
1412
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1413
|
-
def
|
1471
|
+
module_eval <<'.,.,', 'grammar.ra', 672
|
1472
|
+
def _reduce_92( val, _values, result )
|
1473
|
+
result = AST::Default.new(
|
1474
|
+
:line => @lexer.line,
|
1475
|
+
:file => @lexer.file,
|
1476
|
+
:value => val[0]
|
1477
|
+
)
|
1478
|
+
result
|
1479
|
+
end
|
1480
|
+
.,.,
|
1481
|
+
|
1482
|
+
module_eval <<'.,.,', 'grammar.ra', 680
|
1483
|
+
def _reduce_93( val, _values, result )
|
1414
1484
|
result = AST::ASTArray.new(
|
1415
1485
|
:line => @lexer.line,
|
1416
1486
|
:file => @lexer.file,
|
@@ -1420,17 +1490,17 @@ module_eval <<'.,.,', 'grammar.ra', 644
|
|
1420
1490
|
end
|
1421
1491
|
.,.,
|
1422
1492
|
|
1423
|
-
# reduce
|
1493
|
+
# reduce 94 omitted
|
1424
1494
|
|
1425
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1426
|
-
def
|
1495
|
+
module_eval <<'.,.,', 'grammar.ra', 685
|
1496
|
+
def _reduce_95( val, _values, result )
|
1427
1497
|
result = val[1]
|
1428
1498
|
result
|
1429
1499
|
end
|
1430
1500
|
.,.,
|
1431
1501
|
|
1432
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1433
|
-
def
|
1502
|
+
module_eval <<'.,.,', 'grammar.ra', 696
|
1503
|
+
def _reduce_96( val, _values, result )
|
1434
1504
|
if val[1].instance_of?(AST::ASTArray)
|
1435
1505
|
result = val[1]
|
1436
1506
|
else
|
@@ -1444,10 +1514,10 @@ module_eval <<'.,.,', 'grammar.ra', 660
|
|
1444
1514
|
end
|
1445
1515
|
.,.,
|
1446
1516
|
|
1447
|
-
# reduce
|
1517
|
+
# reduce 97 omitted
|
1448
1518
|
|
1449
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1450
|
-
def
|
1519
|
+
module_eval <<'.,.,', 'grammar.ra', 710
|
1520
|
+
def _reduce_98( val, _values, result )
|
1451
1521
|
if val[0].instance_of?(AST::ASTArray)
|
1452
1522
|
val[0].push(val[2])
|
1453
1523
|
result = val[0]
|
@@ -1462,8 +1532,8 @@ module_eval <<'.,.,', 'grammar.ra', 674
|
|
1462
1532
|
end
|
1463
1533
|
.,.,
|
1464
1534
|
|
1465
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1466
|
-
def
|
1535
|
+
module_eval <<'.,.,', 'grammar.ra', 718
|
1536
|
+
def _reduce_99( val, _values, result )
|
1467
1537
|
result = AST::CompArgument.new(
|
1468
1538
|
:line => @lexer.line,
|
1469
1539
|
:file => @lexer.file,
|
@@ -1473,8 +1543,8 @@ module_eval <<'.,.,', 'grammar.ra', 682
|
|
1473
1543
|
end
|
1474
1544
|
.,.,
|
1475
1545
|
|
1476
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1477
|
-
def
|
1546
|
+
module_eval <<'.,.,', 'grammar.ra', 725
|
1547
|
+
def _reduce_100( val, _values, result )
|
1478
1548
|
result = AST::CompArgument.new(
|
1479
1549
|
:line => @lexer.line,
|
1480
1550
|
:file => @lexer.file,
|
@@ -1484,10 +1554,10 @@ module_eval <<'.,.,', 'grammar.ra', 689
|
|
1484
1554
|
end
|
1485
1555
|
.,.,
|
1486
1556
|
|
1487
|
-
# reduce
|
1557
|
+
# reduce 101 omitted
|
1488
1558
|
|
1489
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1490
|
-
def
|
1559
|
+
module_eval <<'.,.,', 'grammar.ra', 734
|
1560
|
+
def _reduce_102( val, _values, result )
|
1491
1561
|
result = AST::Name.new(
|
1492
1562
|
:value => val[1],
|
1493
1563
|
:file => @lexer.file,
|
@@ -1497,8 +1567,8 @@ module_eval <<'.,.,', 'grammar.ra', 698
|
|
1497
1567
|
end
|
1498
1568
|
.,.,
|
1499
1569
|
|
1500
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1501
|
-
def
|
1570
|
+
module_eval <<'.,.,', 'grammar.ra', 743
|
1571
|
+
def _reduce_103( val, _values, result )
|
1502
1572
|
name = val[0].sub(/^\$/,'')
|
1503
1573
|
result = AST::Variable.new(
|
1504
1574
|
:line => @lexer.line,
|
@@ -1509,8 +1579,8 @@ module_eval <<'.,.,', 'grammar.ra', 707
|
|
1509
1579
|
end
|
1510
1580
|
.,.,
|
1511
1581
|
|
1512
|
-
module_eval <<'.,.,', 'grammar.ra',
|
1513
|
-
def
|
1582
|
+
module_eval <<'.,.,', 'grammar.ra', 755
|
1583
|
+
def _reduce_104( val, _values, result )
|
1514
1584
|
if val[1].instance_of?(AST::ASTArray)
|
1515
1585
|
result = val[1]
|
1516
1586
|
else
|
@@ -1524,14 +1594,25 @@ module_eval <<'.,.,', 'grammar.ra', 719
|
|
1524
1594
|
end
|
1525
1595
|
.,.,
|
1526
1596
|
|
1527
|
-
|
1597
|
+
module_eval <<'.,.,', 'grammar.ra', 761
|
1598
|
+
def _reduce_105( val, _values, result )
|
1599
|
+
result = AST::ASTArray.new(
|
1600
|
+
:line => @lexer.line,
|
1601
|
+
:file => @lexer.file,
|
1602
|
+
:children => []
|
1603
|
+
)
|
1604
|
+
result
|
1605
|
+
end
|
1606
|
+
.,.,
|
1528
1607
|
|
1529
|
-
# reduce
|
1608
|
+
# reduce 106 omitted
|
1530
1609
|
|
1531
|
-
# reduce
|
1610
|
+
# reduce 107 omitted
|
1532
1611
|
|
1533
|
-
|
1534
|
-
|
1612
|
+
# reduce 108 omitted
|
1613
|
+
|
1614
|
+
module_eval <<'.,.,', 'grammar.ra', 766
|
1615
|
+
def _reduce_109( val, _values, result )
|
1535
1616
|
result = nil
|
1536
1617
|
result
|
1537
1618
|
end
|