summaryrefslogtreecommitdiff
path: root/lib/configuration/generate_errors.sh
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-03-27 08:48:05 +0100
committerSébastien Dailly <sebastien@dailly.me>2026-03-27 08:48:05 +0100
commit830e7c5d27d161b91402414e6ecd49f1ed818bfb (patch)
tree448864635d29b1ea66424cbb9e0816fbcf1e1907 /lib/configuration/generate_errors.sh
Initial commit
Diffstat (limited to 'lib/configuration/generate_errors.sh')
-rwxr-xr-xlib/configuration/generate_errors.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/configuration/generate_errors.sh b/lib/configuration/generate_errors.sh
new file mode 100755
index 0000000..4c7233d
--- /dev/null
+++ b/lib/configuration/generate_errors.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# Generate the error file with the helper messages. This script is required
+# when the syntax is modified because menhir will change the state number and
+# we need to make it match with the comment in the messages.
+
+menhir --list-errors *.mly --base expression_parser.mly > all_errors
+menhir --merge-errors expression_parser.messages --merge-errors all_errors *.mly --base parser.mly > expression_parser.messages_new