blob: 98f4c252c9070ef7adcd1139ee10a62c26e79470 (
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
|
%{
%}
#include yesno.tin
#include coords.tin
#include numeric.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 coords.trl
#include numeric.trl
command : wcs
| wcs {yyclearin; YYACCEPT} STRING_
;
wcs : OPEN_ {WCSDialog}
| CLOSE_ {WCSDestroyDialog}
| wcssys {WCSCmdSet system $1 UpdateWCS}
| SYSTEM_ wcssys {WCSCmdSet system $2 UpdateWCS}
| skyframe {WCSCmdSet sky $1 UpdateWCS}
| SKY_ skyframe {WCSCmdSet sky $2 UpdateWCS}
| skyformat {WCSCmdSet skyformat $1 UpdateWCS}
| SKYFORMAT_ skyformat {WCSCmdSet 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_
}
|