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

%}

%token ESC
%token EOF
%token LEFT RIGHT UP DOWN
%token NPAGE PPAGE HOME END
%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 RESIZE

%start <Actions.actions> normal
%%


normal:
  | ESC    { Escape }
  | LEFT   { Move (Left 1) }
  | RIGHT  { Move (Right 1) }
  | UP     { Move (Up 1) }
  | DOWN   { Move (Down 1) }
  | 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 }
  | RESIZE  { Resize }