blob: d7f5c7fd6a924359bf18011aa2ed5f7f231e636e (
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
59
60
61
62
63
|
%{
%}
#include def.tin
#include yesno.tin
#include numeric.tin
#include string.tin
%start command
%token ANGLE_
%token BOXCAR_
%token CLOSE_
%token ELLIPTIC_
%token FUNCTION_
%token GAUSSIAN_
%token LOCK_
%token MATCH_
%token OPEN_
%token RADIUS_
%token RADIUSMINOR_
%token SIGMA_
%token SIGMAMINOR_
%token TOPHAT_
%%
#include yesno.trl
#include numeric.trl
command : smooth
| smooth {yyclearin; YYACCEPT} STRING_
;
smooth : yesno {ProcessCmdSet smooth view $1 SmoothUpdate}
| OPEN_ {SmoothDialog}
| CLOSE_ {SmoothDestroyDialog}
| MATCH_ {MatchSmoothCurrent}
| LOCK_ yesno {ProcessCmdSet smooth lock $2 LockSmoothCurrent}
| FUNCTION_ function {ProcessCmdSet smooth function $2 SmoothUpdate}
| RADIUS_ INT_ {ProcessCmdSet smooth radius $2 SmoothUpdate}
| RADIUSMINOR_ INT_ {ProcessCmdSet smooth radius,minor $2 SmoothUpdate}
| SIGMA_ numeric {ProcessCmdSet smooth sigma $2 SmoothUpdate}
| SIGMAMINOR_ numeric {ProcessCmdSet smooth sigma,minor $2 SmoothUpdate}
| ANGLE_ numeric {ProcessCmdSet smooth angle $2 SmoothUpdate}
;
function : BOXCAR_ {set _ boxcar}
| ELLIPTIC_ {set _ elliptic}
| TOPHAT_ {set _ tophat}
| GAUSSIAN_ {set _ gaussian}
;
%%
proc smooth::yyerror {msg} {
variable yycnt
variable yy_current_buffer
variable index_
ParserError $msg $yycnt $yy_current_buffer $index_
}
|