|
Ocamlyacc |
Menhir |
Dypgen |
Elkhound |
Camlp4 |
Aurochs |
| Handled grammar |
LALR(1) |
LR(1) |
ContextFree (GLR) |
ContextFree (GLR) |
LL(k) (k not well defined) |
PEG |
| Reentrant |
??? |
Yes |
Yes |
??? |
Yes |
Yes |
| Grammars in multiple files |
No |
Yes |
No |
??? |
Yes |
No |
| Extensible (an action can change the grammar) |
No |
No |
Yes (moreover, the extension is « scoped ») |
No |
Yes |
No |
| State of development |
Production |
Production |
Beta |
Production |
Production release in 3.09, beta in 3.10 |
Production |
| Parametrized non terminal |
No |
Yes (parametrized by other symbols, terminal or not) |
No (except for priority) |
No |
No (except for levels and OPT or LIST0|1 construct) |
No |
| Nested or local non terminal definition |
No |
No |
No |
No |
Yes |
No |
| Splitting the definition of a non terminal
(this is really useful when the grammar can be splitted in many files) |
No |
Yes |
Yes |
Yes |
Yes |
No |
| Grammars parametrized by Ocaml modules |
No |
Yes |
No |
No |
Yes |
No |
| Rule guarded by semantical value for terminal
(allowing to use something like KWD('+') as a terminal) |
No |
No |
Yes |
No |
Yes |
No |
| Pattern matching on semantical value for terminal and non terminal
(allowing a terminal like « expr_list([x]) »
to mean an expressions list of size one in a rule) |
No |
No |
Yes |
No |
Yes |
No |
| Naming of semantical value in rules
(to avoid the $1,$2, ... which are hard to maintain) |
No |
Yes |
Yes |
Yes |
Yes |
Yes |
| Partial action (action code in the middle of a rule) |
No |
No |
Yes |
No |
Yes (with a hack) |
No |
| Ambiguous grammars
(this means you can get all parse-trees and usually implies
that you can parse all context-free grammars) |
No |
No |
Yes |
Yes |
No |
No |
| Exception to reject a rule |
Meaningless for deterministic parsing |
Meaningless for deterministic parsing |
Yes |
No ??? |
No |
Yes |
| Priority |
Like yacc |
Like yacc |
Using arbitrary relations |
Using the order relation on integer + associativity direction |
Using levels (= a total and extensible order as a relation) + associativity direction |
By production order |
| Debugging grammar conflicts |
Hard |
Easy: conflict explicited in terms of the grammar |
Average (by printing the possible parse trees when many) |
Average (by printing the possible parse trees when many) |
Hard |
Average (use interactive mode) |
| The language used to write the parser generator |
C |
Ocaml |
Ocaml |
C++ |
Ocaml |
Ocaml |