blob: 1f0149d0a9a29a056661654f86e6355a109038ca (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
%{
%}
#include def.tin
#include yesno.tin
#include wcssys.tin
#include skyframe.tin
#include skyformat.tin
#include int.tin
#include string.tin
%start command
%token ALIGN_
%token APPEND_
%token CLOSE_
%token OPEN_
%token REPLACE_
%token RESET_
%token SKY_
%token SKYFORMAT_
%token SYSTEM_
%%
#include yesno.trl
#include wcssys.trl
#include skyframe.trl
#include skyformat.trl
command : wcs
| wcs {global ds9; if {!$ds9(init)} {YYERROR} else {yyclearin; YYACCEPT}} STRING_
;
wcs : OPEN_ {WCSDialog}
| CLOSE_ {WCSDestroyDialog}
| wcssys {ProcessCmdSet wcs system $1 UpdateWCS}
| SYSTEM_ wcssys {ProcessCmdSet wcs system $2 UpdateWCS}
| skyframe {ProcessCmdSet wcs sky $1 UpdateWCS}
| SKY_ skyframe {ProcessCmdSet wcs sky $2 UpdateWCS}
| skyformat {ProcessCmdSet wcs skyformat $1 UpdateWCS}
| SKYFORMAT_ skyformat {ProcessCmdSet wcs skyformat $2 UpdateWCS}
| ALIGN_ yesno {ProcessCmdSet current align $2 AlignWCSFrame}
| RESET_ {WCSCmdReset 1}
| RESET_ INT_ {WCSCmdReset $2}
| REPLACE_ replace
| APPEND_ append
;
replace : {WCSCmdLoad replace 1}
| INT_ {WCSCmdLoad replace $1}
| STRING_ {WCSCmdLoadFn replace 1 $1}
| INT_ STRING_ {WCSCmdLoadFn replace $1 $2}
;
append : {WCSCmdLoad append 1}
| INT_ {WCSCmdLoad append $1}
| STRING_ {WCSCmdLoadFn append 1 $1}
| INT_ STRING_ {WCSCmdLoadFn append $1 $2}
;
%%
proc wcs::yyerror {msg} {
variable yycnt
variable yy_current_buffer
variable index_
ParserError $msg $yycnt $yy_current_buffer $index_
}
|