| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# |
|
2
|
|
|
|
|
|
|
# Module Parse::Yapp::Output |
|
3
|
|
|
|
|
|
|
# |
|
4
|
|
|
|
|
|
|
# Copyright © 1998, 1999, 2000, 2001, Francois Desarmenien. |
|
5
|
|
|
|
|
|
|
# Copyright © 2017 William N. Braswell, Jr. |
|
6
|
|
|
|
|
|
|
# (see the pod text in Parse::Yapp module for use and distribution rights) |
|
7
|
|
|
|
|
|
|
# |
|
8
|
|
|
|
|
|
|
package Parse::Yapp::Output; |
|
9
|
|
|
|
|
|
|
@ISA=qw ( Parse::Yapp::Lalr ); |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
require 5.004; |
|
12
|
|
|
|
|
|
|
|
|
13
|
3
|
|
|
3
|
|
1324
|
use Parse::Yapp::Lalr; |
|
|
3
|
|
|
|
|
8
|
|
|
|
3
|
|
|
|
|
80
|
|
|
14
|
3
|
|
|
3
|
|
15
|
use Parse::Yapp::Driver; |
|
|
3
|
|
|
|
|
6
|
|
|
|
3
|
|
|
|
|
42
|
|
|
15
|
|
|
|
|
|
|
|
|
16
|
3
|
|
|
3
|
|
14
|
use strict; |
|
|
3
|
|
|
|
|
6
|
|
|
|
3
|
|
|
|
|
44
|
|
|
17
|
|
|
|
|
|
|
|
|
18
|
3
|
|
|
3
|
|
13
|
use Carp; |
|
|
3
|
|
|
|
|
16
|
|
|
|
3
|
|
|
|
|
843
|
|
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub _CopyDriver { |
|
21
|
0
|
|
|
0
|
|
0
|
my($text)='#Included Parse/Yapp/Driver.pm file'.('-' x 40)."\n"; |
|
22
|
0
|
0
|
|
|
|
0
|
open(DRV,$Parse::Yapp::Driver::FILENAME) |
|
23
|
|
|
|
|
|
|
or die "BUG: could not open $Parse::Yapp::Driver::FILENAME"; |
|
24
|
0
|
|
|
|
|
0
|
$text.="{\n".join('',)."}\n"; |
|
25
|
0
|
|
|
|
|
0
|
close(DRV); |
|
26
|
0
|
|
|
|
|
0
|
$text.='#End of include'.('-' x 50)."\n"; |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub Output { |
|
30
|
9
|
|
|
9
|
0
|
345
|
my($self)=shift; |
|
31
|
|
|
|
|
|
|
|
|
32
|
9
|
|
|
|
|
39
|
$self->Options(@_); |
|
33
|
|
|
|
|
|
|
|
|
34
|
9
|
|
|
|
|
30
|
my($package)=$self->Option('classname'); |
|
35
|
9
|
|
|
|
|
20
|
my($head,$states,$rules,$tail,$driver); |
|
36
|
9
|
|
|
|
|
26
|
my($version)=$Parse::Yapp::Driver::VERSION; |
|
37
|
9
|
|
|
|
|
13
|
my($datapos); |
|
38
|
9
|
|
50
|
|
|
25
|
my($text)=$self->Option('template') ||<<'EOT'; |
|
39
|
|
|
|
|
|
|
#################################################################### |
|
40
|
|
|
|
|
|
|
# |
|
41
|
|
|
|
|
|
|
# This file was generated using Parse::Yapp version <<$version>>. |
|
42
|
|
|
|
|
|
|
# |
|
43
|
|
|
|
|
|
|
# Don't edit this file, use source file instead. |
|
44
|
|
|
|
|
|
|
# |
|
45
|
|
|
|
|
|
|
# ANY CHANGE MADE HERE WILL BE LOST ! |
|
46
|
|
|
|
|
|
|
# |
|
47
|
|
|
|
|
|
|
#################################################################### |
|
48
|
|
|
|
|
|
|
package <<$package>>; |
|
49
|
|
|
|
|
|
|
use vars qw ( @ISA ); |
|
50
|
|
|
|
|
|
|
use strict; |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
@ISA= qw ( Parse::Yapp::Driver ); |
|
53
|
|
|
|
|
|
|
<<$driver>> |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
<<$head>> |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub new { |
|
58
|
|
|
|
|
|
|
my($class)=shift; |
|
59
|
|
|
|
|
|
|
ref($class) |
|
60
|
|
|
|
|
|
|
and $class=ref($class); |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
my($self)=$class->SUPER::new( yyversion => '<<$version>>', |
|
63
|
|
|
|
|
|
|
yystates => |
|
64
|
|
|
|
|
|
|
<<$states>>, |
|
65
|
|
|
|
|
|
|
yyrules => |
|
66
|
|
|
|
|
|
|
<<$rules>>, |
|
67
|
|
|
|
|
|
|
@_); |
|
68
|
|
|
|
|
|
|
bless($self,$class); |
|
69
|
|
|
|
|
|
|
} |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
<<$tail>> |
|
72
|
|
|
|
|
|
|
1; |
|
73
|
|
|
|
|
|
|
EOT |
|
74
|
|
|
|
|
|
|
|
|
75
|
9
|
|
|
|
|
23
|
$driver='use Parse::Yapp::Driver;'; |
|
76
|
|
|
|
|
|
|
|
|
77
|
9
|
50
|
|
|
|
29
|
defined($package) |
|
78
|
|
|
|
|
|
|
or $package='Parse::Yapp::Default'; |
|
79
|
|
|
|
|
|
|
|
|
80
|
9
|
|
|
|
|
39
|
$head= $self->Head(); |
|
81
|
9
|
|
|
|
|
40
|
$rules=$self->RulesTable(); |
|
82
|
9
|
|
|
|
|
43
|
$states=$self->DfaTable(); |
|
83
|
9
|
|
|
|
|
34
|
$tail= $self->Tail(); |
|
84
|
|
|
|
|
|
|
|
|
85
|
9
|
50
|
|
|
|
25
|
$self->Option('standalone') |
|
86
|
|
|
|
|
|
|
and $driver=_CopyDriver(); |
|
87
|
|
|
|
|
|
|
|
|
88
|
9
|
|
|
|
|
74
|
$text=~s/<<(\$.+)>>/$1/gee; |
|
|
72
|
|
|
|
|
2210
|
|
|
89
|
|
|
|
|
|
|
|
|
90
|
9
|
|
|
|
|
87
|
$text; |
|
91
|
|
|
|
|
|
|
} |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
1; |