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

#include numeric.tin
#include string.tin

%start command

%token CLEAR_
%token CLOSE_
%token COLOR_
%token MARK_
%token OPEN_
%token TRANSPARENCY_

%%

#include numeric.trl

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

mask : {global parse; set parse(result) mask}
 | OPEN_ {MaskDialog}
 | CLOSE_ {MaskDestroyDialog}
 | CLEAR_ {MaskClear}
 | COLOR_ STRING_ {ProcessCmdSet mask color $2 MaskColor}
 | MARK_ INT_ {ProcessCmdSet mask mark $2 MaskMark}
 | TRANSPARENCY_ INT_ {ProcessCmdSet mask transparency $2 MaskTransparency}
 ;

%%

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

     ParserError $msg $yycnt $yy_current_buffer $index_
}