New entry `make interpret-menhir`, to help understand and debug the parser.

master
François Pottier 2018-10-03 09:30:19 +02:00 committed by François Pottier
parent fe0b3f3dfb
commit a4419a8f87
1 changed files with 14 additions and 0 deletions

View File

@ -145,3 +145,17 @@ depend-menhir:
# define in Makefile, so it can only be invoked from the main Makefile
include .depend.menhir
## interpret-menhir
# This rule runs Menhir in interactive mode.
# The user can enter sentences, such as:
# implementation: TYPE LIDENT EQUAL LIDENT EOF
# and see how Menhir interprets them.
interpret-menhir:
@ echo "Please wait, I am building the LALR automaton..."
@ $(MENHIR) $(MENHIRFLAGS) parsing/parser.mly \
--interpret \
--interpret-show-cst \
--trace \