summaryrefslogtreecommitdiffstats
path: root/ds9/parsers/framesendparser.tac
blob: c297385895608f95b21b070e1552840b0ef0d6d0 (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
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
%{
%}
#include def.tin

#include coordsys.tin
#include wcssys.tin

%start framesend

%token ACTIVE_
%token ALL_
%token AUX_
%token BIN_
%token CELESTIAL_
%token CONTOUR_
%token CUBE_
%token DATAMIN_
%token DATASEC_
%token EQUATORIAL_
%token FITS_
%token FRAMENO_
%token GRID_
%token HAS_
%token HIGHLITE_
%token IIS_
%token IRAFMIN_
%token LINEAR_
%token LOCK_
%token MARKER_
%token MOSAIC_
%token PASTE_
%token SELECT_
%token SMOOTH_
%token SYSTEM_
%token UNDO_

%%

#include coordsys.trl
#include wcssys.trl

framesend : {FrameSendCmd}
 | FRAMENO_ {FrameSendCmd}
 | LOCK_ {ProcessSendCmdGet panzoom lock}
 | ACTIVE_ {FrameSendCmdGet active}
 | ALL_ {FrameSendCmdGet frames}
 | HAS_ has
 ;

has : coordsys {ProcessSendCmdCurrentYesNo "has $1"}
 | wcssys {ProcessSendCmdCurrentYesNo "has wcs $1"}
 | param {ProcessSendCmdCurrentYesNo "has $1"}
 | CONTOUR_ contour {ProcessSendCmdCurrentYesNo "has contour $2"}
 | FITS_ fits {ProcessSendCmdCurrentYesNo "has fits $2"}
 | MARKER_ marker  {ProcessSendCmdCurrentYesNo "has marker $2"}
 | SYSTEM_ system
 | WCS_ wcs
 ; 

param : IIS_ {set _ iis}
 | DATAMIN_ {set _ datamin}
 | IRAFMIN_ {set _ irafmin}
 | DATASEC_ {set _ datasec}
 | GRID_ {set _ grid}
 | SMOOTH_ {set _ smooth}
 ;

contour : {set _ {}}
 | AUX_ {set _ aux}
 ;

fits : {set _ {}}
 | BIN_ {set _ bin}
 | CUBE_ {set _ cube}
 | MOSAIC_ {set _ mosaic}
 ;

marker : HIGHLITE_ {set _ highlite}
 | PASTE_ {set _ paste}
 | SELECT_ {set _ select}
 | UNDO_ {set _ undo}
 ;

system : coordsys {ProcessSendCmdCurrentYesNo "has $1"}
 | wcssys {ProcessSendCmdCurrentYesNo "has wcs $1"}
 ;
 
wcs : wcstype {ProcessSendCmdCurrentYesNo "has wcs $1 wcs"}
 | wcstype wcssys {ProcessSendCmdCurrentYesNo "has wcs $1 $2"}
 | wcssys {ProcessSendCmdCurrentYesNo "has wcs $1"}
 ;

wcstype : CELESTIAL_ {set _ celestial}
 | LINEAR_ {set _ linear}
 # backward compatibility
 | EQUATORIAL_ {set _ celestial}
 ;

%%

proc framesend::yyerror {msg} {
     variable yycnt
     variable yy_current_buffer
     variable index_

     ParserError $msg $yycnt $yy_current_buffer $index_
}