From 16bb41934c1258282170e7773e36fe7ffad3cfdc Mon Sep 17 00:00:00 2001
From: Fred Drake <fdrake@acm.org>
Date: Mon, 20 Aug 2001 21:36:38 +0000
Subject: New \grammartoken markup, similar to \token but allowed everywhere.

---
 Doc/perl/python.perl     | 4 ++++
 Doc/texinputs/python.sty | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl
index f5363c6..2f86de6 100644
--- a/Doc/perl/python.perl
+++ b/Doc/perl/python.perl
@@ -716,6 +716,10 @@ sub do_cmd_token{
     return "<a href=\"$target\">$token</a>" . $_;
 }
 
+sub do_cmd_grammartoken{
+    return do_cmd_token(@_);
+}
+
 sub do_env_productionlist{
     local($_) = @_;
     my $lang = next_optional_argument();
diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty
index 6b892cb..f25041b 100644
--- a/Doc/texinputs/python.sty
+++ b/Doc/texinputs/python.sty
@@ -867,11 +867,13 @@
 \newcommand{\citetitle}[2][URL]{\emph{#2}}
 
 
+\newcommand{\grammartoken}[1]{\texttt{#1}}
 \newenvironment{productionlist}[1][\py@badkey]{
   \def\optional##1{{\Large[}##1{\Large]}}
   \def\production##1##2{\code{##1}&::=&\code{##2}\\}
   \def\orgroup##1{{\def\or{\textbar\ }##1}}
   \def\token##1{##1}
+  \let\grammartoken=\token
   \begin{center}
     \begin{tabular}{lcl}
 }{%
-- 
cgit v0.12

