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

#include yesno.tin
#include numeric.tin
#include string.tin

%start command

%token CLOSE_
%token CONNECT_
%token DELAY_
%token DISCONNECT_
%token INTERNAL_
%token METHOD_
%token MIME_
%token OPEN_
%token SERVER_
%token XPA_

%%

#include yesno.trl
#include numeric.trl

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

vo : OPEN_ {VODialog}
 | CLOSE_ {VODestroy voi}
 | METHOD_ method {VOCmdSet method $2}
 | SERVER_ STRING_ {VOCmdSet server $2}
 | INTERNAL_ yesno {VOCmdSet hv $2}
 | DELAY_ INT_ {VOCmdSet delay $2}
 | CONNECT_ STRING_ {VOCmdConnect $2}
 | DISCONNECT_ STRING_ {VOCmdDisconnect $2}
 | STRING_ {VOCmdConnect $1}
 ;

method : XPA_ {set _ xpa}
 | MIME_ {set _ mime}
 ;

%%

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

     ParserError $msg $yycnt $yy_current_buffer $index_
}