blob: 89394804445a21d891bc7b8c322d16e879082067 (
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
|
%{
%}
#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_ STRING_ {WebCmdNew $3 $2}
| {if {![WebCmdCheck]} {web::YYABORT}} webCmd
| STRING_ {if {![WebCmdRef $1]} {web::YYABORT}} 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_
}
|