blob: ece39216f13cd0392b6f0b66777d3e6809a80720 (
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
47
48
49
50
51
52
|
%{
%}
#include string.tin
#include def.tin
%start command
%token NONE_
%token REGION_
%token CROSSHAIR_
%token COLORBAR_
%token PAN_
%token ZOOM_
%token ROTATE_
%token CROP_
%token CATALOG_
%token EXAMINE_
%token POINTER_
%%
command : mode
| mode {yyclearin; YYACCEPT} STRING_
;
mode : item {ProcessCmdSet current mode $1 ChangeMode}
;
item : NONE_ {set _ none}
| REGION_ {set _ region}
| CROSSHAIR_ {set _ crosshair}
| COLORBAR_ {set _ colorbar}
| PAN_ {set _ pan}
| ZOOM_ {set _ zoom}
| ROTATE_ {set _ rotate}
| CROP_ {set _ crop}
| CATALOG_ {set _ catalog}
| EXAMINE_ {set _ examine}
# backward compatibilty
| POINTER_ {set _ region}
;
%%
proc mode::yyerror {msg} {
variable yycnt
variable yy_current_buffer
variable index_
ParserError $msg $yycnt $yy_current_buffer $index_
}
|