summaryrefslogtreecommitdiffstats
path: root/Doc/perl/python.perl
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-03-15 23:18:05 (GMT)
committerFred Drake <fdrake@acm.org>2002-03-15 23:18:05 (GMT)
commit487b17d2c1f3c3b88800815f1e70d1027a19e4b5 (patch)
tree47e1e3c364298d859aa1183c8d35aedf3a04d489 /Doc/perl/python.perl
parent03efe0399ca57f28eb55d76003a1f2627f66ccea (diff)
downloadcpython-487b17d2c1f3c3b88800815f1e70d1027a19e4b5.zip
cpython-487b17d2c1f3c3b88800815f1e70d1027a19e4b5.tar.gz
cpython-487b17d2c1f3c3b88800815f1e70d1027a19e4b5.tar.bz2
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.
Diffstat (limited to 'Doc/perl/python.perl')
-rw-r--r--Doc/perl/python.perl13
1 files changed, 13 insertions, 0 deletions
diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl
index 176e90b..e54015d 100644
--- a/Doc/perl/python.perl
+++ b/Doc/perl/python.perl
@@ -805,6 +805,18 @@ sub do_cmd_production{
. $_);
}
+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 process_grammar_files{
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;