Skip to content

Commit 27346eb

Browse files
committed
Rename ocamlyacc's -e option --strict.
1 parent ec008de commit 27346eb

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Makefile.shared

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ COMPFLAGS=-strict-sequence -principal -absname -w +a-4-9-41-42-44-45-48 -warn-er
2929
-bin-annot -safe-string -strict-formats $(INCLUDES)
3030
LINKFLAGS=
3131

32-
YACCFLAGS=-v -e
32+
YACCFLAGS=-v --strict
3333
CAMLLEX=$(CAMLRUN) boot/ocamllex
3434
CAMLDEP=$(CAMLRUN) tools/ocamldep
3535
DEPFLAGS=$(INCLUDES)

yacc/error.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ void polymorphic_entry_point(char *s)
317317
void forbidden_conflicts(void)
318318
{
319319
fprintf(stderr,
320-
"%s: the grammar has conflicts, but -e was specified\n",
320+
"%s: the grammar has conflicts, but --strict was specified\n",
321321
myname);
322322
done(1);
323323
}

yacc/main.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ void set_signals(void)
161161

162162
void usage(void)
163163
{
164-
fprintf(stderr, "usage: %s [-v] [-e] [-q] [-b file_prefix] filename\n",
164+
fprintf(stderr, "usage: %s [-v] [--strict] [-q] [-b file_prefix] filename\n",
165165
myname);
166166
exit(1);
167167
}
@@ -185,6 +185,10 @@ void getargs(int argc, char **argv)
185185
return;
186186

187187
case '-':
188+
if (!strcmp (argv[i], "--strict")){
189+
eflag = 1;
190+
goto end_of_option;
191+
}
188192
++i;
189193
goto no_more_options;
190194

@@ -214,10 +218,6 @@ void getargs(int argc, char **argv)
214218
usage();
215219
continue;
216220

217-
case 'e':
218-
eflag = 1;
219-
continue;
220-
221221
default:
222222
usage();
223223
}

0 commit comments

Comments
 (0)