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

#include matchlock.tin
#include coords.tin
#include yesno.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 yesno.trl
#include numeric.trl

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

lock : FRAME_ lock {PanZoomCmdSet lock $2 LockFrameCurrent}
 | CROSSHAIR_ lock {CrosshairCmdSet lock $2 LockCrosshairCurrent}
 | CROP_ lock {CropCmdSet lock $2 LockCropCurrent}
 | SLICE_ lockslice {CubeCmdSet lock $2 LockCubeCurrent}
 | BIN_ yesno {BinCmdSet lock $2 LockBinCurrent}
 | AXES_ yesno {CubeCmdSet lock,axes $2 LockAxesCurrent}
 | SCALE_ yesno {ScaleCmdSet lock $2 LockScaleCurrent}
 | SCALELIMITS_ yesno {ScaleCmdSet lock,limits $2 LockScaleLimitsCurrent}
 | COLORBAR_ yesno {ColorbarCmdSet lock $2 LockColorCurrent}
 | BLOCK_ yesno {BlockCmdSet lock $2 LockBlockCurrent}
 | SMOOTH_ yesno {SmoothCmdSet lock $2 LockSmoothCurrent}
 | 3D_ yesno {ThreedCmdSet lock $2 Lock3DCurrent}
 ;

%%

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

     ParserError $msg $yycnt $yy_current_buffer $index_
}