aboutsummaryrefslogtreecommitdiff
path: root/actionParser.mly
blob: 809a9adde97d866a52c6da90ad125f01a349d0ba (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
%{
  open Actions

%}

%token ESC
%token EOF
%token LEFT RIGHT UP DOWN
%token NPAGE PPAGE HOME END
%token RESIZE
%token DELETE
%token SEARCH
%token E U V Y P
%token EQUAL
%token I
%token <int*int>BUTTON1_CLICKED
%token <int*int>BUTTON1_RELEASED
%token COMMAND

%token <Num.num> Num

%start <Actions.actions> normal
%%


normal:
  | ESC    { Escape }
  | LEFT   { Move (Left 1) }
  | RIGHT  { Move (Right 1) }
  | UP     { Move (Up 1) }
  | DOWN   { Move (Down 1) }
  | RESIZE { Resize }
  | DELETE { Delete }
  | E      { Edit }
  | U      { Undo }
  | V      { Visual }
  | Y      { Yank }
  | P      { Paste }
  | SEARCH { Search }
  | EQUAL  { InsertFormula }
  | NPAGE  { Move (Down 10)}
  | PPAGE  { Move (Up 10)}
  | HOME   { Move (Left 10)}
  | END    { Move (Right 10)}
  | BUTTON1_CLICKED { Button1_clicked $1}
  | BUTTON1_RELEASED{ Button1_released $1}
  | COMMAND { Command }