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

#include coordsys.tin
#include wcssys.tin
#include skyframe.tin
#include numeric.tin
#include sexstr.tin
#include string.tin

%start command

%token CLOSE_
%token OPEN_
%token TO_

%%

#include coordsys.trl
#include wcssys.trl
#include skyframe.trl
#include numeric.trl

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

pan : OPEN_ {PanZoomDialog}
 | CLOSE_ {PanZoomDestroyDialog}
 | TO_ panto
 | numeric numeric {Pan $1 $2 physical fk5}
 | numeric numeric coordsys {Pan $1 $2 $3 fk5}
 | numeric numeric wcssys {Pan $1 $2 $3 fk5}
 | numeric numeric skyframe {Pan $1 $2 wcs $3}
 | numeric numeric wcssys skyframe {Pan $1 $2 $3 $4}
 | SEXSTR_ SEXSTR_ {Pan $1 $2 wcs fk5}
 | SEXSTR_ SEXSTR_ wcssys {Pan $1 $2 $3 fk5}
 | SEXSTR_ SEXSTR_ skyframe {Pan $1 $2 wcs $3}
 | SEXSTR_ SEXSTR_ wcssys skyframe {Pan $1 $2 $3 $4}
 ;

panto : numeric numeric {PanTo $1 $2 physical fk5}
 | numeric numeric coordsys {PanTo $1 $2 $3 fk5}
 | numeric numeric wcssys {PanTo $1 $2 $3 fk5}
 | numeric numeric skyframe {PanTo $1 $2 wcs $3}
 | numeric numeric wcssys skyframe {PanTo $1 $2 $3 $4}
 | SEXSTR_ SEXSTR_ {PanTo $1 $2 wcs fk5}
 | SEXSTR_ SEXSTR_ wcssys {PanTo $1 $2 $3 fk5}
 | SEXSTR_ SEXSTR_ skyframe {PanTo $1 $2 wcs $3}
 | SEXSTR_ SEXSTR_ wcssys skyframe {PanTo $1 $2 $3 $4}
 ;

%%

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