-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNameparser.mly
58 lines (50 loc) · 926 Bytes
/
Nameparser.mly
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
%token SPEC
%token THEN
%token CHORD
%token OP
%token HASABSNOTE
%token ROOT
%token HASRELNOTE
%token END
%token PRIORITY
%token OPEN
%token CLOSE
%token EOF
%token COLON
%token PERCENT
%token <string> IDENT
%token EQUALS
%token <int> INT
%token COMMA
%token COMMENT
%token EOL
%token DOT
%token NOT
%token SUC
%token SORT
%token SORTS
%token LOGIC
%token OPS
%token PRED
%token PREDS
%token GENERATED
%token FREE
%start chord1
%type <string> chord1
%%
chord:
| SPEC IDENT EQUALS chord {$2}
| OP IDENT COLON CHORD chord {""}
| CHORD chord {""}
| THEN chord {""}
| DOT HASRELNOTE OPEN IDENT COMMA INT CLOSE chord {""}
| DOT HASABSNOTE OPEN IDENT COMMA INT CLOSE chord {""}
| DOT ROOT OPEN IDENT CLOSE EQUALS INT chord {""}
| DOT NOT INT EQUALS INT chord {""}
| DOT SUC OPEN INT CLOSE EQUALS INT chord {""}
| PERCENT OPEN IDENT CLOSE PERCENT chord {""}
| END {""}
| IDENT chord {""}
| EOF {""};
chord1:
| chord { $1 };