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

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

%start command

%token STRIPE82_
%token FIRST_

%%

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

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

vla : {IMGSVRApply dvla 1}
 | OPEN_ {}
 | CLOSE_ {ARDestroy dvla}
 | STRING_ {IMGSVRCmd dvla name $1}
 | NAME_ STRING_ {IMGSVRCmd dvla name $2}
 | SIZE_ numeric numeric sizeOpt {IMGSVRCmdSize dvla $2 $3 $4}
 | SAVE_ yesno {IMGSVRCmd dvla save $2}
 | FRAME_ frame {IMGSVRCmd dvla mode $2}
 | SURVEY_ survey {IMGSVRCmd dvla survey $2}
 | UPDATE_ update

 | numeric numeric coordOpt {IMGSVRCmdCoord dvla $1 $2 degrees}
 | SEXSTR_ SEXSTR_ coordOpt {IMGSVRCmdCoord dvla $1 $2 sexagesimal}
 | COORD_ numeric numeric deg {IMGSVRCmdCoord dvla $2 $3 $4}
 | COORD_ SEXSTR_ SEXSTR_ sex {IMGSVRCmdCoord dvla $2 $3 $4}
 ;

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

survey : STRIPE82_ {set _ stripe82}
 | FIRST_ {set _ first}
 ;

%%

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