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

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

%start command

%token 3D_
%token AXES_
%token BIN_
%token BLOCK_
%token COLORBAR_
%token CROP_
%token CROSSHAIR_
%token FRAME_
%token SCALE_
%token SCALELIMITS_
%token SLICE_
%token SMOOTH_

%%

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

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

match : FRAME_ match {MatchFrameCurrent $2}
 | CROSSHAIR_ match {MatchCrosshairCurrent $2}
 | CROP_ match {MatchCropCurrent $2}
 | SLICE_ matchslice {MatchCubeCurrent $2}
 | BIN_ {MatchBinCurrent}
 | AXES_ {MatchAxesCurrent}
 | SCALE_ {MatchScaleCurrent}
 | SCALELIMITS_ {MatchScaleLimitsCurrent}
 | COLORBAR_ {MatchColorCurrent}
 | BLOCK_ {MatchBlockCurrent}
 | SMOOTH_ {MatchSmoothCurrent}
 | 3D_ {Match3DCurrent}
 ;

%%

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

     ParserError $msg $yycnt $yy_current_buffer $index_
}