ruby-php-serialization 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: df124eda6a02d0b6fee91d3cc3593dbdac4e2677
4
+ data.tar.gz: 9a1861ddecf132c43659b79ea61c00af5d62b93e
5
+ SHA512:
6
+ metadata.gz: 86a70f7f615a39857bee421cc814bef1eb76a87e53cb0aaef6e9dd971b477761e4f272d8594d12f2e347efeee00a9d848605998c46adaa95cf48f61f63135865
7
+ data.tar.gz: 885ede809d12869d51c6feb4c5dba6681df827e2f038a77d2442f3fb5af0cc8cb4f2a249605466597393f8add7bada167bbfcfe4af75b27bc5b89759ff9420e0
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/.travis.yml ADDED
@@ -0,0 +1,12 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ - 1.9.3
6
+ - 2.1.6
7
+ - 2.2.2
8
+ - jruby-18mode
9
+ - jruby-19mode
10
+ - rbx-2
11
+ - ree
12
+ script: ./bin/rspec
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in ruby-php-serialization.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Rodrigo Kochenburger
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # Ruby::Php::Serialization
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'ruby-php-serialization'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install ruby-php-serialization
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Contributing
26
+
27
+ 1. Fork it ( https://github.com/[my-github-username]/ruby-php-serialization/fork )
28
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
29
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
30
+ 4. Push to the branch (`git push origin my-new-feature`)
31
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ task default: [:compile]
4
+
5
+ desc "Compile all the necessary files, such as .y grammar files"
6
+ task compile: ['lib/php_serialization/unserializer.rb']
7
+
8
+ file 'lib/php_serialization/unserializer.rb' => 'lib/php_serialization/unserializer.y' do |t|
9
+ `./bin/racc -o #{t.name} #{t.prerequisites[0]}`
10
+ end
data/bin/racc ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'racc' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('racc', 'racc')
data/bin/racc2y ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'racc2y' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('racc', 'racc2y')
data/bin/rake ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'rake' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('rake', 'rake')
data/bin/rspec ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'rspec' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('rspec-core', 'rspec')
data/bin/y2racc ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'y2racc' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('racc', 'y2racc')
@@ -0,0 +1,48 @@
1
+ $:.unshift(File.dirname(__FILE__))
2
+ require 'php_serialization/serializer'
3
+ require 'php_serialization/unserializer'
4
+
5
+ module PhpSerialization
6
+ class << self
7
+ def serializer
8
+ @serializer ||= Serializer.new
9
+ end
10
+
11
+ def unserializer
12
+ @unserializer ||= Unserializer.new
13
+ end
14
+
15
+ def load(str)
16
+ unserializer.run(str)
17
+ end
18
+
19
+ def dump(object)
20
+ serializer.run(object)
21
+ end
22
+
23
+ alias :unserialize :load
24
+ alias :restore :load
25
+ alias :serialize :dump
26
+ end
27
+ end
28
+
29
+ module PhpSessionSerialization
30
+ class << self
31
+ def load(str)
32
+ hash = {}
33
+
34
+ while str =~ /^([^|]+)\|(.*?[;}])(?=[^;}|]+\||$)/
35
+ hash[$1] = PhpSerialization.load($2)
36
+ str = $'
37
+ end
38
+
39
+ hash
40
+ end
41
+
42
+ def dump(hash)
43
+ str = ""
44
+ hash.each { |key,value| str << "#{key}|#{PhpSerialization.dump(value)}" }
45
+ str
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,36 @@
1
+ module PhpSerialization
2
+ class Serializer
3
+ def run(object)
4
+ case object
5
+ when NilClass then
6
+ "N;"
7
+ when TrueClass then
8
+ "b:1;"
9
+ when FalseClass then
10
+ "b:0;"
11
+ when Integer then
12
+ "i:#{object};"
13
+ when Float then
14
+ "d:#{object};"
15
+ when String, Symbol then
16
+ "s:#{object.to_s.bytesize}:\"#{object}\";"
17
+ when Array then
18
+ idx = -1
19
+ items = object.map { |item| "#{run(idx += 1)}#{run(item)}" }.join
20
+ "a:#{object.length}:{#{items}}"
21
+ when Hash then
22
+ items = object.map { |key,value| "#{run(key)}#{run(value)}" }.join
23
+ "a:#{object.length}:{#{items}}"
24
+ else
25
+ klass_name = object.class.name
26
+
27
+ if klass_name =~ /^Struct::/ && php_klass = object.instance_variable_get("@_php_class")
28
+ klass_name = php_klass
29
+ end
30
+
31
+ attributes = object.instance_variables.sort.map { |var_name| "#{run(var_name.to_s.gsub(/^@/, ''))}#{run(object.instance_variable_get(var_name))}" }
32
+ "O:#{klass_name.length}:\"#{klass_name}\":#{object.instance_variables.length}:{#{attributes.join}}"
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,21 @@
1
+ module PhpSerialization
2
+ class Tokenizer
3
+ def initialize(string)
4
+ @string = string
5
+ end
6
+
7
+ def each
8
+ while !@string.empty?
9
+ token = case @string
10
+ when /\A-?[0-9]+(\.[0-9]+)?/m then yield([:NUMBER, $&])
11
+ when /\A"((?:(?:"(?![;:]))*|(?:[^"]))*)"(?=[:;])/m then yield([:STRING, $1])
12
+ when /\A[^\s]/m then yield([$&, $&])
13
+ end
14
+
15
+ @string = $'
16
+ end
17
+
18
+ yield([false, '$'])
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,503 @@
1
+
2
+
3
+ -------- Grammar --------
4
+
5
+ rule 1 data: null ";"
6
+ rule 2 data: bool ";"
7
+ rule 3 data: integer ";"
8
+ rule 4 data: double ";"
9
+ rule 5 data: string ";"
10
+ rule 6 data: assoc_array
11
+ rule 7 data: object
12
+ rule 8 null: "N"
13
+ rule 9 bool: "b" ":" NUMBER
14
+ rule 10 integer: "i" ":" NUMBER
15
+ rule 11 double: "d" ":" NUMBER
16
+ rule 12 string: "s" ":" NUMBER ":" STRING
17
+ rule 13 object: "O" ":" NUMBER ":" STRING ":" NUMBER ":" "{" attribute_list "}"
18
+ rule 14 attribute_list: attribute_list attribute
19
+ rule 15 attribute_list:
20
+ rule 16 attribute: data data
21
+ rule 17 assoc_array: "a" ":" NUMBER ":" "{" attribute_list "}"
22
+
23
+ ------- Symbols -------
24
+
25
+ **Nonterminals, with rules where they appear
26
+
27
+ $start (15)
28
+ on right:
29
+ on left :
30
+ data (16)
31
+ on right: 16
32
+ on left : 1 2 3 4 5 6 7
33
+ null (17)
34
+ on right: 1
35
+ on left : 8
36
+ bool (18)
37
+ on right: 2
38
+ on left : 9
39
+ integer (19)
40
+ on right: 3
41
+ on left : 10
42
+ double (20)
43
+ on right: 4
44
+ on left : 11
45
+ string (21)
46
+ on right: 5
47
+ on left : 12
48
+ assoc_array (22)
49
+ on right: 6
50
+ on left : 17
51
+ object (23)
52
+ on right: 7
53
+ on left : 13
54
+ attribute_list (24)
55
+ on right: 13 14 17
56
+ on left : 14 15
57
+ attribute (25)
58
+ on right: 14
59
+ on left : 16
60
+
61
+ **Terminals, with rules where they appear
62
+
63
+ $end (0)
64
+ error (1)
65
+ ";" (2) 1 2 3 4 5
66
+ "N" (3) 8
67
+ "b" (4) 9
68
+ ":" (5) 9 10 11 12 13 17
69
+ NUMBER (6) 9 10 11 12 13 17
70
+ "i" (7) 10
71
+ "d" (8) 11
72
+ "s" (9) 12
73
+ STRING (10) 12 13
74
+ "O" (11) 13
75
+ "{" (12) 13 17
76
+ "}" (13) 13 17
77
+ "a" (14) 17
78
+
79
+ --------- State ---------
80
+
81
+ state 0
82
+
83
+
84
+ "N" shift, and go to state 9
85
+ "b" shift, and go to state 10
86
+ "i" shift, and go to state 11
87
+ "d" shift, and go to state 12
88
+ "s" shift, and go to state 13
89
+ "O" shift, and go to state 14
90
+ "a" shift, and go to state 15
91
+
92
+ data go to state 1
93
+ null go to state 2
94
+ bool go to state 3
95
+ integer go to state 4
96
+ double go to state 5
97
+ string go to state 6
98
+ assoc_array go to state 7
99
+ object go to state 8
100
+
101
+ state 1
102
+
103
+
104
+ $end shift, and go to state 16
105
+
106
+
107
+ state 2
108
+
109
+ 1) data : null _ ";"
110
+
111
+ ";" shift, and go to state 17
112
+
113
+
114
+ state 3
115
+
116
+ 2) data : bool _ ";"
117
+
118
+ ";" shift, and go to state 18
119
+
120
+
121
+ state 4
122
+
123
+ 3) data : integer _ ";"
124
+
125
+ ";" shift, and go to state 19
126
+
127
+
128
+ state 5
129
+
130
+ 4) data : double _ ";"
131
+
132
+ ";" shift, and go to state 20
133
+
134
+
135
+ state 6
136
+
137
+ 5) data : string _ ";"
138
+
139
+ ";" shift, and go to state 21
140
+
141
+
142
+ state 7
143
+
144
+ 6) data : assoc_array _
145
+
146
+ $default reduce using rule 6 (data)
147
+
148
+
149
+ state 8
150
+
151
+ 7) data : object _
152
+
153
+ $default reduce using rule 7 (data)
154
+
155
+
156
+ state 9
157
+
158
+ 8) null : "N" _
159
+
160
+ $default reduce using rule 8 (null)
161
+
162
+
163
+ state 10
164
+
165
+ 9) bool : "b" _ ":" NUMBER
166
+
167
+ ":" shift, and go to state 22
168
+
169
+
170
+ state 11
171
+
172
+ 10) integer : "i" _ ":" NUMBER
173
+
174
+ ":" shift, and go to state 23
175
+
176
+
177
+ state 12
178
+
179
+ 11) double : "d" _ ":" NUMBER
180
+
181
+ ":" shift, and go to state 24
182
+
183
+
184
+ state 13
185
+
186
+ 12) string : "s" _ ":" NUMBER ":" STRING
187
+
188
+ ":" shift, and go to state 25
189
+
190
+
191
+ state 14
192
+
193
+ 13) object : "O" _ ":" NUMBER ":" STRING ":" NUMBER ":" "{" attribute_list "}"
194
+
195
+ ":" shift, and go to state 26
196
+
197
+
198
+ state 15
199
+
200
+ 17) assoc_array : "a" _ ":" NUMBER ":" "{" attribute_list "}"
201
+
202
+ ":" shift, and go to state 27
203
+
204
+
205
+ state 16
206
+
207
+
208
+ $end shift, and go to state 28
209
+
210
+
211
+ state 17
212
+
213
+ 1) data : null ";" _
214
+
215
+ $default reduce using rule 1 (data)
216
+
217
+
218
+ state 18
219
+
220
+ 2) data : bool ";" _
221
+
222
+ $default reduce using rule 2 (data)
223
+
224
+
225
+ state 19
226
+
227
+ 3) data : integer ";" _
228
+
229
+ $default reduce using rule 3 (data)
230
+
231
+
232
+ state 20
233
+
234
+ 4) data : double ";" _
235
+
236
+ $default reduce using rule 4 (data)
237
+
238
+
239
+ state 21
240
+
241
+ 5) data : string ";" _
242
+
243
+ $default reduce using rule 5 (data)
244
+
245
+
246
+ state 22
247
+
248
+ 9) bool : "b" ":" _ NUMBER
249
+
250
+ NUMBER shift, and go to state 29
251
+
252
+
253
+ state 23
254
+
255
+ 10) integer : "i" ":" _ NUMBER
256
+
257
+ NUMBER shift, and go to state 30
258
+
259
+
260
+ state 24
261
+
262
+ 11) double : "d" ":" _ NUMBER
263
+
264
+ NUMBER shift, and go to state 31
265
+
266
+
267
+ state 25
268
+
269
+ 12) string : "s" ":" _ NUMBER ":" STRING
270
+
271
+ NUMBER shift, and go to state 32
272
+
273
+
274
+ state 26
275
+
276
+ 13) object : "O" ":" _ NUMBER ":" STRING ":" NUMBER ":" "{" attribute_list "}"
277
+
278
+ NUMBER shift, and go to state 33
279
+
280
+
281
+ state 27
282
+
283
+ 17) assoc_array : "a" ":" _ NUMBER ":" "{" attribute_list "}"
284
+
285
+ NUMBER shift, and go to state 34
286
+
287
+
288
+ state 28
289
+
290
+
291
+ $default accept
292
+
293
+
294
+ state 29
295
+
296
+ 9) bool : "b" ":" NUMBER _
297
+
298
+ $default reduce using rule 9 (bool)
299
+
300
+
301
+ state 30
302
+
303
+ 10) integer : "i" ":" NUMBER _
304
+
305
+ $default reduce using rule 10 (integer)
306
+
307
+
308
+ state 31
309
+
310
+ 11) double : "d" ":" NUMBER _
311
+
312
+ $default reduce using rule 11 (double)
313
+
314
+
315
+ state 32
316
+
317
+ 12) string : "s" ":" NUMBER _ ":" STRING
318
+
319
+ ":" shift, and go to state 35
320
+
321
+
322
+ state 33
323
+
324
+ 13) object : "O" ":" NUMBER _ ":" STRING ":" NUMBER ":" "{" attribute_list "}"
325
+
326
+ ":" shift, and go to state 36
327
+
328
+
329
+ state 34
330
+
331
+ 17) assoc_array : "a" ":" NUMBER _ ":" "{" attribute_list "}"
332
+
333
+ ":" shift, and go to state 37
334
+
335
+
336
+ state 35
337
+
338
+ 12) string : "s" ":" NUMBER ":" _ STRING
339
+
340
+ STRING shift, and go to state 38
341
+
342
+
343
+ state 36
344
+
345
+ 13) object : "O" ":" NUMBER ":" _ STRING ":" NUMBER ":" "{" attribute_list "}"
346
+
347
+ STRING shift, and go to state 39
348
+
349
+
350
+ state 37
351
+
352
+ 17) assoc_array : "a" ":" NUMBER ":" _ "{" attribute_list "}"
353
+
354
+ "{" shift, and go to state 40
355
+
356
+
357
+ state 38
358
+
359
+ 12) string : "s" ":" NUMBER ":" STRING _
360
+
361
+ $default reduce using rule 12 (string)
362
+
363
+
364
+ state 39
365
+
366
+ 13) object : "O" ":" NUMBER ":" STRING _ ":" NUMBER ":" "{" attribute_list "}"
367
+
368
+ ":" shift, and go to state 41
369
+
370
+
371
+ state 40
372
+
373
+ 17) assoc_array : "a" ":" NUMBER ":" "{" _ attribute_list "}"
374
+
375
+ $default reduce using rule 15 (attribute_list)
376
+
377
+ attribute_list go to state 42
378
+
379
+ state 41
380
+
381
+ 13) object : "O" ":" NUMBER ":" STRING ":" _ NUMBER ":" "{" attribute_list "}"
382
+
383
+ NUMBER shift, and go to state 43
384
+
385
+
386
+ state 42
387
+
388
+ 14) attribute_list : attribute_list _ attribute
389
+ 17) assoc_array : "a" ":" NUMBER ":" "{" attribute_list _ "}"
390
+
391
+ "N" shift, and go to state 9
392
+ "b" shift, and go to state 10
393
+ "i" shift, and go to state 11
394
+ "d" shift, and go to state 12
395
+ "s" shift, and go to state 13
396
+ "O" shift, and go to state 14
397
+ "}" shift, and go to state 46
398
+ "a" shift, and go to state 15
399
+
400
+ null go to state 2
401
+ bool go to state 3
402
+ integer go to state 4
403
+ double go to state 5
404
+ string go to state 6
405
+ assoc_array go to state 7
406
+ object go to state 8
407
+ attribute go to state 44
408
+ data go to state 45
409
+
410
+ state 43
411
+
412
+ 13) object : "O" ":" NUMBER ":" STRING ":" NUMBER _ ":" "{" attribute_list "}"
413
+
414
+ ":" shift, and go to state 47
415
+
416
+
417
+ state 44
418
+
419
+ 14) attribute_list : attribute_list attribute _
420
+
421
+ $default reduce using rule 14 (attribute_list)
422
+
423
+
424
+ state 45
425
+
426
+ 16) attribute : data _ data
427
+
428
+ "N" shift, and go to state 9
429
+ "b" shift, and go to state 10
430
+ "i" shift, and go to state 11
431
+ "d" shift, and go to state 12
432
+ "s" shift, and go to state 13
433
+ "O" shift, and go to state 14
434
+ "a" shift, and go to state 15
435
+
436
+ null go to state 2
437
+ bool go to state 3
438
+ integer go to state 4
439
+ double go to state 5
440
+ string go to state 6
441
+ assoc_array go to state 7
442
+ object go to state 8
443
+ data go to state 48
444
+
445
+ state 46
446
+
447
+ 17) assoc_array : "a" ":" NUMBER ":" "{" attribute_list "}" _
448
+
449
+ $default reduce using rule 17 (assoc_array)
450
+
451
+
452
+ state 47
453
+
454
+ 13) object : "O" ":" NUMBER ":" STRING ":" NUMBER ":" _ "{" attribute_list "}"
455
+
456
+ "{" shift, and go to state 49
457
+
458
+
459
+ state 48
460
+
461
+ 16) attribute : data data _
462
+
463
+ $default reduce using rule 16 (attribute)
464
+
465
+
466
+ state 49
467
+
468
+ 13) object : "O" ":" NUMBER ":" STRING ":" NUMBER ":" "{" _ attribute_list "}"
469
+
470
+ $default reduce using rule 15 (attribute_list)
471
+
472
+ attribute_list go to state 50
473
+
474
+ state 50
475
+
476
+ 13) object : "O" ":" NUMBER ":" STRING ":" NUMBER ":" "{" attribute_list _ "}"
477
+ 14) attribute_list : attribute_list _ attribute
478
+
479
+ "N" shift, and go to state 9
480
+ "b" shift, and go to state 10
481
+ "i" shift, and go to state 11
482
+ "d" shift, and go to state 12
483
+ "s" shift, and go to state 13
484
+ "O" shift, and go to state 14
485
+ "}" shift, and go to state 51
486
+ "a" shift, and go to state 15
487
+
488
+ null go to state 2
489
+ bool go to state 3
490
+ integer go to state 4
491
+ double go to state 5
492
+ string go to state 6
493
+ assoc_array go to state 7
494
+ object go to state 8
495
+ attribute go to state 44
496
+ data go to state 45
497
+
498
+ state 51
499
+
500
+ 13) object : "O" ":" NUMBER ":" STRING ":" NUMBER ":" "{" attribute_list "}" _
501
+
502
+ $default reduce using rule 13 (object)
503
+