blob: 41ad906ad9abd95f0a185182f3eafb991ff532d6 (
plain)
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
|
%{
%}
#include base.tin
%start command
%token CLOSE_
%token IN_
%token FIT_
%token OPEN_
%token OUT_
%token TO_
%%
#include base.trl
command : zoom
| zoom {yyclearin; YYACCEPT} STRING_
;
zoom : OPEN_ {PanZoomDialog}
| CLOSE_ {PanZoomDestroyDialog}
| IN_ {Zoom 2 2}
| OUT_ {Zoom .5 .5}
| TO_ zoomTo
| numeric {Zoom $1 $1}
| numeric numeric {Zoom $1 $2}
;
zoomTo: FIT_ {ZoomToFit}
| numeric {ZoomTo $1 $1}
| numeric numeric {ZoomTo $1 $2}
;
%%
proc zoom::yyerror {msg} {
variable yycnt
variable yy_current_buffer
variable index_
ParserError $msg $yycnt $yy_current_buffer $index_
}
|