From a25078ff9d62ba75ff9ba78eb149a03586154556 Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Wed, 23 Jul 2014 11:24:12 -0400 Subject: [PATCH] Remove unused empty production for `litsq_zq` in texvccheck It is impossible to take the empty alternative for this production, since any input which matches `litsq_aq` would instead match `lit_aq` if the empty alternative is used. In addition, there is no action clause for the empty alternative, so it wouldn't typecheck if the empty alternative was possible. This has no effect on the generated parser, but clarifies the grammar (and makes ports easier!). Change-Id: I32c85d2c74ab047b4b52401248d5dc7fc3201705 --- texvccheck/parser.mly | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/texvccheck/parser.mly b/texvccheck/parser.mly index d1254bb..51e240c 100644 --- a/texvccheck/parser.mly +++ b/texvccheck/parser.mly @@ -44,7 +44,7 @@ litsq_uq: litsq_dq: litsq_zq SUB lit { $1,$3 } litsq_zq: - | SQ_CLOSE { TEX_LITERAL sq_close_ri } + SQ_CLOSE { TEX_LITERAL sq_close_ri } expr_nosqc: /* */ { [] } | lit_aq expr_nosqc { $1 :: $2 }