summaryrefslogtreecommitdiff
path: root/yacc
diff options
context:
space:
mode:
authorNicolas Ojeda Bar <nicolas.ojeda.bar@lexifi.com>2016-07-05 11:42:21 +0200
committerNicolas Ojeda Bar <nicolas.ojeda.bar@lexifi.com>2016-07-05 11:42:21 +0200
commit318d9c9b415716dc1326963e9d3d6ba3c7118aa3 (patch)
tree5f18508af41ec5a9c587775cb7e596ae79bf293d /yacc
parent17cc980be3f8fc59764a9ada968fdcd984b6b636 (diff)
downloadocaml-318d9c9b415716dc1326963e9d3d6ba3c7118aa3.tar.gz
ocamlyacc: output verbose file before failing on --strict.
Diffstat (limited to 'yacc')
-rw-r--r--yacc/main.c1
-rw-r--r--yacc/mkpar.c6
2 files changed, 2 insertions, 5 deletions
diff --git a/yacc/main.c b/yacc/main.c
index 7882781c45..e7606dae44 100644
--- a/yacc/main.c
+++ b/yacc/main.c
@@ -462,6 +462,7 @@ int main(int argc, char **argv)
lalr();
make_parser();
verbose();
+ if (eflag && SRtotal + RRtotal > 0) forbidden_conflicts();
output();
done(0);
/*NOTREACHED*/
diff --git a/yacc/mkpar.c b/yacc/mkpar.c
index 8064f5b3b1..79b2f928bd 100644
--- a/yacc/mkpar.c
+++ b/yacc/mkpar.c
@@ -47,11 +47,7 @@ void make_parser(void)
find_final_state();
remove_conflicts();
unused_rules();
- if (SRtotal + RRtotal > 0) {
- total_conflicts();
- if (eflag)
- forbidden_conflicts();
- }
+ if (SRtotal + RRtotal > 0) total_conflicts();
defreds();
}