YouTube: Correctly parse url_encoded_fmt_stream_map from the web scape, too
[videosite.git] / videosite / JSONNospace.pm
1 ####################################################################
2 #
3 #    This file was generated using Parse::Yapp version 1.05.
4 #
5 #        Don't edit this file, use source file instead.
6 #
7 #             ANY CHANGE MADE HERE WILL BE LOST !
8 #
9 ####################################################################
10 package videosite::JSONNospace;
11 use vars qw ( @ISA );
12 use strict;
13
14 @ISA= qw ( Parse::Yapp::Driver );
15 #Included Parse/Yapp/Driver.pm file----------------------------------------
16 {
17 #
18 # Module Parse::Yapp::Driver
19 #
20 # This module is part of the Parse::Yapp package available on your
21 # nearest CPAN
22 #
23 # Any use of this module in a standalone parser make the included
24 # text under the same copyright as the Parse::Yapp module itself.
25 #
26 # This notice should remain unchanged.
27 #
28 # (c) Copyright 1998-2001 Francois Desarmenien, all rights reserved.
29 # (see the pod text in Parse::Yapp module for use and distribution rights)
30 #
31
32 package Parse::Yapp::Driver;
33
34 require 5.004;
35
36 use strict;
37
38 use vars qw ( $VERSION $COMPATIBLE $FILENAME );
39
40 $VERSION = '1.05';
41 $COMPATIBLE = '0.07';
42 $FILENAME=__FILE__;
43
44 use Carp;
45
46 #Known parameters, all starting with YY (leading YY will be discarded)
47 my(%params)=(YYLEX => 'CODE', 'YYERROR' => 'CODE', YYVERSION => '',
48                          YYRULES => 'ARRAY', YYSTATES => 'ARRAY', YYDEBUG => '');
49 #Mandatory parameters
50 my(@params)=('LEX','RULES','STATES');
51
52 sub new {
53     my($class)=shift;
54         my($errst,$nberr,$token,$value,$check,$dotpos);
55     my($self)={ ERROR => \&_Error,
56                                 ERRST => \$errst,
57                 NBERR => \$nberr,
58                                 TOKEN => \$token,
59                                 VALUE => \$value,
60                                 DOTPOS => \$dotpos,
61                                 STACK => [],
62                                 DEBUG => 0,
63                                 CHECK => \$check };
64
65         _CheckParams( [], \%params, \@_, $self );
66
67                 exists($$self{VERSION})
68         and     $$self{VERSION} < $COMPATIBLE
69         and     croak "Yapp driver version $VERSION ".
70                           "incompatible with version $$self{VERSION}:\n".
71                           "Please recompile parser module.";
72
73         ref($class)
74     and $class=ref($class);
75
76     bless($self,$class);
77 }
78
79 sub YYParse {
80     my($self)=shift;
81     my($retval);
82
83         _CheckParams( \@params, \%params, \@_, $self );
84
85         if($$self{DEBUG}) {
86                 _DBLoad();
87                 $retval = eval '$self->_DBParse()';#Do not create stab entry on compile
88         $@ and die $@;
89         }
90         else {
91                 $retval = $self->_Parse();
92         }
93     $retval
94 }
95
96 sub YYData {
97         my($self)=shift;
98
99                 exists($$self{USER})
100         or      $$self{USER}={};
101
102         $$self{USER};
103         
104 }
105
106 sub YYErrok {
107         my($self)=shift;
108
109         ${$$self{ERRST}}=0;
110     undef;
111 }
112
113 sub YYNberr {
114         my($self)=shift;
115
116         ${$$self{NBERR}};
117 }
118
119 sub YYRecovering {
120         my($self)=shift;
121
122         ${$$self{ERRST}} != 0;
123 }
124
125 sub YYAbort {
126         my($self)=shift;
127
128         ${$$self{CHECK}}='ABORT';
129     undef;
130 }
131
132 sub YYAccept {
133         my($self)=shift;
134
135         ${$$self{CHECK}}='ACCEPT';
136     undef;
137 }
138
139 sub YYError {
140         my($self)=shift;
141
142         ${$$self{CHECK}}='ERROR';
143     undef;
144 }
145
146 sub YYSemval {
147         my($self)=shift;
148         my($index)= $_[0] - ${$$self{DOTPOS}} - 1;
149
150                 $index < 0
151         and     -$index <= @{$$self{STACK}}
152         and     return $$self{STACK}[$index][1];
153
154         undef;  #Invalid index
155 }
156
157 sub YYCurtok {
158         my($self)=shift;
159
160         @_
161     and ${$$self{TOKEN}}=$_[0];
162     ${$$self{TOKEN}};
163 }
164
165 sub YYCurval {
166         my($self)=shift;
167
168         @_
169     and ${$$self{VALUE}}=$_[0];
170     ${$$self{VALUE}};
171 }
172
173 sub YYExpect {
174     my($self)=shift;
175
176     keys %{$self->{STATES}[$self->{STACK}[-1][0]]{ACTIONS}}
177 }
178
179 sub YYLexer {
180     my($self)=shift;
181
182         $$self{LEX};
183 }
184
185
186 #################
187 # Private stuff #
188 #################
189
190
191 sub _CheckParams {
192         my($mandatory,$checklist,$inarray,$outhash)=@_;
193         my($prm,$value);
194         my($prmlst)={};
195
196         while(($prm,$value)=splice(@$inarray,0,2)) {
197         $prm=uc($prm);
198                         exists($$checklist{$prm})
199                 or      croak("Unknow parameter '$prm'");
200                         ref($value) eq $$checklist{$prm}
201                 or      croak("Invalid value for parameter '$prm'");
202         $prm=unpack('@2A*',$prm);
203                 $$outhash{$prm}=$value;
204         }
205         for (@$mandatory) {
206                         exists($$outhash{$_})
207                 or      croak("Missing mandatory parameter '".lc($_)."'");
208         }
209 }
210
211 sub _Error {
212         print "Parse error.\n";
213 }
214
215 sub _DBLoad {
216         {
217                 no strict 'refs';
218
219                         exists(${__PACKAGE__.'::'}{_DBParse})#Already loaded ?
220                 and     return;
221         }
222         my($fname)=__FILE__;
223         my(@drv);
224         open(DRV,"<$fname") or die "Report this as a BUG: Cannot open $fname";
225         while(<DRV>) {
226                         /^\s*sub\s+_Parse\s*{\s*$/ .. /^\s*}\s*#\s*_Parse\s*$/
227                 and     do {
228                         s/^#DBG>//;
229                         push(@drv,$_);
230                 }
231         }
232         close(DRV);
233
234         $drv[0]=~s/_P/_DBP/;
235         eval join('',@drv);
236 }
237
238 #Note that for loading debugging version of the driver,
239 #this file will be parsed from 'sub _Parse' up to '}#_Parse' inclusive.
240 #So, DO NOT remove comment at end of sub !!!
241 sub _Parse {
242     my($self)=shift;
243
244         my($rules,$states,$lex,$error)
245      = @$self{ 'RULES', 'STATES', 'LEX', 'ERROR' };
246         my($errstatus,$nberror,$token,$value,$stack,$check,$dotpos)
247      = @$self{ 'ERRST', 'NBERR', 'TOKEN', 'VALUE', 'STACK', 'CHECK', 'DOTPOS' };
248
249 #DBG>   my($debug)=$$self{DEBUG};
250 #DBG>   my($dbgerror)=0;
251
252 #DBG>   my($ShowCurToken) = sub {
253 #DBG>           my($tok)='>';
254 #DBG>           for (split('',$$token)) {
255 #DBG>                   $tok.=          (ord($_) < 32 or ord($_) > 126)
256 #DBG>                                   ?       sprintf('<%02X>',ord($_))
257 #DBG>                                   :       $_;
258 #DBG>           }
259 #DBG>           $tok.='<';
260 #DBG>   };
261
262         $$errstatus=0;
263         $$nberror=0;
264         ($$token,$$value)=(undef,undef);
265         @$stack=( [ 0, undef ] );
266         $$check='';
267
268     while(1) {
269         my($actions,$act,$stateno);
270
271         $stateno=$$stack[-1][0];
272         $actions=$$states[$stateno];
273
274 #DBG>   print STDERR ('-' x 40),"\n";
275 #DBG>           $debug & 0x2
276 #DBG>   and     print STDERR "In state $stateno:\n";
277 #DBG>           $debug & 0x08
278 #DBG>   and     print STDERR "Stack:[".
279 #DBG>                                    join(',',map { $$_[0] } @$stack).
280 #DBG>                                    "]\n";
281
282
283         if  (exists($$actions{ACTIONS})) {
284
285                                 defined($$token)
286             or  do {
287                                 ($$token,$$value)=&$lex($self);
288 #DBG>                           $debug & 0x01
289 #DBG>                   and     print STDERR "Need token. Got ".&$ShowCurToken."\n";
290                         };
291
292             $act=   exists($$actions{ACTIONS}{$$token})
293                     ?   $$actions{ACTIONS}{$$token}
294                     :   exists($$actions{DEFAULT})
295                         ?   $$actions{DEFAULT}
296                         :   undef;
297         }
298         else {
299             $act=$$actions{DEFAULT};
300 #DBG>                   $debug & 0x01
301 #DBG>           and     print STDERR "Don't need token.\n";
302         }
303
304             defined($act)
305         and do {
306
307                 $act > 0
308             and do {        #shift
309
310 #DBG>                           $debug & 0x04
311 #DBG>                   and     print STDERR "Shift and go to state $act.\n";
312
313                                         $$errstatus
314                                 and     do {
315                                         --$$errstatus;
316
317 #DBG>                                   $debug & 0x10
318 #DBG>                           and     $dbgerror
319 #DBG>                           and     $$errstatus == 0
320 #DBG>                           and     do {
321 #DBG>                                   print STDERR "**End of Error recovery.\n";
322 #DBG>                                   $dbgerror=0;
323 #DBG>                           };
324                                 };
325
326
327                 push(@$stack,[ $act, $$value ]);
328
329                                         $$token ne ''   #Don't eat the eof
330                                 and     $$token=$$value=undef;
331                 next;
332             };
333
334             #reduce
335             my($lhs,$len,$code,@sempar,$semval);
336             ($lhs,$len,$code)=@{$$rules[-$act]};
337
338 #DBG>                   $debug & 0x04
339 #DBG>           and     $act
340 #DBG>           and     print STDERR "Reduce using rule ".-$act." ($lhs,$len): ";
341
342                 $act
343             or  $self->YYAccept();
344
345             $$dotpos=$len;
346
347                 unpack('A1',$lhs) eq '@'    #In line rule
348             and do {
349                     $lhs =~ /^\@[0-9]+\-([0-9]+)$/
350                 or  die "In line rule name '$lhs' ill formed: ".
351                         "report it as a BUG.\n";
352                 $$dotpos = $1;
353             };
354
355             @sempar =       $$dotpos
356                         ?   map { $$_[1] } @$stack[ -$$dotpos .. -1 ]
357                         :   ();
358
359             $semval = $code ? &$code( $self, @sempar )
360                             : @sempar ? $sempar[0] : undef;
361
362             splice(@$stack,-$len,$len);
363
364                 $$check eq 'ACCEPT'
365             and do {
366
367 #DBG>                   $debug & 0x04
368 #DBG>           and     print STDERR "Accept.\n";
369
370                                 return($semval);
371                         };
372
373                 $$check eq 'ABORT'
374             and do {
375
376 #DBG>                   $debug & 0x04
377 #DBG>           and     print STDERR "Abort.\n";
378
379                                 return(undef);
380
381                         };
382
383 #DBG>                   $debug & 0x04
384 #DBG>           and     print STDERR "Back to state $$stack[-1][0], then ";
385
386                 $$check eq 'ERROR'
387             or  do {
388 #DBG>                           $debug & 0x04
389 #DBG>                   and     print STDERR 
390 #DBG>                               "go to state $$states[$$stack[-1][0]]{GOTOS}{$lhs}.\n";
391
392 #DBG>                           $debug & 0x10
393 #DBG>                   and     $dbgerror
394 #DBG>                   and     $$errstatus == 0
395 #DBG>                   and     do {
396 #DBG>                           print STDERR "**End of Error recovery.\n";
397 #DBG>                           $dbgerror=0;
398 #DBG>                   };
399
400                             push(@$stack,
401                      [ $$states[$$stack[-1][0]]{GOTOS}{$lhs}, $semval ]);
402                 $$check='';
403                 next;
404             };
405
406 #DBG>                   $debug & 0x04
407 #DBG>           and     print STDERR "Forced Error recovery.\n";
408
409             $$check='';
410
411         };
412
413         #Error
414             $$errstatus
415         or   do {
416
417             $$errstatus = 1;
418             &$error($self);
419                 $$errstatus # if 0, then YYErrok has been called
420             or  next;       # so continue parsing
421
422 #DBG>                   $debug & 0x10
423 #DBG>           and     do {
424 #DBG>                   print STDERR "**Entering Error recovery.\n";
425 #DBG>                   ++$dbgerror;
426 #DBG>           };
427
428             ++$$nberror;
429
430         };
431
432                         $$errstatus == 3        #The next token is not valid: discard it
433                 and     do {
434                                 $$token eq ''   # End of input: no hope
435                         and     do {
436 #DBG>                           $debug & 0x10
437 #DBG>                   and     print STDERR "**At eof: aborting.\n";
438                                 return(undef);
439                         };
440
441 #DBG>                   $debug & 0x10
442 #DBG>           and     print STDERR "**Dicard invalid token ".&$ShowCurToken.".\n";
443
444                         $$token=$$value=undef;
445                 };
446
447         $$errstatus=3;
448
449                 while(    @$stack
450                           and (         not exists($$states[$$stack[-1][0]]{ACTIONS})
451                                 or  not exists($$states[$$stack[-1][0]]{ACTIONS}{error})
452                                         or      $$states[$$stack[-1][0]]{ACTIONS}{error} <= 0)) {
453
454 #DBG>                   $debug & 0x10
455 #DBG>           and     print STDERR "**Pop state $$stack[-1][0].\n";
456
457                         pop(@$stack);
458                 }
459
460                         @$stack
461                 or      do {
462
463 #DBG>                   $debug & 0x10
464 #DBG>           and     print STDERR "**No state left on stack: aborting.\n";
465
466                         return(undef);
467                 };
468
469                 #shift the error token
470
471 #DBG>                   $debug & 0x10
472 #DBG>           and     print STDERR "**Shift \$error token and go to state ".
473 #DBG>                                            $$states[$$stack[-1][0]]{ACTIONS}{error}.
474 #DBG>                                            ".\n";
475
476                 push(@$stack, [ $$states[$$stack[-1][0]]{ACTIONS}{error}, undef ]);
477
478     }
479
480     #never reached
481         croak("Error in driver logic. Please, report it as a BUG");
482
483 }#_Parse
484 #DO NOT remove comment
485
486 1;
487
488 }
489 #End of include--------------------------------------------------
490
491
492 #line 31 "JSONNospace.yp"
493
494 use Encode;
495
496
497 sub new {
498         my($class)=shift;
499         ref($class)
500     and $class=ref($class);
501
502     my($self)=$class->SUPER::new( yyversion => '1.05',
503                                   yystates =>
504 [
505         {#State 0
506                 ACTIONS => {
507                         'TRUE' => 1,
508                         'FALSE' => 10,
509                         'CURLYOPEN' => 2,
510                         'SQUAREOPEN' => 11,
511                         'QUOTE' => 3
512                 },
513                 GOTOS => {
514                         'boolean' => 8,
515                         'array' => 7,
516                         'hash' => 6,
517                         'basicstream' => 5,
518                         'quotestring' => 9,
519                         'basictype' => 4
520                 }
521         },
522         {#State 1
523                 DEFAULT => -7
524         },
525         {#State 2
526                 ACTIONS => {
527                         'CURLYCLOSE' => 14,
528                         'QUOTE' => 3
529                 },
530                 GOTOS => {
531                         'quotestring' => 15,
532                         'kvstream' => 12,
533                         'kvpair' => 13
534                 }
535         },
536         {#State 3
537                 ACTIONS => {
538                         'INTEGER' => 24,
539                         'SIMPLECHAR' => 23,
540                         'TRUE' => 16,
541                         'NULL' => 17,
542                         'COLON' => 18,
543                         'COMMA' => 26,
544                         'BACKSLASH' => 25,
545                         'QUOTE' => 27,
546                         'SINGLEQUOTE' => 28,
547                         'FALSE' => 20,
548                         'SQUARECLOSE' => 30,
549                         'SQUAREOPEN' => 33,
550                         'U' => 32,
551                         'QUOTEDNORMAL' => 31,
552                         'QUADHEX' => 21
553                 },
554                 GOTOS => {
555                         'charstream' => 22,
556                         'char' => 29,
557                         'escapedchar' => 19
558                 }
559         },
560         {#State 4
561                 DEFAULT => -1
562         },
563         {#State 5
564                 ACTIONS => {
565                         '' => 34,
566                         'COMMA' => 35
567                 }
568         },
569         {#State 6
570                 DEFAULT => -3
571         },
572         {#State 7
573                 DEFAULT => -4
574         },
575         {#State 8
576                 DEFAULT => -6
577         },
578         {#State 9
579                 DEFAULT => -5
580         },
581         {#State 10
582                 DEFAULT => -8
583         },
584         {#State 11
585                 ACTIONS => {
586                         'TRUE' => 1,
587                         'FALSE' => 10,
588                         'SQUARECLOSE' => 37,
589                         'CURLYOPEN' => 2,
590                         'SQUAREOPEN' => 11,
591                         'QUOTE' => 3
592                 },
593                 GOTOS => {
594                         'basicstream' => 36,
595                         'hash' => 6,
596                         'array' => 7,
597                         'boolean' => 8,
598                         'quotestring' => 9,
599                         'basictype' => 4
600                 }
601         },
602         {#State 12
603                 ACTIONS => {
604                         'CURLYCLOSE' => 38,
605                         'COMMA' => 39
606                 }
607         },
608         {#State 13
609                 DEFAULT => -13
610         },
611         {#State 14
612                 DEFAULT => -11
613         },
614         {#State 15
615                 ACTIONS => {
616                         'COLON' => 40
617                 }
618         },
619         {#State 16
620                 DEFAULT => -43
621         },
622         {#State 17
623                 DEFAULT => -45
624         },
625         {#State 18
626                 DEFAULT => -40
627         },
628         {#State 19
629                 DEFAULT => -48
630         },
631         {#State 20
632                 DEFAULT => -44
633         },
634         {#State 21
635                 DEFAULT => -37
636         },
637         {#State 22
638                 ACTIONS => {
639                         'SIMPLECHAR' => 23,
640                         'INTEGER' => 24,
641                         'TRUE' => 16,
642                         'NULL' => 17,
643                         'COLON' => 18,
644                         'BACKSLASH' => 25,
645                         'COMMA' => 26,
646                         'QUOTE' => 41,
647                         'SINGLEQUOTE' => 28,
648                         'FALSE' => 20,
649                         'SQUARECLOSE' => 30,
650                         'QUOTEDNORMAL' => 31,
651                         'U' => 32,
652                         'SQUAREOPEN' => 33,
653                         'QUADHEX' => 21
654                 },
655                 GOTOS => {
656                         'char' => 42,
657                         'escapedchar' => 19
658                 }
659         },
660         {#State 23
661                 DEFAULT => -38
662         },
663         {#State 24
664                 DEFAULT => -39
665         },
666         {#State 25
667                 ACTIONS => {
668                         'BACKSLASH' => 47,
669                         'CURLYOPEN' => 44,
670                         'SLASH' => 43,
671                         'QUOTE' => 48,
672                         'CURLYCLOSE' => 45,
673                         'SINGLEQUOTE' => 49,
674                         'SQUARECLOSE' => 50,
675                         'SQUAREOPEN' => 52,
676                         'QUADHEX' => 46,
677                         'QUOTEDNORMAL' => 51
678                 }
679         },
680         {#State 26
681                 DEFAULT => -41
682         },
683         {#State 27
684                 DEFAULT => -21
685         },
686         {#State 28
687                 DEFAULT => -42
688         },
689         {#State 29
690                 DEFAULT => -23
691         },
692         {#State 30
693                 DEFAULT => -47
694         },
695         {#State 31
696                 DEFAULT => -35
697         },
698         {#State 32
699                 DEFAULT => -36
700         },
701         {#State 33
702                 DEFAULT => -46
703         },
704         {#State 34
705                 DEFAULT => 0
706         },
707         {#State 35
708                 ACTIONS => {
709                         'TRUE' => 1,
710                         'FALSE' => 10,
711                         'CURLYOPEN' => 2,
712                         'SQUAREOPEN' => 11,
713                         'QUOTE' => 3
714                 },
715                 GOTOS => {
716                         'hash' => 6,
717                         'array' => 7,
718                         'boolean' => 8,
719                         'quotestring' => 9,
720                         'basictype' => 53
721                 }
722         },
723         {#State 36
724                 ACTIONS => {
725                         'SQUARECLOSE' => 54,
726                         'COMMA' => 35
727                 }
728         },
729         {#State 37
730                 DEFAULT => -9
731         },
732         {#State 38
733                 DEFAULT => -12
734         },
735         {#State 39
736                 ACTIONS => {
737                         'QUOTE' => 3
738                 },
739                 GOTOS => {
740                         'quotestring' => 15,
741                         'kvpair' => 55
742                 }
743         },
744         {#State 40
745                 ACTIONS => {
746                         'INTEGER' => 59,
747                         'TRUE' => 1,
748                         'NULL' => 56,
749                         'FALSE' => 10,
750                         'CURLYOPEN' => 2,
751                         'SQUAREOPEN' => 11,
752                         'QUOTE' => 3
753                 },
754                 GOTOS => {
755                         'hash' => 60,
756                         'array' => 58,
757                         'boolean' => 57,
758                         'quotestring' => 61
759                 }
760         },
761         {#State 41
762                 DEFAULT => -22
763         },
764         {#State 42
765                 DEFAULT => -24
766         },
767         {#State 43
768                 DEFAULT => -31
769         },
770         {#State 44
771                 DEFAULT => -25
772         },
773         {#State 45
774                 DEFAULT => -26
775         },
776         {#State 46
777                 DEFAULT => -33
778         },
779         {#State 47
780                 DEFAULT => -32
781         },
782         {#State 48
783                 DEFAULT => -29
784         },
785         {#State 49
786                 DEFAULT => -30
787         },
788         {#State 50
789                 DEFAULT => -28
790         },
791         {#State 51
792                 DEFAULT => -34
793         },
794         {#State 52
795                 DEFAULT => -27
796         },
797         {#State 53
798                 DEFAULT => -2
799         },
800         {#State 54
801                 DEFAULT => -10
802         },
803         {#State 55
804                 DEFAULT => -14
805         },
806         {#State 56
807                 DEFAULT => -19
808         },
809         {#State 57
810                 DEFAULT => -18
811         },
812         {#State 58
813                 DEFAULT => -17
814         },
815         {#State 59
816                 DEFAULT => -20
817         },
818         {#State 60
819                 DEFAULT => -16
820         },
821         {#State 61
822                 DEFAULT => -15
823         }
824 ],
825                                   yyrules  =>
826 [
827         [#Rule 0
828                  '$start', 2, undef
829         ],
830         [#Rule 1
831                  'basicstream', 1,
832 sub
833 #line 37 "JSONNospace.yp"
834 { return [ $_[1] ] }
835         ],
836         [#Rule 2
837                  'basicstream', 3,
838 sub
839 #line 38 "JSONNospace.yp"
840 { return [ @{$_[1]}, $_[3] ] }
841         ],
842         [#Rule 3
843                  'basictype', 1, undef
844         ],
845         [#Rule 4
846                  'basictype', 1, undef
847         ],
848         [#Rule 5
849                  'basictype', 1, undef
850         ],
851         [#Rule 6
852                  'basictype', 1, undef
853         ],
854         [#Rule 7
855                  'boolean', 1,
856 sub
857 #line 47 "JSONNospace.yp"
858 { return 1 }
859         ],
860         [#Rule 8
861                  'boolean', 1,
862 sub
863 #line 48 "JSONNospace.yp"
864 { return 0 }
865         ],
866         [#Rule 9
867                  'array', 2,
868 sub
869 #line 51 "JSONNospace.yp"
870 { return [] }
871         ],
872         [#Rule 10
873                  'array', 3,
874 sub
875 #line 52 "JSONNospace.yp"
876 { return [ @{$_[2]} ] }
877         ],
878         [#Rule 11
879                  'hash', 2,
880 sub
881 #line 55 "JSONNospace.yp"
882 { return { } }
883         ],
884         [#Rule 12
885                  'hash', 3,
886 sub
887 #line 56 "JSONNospace.yp"
888 { return { @{$_[2]} } }
889         ],
890         [#Rule 13
891                  'kvstream', 1, undef
892         ],
893         [#Rule 14
894                  'kvstream', 3,
895 sub
896 #line 60 "JSONNospace.yp"
897 { return [ @{$_[1]}, @{$_[3]} ] }
898         ],
899         [#Rule 15
900                  'kvpair', 3,
901 sub
902 #line 63 "JSONNospace.yp"
903 { return [ $_[1], $_[3] ] }
904         ],
905         [#Rule 16
906                  'kvpair', 3,
907 sub
908 #line 64 "JSONNospace.yp"
909 { return [ $_[1], $_[3] ] }
910         ],
911         [#Rule 17
912                  'kvpair', 3,
913 sub
914 #line 65 "JSONNospace.yp"
915 { return [ $_[1], $_[3] ] }
916         ],
917         [#Rule 18
918                  'kvpair', 3,
919 sub
920 #line 66 "JSONNospace.yp"
921 { return [ $_[1], $_[3] ] }
922         ],
923         [#Rule 19
924                  'kvpair', 3,
925 sub
926 #line 67 "JSONNospace.yp"
927 { return [ $_[1], undef ] }
928         ],
929         [#Rule 20
930                  'kvpair', 3,
931 sub
932 #line 68 "JSONNospace.yp"
933 { return [ $_[1], $_[3] ] }
934         ],
935         [#Rule 21
936                  'quotestring', 2,
937 sub
938 #line 71 "JSONNospace.yp"
939 { return "" }
940         ],
941         [#Rule 22
942                  'quotestring', 3,
943 sub
944 #line 72 "JSONNospace.yp"
945 { return $_[2] }
946         ],
947         [#Rule 23
948                  'charstream', 1, undef
949         ],
950         [#Rule 24
951                  'charstream', 2,
952 sub
953 #line 76 "JSONNospace.yp"
954 { return $_[1] . $_[2] }
955         ],
956         [#Rule 25
957                  'escapedchar', 2,
958 sub
959 #line 79 "JSONNospace.yp"
960 { return $_[2] }
961         ],
962         [#Rule 26
963                  'escapedchar', 2,
964 sub
965 #line 80 "JSONNospace.yp"
966 { return $_[2] }
967         ],
968         [#Rule 27
969                  'escapedchar', 2,
970 sub
971 #line 81 "JSONNospace.yp"
972 { return $_[2] }
973         ],
974         [#Rule 28
975                  'escapedchar', 2,
976 sub
977 #line 82 "JSONNospace.yp"
978 { return $_[2] }
979         ],
980         [#Rule 29
981                  'escapedchar', 2,
982 sub
983 #line 83 "JSONNospace.yp"
984 { return $_[2] }
985         ],
986         [#Rule 30
987                  'escapedchar', 2,
988 sub
989 #line 84 "JSONNospace.yp"
990 { return $_[2] }
991         ],
992         [#Rule 31
993                  'escapedchar', 2,
994 sub
995 #line 85 "JSONNospace.yp"
996 { return $_[2] }
997         ],
998         [#Rule 32
999                  'escapedchar', 2,
1000 sub
1001 #line 86 "JSONNospace.yp"
1002 { return $_[2] }
1003         ],
1004         [#Rule 33
1005                  'escapedchar', 2,
1006 sub
1007 #line 87 "JSONNospace.yp"
1008 { return encode("utf8", pack("U", hex(substr($_[2],1)))) }
1009         ],
1010         [#Rule 34
1011                  'escapedchar', 2,
1012 sub
1013 #line 88 "JSONNospace.yp"
1014 {
1015         if ($_[2] eq 'n') {
1016             return "\n";
1017         } elsif ($_[2] eq 'r') {
1018             return "\r";
1019         } else {
1020             return $_[2];
1021         }}
1022         ],
1023         [#Rule 35
1024                  'char', 1, undef
1025         ],
1026         [#Rule 36
1027                  'char', 1, undef
1028         ],
1029         [#Rule 37
1030                  'char', 1, undef
1031         ],
1032         [#Rule 38
1033                  'char', 1, undef
1034         ],
1035         [#Rule 39
1036                  'char', 1, undef
1037         ],
1038         [#Rule 40
1039                  'char', 1, undef
1040         ],
1041         [#Rule 41
1042                  'char', 1, undef
1043         ],
1044         [#Rule 42
1045                  'char', 1, undef
1046         ],
1047         [#Rule 43
1048                  'char', 1, undef
1049         ],
1050         [#Rule 44
1051                  'char', 1, undef
1052         ],
1053         [#Rule 45
1054                  'char', 1, undef
1055         ],
1056         [#Rule 46
1057                  'char', 1, undef
1058         ],
1059         [#Rule 47
1060                  'char', 1, undef
1061         ],
1062         [#Rule 48
1063                  'char', 1, undef
1064         ]
1065 ],
1066                                   @_);
1067     bless($self,$class);
1068 }
1069
1070 #line 113 "JSONNospace.yp"
1071
1072
1073 1;