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

#include numeric.tin
#include string.tin

%start command

%token BACK_
%token CLEAR_
%token CLICK_
%token CLOSE_
%token FORWARD_
%token NEW_
%token RELOAD_
%token STOP_

%%

#include numeric.trl

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

web : {WebCmdNew {}}
 | STRING_ {WebCmdNew $1}
 | NEW_ STRING_ {WebCmdNew $2}
 | NEW_ STRING_ STRING_ {WebCmdNew $3 $2}

 | {WebCmdCheck} webCmd
 | STRING_ {WebCmdRef $1} webCmd
 ;

webCmd : CLICK_ click
 | CLEAR_ {global cvarname; HVClearCmd $cvarname}
 | CLOSE_ {global cvarname; HVDestroy $cvarname}
 ;

click : BACK_ {global cvarname; HVBackCmd $cvarname}
 | FORWARD_ {global cvarname; HVForwardCmd $cvarname}
 | STOP_ {global cvarname; HVStopCmd $cvarname}
 | RELOAD_ {global cvarname; HVReloadCmd $cvarname}
 | INT_ {WebCmdClick $1}
 ;
 
%%

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

     ParserError $msg $yycnt $yy_current_buffer $index_
}