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

#include matchlock.tin
#include coords.tin
#include numeric.tin
#include string.tin

%start command

%%

#include matchlock.trl
#include coords.trl
#include numeric.trl

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

crosshair : MATCH_ match {MatchCrosshairCurrent $2}
 | LOCK_ lock {ProcessCmdSet crosshair lock $2 LockCrosshairCurrent}
 | numeric numeric {CrosshairTo $1 $2 physical fk5}
 | numeric numeric coordsys {CrosshairTo $1 $2 $3 fk5}
 | numeric numeric wcssys {CrosshairTo $1 $2 $3 fk5}
 | numeric numeric skyframe {CrosshairTo $1 $2 wcs $3}
 | numeric numeric wcssys skyframe {CrosshairTo $1 $2 $3 $4}
 | SEXSTR_ SEXSTR_ {CrosshairTo $1 $2 wcs fk5}
 | SEXSTR_ SEXSTR_ wcssys {CrosshairTo $1 $2 $3 fk5}
 | SEXSTR_ SEXSTR_ skyframe {CrosshairTo $1 $2 wcs $3}
 | SEXSTR_ SEXSTR_ wcssys skyframe {CrosshairTo $1 $2 $3 $4}
 ;

%%

proc crosshair::yyerror {msg} {
     variable yycnt
     variable yy_current_buffer
     variable index_

     ParserError $msg $yycnt $yy_current_buffer $index_
}