line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::LinkParser::MatchPath::SMContext; |
2
|
1
|
|
|
1
|
|
5
|
use Data::Dumper; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
1201
|
|
3
|
|
|
|
|
|
|
|
4
|
0
|
|
|
0
|
0
|
|
sub print_stat{ |
5
|
|
|
|
|
|
|
} |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub ENTER_wordcapture { |
9
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
10
|
0
|
|
|
|
|
|
$self->{_wordcapture} = 1; |
11
|
0
|
|
|
|
|
|
print_stat "ENTER wordcapture : $self->{_curr_state}\n"; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub LEAVE_wordcapture { |
15
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
16
|
0
|
|
|
|
|
|
$self->{_wordcapture} = 0; |
17
|
0
|
|
|
|
|
|
print_stat "LEAVE wordcapture\n"; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub ENTER_BRANCH { |
21
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
22
|
0
|
|
|
|
|
|
$self->{_branch} = 'E'; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub LEAVE_BRANCH { |
26
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
27
|
0
|
|
|
|
|
|
$self->{_branch} = 'L'; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub CLEAR_BRANCH { |
32
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
33
|
0
|
|
|
|
|
|
$self->{_branch} = undef; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub POP_BRANCHTYPE { |
37
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
38
|
0
|
|
|
|
|
|
$self->{_branch_type} = pop @{$self->{_branch_type_stack}}; |
|
0
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub ENTER_AT { |
43
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
44
|
0
|
|
|
|
|
|
print_stat "ENTER AT\n"; |
45
|
0
|
|
|
|
|
|
push @{$self->{_branch_type_stack}}, $self->{_branch_type}; |
|
0
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
$self->{_branch_type} = 0; |
47
|
0
|
|
|
|
|
|
$self->ENTER_BRANCH; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub LEAVE_AT { |
51
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
52
|
0
|
|
|
|
|
|
print_stat "LEAVE AT\n"; |
53
|
0
|
|
|
|
|
|
$self->LEAVE_BRANCH; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub ENTER_POUND { |
58
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
59
|
0
|
|
|
|
|
|
print_stat "ENTER POUND\n"; |
60
|
0
|
|
|
|
|
|
push @{$self->{_branch_type_stack}}, $self->{_branch_type}; |
|
0
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
$self->{_branch_type} = 1; |
62
|
0
|
|
|
|
|
|
$self->ENTER_BRANCH; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
sub LEAVE_POUND { |
65
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
66
|
0
|
|
|
|
|
|
print_stat "LEAVE POUND\n"; |
67
|
0
|
|
|
|
|
|
$self->LEAVE_BRANCH; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub ENTER_EXCLM { |
72
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
73
|
0
|
|
|
|
|
|
print_stat "ENTER EXCLM\n"; |
74
|
0
|
|
|
|
|
|
push @{$self->{_branch_type_stack}}, $self->{_branch_type}; |
|
0
|
|
|
|
|
|
|
75
|
0
|
|
|
|
|
|
$self->{_branch_type} = 2; |
76
|
0
|
|
|
|
|
|
$self->ENTER_BRANCH; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
sub LEAVE_EXCLM { |
79
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
80
|
0
|
|
|
|
|
|
print_stat "LEAVE EXCLM\n"; |
81
|
0
|
|
|
|
|
|
$self->LEAVE_BRANCH; |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub STORE_INPUT_ACTION { |
88
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
89
|
0
|
|
|
|
|
|
print_stat "STORE INPUT ACTION\n"; |
90
|
0
|
|
|
|
|
|
$self->{_input_action} = 'store'; |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
sub LOAD_INPUT_ACTION { |
93
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
94
|
0
|
|
|
|
|
|
print_stat "LOAD INPUT ACTION\n"; |
95
|
0
|
|
|
|
|
|
$self->{_input_action} = 'load'; |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
sub CLEAR_INPUT_ACTION { |
98
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
99
|
0
|
|
|
|
|
|
print_stat "CLEAR INPUT ACTION\n"; |
100
|
0
|
|
|
|
|
|
$self->{_input_action} = undef; |
101
|
|
|
|
|
|
|
} |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
sub PUSH_PREV_STATE { |
105
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
106
|
0
|
|
|
|
|
|
print_stat "PUSH PREVIOUS STATE $self->{_curr_state};\n"; |
107
|
0
|
|
|
|
|
|
push @{$self->{_prev_state_stack}}, $self->{_curr_state}; |
|
0
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
} |
109
|
|
|
|
|
|
|
sub LOAD_PREV_STATE { |
110
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
111
|
0
|
|
|
|
|
|
$self->{_curr_state} = $self->{_prev_state_stack}->[-1]; |
112
|
0
|
|
|
|
|
|
print_stat "LOAD PREVIOUS STATE $self->{_curr_state};\n"; |
113
|
|
|
|
|
|
|
} |
114
|
|
|
|
|
|
|
sub POP_PREV_STATE { |
115
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
116
|
0
|
|
|
|
|
|
print_stat "POP PREVIOUS STATE\n"; |
117
|
0
|
|
|
|
|
|
pop @{$self->{_prev_state_stack}}; |
|
0
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
} |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
sub SAVE_TOJOIN_STATE { |
122
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
123
|
0
|
|
|
|
|
|
print_stat "SAVE $self->{_curr_state} to join later\n"; |
124
|
0
|
|
|
|
|
|
$self->{_tojoin}->{ $self->{_curr_state} } = ''; |
125
|
|
|
|
|
|
|
} |
126
|
|
|
|
|
|
|
sub JOIN_STATES { |
127
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
128
|
0
|
|
|
|
|
|
print_stat "JOIN ", join( q/ /, keys %{$self->{_tojoin}}), "\n"; |
|
0
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
} |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
sub SET_FAILURE { |
132
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
133
|
0
|
|
|
|
|
|
print_stat "SET FAILURE\n"; |
134
|
0
|
|
|
|
|
|
$self->{_failure} = 1; |
135
|
|
|
|
|
|
|
} |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
sub CLEAR_FAILURE { |
138
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
139
|
0
|
|
|
|
|
|
print_stat "CLEAR FAILURE\n"; |
140
|
0
|
|
|
|
|
|
$self->{_failure} = undef; |
141
|
|
|
|
|
|
|
} |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
1; |