Skip to content

Commit

Permalink
For uniformity, rename [make list-errors] to [make list-parse-errors].
Browse files Browse the repository at this point in the history
  • Loading branch information
fpottier committed Dec 16, 2020
1 parent f45bdcd commit b0a4993
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Makefile.menhir
Expand Up @@ -181,7 +181,7 @@ interpret-menhir:
--interpret-show-cst \
--trace \

## list-errors
## list-parse-errors

# This rule runs Menhir's reachability analysis, which produces a list of all
# states where a syntax error can be detected (and a corresponding list of of
Expand All @@ -197,8 +197,8 @@ interpret-menhir:
# grammar to produce the sentences, and once on the original grammar to update
# the auto-comments (which would otherwise be incorrect).

.PHONY: list-errors
list-errors:
.PHONY: list-parse-errors
list-parse-errors:
@ tmp=`mktemp -d /tmp/parser.XXXX` && \
sed -e '/BEGIN AVOID/,/END AVOID/d' parsing/parser.mly > $$tmp/parser.mly && \
$(MENHIR) $(MENHIRBASICFLAGS) $$tmp/parser.mly \
Expand All @@ -213,7 +213,7 @@ list-errors:

## generate-parse-errors

# This rule assumes that [make list-errors] has been run first.
# This rule assumes that [make list-parse-errors] has been run first.

# This rule turns the error sentences stored in parsing/parser.auto.messages
# into one .ml file.
Expand Down
4 changes: 2 additions & 2 deletions parsing/parser.mly
Expand Up @@ -15,7 +15,7 @@

/* The parser definition */

/* The commands [make list-errors] and [make generate-parse-errors]
/* The commands [make list-parse-errors] and [make generate-parse-errors]
run Menhir on a modified copy of the parser where every block of
text comprised between the markers [BEGIN AVOID] and -----------
[END AVOID] has been removed. This file should be formatted in
Expand Down Expand Up @@ -2513,7 +2513,7 @@ let_binding_body:
/* BEGIN AVOID */
| val_ident %prec below_HASH
{ (mkpatvar ~loc:$loc $1, mkexpvar ~loc:$loc $1, true) }
(* The production that allows puns is marked so that [make list-errors]
(* The production that allows puns is marked so that [make list-parse-errors]
does not attempt to exploit it. That would be problematic because it
would then generate bindings such as [let x], which are rejected by the
auxiliary function [addlb] via a call to [syntax_error]. *)
Expand Down

0 comments on commit b0a4993

Please sign in to comment.