blob: 21e7572d038f036fbcd5d0e1d832cf1ee88b084f (
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
64
65
66
67
68
69
70
|
%{
%}
#include yesno.tin
#include font.tin
#include numeric.tin
#include string.tin
%start command
%token DISTANCE_
%token HORIZONTAL_
%token LOCK_
%token MATCH_
%token NUMERICS_
%token ORIENTATION_
%token SIZE_
%token SPACE_
%token TICKS_
%token VALUE_
%token VERTICAL_
%%
#include yesno.trl
#include font.trl
#include numeric.trl
command : colorbar
| colorbar {yyclearin; YYACCEPT} STRING_
;
colorbar : yesno {ProcessCmdSet view colorbar $1 UpdateView}
| MATCH_ {MatchColorCurrent}
| LOCK_ yesno {ProcessCmdSet colorbar lock $2 LockColorCurrent}
| NUMERICS_ yesno {ProcessCmdSet colorbar numerics $2 UpdateView}
| SPACE_ space {ProcessCmdSet colorbar space $2 UpdateView}
| FONT_ font {ProcessCmdSet colorbar font $2 UpdateView}
| FONTSIZE_ INT_ {ProcessCmdSet colorbar font,size $2 UpdateView}
| FONTWEIGHT_ fontWeight {ProcessCmdSet colorbar font,weight $2 UpdateView}
| FONTSLANT_ fontSlant {ProcessCmdSet colorbar font,slant $2 UpdateView}
# backward compatibility
| FONTSTYLE_ fontStyle {ColorbarCmdFontStyle $2 UpdateView}
| orientation {ProcessCmdSet colorbar orientation $1 UpdateView}
# backward compatibility
| ORIENTATION_ orientation {ProcessCmdSet colorbar orientation $2 UpdateView}
| SIZE_ INT_ {ProcessCmdSet colorbar size $2 UpdateView}
| TICKS_ INT_ {ProcessCmdSet colorbar ticks $2 UpdateView}
;
space : VALUE_ {set _ 1}
| DISTANCE_ {set _ 0}
;
orientation : VERTICAL_ {set _ vertical}
| HORIZONTAL_ {set _ horizontal}
;
%%
proc colorbar::yyerror {msg} {
variable yycnt
variable yy_current_buffer
variable index_
ParserError $msg $yycnt $yy_current_buffer $index_
}
|