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

%start command

#include coords.tin
#include base.tin

%token CLOSE_
%token OPEN_
%token TO_

%%

#include coords.trl
#include base.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
     
     Error "$msg: [lindex $yy_current_buffer [expr $yycnt-1]]"
}