diff Doc/perl/python.perl @ 22316:cc788b3b21b6 2.2

Revise the markup related to the grammar productions to increase the level of predictability. This is not really "good" markup, but is arguably better than we had before. This closes SF bug #523117.
author Fred Drake <fdrake@acm.org>
date Fri, 15 Mar 2002 23:18:05 +0000
parents d30797e5cc1a
children 74de86418284
line wrap: on
line diff
--- a/Doc/perl/python.perl	Fri Mar 15 22:36:55 2002 +0000
+++ b/Doc/perl/python.perl	Fri Mar 15 23:18:05 2002 +0000
@@ -805,6 +805,18 @@
             . $_);
 }
 
+sub do_cmd_productioncont{
+    local($_) = @_;
+    my $defn = next_argument();
+    return ("<tr valign=\"baseline\">\n"
+            . "    <td>&nbsp;</td>\n"
+            . "    <td>&nbsp;</td>\n"
+            . "    <td><code>"
+            . translate_commands($defn)
+            . "</code></td></tr>"
+            . $_);
+}
+
 sub process_grammar_files{
     my $lang;
     my $filename;
@@ -845,6 +857,7 @@
 
 sub strip_grammar_markup{
     local($_) = @_;
+    s/\\productioncont/              /g;
     s/\\production(<<\d+>>)(.+)\1/\n\2 ::= /g;
     s/\\token(<<\d+>>)(.+)\1/\2/g;
     s/\\e([^a-zA-Z])/\\\1/g;