-
Notifications
You must be signed in to change notification settings - Fork 0
/
Debug2.eyp
65 lines (42 loc) · 836 Bytes
/
Debug2.eyp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
%{
=head1 SYNOPSIS
See
http://search.cpan.org/perldoc?Parse::Eyapp::debuggingtut
file Debug2.eyp
This grammar fixes the conflicts an bugs in Debug.eyp and Debug1.eyp
Be sure C<DebugTail.pm> is reachable
compile it with
eyapp -b '' Debug2.eyp
See the C<.output> file generated
execute the generated modulino with:
./Debug2.pm -t
=head1 See also
Debug1.eyp Debug2.eyp DebugLookForward.eyp
=cut
our $VERSION = '0.01';
use base q{DebugTail};
%}
%token D S
%tree
%%
p:
%name P
ds ';' ss
| %name SS
ss
;
ds:
%name D2
ds ';' D
| %name D1
D
;
ss:
%name S2
S ';' ss
| %name S1
S
;
%%
__PACKAGE__->YYLexer( \&DebugTail::lex);
__PACKAGE__->main('Provide a statement like "D; D; S" and press <CR><CTRL-D>: ') unless caller;