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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
%{
%}
#include yesno.tin
#include coordsys.tin
#include wcssys.tin
#include skyframe.tin
#include skyformat.tin
#include int.tin
#include string.tin
%start regionsend
%token AUTO_
%token AUTOCENTROID_
%token BACKGROUND_
%token CENTROID_
%token COLOR_
%token DELIM_
%token EPSILON_
%token EXCLUDE_
%token FORMAT_
%token GROUP_
%token GROUPS_
%token INCLUDE_
%token ITERATION_
%token NL_
%token RADIUS_
%token SELECTED_
%token SHAPE_
%token SHOW_
%token SHOWTEXT_
%token SKY_
%token SKYFORMAT_
%token SOURCE_
%token STRIP_
%token SYSTEM_
%token WIDTH_
%token DS9_
%token XML_
%token CIAO_
%token SAOTNG_
%token PROS_
%token SAOIMAGE_
%token XY_
%token MFORMAT_
%token MSYSTEM_
%token MSKY_
%token MSKYFORMAT_
%token MSTRIP_
%token MDELIM_
%token MPROP_
%token MGROUP_
%%
#include yesno.trl
#include coordsys.trl
#include wcssys.trl
#include skyframe.trl
#include skyformat.trl
regionsend : {RegionSendCmd}
| props {RegionSendCmd}
| EPSILON_ {ProcessSendCmdGet pmarker epsilon}
| SHOW_ {ProcessSendCmdYesNo marker show}
| SHOWTEXT_ {ProcessSendCmdYesNo marker show,text}
| CENTROID_ centroid
# backword compatibility
| AUTOCENTROID_ {ProcessSendCmdYesNo marker centroid,auto}
| FORMAT_ {ProcessSendCmdGet marker format}
| SYSTEM_ {ProcessSendCmdGet marker system}
| SKY_ {ProcessSendCmdGet marker sky}
| SKYFORMAT_ {ProcessSendCmdGet marker skyformat}
| STRIP_ {ProcessSendCmdYesNo marker strip}
# backward compatibility
| DELIM_ {}
| SHAPE_ {ProcessSendCmdGet marker shape}
| COLOR_ {ProcessSendCmdGet marker color}
| WIDTH_ {ProcessSendCmdGet marker width}
| GROUP_ {ProcessSendCmdCurrent frame "get marker tag all"}
| GROUPS_ {ProcessSendCmdCurrent frame "get marker tag all"}
;
centroid: AUTO_ {ProcessSendCmdYesNo marker centroid,auto}
| RADIUS_ {ProcessSendCmdGet marker centroid,radius}
| ITERATION_ {ProcessSendCmdGet marker centroid,iteration}
;
format : DS9_ {set _ ds9}
| XML_ {set _ xml}
| CIAO_ {set _ ciao}
| SAOTNG_ {set _ saotng}
| PROS_ {set _ pros}
| SAOIMAGE_ {set _ saoimage}
| XY_ {set _ xy}
;
delim : NL_ {set _ 0}
| STRING_ {set _ 1}
;
props : props prop
| prop
;
prop : MFORMAT_ format {ProcessCmdSet marker load,format $2}
| MSYSTEM_ coordsys {ProcessCmdSet marker load,system $2}
| MSYSTEM_ wcssys {ProcessCmdSet marker load,system $2}
# backward compatibility
| MSYSTEM_ skyframe {ProcessCmdSet marker load,system wcs; ProcessCmdSet marker load,sky $2}
| MSKY_ skyframe {ProcessCmdSet marker load,sky $2}
| MSKYFORMAT_ skyformat {ProcessCmdSet marker load,skyformat $2}
| MSTRIP_ yesno {ProcessCmdSet marker load,strip $2}
# backward compatibility
| MDELIM_ delim {ProcessCmdSet marker load,strip $2}
| MPROP_ STRING_ INT_ {ProcessCmdAppend marker load,props "$2 = $3 "}
| MPROP_ STRING_ STRING_ {ProcessCmdAppend marker load,props "$2 = $3 "}
| INCLUDE_ {ProcessCmdAppend marker load,props "include = 1 "}
| EXCLUDE_ {ProcessCmdAppend marker load,props "include = 0 "}
| SOURCE_ {ProcessCmdAppend marker load,props "source = 1 "}
| BACKGROUND_ {ProcessCmdAppend marker load,props "source = 0 "}
| MGROUP_ STRING_ {ProcessCmdAppend marker load,tags "tag = $2 "}
| SELECTED_ {ProcessCmdSet marker load,select select}
;
%%
proc regionsend::yyerror {msg} {
variable yycnt
variable yy_current_buffer
variable index_
ParserError $msg $yycnt $yy_current_buffer $index_
}
|