blob: 67709aa6783cb01c0ac3e0daaabe654622280243 (
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
|
%{
%}
#include def.tin
#include string.tin
%start command
%token CLOSE_
%token NONE_
%token OPEN_
%token XY_
%%
command : orient
| orient {global ds9; if {!$ds9(init)} {YYERROR} else {yyclearin; YYACCEPT}} STRING_
;
orient : orientation {ProcessCmdSet current orient $1 ChangeOrient}
| OPEN_ {PanZoomDialog}
| CLOSE_ {PanZoomDestroyDialog}
;
orientation : NONE_ {set _ none}
| 'x' {set _ x}
| 'X' {set _ x}
| 'y' {set _ y}
| 'Y' {set _ y}
| XY_ {set _ xy}
;
%%
proc orient::yyerror {msg} {
variable yycnt
variable yy_current_buffer
variable index_
ParserError $msg $yycnt $yy_current_buffer $index_
}
|