diff options
| author | Jeremy Yallop <yallop@gmail.com> | 2016-05-31 20:20:46 +0100 |
|---|---|---|
| committer | Jeremy Yallop <yallop@gmail.com> | 2016-05-31 20:45:06 +0100 |
| commit | 54065bb1d08ff0e75ec2165543daa467dd4f207f (patch) | |
| tree | f4da415bb6688e5915ed9b0f8179bd574e8f1bee /yacc/mkpar.c | |
| parent | f54c38ba0c88a74b710ff392cf466c0427dc7b26 (diff) | |
| download | ocaml-54065bb1d08ff0e75ec2165543daa467dd4f207f.tar.gz | |
Add an -e option to ocamlyacc to reject grammars with conflicts.
Diffstat (limited to 'yacc/mkpar.c')
| -rw-r--r-- | yacc/mkpar.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/yacc/mkpar.c b/yacc/mkpar.c index 79b2f928bd..8064f5b3b1 100644 --- a/yacc/mkpar.c +++ b/yacc/mkpar.c @@ -47,7 +47,11 @@ void make_parser(void) find_final_state(); remove_conflicts(); unused_rules(); - if (SRtotal + RRtotal > 0) total_conflicts(); + if (SRtotal + RRtotal > 0) { + total_conflicts(); + if (eflag) + forbidden_conflicts(); + } defreds(); } |
