File Coverage

blib/lib/Devel/GDB/Reflect/GDBGrammar.pm
Criterion Covered Total %
statement 9 11 81.8
branch 0 2 0.0
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 12 18 66.6


line stmt bran cond sub pod time code
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 Devel::GDB::Reflect::GDBGrammar;
11 1     1   11 use vars qw ( @ISA );
  1         1  
  1         59  
12 1     1   8 use strict;
  1         1  
  1         52  
13              
14             @ISA= qw ( Parse::Yapp::Driver );
15 1     1   1054 use Parse::Yapp::Driver;
  1         4512  
  1         7788  
16              
17              
18              
19             sub new {
20 0     0 0   my($class)=shift;
21 0 0         ref($class)
22             and $class=ref($class);
23              
24             my($self)=$class->SUPER::new( yyversion => '1.05',
25             yystates =>
26             [
27             {#State 0
28             ACTIONS => {
29             'TYPE' => 2
30             },
31             GOTOS => {
32             'input' => 1
33             }
34             },
35             {#State 1
36             ACTIONS => {
37             '' => 3
38             }
39             },
40             {#State 2
41             ACTIONS => {
42             'EQUALS' => 4
43             }
44             },
45             {#State 3
46             DEFAULT => 0
47             },
48             {#State 4
49             ACTIONS => {
50             'CHAR' => 24,
51             'FLOAT' => 25,
52             'UNSIGNED' => 26,
53             'UNION' => 20,
54             'SIZE_T' => 22,
55             'STRUCT' => 21,
56             'INT' => 19,
57             'CONST' => 18,
58             'AMP' => 31,
59             'STATIC' => 29,
60             'STAR' => 27,
61             'CLASS' => 8,
62             'DOUBLE' => 9,
63             'LONG' => 6,
64             'MUTABLE' => 5,
65             'VOID' => 16,
66             'SSIZE_T' => 15,
67             'IDENTIFIER' => 12
68             },
69             GOTOS => {
70             'Namespace' => 7,
71             'TemplatedIdentifier' => 23,
72             'ClassPrefix' => 10,
73             'BuiltinType' => 11,
74             'TypeDefn' => 28,
75             'SimpleType' => 13,
76             'BasicType' => 30,
77             'TypePrefix' => 14,
78             'TypePrefixes' => 17
79             }
80             },
81             {#State 5
82             DEFAULT => -11
83             },
84             {#State 6
85             ACTIONS => {
86             'UNSIGNED' => 32,
87             'LONG' => 34,
88             'INT' => 33
89             },
90             DEFAULT => -65
91             },
92             {#State 7
93             ACTIONS => {
94             'IDENTIFIER' => 12
95             },
96             GOTOS => {
97             'TemplatedIdentifier' => 35
98             }
99             },
100             {#State 8
101             DEFAULT => -20
102             },
103             {#State 9
104             DEFAULT => -59
105             },
106             {#State 10
107             ACTIONS => {
108             'SSIZE_T' => 15,
109             'VOID' => 16,
110             'IDENTIFIER' => 12,
111             'DOUBLE' => 9,
112             'CHAR' => 24,
113             'UNSIGNED' => 26,
114             'FLOAT' => 25,
115             'LONG' => 6,
116             'INT' => 19,
117             'SIZE_T' => 22
118             },
119             GOTOS => {
120             'TemplatedIdentifier' => 23,
121             'BuiltinType' => 11,
122             'SimpleType' => 36,
123             'Namespace' => 7
124             }
125             },
126             {#State 11
127             DEFAULT => -35
128             },
129             {#State 12
130             ACTIONS => {
131             'OPENANGLE' => 38
132             },
133             DEFAULT => -32,
134             GOTOS => {
135             'TemplateSpec' => 37
136             }
137             },
138             {#State 13
139             ACTIONS => {
140             'COLON' => 40
141             },
142             DEFAULT => -27,
143             GOTOS => {
144             'ClassSuffix' => 39
145             }
146             },
147             {#State 14
148             DEFAULT => -8
149             },
150             {#State 15
151             DEFAULT => -63
152             },
153             {#State 16
154             DEFAULT => -53
155             },
156             {#State 17
157             ACTIONS => {
158             'MUTABLE' => 5,
159             'LONG' => 6,
160             'CLASS' => 8,
161             'DOUBLE' => 9,
162             'IDENTIFIER' => 12,
163             'VOID' => 16,
164             'SSIZE_T' => 15,
165             'UNION' => 20,
166             'SIZE_T' => 22,
167             'STRUCT' => 21,
168             'INT' => 19,
169             'CONST' => 18,
170             'CHAR' => 24,
171             'FLOAT' => 25,
172             'UNSIGNED' => 26,
173             'STATIC' => 29,
174             'STAR' => 27,
175             'AMP' => 31
176             },
177             GOTOS => {
178             'Namespace' => 7,
179             'BuiltinType' => 11,
180             'SimpleType' => 41,
181             'ClassPrefix' => 43,
182             'TemplatedIdentifier' => 23,
183             'TypePrefix' => 42
184             }
185             },
186             {#State 18
187             DEFAULT => -10
188             },
189             {#State 19
190             DEFAULT => -55
191             },
192             {#State 20
193             DEFAULT => -22
194             },
195             {#State 21
196             DEFAULT => -21
197             },
198             {#State 22
199             DEFAULT => -62
200             },
201             {#State 23
202             ACTIONS => {
203             'DOUBLE_COLON' => 44
204             },
205             DEFAULT => -34
206             },
207             {#State 24
208             DEFAULT => -60
209             },
210             {#State 25
211             DEFAULT => -58
212             },
213             {#State 26
214             ACTIONS => {
215             'CHAR' => 46,
216             'LONG' => 45,
217             'INT' => 47
218             },
219             DEFAULT => -64
220             },
221             {#State 27
222             DEFAULT => -13
223             },
224             {#State 28
225             DEFAULT => -1
226             },
227             {#State 29
228             DEFAULT => -12
229             },
230             {#State 30
231             ACTIONS => {
232             'OPENBRACE' => 49
233             },
234             DEFAULT => -3,
235             GOTOS => {
236             'ClassSpec' => 48
237             }
238             },
239             {#State 31
240             DEFAULT => -14
241             },
242             {#State 32
243             ACTIONS => {
244             'INT' => 50
245             },
246             DEFAULT => -68
247             },
248             {#State 33
249             DEFAULT => -54
250             },
251             {#State 34
252             DEFAULT => -66
253             },
254             {#State 35
255             ACTIONS => {
256             'DOUBLE_COLON' => 51
257             },
258             DEFAULT => -33
259             },
260             {#State 36
261             ACTIONS => {
262             'COLON' => 40
263             },
264             DEFAULT => -27,
265             GOTOS => {
266             'ClassSuffix' => 52
267             }
268             },
269             {#State 37
270             DEFAULT => -31
271             },
272             {#State 38
273             ACTIONS => {
274             'LONG' => 6,
275             'MUTABLE' => 5,
276             'CLASS' => 8,
277             'DOUBLE' => 9,
278             'IDENTIFIER' => 12,
279             'VOID' => 16,
280             'SSIZE_T' => 15,
281             'INT' => 19,
282             'CONST' => 18,
283             'UNION' => 20,
284             'STRUCT' => 21,
285             'SIZE_T' => 22,
286             'UNSIGNED' => 26,
287             'CHAR' => 24,
288             'FLOAT' => 25,
289             'STATIC' => 29,
290             'STAR' => 27,
291             'AMP' => 31
292             },
293             GOTOS => {
294             'SimpleType' => 13,
295             'BuiltinType' => 11,
296             'TypePrefixes' => 17,
297             'BasicType' => 53,
298             'TypePrefix' => 14,
299             'Namespace' => 7,
300             'BasicTypeList_NonEmpty' => 54,
301             'ClassPrefix' => 10,
302             'TemplatedIdentifier' => 23
303             }
304             },
305             {#State 39
306             ACTIONS => {
307             'CONST' => 57,
308             'OPENBRACKET' => 55,
309             'STAR' => 58,
310             'AMP' => 59
311             },
312             DEFAULT => -19,
313             GOTOS => {
314             'TypeSuffix' => 56
315             }
316             },
317             {#State 40
318             ACTIONS => {
319             'CHAR' => 24,
320             'FLOAT' => 25,
321             'UNSIGNED' => 26,
322             'INT' => 19,
323             'SIZE_T' => 22,
324             'STRUCT' => 21,
325             'UNION' => 20,
326             'PUBLIC' => 65,
327             'SSIZE_T' => 15,
328             'VOID' => 16,
329             'IDENTIFIER' => 12,
330             'PROTECTED' => 64,
331             'DOUBLE' => 9,
332             'CLASS' => 8,
333             'PRIVATE' => 60,
334             'LONG' => 6
335             },
336             GOTOS => {
337             'TemplatedIdentifier' => 23,
338             'ClassPrefix' => 61,
339             'ClassAccess' => 62,
340             'Namespace' => 7,
341             'BuiltinType' => 11,
342             'SimpleType' => 63
343             }
344             },
345             {#State 41
346             ACTIONS => {
347             'COLON' => 40
348             },
349             DEFAULT => -27,
350             GOTOS => {
351             'ClassSuffix' => 66
352             }
353             },
354             {#State 42
355             DEFAULT => -9
356             },
357             {#State 43
358             ACTIONS => {
359             'DOUBLE' => 9,
360             'UNSIGNED' => 26,
361             'FLOAT' => 25,
362             'CHAR' => 24,
363             'LONG' => 6,
364             'INT' => 19,
365             'SIZE_T' => 22,
366             'SSIZE_T' => 15,
367             'VOID' => 16,
368             'IDENTIFIER' => 12
369             },
370             GOTOS => {
371             'TemplatedIdentifier' => 23,
372             'BuiltinType' => 11,
373             'SimpleType' => 67,
374             'Namespace' => 7
375             }
376             },
377             {#State 44
378             DEFAULT => -37
379             },
380             {#State 45
381             DEFAULT => -67
382             },
383             {#State 46
384             DEFAULT => -61
385             },
386             {#State 47
387             DEFAULT => -57
388             },
389             {#State 48
390             DEFAULT => -2
391             },
392             {#State 49
393             ACTIONS => {
394             'LONG' => 6,
395             'MUTABLE' => 5,
396             'DOUBLE' => 9,
397             'CLASS' => 8,
398             'PRIVATE' => 60,
399             'PROTECTED' => 64,
400             'IDENTIFIER' => 74,
401             'PUBLIC' => 65,
402             'VOID' => 16,
403             'SSIZE_T' => 15,
404             'INT' => 19,
405             'CONST' => 18,
406             'SIZE_T' => 22,
407             'STRUCT' => 21,
408             'UNION' => 20,
409             'FLOAT' => 25,
410             'UNSIGNED' => 26,
411             'CHAR' => 24,
412             'STAR' => 27,
413             'STATIC' => 29,
414             'AMP' => 31
415             },
416             DEFAULT => -45,
417             GOTOS => {
418             'ClassMember' => 69,
419             'TemplatedIdentifier' => 23,
420             'ClassPrefix' => 10,
421             'Namespace' => 7,
422             'VarDecl' => 70,
423             'ClassMembers' => 72,
424             'TypePrefix' => 14,
425             'TypePrefixes' => 17,
426             'BasicType' => 68,
427             'FunctionDecl' => 71,
428             'SimpleType' => 13,
429             'BuiltinType' => 11,
430             'ClassAccess' => 73
431             }
432             },
433             {#State 50
434             DEFAULT => -56
435             },
436             {#State 51
437             DEFAULT => -36
438             },
439             {#State 52
440             ACTIONS => {
441             'OPENBRACKET' => 55,
442             'CONST' => 57,
443             'AMP' => 59,
444             'STAR' => 58
445             },
446             DEFAULT => -19,
447             GOTOS => {
448             'TypeSuffix' => 75
449             }
450             },
451             {#State 53
452             ACTIONS => {
453             'COMMA' => 76
454             },
455             DEFAULT => -40
456             },
457             {#State 54
458             ACTIONS => {
459             'CLOSEANGLE' => 77
460             }
461             },
462             {#State 55
463             ACTIONS => {
464             'NUMBER' => 78
465             }
466             },
467             {#State 56
468             DEFAULT => -7
469             },
470             {#State 57
471             ACTIONS => {
472             'CONST' => 57,
473             'OPENBRACKET' => 55,
474             'STAR' => 58,
475             'AMP' => 59
476             },
477             DEFAULT => -19,
478             GOTOS => {
479             'TypeSuffix' => 79
480             }
481             },
482             {#State 58
483             ACTIONS => {
484             'OPENBRACKET' => 55,
485             'CONST' => 57,
486             'AMP' => 59,
487             'STAR' => 58
488             },
489             DEFAULT => -19,
490             GOTOS => {
491             'TypeSuffix' => 80
492             }
493             },
494             {#State 59
495             ACTIONS => {
496             'STAR' => 58,
497             'AMP' => 59,
498             'CONST' => 57,
499             'OPENBRACKET' => 55
500             },
501             DEFAULT => -19,
502             GOTOS => {
503             'TypeSuffix' => 81
504             }
505             },
506             {#State 60
507             DEFAULT => -29
508             },
509             {#State 61
510             ACTIONS => {
511             'SIZE_T' => 22,
512             'LONG' => 6,
513             'INT' => 19,
514             'CHAR' => 24,
515             'FLOAT' => 25,
516             'UNSIGNED' => 26,
517             'DOUBLE' => 9,
518             'IDENTIFIER' => 12,
519             'SSIZE_T' => 15,
520             'VOID' => 16
521             },
522             GOTOS => {
523             'SimpleType' => 82,
524             'BuiltinType' => 11,
525             'Namespace' => 7,
526             'TemplatedIdentifier' => 23
527             }
528             },
529             {#State 62
530             ACTIONS => {
531             'UNSIGNED' => 26,
532             'FLOAT' => 25,
533             'CHAR' => 24,
534             'DOUBLE' => 9,
535             'CLASS' => 8,
536             'STRUCT' => 21,
537             'SIZE_T' => 22,
538             'UNION' => 20,
539             'INT' => 19,
540             'LONG' => 6,
541             'VOID' => 16,
542             'SSIZE_T' => 15,
543             'IDENTIFIER' => 12
544             },
545             GOTOS => {
546             'TemplatedIdentifier' => 23,
547             'ClassPrefix' => 83,
548             'Namespace' => 7,
549             'SimpleType' => 84,
550             'BuiltinType' => 11
551             }
552             },
553             {#State 63
554             DEFAULT => -26
555             },
556             {#State 64
557             DEFAULT => -30
558             },
559             {#State 65
560             DEFAULT => -28
561             },
562             {#State 66
563             ACTIONS => {
564             'AMP' => 59,
565             'STAR' => 58,
566             'OPENBRACKET' => 55,
567             'CONST' => 57
568             },
569             DEFAULT => -19,
570             GOTOS => {
571             'TypeSuffix' => 85
572             }
573             },
574             {#State 67
575             ACTIONS => {
576             'COLON' => 40
577             },
578             DEFAULT => -27,
579             GOTOS => {
580             'ClassSuffix' => 86
581             }
582             },
583             {#State 68
584             ACTIONS => {
585             'IDENTIFIER' => 87
586             }
587             },
588             {#State 69
589             ACTIONS => {
590             'DOUBLE' => 9,
591             'CLASS' => 8,
592             'PRIVATE' => 60,
593             'LONG' => 6,
594             'MUTABLE' => 5,
595             'PUBLIC' => 65,
596             'VOID' => 16,
597             'SSIZE_T' => 15,
598             'PROTECTED' => 64,
599             'IDENTIFIER' => 74,
600             'FLOAT' => 25,
601             'CHAR' => 24,
602             'UNSIGNED' => 26,
603             'INT' => 19,
604             'CONST' => 18,
605             'STRUCT' => 21,
606             'SIZE_T' => 22,
607             'UNION' => 20,
608             'AMP' => 31,
609             'STATIC' => 29,
610             'STAR' => 27
611             },
612             DEFAULT => -45,
613             GOTOS => {
614             'BuiltinType' => 11,
615             'SimpleType' => 13,
616             'ClassAccess' => 73,
617             'TypePrefix' => 14,
618             'TypePrefixes' => 17,
619             'BasicType' => 68,
620             'ClassMembers' => 88,
621             'FunctionDecl' => 71,
622             'VarDecl' => 70,
623             'Namespace' => 7,
624             'ClassMember' => 69,
625             'TemplatedIdentifier' => 23,
626             'ClassPrefix' => 10
627             }
628             },
629             {#State 70
630             ACTIONS => {
631             'SEMICOLON' => 89
632             }
633             },
634             {#State 71
635             ACTIONS => {
636             'SEMICOLON' => 90
637             }
638             },
639             {#State 72
640             ACTIONS => {
641             'CLOSEBRACE' => 91
642             }
643             },
644             {#State 73
645             ACTIONS => {
646             'COLON' => 92
647             }
648             },
649             {#State 74
650             ACTIONS => {
651             'OPENANGLE' => 38,
652             'OPENPAREN' => 93
653             },
654             DEFAULT => -32,
655             GOTOS => {
656             'TemplateSpec' => 37
657             }
658             },
659             {#State 75
660             DEFAULT => -5
661             },
662             {#State 76
663             ACTIONS => {
664             'SSIZE_T' => 15,
665             'VOID' => 16,
666             'IDENTIFIER' => 12,
667             'CLASS' => 8,
668             'DOUBLE' => 9,
669             'LONG' => 6,
670             'MUTABLE' => 5,
671             'AMP' => 31,
672             'STATIC' => 29,
673             'STAR' => 27,
674             'UNSIGNED' => 26,
675             'CHAR' => 24,
676             'FLOAT' => 25,
677             'UNION' => 20,
678             'SIZE_T' => 22,
679             'STRUCT' => 21,
680             'CONST' => 18,
681             'INT' => 19
682             },
683             DEFAULT => -39,
684             GOTOS => {
685             'TypePrefix' => 14,
686             'TypePrefixes' => 17,
687             'BasicType' => 53,
688             'BuiltinType' => 11,
689             'SimpleType' => 13,
690             'TemplatedIdentifier' => 23,
691             'ClassPrefix' => 10,
692             'BasicTypeList' => 94,
693             'Namespace' => 7,
694             'BasicTypeList_NonEmpty' => 95
695             }
696             },
697             {#State 77
698             DEFAULT => -42
699             },
700             {#State 78
701             ACTIONS => {
702             'CLOSEBRACKET' => 96
703             }
704             },
705             {#State 79
706             DEFAULT => -15
707             },
708             {#State 80
709             DEFAULT => -16
710             },
711             {#State 81
712             DEFAULT => -17
713             },
714             {#State 82
715             DEFAULT => -24
716             },
717             {#State 83
718             ACTIONS => {
719             'VOID' => 16,
720             'SSIZE_T' => 15,
721             'IDENTIFIER' => 12,
722             'UNSIGNED' => 26,
723             'CHAR' => 24,
724             'FLOAT' => 25,
725             'DOUBLE' => 9,
726             'SIZE_T' => 22,
727             'INT' => 19,
728             'LONG' => 6
729             },
730             GOTOS => {
731             'TemplatedIdentifier' => 23,
732             'Namespace' => 7,
733             'BuiltinType' => 11,
734             'SimpleType' => 97
735             }
736             },
737             {#State 84
738             DEFAULT => -25
739             },
740             {#State 85
741             DEFAULT => -6
742             },
743             {#State 86
744             ACTIONS => {
745             'AMP' => 59,
746             'STAR' => 58,
747             'OPENBRACKET' => 55,
748             'CONST' => 57
749             },
750             DEFAULT => -19,
751             GOTOS => {
752             'TypeSuffix' => 98
753             }
754             },
755             {#State 87
756             ACTIONS => {
757             'CONST' => 57,
758             'OPENBRACKET' => 55,
759             'STAR' => 58,
760             'OPENANGLE' => 38,
761             'AMP' => 59,
762             'OPENPAREN' => 101
763             },
764             DEFAULT => -19,
765             GOTOS => {
766             'TemplateSpec' => 99,
767             'TypeSuffix' => 100
768             }
769             },
770             {#State 88
771             DEFAULT => -44
772             },
773             {#State 89
774             DEFAULT => -48
775             },
776             {#State 90
777             DEFAULT => -47
778             },
779             {#State 91
780             DEFAULT => -43
781             },
782             {#State 92
783             DEFAULT => -46
784             },
785             {#State 93
786             ACTIONS => {
787             'CLASS' => 8,
788             'DOUBLE' => 9,
789             'MUTABLE' => 5,
790             'LONG' => 6,
791             'VOID' => 16,
792             'SSIZE_T' => 15,
793             'IDENTIFIER' => 12,
794             'UNSIGNED' => 26,
795             'FLOAT' => 25,
796             'CHAR' => 24,
797             'UNION' => 20,
798             'STRUCT' => 21,
799             'SIZE_T' => 22,
800             'CONST' => 18,
801             'INT' => 19,
802             'AMP' => 31,
803             'STAR' => 27,
804             'STATIC' => 29
805             },
806             DEFAULT => -39,
807             GOTOS => {
808             'TypePrefix' => 14,
809             'TypePrefixes' => 17,
810             'BasicType' => 53,
811             'SimpleType' => 13,
812             'BuiltinType' => 11,
813             'BasicTypeList' => 102,
814             'ClassPrefix' => 10,
815             'TemplatedIdentifier' => 23,
816             'BasicTypeList_NonEmpty' => 95,
817             'Namespace' => 7
818             }
819             },
820             {#State 94
821             DEFAULT => -41
822             },
823             {#State 95
824             DEFAULT => -38
825             },
826             {#State 96
827             ACTIONS => {
828             'STAR' => 58,
829             'AMP' => 59,
830             'CONST' => 57,
831             'OPENBRACKET' => 55
832             },
833             DEFAULT => -19,
834             GOTOS => {
835             'TypeSuffix' => 103
836             }
837             },
838             {#State 97
839             DEFAULT => -23
840             },
841             {#State 98
842             DEFAULT => -4
843             },
844             {#State 99
845             ACTIONS => {
846             'OPENPAREN' => 104
847             }
848             },
849             {#State 100
850             DEFAULT => -52
851             },
852             {#State 101
853             ACTIONS => {
854             'LONG' => 6,
855             'MUTABLE' => 5,
856             'CLASS' => 8,
857             'DOUBLE' => 9,
858             'IDENTIFIER' => 12,
859             'SSIZE_T' => 15,
860             'VOID' => 16,
861             'UNION' => 20,
862             'STRUCT' => 21,
863             'SIZE_T' => 22,
864             'CONST' => 18,
865             'INT' => 19,
866             'FLOAT' => 25,
867             'UNSIGNED' => 26,
868             'CHAR' => 24,
869             'STAR' => 27,
870             'STATIC' => 29,
871             'AMP' => 31
872             },
873             DEFAULT => -39,
874             GOTOS => {
875             'SimpleType' => 13,
876             'BuiltinType' => 11,
877             'TypePrefix' => 14,
878             'BasicType' => 53,
879             'TypePrefixes' => 17,
880             'BasicTypeList_NonEmpty' => 95,
881             'Namespace' => 7,
882             'BasicTypeList' => 105,
883             'TemplatedIdentifier' => 23,
884             'ClassPrefix' => 10
885             }
886             },
887             {#State 102
888             ACTIONS => {
889             'CLOSEPAREN' => 106
890             }
891             },
892             {#State 103
893             DEFAULT => -18
894             },
895             {#State 104
896             ACTIONS => {
897             'AMP' => 31,
898             'STAR' => 27,
899             'STATIC' => 29,
900             'CHAR' => 24,
901             'UNSIGNED' => 26,
902             'FLOAT' => 25,
903             'INT' => 19,
904             'CONST' => 18,
905             'STRUCT' => 21,
906             'SIZE_T' => 22,
907             'UNION' => 20,
908             'VOID' => 16,
909             'SSIZE_T' => 15,
910             'IDENTIFIER' => 12,
911             'DOUBLE' => 9,
912             'CLASS' => 8,
913             'LONG' => 6,
914             'MUTABLE' => 5
915             },
916             DEFAULT => -39,
917             GOTOS => {
918             'BasicTypeList_NonEmpty' => 95,
919             'Namespace' => 7,
920             'BasicTypeList' => 107,
921             'ClassPrefix' => 10,
922             'TemplatedIdentifier' => 23,
923             'SimpleType' => 13,
924             'BuiltinType' => 11,
925             'TypePrefix' => 14,
926             'BasicType' => 53,
927             'TypePrefixes' => 17
928             }
929             },
930             {#State 105
931             ACTIONS => {
932             'CLOSEPAREN' => 108
933             }
934             },
935             {#State 106
936             ACTIONS => {
937             'CONST' => 57,
938             'STAR' => 58,
939             'OPENBRACKET' => 55,
940             'AMP' => 59
941             },
942             DEFAULT => -19,
943             GOTOS => {
944             'TypeSuffix' => 109
945             }
946             },
947             {#State 107
948             ACTIONS => {
949             'CLOSEPAREN' => 110
950             }
951             },
952             {#State 108
953             ACTIONS => {
954             'AMP' => 59,
955             'OPENBRACKET' => 55,
956             'CONST' => 57,
957             'STAR' => 58
958             },
959             DEFAULT => -19,
960             GOTOS => {
961             'TypeSuffix' => 111
962             }
963             },
964             {#State 109
965             DEFAULT => -51
966             },
967             {#State 110
968             ACTIONS => {
969             'OPENBRACKET' => 55,
970             'AMP' => 59,
971             'STAR' => 58,
972             'CONST' => 57
973             },
974             DEFAULT => -19,
975             GOTOS => {
976             'TypeSuffix' => 112
977             }
978             },
979             {#State 111
980             DEFAULT => -50
981             },
982             {#State 112
983             DEFAULT => -49
984             }
985             ],
986             yyrules =>
987             [
988             [#Rule 0
989             '$start', 2, undef
990             ],
991             [#Rule 1
992             'input', 3,
993             sub
994             #line 4 "yp/GDBGrammar.yp"
995             { $_[3] }
996             ],
997             [#Rule 2
998             'TypeDefn', 2,
999             sub
1000             #line 8 "yp/GDBGrammar.yp"
1001             {{
1002             fullname => $_[1]->{fullname},
1003             shortname => $_[1]->{shortname},
1004             quotename => $_[1]->{quotename},
1005             parent => $_[1]->{parent},
1006             members => $_[2],
1007             }}
1008             ],
1009             [#Rule 3
1010             'TypeDefn', 1, undef
1011             ],
1012             [#Rule 4
1013             'BasicType', 5,
1014             sub
1015             #line 18 "yp/GDBGrammar.yp"
1016             { BasicType(@_[1..$#_]) }
1017             ],
1018             [#Rule 5
1019             'BasicType', 4,
1020             sub
1021             #line 19 "yp/GDBGrammar.yp"
1022             { BasicType("", @_[1..$#_]) }
1023             ],
1024             [#Rule 6
1025             'BasicType', 4,
1026             sub
1027             #line 20 "yp/GDBGrammar.yp"
1028             { BasicType($_[1], "", @_[2..$#_]) }
1029             ],
1030             [#Rule 7
1031             'BasicType', 3,
1032             sub
1033             #line 21 "yp/GDBGrammar.yp"
1034             { BasicType("", "", @_[1..$#_]) }
1035             ],
1036             [#Rule 8
1037             'TypePrefixes', 1, undef
1038             ],
1039             [#Rule 9
1040             'TypePrefixes', 2,
1041             sub
1042             #line 26 "yp/GDBGrammar.yp"
1043             { trim(join(' ', @_[1..$#_])) }
1044             ],
1045             [#Rule 10
1046             'TypePrefix', 1, undef
1047             ],
1048             [#Rule 11
1049             'TypePrefix', 1, undef
1050             ],
1051             [#Rule 12
1052             'TypePrefix', 1, undef
1053             ],
1054             [#Rule 13
1055             'TypePrefix', 1, undef
1056             ],
1057             [#Rule 14
1058             'TypePrefix', 1, undef
1059             ],
1060             [#Rule 15
1061             'TypeSuffix', 2,
1062             sub
1063             #line 37 "yp/GDBGrammar.yp"
1064             { trim(join(' ', @_[1..$#_])) }
1065             ],
1066             [#Rule 16
1067             'TypeSuffix', 2,
1068             sub
1069             #line 39 "yp/GDBGrammar.yp"
1070             { trim(join(' ', @_[1..$#_])) }
1071             ],
1072             [#Rule 17
1073             'TypeSuffix', 2,
1074             sub
1075             #line 41 "yp/GDBGrammar.yp"
1076             { trim(join(' ', @_[1..$#_])) }
1077             ],
1078             [#Rule 18
1079             'TypeSuffix', 4,
1080             sub
1081             #line 43 "yp/GDBGrammar.yp"
1082             { trim(join(' ', @_[1..$#_])) }
1083             ],
1084             [#Rule 19
1085             'TypeSuffix', 0,
1086             sub
1087             #line 45 "yp/GDBGrammar.yp"
1088             { trim(join(' ', @_[1..$#_])) }
1089             ],
1090             [#Rule 20
1091             'ClassPrefix', 1, undef
1092             ],
1093             [#Rule 21
1094             'ClassPrefix', 1, undef
1095             ],
1096             [#Rule 22
1097             'ClassPrefix', 1, undef
1098             ],
1099             [#Rule 23
1100             'ClassSuffix', 4,
1101             sub
1102             #line 51 "yp/GDBGrammar.yp"
1103             { $_[4] }
1104             ],
1105             [#Rule 24
1106             'ClassSuffix', 3,
1107             sub
1108             #line 52 "yp/GDBGrammar.yp"
1109             { $_[3] }
1110             ],
1111             [#Rule 25
1112             'ClassSuffix', 3,
1113             sub
1114             #line 53 "yp/GDBGrammar.yp"
1115             { $_[3] }
1116             ],
1117             [#Rule 26
1118             'ClassSuffix', 2,
1119             sub
1120             #line 54 "yp/GDBGrammar.yp"
1121             { $_[3] }
1122             ],
1123             [#Rule 27
1124             'ClassSuffix', 0,
1125             sub
1126             #line 55 "yp/GDBGrammar.yp"
1127             { undef }
1128             ],
1129             [#Rule 28
1130             'ClassAccess', 1, undef
1131             ],
1132             [#Rule 29
1133             'ClassAccess', 1, undef
1134             ],
1135             [#Rule 30
1136             'ClassAccess', 1, undef
1137             ],
1138             [#Rule 31
1139             'TemplatedIdentifier', 2,
1140             sub
1141             #line 64 "yp/GDBGrammar.yp"
1142             {{
1143             fullname => join('', $_[1], '< ', join(',', @{$_[2]}), ' >'),
1144             shortname => $_[1],
1145             template => $_[2]
1146             }}
1147             ],
1148             [#Rule 32
1149             'TemplatedIdentifier', 1,
1150             sub
1151             #line 70 "yp/GDBGrammar.yp"
1152             {{
1153             fullname => join(' ', @_[1..$#_]),
1154             shortname => $_[1],
1155             }}
1156             ],
1157             [#Rule 33
1158             'SimpleType', 2,
1159             sub
1160             #line 77 "yp/GDBGrammar.yp"
1161             {{
1162             fullname => join('', $_[1], $_[2]->{fullname}),
1163             shortname => $_[2]->{shortname},
1164             template => $_[2]->{template},
1165             }}
1166             ],
1167             [#Rule 34
1168             'SimpleType', 1, undef
1169             ],
1170             [#Rule 35
1171             'SimpleType', 1,
1172             sub
1173             #line 84 "yp/GDBGrammar.yp"
1174             {{
1175             fullname => $_[1],
1176             shortname => $_[1],
1177             }}
1178             ],
1179             [#Rule 36
1180             'Namespace', 3,
1181             sub
1182             #line 91 "yp/GDBGrammar.yp"
1183             { join('', $_[1], $_[2]->{fullname}, $_[3]) }
1184             ],
1185             [#Rule 37
1186             'Namespace', 2,
1187             sub
1188             #line 93 "yp/GDBGrammar.yp"
1189             { join('', $_[1]->{fullname}, $_[2]) }
1190             ],
1191             [#Rule 38
1192             'BasicTypeList', 1, undef
1193             ],
1194             [#Rule 39
1195             'BasicTypeList', 0,
1196             sub
1197             #line 98 "yp/GDBGrammar.yp"
1198             { [] }
1199             ],
1200             [#Rule 40
1201             'BasicTypeList_NonEmpty', 1,
1202             sub
1203             #line 102 "yp/GDBGrammar.yp"
1204             { [$_[1]->{fullname}] }
1205             ],
1206             [#Rule 41
1207             'BasicTypeList_NonEmpty', 3,
1208             sub
1209             #line 104 "yp/GDBGrammar.yp"
1210             { [$_[1]->{fullname}, @{$_[3]}] }
1211             ],
1212             [#Rule 42
1213             'TemplateSpec', 3,
1214             sub
1215             #line 108 "yp/GDBGrammar.yp"
1216             { $_[2] }
1217             ],
1218             [#Rule 43
1219             'ClassSpec', 3,
1220             sub
1221             #line 112 "yp/GDBGrammar.yp"
1222             { $_[2] }
1223             ],
1224             [#Rule 44
1225             'ClassMembers', 2,
1226             sub
1227             #line 116 "yp/GDBGrammar.yp"
1228             { defined($_[1]) ? [$_[1], @{$_[2]}] : $_[2] }
1229             ],
1230             [#Rule 45
1231             'ClassMembers', 0,
1232             sub
1233             #line 118 "yp/GDBGrammar.yp"
1234             { [] }
1235             ],
1236             [#Rule 46
1237             'ClassMember', 2,
1238             sub
1239             #line 122 "yp/GDBGrammar.yp"
1240             { undef }
1241             ],
1242             [#Rule 47
1243             'ClassMember', 2, undef
1244             ],
1245             [#Rule 48
1246             'ClassMember', 2, undef
1247             ],
1248             [#Rule 49
1249             'FunctionDecl', 7,
1250             sub
1251             #line 129 "yp/GDBGrammar.yp"
1252             {{
1253             function => $_[2],
1254             type => $_[1],
1255             params => $_[5],
1256             }}
1257             ],
1258             [#Rule 50
1259             'FunctionDecl', 6,
1260             sub
1261             #line 135 "yp/GDBGrammar.yp"
1262             {{
1263             function => $_[2],
1264             type => $_[1],
1265             params => $_[4],
1266             }}
1267             ],
1268             [#Rule 51
1269             'FunctionDecl', 5,
1270             sub
1271             #line 141 "yp/GDBGrammar.yp"
1272             {{
1273             function => $_[1] . $_[2],
1274             type => undef,
1275             params => $_[4],
1276             }}
1277             ],
1278             [#Rule 52
1279             'VarDecl', 3,
1280             sub
1281             #line 149 "yp/GDBGrammar.yp"
1282             {{
1283             variable => $_[2],
1284             type => $_[1],
1285             }}
1286             ],
1287             [#Rule 53
1288             'BuiltinType', 1, undef
1289             ],
1290             [#Rule 54
1291             'BuiltinType', 2, undef
1292             ],
1293             [#Rule 55
1294             'BuiltinType', 1, undef
1295             ],
1296             [#Rule 56
1297             'BuiltinType', 3, undef
1298             ],
1299             [#Rule 57
1300             'BuiltinType', 2, undef
1301             ],
1302             [#Rule 58
1303             'BuiltinType', 1, undef
1304             ],
1305             [#Rule 59
1306             'BuiltinType', 1, undef
1307             ],
1308             [#Rule 60
1309             'BuiltinType', 1, undef
1310             ],
1311             [#Rule 61
1312             'BuiltinType', 2, undef
1313             ],
1314             [#Rule 62
1315             'BuiltinType', 1, undef
1316             ],
1317             [#Rule 63
1318             'BuiltinType', 1, undef
1319             ],
1320             [#Rule 64
1321             'BuiltinType', 1, undef
1322             ],
1323             [#Rule 65
1324             'BuiltinType', 1, undef
1325             ],
1326             [#Rule 66
1327             'BuiltinType', 2, undef
1328             ],
1329             [#Rule 67
1330             'BuiltinType', 2, undef
1331             ],
1332             [#Rule 68
1333             'BuiltinType', 2, undef
1334             ]
1335             ],
1336             @_);
1337             bless($self,$class);
1338             }
1339              
1340             #line 172 "yp/GDBGrammar.yp"
1341              
1342              
1343             sub BasicType
1344             {
1345             unshift @_, undef;
1346              
1347             my $t = {
1348             fullname => trim(join(' ', $_[1], $_[2], $_[3]->{fullname}, $_[5])),
1349             shortname => trim($_[3]->{shortname}),
1350             quotename => trim(join(' ', $_[1], $_[2], q(').$_[3]->{fullname}.q('), $_[5])),
1351             template => $_[3]->{template},
1352             };
1353              
1354             if(defined $_[4])
1355             {
1356             $t->{parent} =
1357             {
1358             fullname => $_[4]->{fullname},
1359             shortname => $_[4]->{shortname},
1360             quotename => q(').$_[4]->{fullname}.q('),
1361             };
1362             }
1363              
1364             $t;
1365             };
1366              
1367             sub trim($)
1368             {
1369             $_ = shift @_;
1370             s/^\s*//s;
1371             s/\s*$//s;
1372             return $_;
1373             }
1374              
1375             sub _Lexer {
1376             my($parser)=shift;
1377              
1378             $parser->YYData->{DATA} =~ s/^\s+//s;
1379              
1380             $parser->YYData->{DATA}
1381             or return('',undef);
1382              
1383             for ($parser->YYData->{DATA}) {
1384             s/^(operator[<>\[\]=+!-]+)//s
1385             and return('IDENTIFIER', $1);
1386             s/^(==)//s
1387             and return('DOUBLE_EQUALS', $1);
1388             s/^(=)//s
1389             and return('EQUALS', $1);
1390             s/^(\*)//s
1391             and return('STAR', $1);
1392             s/^(&)//s
1393             and return('AMP', $1);
1394             s/^(\[)//s
1395             and return('OPENBRACKET', $1);
1396             s/^(\])//s
1397             and return('CLOSEBRACKET', $1);
1398             s/^(<)//s
1399             and return('OPENANGLE', $1);
1400             s/^(>)//s
1401             and return('CLOSEANGLE', $1);
1402             s/^(::)//s
1403             and return('DOUBLE_COLON', $1);
1404             s/^(,)//s
1405             and return('COMMA', $1);
1406             s/^(:)//s
1407             and return('COLON', $1);
1408             s/^(;)//s
1409             and return('SEMICOLON', $1);
1410             s/^({)//s
1411             and return('OPENBRACE', $1);
1412             s/^(})//s
1413             and return('CLOSEBRACE', $1);
1414             s/^(\()//s
1415             and return('OPENPAREN', $1);
1416             s/^(\))//s
1417             and return('CLOSEPAREN', $1);
1418             s/^(type\b)//s
1419             and return('TYPE', $1);
1420             s/^(void\b)//s
1421             and return('VOID', $1);
1422             s/^(int\b)//s
1423             and return('INT', $1);
1424             s/^(float\b)//s
1425             and return('FLOAT', $1);
1426             s/^(double\b)//s
1427             and return('DOUBLE', $1);
1428             s/^(char\b)//s
1429             and return('CHAR', $1);
1430             s/^(size_t\b)//s
1431             and return('SIZE_T', $1);
1432             s/^(ssize_t\b)//s
1433             and return('SSIZE_T', $1);
1434             s/^(unsigned\b)//s
1435             and return('UNSIGNED', $1);
1436             s/^(long\b)//s
1437             and return('LONG', $1);
1438             s/^(mutable\b)//s
1439             and return('MUTABLE', $1);
1440             s/^(const\b)//s
1441             and return('CONST', $1);
1442             s/^(static\b)//s
1443             and return('STATIC', $1);
1444             s/^(class\b)//s
1445             and return('CLASS', $1);
1446             s/^(struct\b)//s
1447             and return('STRUCT', $1);
1448             s/^(union\b)//s
1449             and return('UNION', $1);
1450             s/^(private\b)//s
1451             and return('PRIVATE', $1);
1452             s/^(protected\b)//s
1453             and return('PROTECTED', $1);
1454             s/^(public)//s
1455             and return('PUBLIC', $1);
1456             s/^([0-9]+)//s
1457             and return('NUMBER', $1);
1458             s/^([A-Za-z_~][A-Za-z0-9_~]*)//s
1459             and return('IDENTIFIER', $1);
1460             s/^(.)//s
1461             and return($1, $1);
1462             }
1463             }
1464              
1465             sub parse($)
1466             {
1467             my $self = shift;
1468              
1469             $self->YYData->{DATA} = shift;
1470             my $result = $self->YYParse( yylex => \&_Lexer, yyerror => sub {} );
1471             $self->YYData->{DATA} = undef;
1472              
1473             return $result;
1474             }
1475              
1476             1;