[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Tom <tom.primozic@g...> |
| Subject: | Re: [Caml-list] ocamlyacc, menhir, dypgen, camp4, elkhound |
Possibly a difficult grammar is the grammar of OCaml value definition...
structure_item:
LET rec_flag let_bindings
;
rec_flag:
/* empty */
| REC
;
val_ident:
LIDENT
| LPAREN operator RPAREN
;
let_bindings:
let_binding
| let_bindings AND let_binding
;
let_binding:
val_ident fun_binding
| pattern EQUAL seq_expr
;
fun_binding:
strict_binding
| type_constraint EQUAL seq_expr
;
strict_binding:
EQUAL seq_expr
| labeled_simple_pattern fun_binding
;
Indeed there are some "unknown" items, but the difficult part here is
trying to parse the function declaration with
variable number of parameters, using no (slow) recursion.
Hm... maybe, I don't know, I found this both hard to think of and hard
to understand.
- Tom