2c18cb93b0b9a8ed8c397773aadb286b609d1c55
[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                         'SIMPLECHAR' => 17,
539                         'INTEGER' => 16,
540                         'TRUE' => 19,
541                         'NULL' => 20,
542                         'COLON' => 21,
543                         'BACKSLASH' => 23,
544                         'COMMA' => 22,
545                         'QUOTE' => 25,
546                         'SINGLEQUOTE' => 26,
547                         'FALSE' => 27,
548                         'QUOTEDNORMAL' => 31,
549                         'U' => 30,
550                         'QUADHEX' => 29
551                 },
552                 GOTOS => {
553                         'charstream' => 18,
554                         'char' => 28,
555                         'escapedchar' => 24
556                 }
557         },
558         {#State 4
559                 DEFAULT => -1
560         },
561         {#State 5
562                 ACTIONS => {
563                         '' => 32,
564                         'COMMA' => 33
565                 }
566         },
567         {#State 6
568                 DEFAULT => -3
569         },
570         {#State 7
571                 DEFAULT => -4
572         },
573         {#State 8
574                 DEFAULT => -6
575         },
576         {#State 9
577                 DEFAULT => -5
578         },
579         {#State 10
580                 DEFAULT => -8
581         },
582         {#State 11
583                 ACTIONS => {
584                         'TRUE' => 1,
585                         'FALSE' => 10,
586                         'SQUARECLOSE' => 35,
587                         'CURLYOPEN' => 2,
588                         'SQUAREOPEN' => 11,
589                         'QUOTE' => 3
590                 },
591                 GOTOS => {
592                         'basicstream' => 34,
593                         'hash' => 6,
594                         'array' => 7,
595                         'boolean' => 8,
596                         'quotestring' => 9,
597                         'basictype' => 4
598                 }
599         },
600         {#State 12
601                 ACTIONS => {
602                         'CURLYCLOSE' => 37,
603                         'COMMA' => 36
604                 }
605         },
606         {#State 13
607                 DEFAULT => -13
608         },
609         {#State 14
610                 DEFAULT => -11
611         },
612         {#State 15
613                 ACTIONS => {
614                         'COLON' => 38
615                 }
616         },
617         {#State 16
618                 DEFAULT => -39
619         },
620         {#State 17
621                 DEFAULT => -38
622         },
623         {#State 18
624                 ACTIONS => {
625                         'SIMPLECHAR' => 17,
626                         'INTEGER' => 16,
627                         'TRUE' => 19,
628                         'NULL' => 20,
629                         'COLON' => 21,
630                         'BACKSLASH' => 23,
631                         'COMMA' => 22,
632                         'QUOTE' => 39,
633                         'SINGLEQUOTE' => 26,
634                         'FALSE' => 27,
635                         'QUOTEDNORMAL' => 31,
636                         'U' => 30,
637                         'QUADHEX' => 29
638                 },
639                 GOTOS => {
640                         'char' => 40,
641                         'escapedchar' => 24
642                 }
643         },
644         {#State 19
645                 DEFAULT => -43
646         },
647         {#State 20
648                 DEFAULT => -45
649         },
650         {#State 21
651                 DEFAULT => -40
652         },
653         {#State 22
654                 DEFAULT => -41
655         },
656         {#State 23
657                 ACTIONS => {
658                         'BACKSLASH' => 41,
659                         'CURLYOPEN' => 43,
660                         'SLASH' => 42,
661                         'QUOTE' => 44,
662                         'SINGLEQUOTE' => 45,
663                         'CURLYCLOSE' => 46,
664                         'SQUARECLOSE' => 47,
665                         'SQUAREOPEN' => 50,
666                         'QUADHEX' => 49,
667                         'QUOTEDNORMAL' => 48
668                 }
669         },
670         {#State 24
671                 DEFAULT => -46
672         },
673         {#State 25
674                 DEFAULT => -21
675         },
676         {#State 26
677                 DEFAULT => -42
678         },
679         {#State 27
680                 DEFAULT => -44
681         },
682         {#State 28
683                 DEFAULT => -23
684         },
685         {#State 29
686                 DEFAULT => -37
687         },
688         {#State 30
689                 DEFAULT => -36
690         },
691         {#State 31
692                 DEFAULT => -35
693         },
694         {#State 32
695                 DEFAULT => 0
696         },
697         {#State 33
698                 ACTIONS => {
699                         'TRUE' => 1,
700                         'FALSE' => 10,
701                         'CURLYOPEN' => 2,
702                         'SQUAREOPEN' => 11,
703                         'QUOTE' => 3
704                 },
705                 GOTOS => {
706                         'hash' => 6,
707                         'array' => 7,
708                         'boolean' => 8,
709                         'quotestring' => 9,
710                         'basictype' => 51
711                 }
712         },
713         {#State 34
714                 ACTIONS => {
715                         'SQUARECLOSE' => 52,
716                         'COMMA' => 33
717                 }
718         },
719         {#State 35
720                 DEFAULT => -9
721         },
722         {#State 36
723                 ACTIONS => {
724                         'QUOTE' => 3
725                 },
726                 GOTOS => {
727                         'quotestring' => 15,
728                         'kvpair' => 53
729                 }
730         },
731         {#State 37
732                 DEFAULT => -12
733         },
734         {#State 38
735                 ACTIONS => {
736                         'INTEGER' => 54,
737                         'TRUE' => 1,
738                         'NULL' => 55,
739                         'FALSE' => 10,
740                         'CURLYOPEN' => 2,
741                         'SQUAREOPEN' => 11,
742                         'QUOTE' => 3
743                 },
744                 GOTOS => {
745                         'hash' => 58,
746                         'array' => 57,
747                         'boolean' => 56,
748                         'quotestring' => 59
749                 }
750         },
751         {#State 39
752                 DEFAULT => -22
753         },
754         {#State 40
755                 DEFAULT => -24
756         },
757         {#State 41
758                 DEFAULT => -32
759         },
760         {#State 42
761                 DEFAULT => -31
762         },
763         {#State 43
764                 DEFAULT => -25
765         },
766         {#State 44
767                 DEFAULT => -29
768         },
769         {#State 45
770                 DEFAULT => -30
771         },
772         {#State 46
773                 DEFAULT => -26
774         },
775         {#State 47
776                 DEFAULT => -28
777         },
778         {#State 48
779                 DEFAULT => -34
780         },
781         {#State 49
782                 DEFAULT => -33
783         },
784         {#State 50
785                 DEFAULT => -27
786         },
787         {#State 51
788                 DEFAULT => -2
789         },
790         {#State 52
791                 DEFAULT => -10
792         },
793         {#State 53
794                 DEFAULT => -14
795         },
796         {#State 54
797                 DEFAULT => -20
798         },
799         {#State 55
800                 DEFAULT => -19
801         },
802         {#State 56
803                 DEFAULT => -18
804         },
805         {#State 57
806                 DEFAULT => -17
807         },
808         {#State 58
809                 DEFAULT => -16
810         },
811         {#State 59
812                 DEFAULT => -15
813         }
814 ],
815                                   yyrules  =>
816 [
817         [#Rule 0
818                  '$start', 2, undef
819         ],
820         [#Rule 1
821                  'basicstream', 1,
822 sub
823 #line 37 "JSONNospace.yp"
824 { return [ $_[1] ] }
825         ],
826         [#Rule 2
827                  'basicstream', 3,
828 sub
829 #line 38 "JSONNospace.yp"
830 { return [ @{$_[1]}, $_[3] ] }
831         ],
832         [#Rule 3
833                  'basictype', 1, undef
834         ],
835         [#Rule 4
836                  'basictype', 1, undef
837         ],
838         [#Rule 5
839                  'basictype', 1, undef
840         ],
841         [#Rule 6
842                  'basictype', 1, undef
843         ],
844         [#Rule 7
845                  'boolean', 1,
846 sub
847 #line 47 "JSONNospace.yp"
848 { return 1 }
849         ],
850         [#Rule 8
851                  'boolean', 1,
852 sub
853 #line 48 "JSONNospace.yp"
854 { return 0 }
855         ],
856         [#Rule 9
857                  'array', 2,
858 sub
859 #line 51 "JSONNospace.yp"
860 { return [] }
861         ],
862         [#Rule 10
863                  'array', 3,
864 sub
865 #line 52 "JSONNospace.yp"
866 { return [ @{$_[2]} ] }
867         ],
868         [#Rule 11
869                  'hash', 2,
870 sub
871 #line 55 "JSONNospace.yp"
872 { return { } }
873         ],
874         [#Rule 12
875                  'hash', 3,
876 sub
877 #line 56 "JSONNospace.yp"
878 { return { @{$_[2]} } }
879         ],
880         [#Rule 13
881                  'kvstream', 1, undef
882         ],
883         [#Rule 14
884                  'kvstream', 3,
885 sub
886 #line 60 "JSONNospace.yp"
887 { return [ @{$_[1]}, @{$_[3]} ] }
888         ],
889         [#Rule 15
890                  'kvpair', 3,
891 sub
892 #line 63 "JSONNospace.yp"
893 { return [ $_[1], $_[3] ] }
894         ],
895         [#Rule 16
896                  'kvpair', 3,
897 sub
898 #line 64 "JSONNospace.yp"
899 { return [ $_[1], $_[3] ] }
900         ],
901         [#Rule 17
902                  'kvpair', 3,
903 sub
904 #line 65 "JSONNospace.yp"
905 { return [ $_[1], $_[3] ] }
906         ],
907         [#Rule 18
908                  'kvpair', 3,
909 sub
910 #line 66 "JSONNospace.yp"
911 { return [ $_[1], $_[3] ] }
912         ],
913         [#Rule 19
914                  'kvpair', 3,
915 sub
916 #line 67 "JSONNospace.yp"
917 { return [ $_[1], undef ] }
918         ],
919         [#Rule 20
920                  'kvpair', 3,
921 sub
922 #line 68 "JSONNospace.yp"
923 { return [ $_[1], $_[3] ] }
924         ],
925         [#Rule 21
926                  'quotestring', 2,
927 sub
928 #line 71 "JSONNospace.yp"
929 { return "" }
930         ],
931         [#Rule 22
932                  'quotestring', 3,
933 sub
934 #line 72 "JSONNospace.yp"
935 { return $_[2] }
936         ],
937         [#Rule 23
938                  'charstream', 1, undef
939         ],
940         [#Rule 24
941                  'charstream', 2,
942 sub
943 #line 76 "JSONNospace.yp"
944 { return $_[1] . $_[2] }
945         ],
946         [#Rule 25
947                  'escapedchar', 2,
948 sub
949 #line 79 "JSONNospace.yp"
950 { return $_[2] }
951         ],
952         [#Rule 26
953                  'escapedchar', 2,
954 sub
955 #line 80 "JSONNospace.yp"
956 { return $_[2] }
957         ],
958         [#Rule 27
959                  'escapedchar', 2,
960 sub
961 #line 81 "JSONNospace.yp"
962 { return $_[2] }
963         ],
964         [#Rule 28
965                  'escapedchar', 2,
966 sub
967 #line 82 "JSONNospace.yp"
968 { return $_[2] }
969         ],
970         [#Rule 29
971                  'escapedchar', 2,
972 sub
973 #line 83 "JSONNospace.yp"
974 { return $_[2] }
975         ],
976         [#Rule 30
977                  'escapedchar', 2,
978 sub
979 #line 84 "JSONNospace.yp"
980 { return $_[2] }
981         ],
982         [#Rule 31
983                  'escapedchar', 2,
984 sub
985 #line 85 "JSONNospace.yp"
986 { return $_[2] }
987         ],
988         [#Rule 32
989                  'escapedchar', 2,
990 sub
991 #line 86 "JSONNospace.yp"
992 { return $_[2] }
993         ],
994         [#Rule 33
995                  'escapedchar', 2,
996 sub
997 #line 87 "JSONNospace.yp"
998 { return encode("utf8", pack("U", hex(substr($_[2],1)))) }
999         ],
1000         [#Rule 34
1001                  'escapedchar', 2,
1002 sub
1003 #line 88 "JSONNospace.yp"
1004 {
1005         if ($_[2] eq 'n') {
1006             return "\n";
1007         } elsif ($_[2] eq 'r') {
1008             return "\r";
1009         } else {
1010             return $_[2];
1011         }}
1012         ],
1013         [#Rule 35
1014                  'char', 1, undef
1015         ],
1016         [#Rule 36
1017                  'char', 1, undef
1018         ],
1019         [#Rule 37
1020                  'char', 1, undef
1021         ],
1022         [#Rule 38
1023                  'char', 1, undef
1024         ],
1025         [#Rule 39
1026                  'char', 1, undef
1027         ],
1028         [#Rule 40
1029                  'char', 1, undef
1030         ],
1031         [#Rule 41
1032                  'char', 1, undef
1033         ],
1034         [#Rule 42
1035                  'char', 1, undef
1036         ],
1037         [#Rule 43
1038                  'char', 1, undef
1039         ],
1040         [#Rule 44
1041                  'char', 1, undef
1042         ],
1043         [#Rule 45
1044                  'char', 1, undef
1045         ],
1046         [#Rule 46
1047                  'char', 1, undef
1048         ]
1049 ],
1050                                   @_);
1051     bless($self,$class);
1052 }
1053
1054 #line 111 "JSONNospace.yp"
1055
1056
1057 1;