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

#include coordsys.tin
#include wcssys.tin
#include skyframe.tin
#include wcsformat.tin

%start cropsend

%token 3D_
%token LOCK_

%%

#include coordsys.trl
#include wcssys.trl
#include skyframe.trl
#include wcsformat.trl

cropsend : {ProcessSendCmdCurrent "get crop center physical fk5 degrees physical degrees"}
 | coordsys {ProcessSendCmdCurrent "get crop center $1 fk5 degrees $1 degrees"}

 | wcssys {ProcessSendCmdCurrent "get crop center $1 fk5 degrees $1 degrees"}
 | skyframe {ProcessSendCmdCurrent "get crop center wcs $1 degrees wcs degrees"}

 | wcssys skyformat
   {ProcessSendCmdCurrent "get crop center $1 fk5 $2 $1 degrees"}
 | skyframe skyformat
   {ProcessSendCmdCurrent "get crop center wcs $1 $2 wcs degrees"}

 | wcssys skyformat rformat
   {ProcessSendCmdCurrent "get crop center $1 fk5 $2 $1 $3"}
 | skyframe skyformat rformat
   {ProcessSendCmdCurrent "get crop center wcs $1 $2 wcs $3"}

 | wcssys skyframe skyformat rformat
   {ProcessSendCmdCurrent "get crop center $1 $2 $3 $1 $4"}

 | 3D_ 3d
 | LOCK_ {ProcessSendCmdGet crop lock}
 ;

3d : {ProcessSendCmdCurrent "get crop 3d image"}
 | coordsys {ProcessSendCmdCurrent "get crop 3d $1"}
 | wcssys {ProcessSendCmdCurrent "get crop 3d $1"}
 ;

%%

proc cropsend::yyerror {msg} {
     variable yycnt
     variable yy_current_buffer
     variable index_
     
     ParserError $msg $yycnt $yy_current_buffer $index_
}