blob: 577378389ea8b8bb294d3fc69d834d791a3d9d9a (
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
53
54
|
%{
%}
#include def.tin
#include string.tin
%start command
%token NONE_
%token POINTER_
%token REGION_
%token CROSSHAIR_
%token COLORBAR_
%token PAN_
%token ZOOM_
%token ROTATE_
%token CROP_
%token CATALOG_
%token EXAMINE_
%token 3D_
%%
command : mode
| mode {global ds9; if {!$ds9(init)} {YYERROR} else {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}
| 3D_ {set _ 3d}
# backward compatibilty
| POINTER_ {set _ region}
;
%%
proc mode::yyerror {msg} {
variable yycnt
variable yy_current_buffer
variable index_
ParserError $msg $yycnt $yy_current_buffer $index_
}
|