summaryrefslogtreecommitdiffstats
path: root/ds9/parsers/dsssaoparser.tac
blob: 52bb76980c33b83274434249f0a92b5335c938d0 (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
%{
%}

#include yesno.tin
#include coords.tin
#include imgsvr.tin
#include numeric.tin
#include string.tin

%start command

%%

#include yesno.trl
#include coords.trl
#include imgsvr.trl
#include numeric.trl

command : dsssao
 | dsssao {yyclearin; YYACCEPT} STRING_
 ;

dsssao : {IMGSVRApply dsao 1}
 | OPEN_ {}
 | CLOSE_ {ARDestroy dsao}
 | STRING_ {ProcessCmdSet dsao name $1 "IMGSVRApply dsao 1"}
 | NAME_ CLEAR_ {ProcessCmdSet dsao name {}}
 | NAME_ STRING_ {ProcessCmdSet dsao name $2 "IMGSVRApply dsao 1"}
 | SIZE_ numeric numeric sizeOpt
   {ProcessCmdSet4 dsao width $2 height $3 rformat $4 rformat,msg $4}
 | SAVE_ yesno {ProcessCmdSet dsao save $2}
 | FRAME_ frame {ProcessCmdSet dsao mode $2}
 | UPDATE_ update

 | numeric numeric deg {ProcessCmdSet4 dsao x $1 y $2 skyformat $3 skyformat,msg $3 "IMGSVRApply dsao 1"}
 | SEXSTR_ SEXSTR_ sex {ProcessCmdSet4 dsao x $1 y $2 skyformat $3 skyformat,msg $3 "IMGSVRApply dsao 1"}
 # backward compatibility
 | COORD_ numeric numeric deg {ProcessCmdSet4 dsao x $2 y $3 skyformat $4 skyformat,msg $4 "IMGSVRApply dsao 1"}
 | COORD_ SEXSTR_ SEXSTR_ sex {ProcessCmdSet4 dsao x $2 y $3 skyformat $4 skyformat,msg $4 "IMGSVRApply dsao 1"}
 ;

update : FRAME_ {IMGSVRCmdUpdate dsao}
 | CROSSHAIR_ {IMGSVRCmdCrosshair dsao}
 ;

%%

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