X-Git-Url: https://git.distorted.org.uk/~mdw/mdwtools/blobdiff_plain/e8e9e5d812460c19d276d9449a1792e2b384eb20..7b2adc290673aa432bbbecd130473d38408961e4:/syntax.dtx

diff --git a/syntax.dtx b/syntax.dtx
index c6f04db..1b1965f 100644
--- a/syntax.dtx
+++ b/syntax.dtx
@@ -1358,8 +1358,8 @@
 % commands.  Well, almost \dots
 %
 %    \begin{macrocode}
-\newcommand{\grammarlabel}[2]{%
-  \synt{#1} \hfill#2%
+\newcommand{\grammarlabel}[3][]{%
+  \synt{#2}#1 \hfill#3%
 }
 %    \end{macrocode}
 %
@@ -1372,8 +1372,8 @@
 % strut just makes sure that I know exactly how high the line is.
 %
 %    \begin{macrocode}
-\def\gr@implitem<#1> #2 {%
-  \sbox\z@{\hskip\labelsep\grammarlabel{#1}{#2}}%
+\def\gr@implitem<#1>#2 #3 {%
+  \sbox\z@{\hskip\labelsep\grammarlabel[{#2}]{#1}{#3}}%
   \strut\@@par%
   \vskip-\parskip%
   \vskip-\baselineskip%
