diff options
author | Fred Drake <fdrake@acm.org> | 2002-03-15 23:21:37 +0000 |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2002-03-15 23:21:37 +0000 |
commit | 5381588073eced38d37a4cb5ab89d7bd9579b71c (patch) | |
tree | dc7860af56cc6a378032ed34735b1c331cf77cd4 /Doc/perl/python.perl | |
parent | 7fe80a108520479a62edd6adc5eef86f4a058341 (diff) | |
download | cpython-git-5381588073eced38d37a4cb5ab89d7bd9579b71c.tar.gz |
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.perl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl index 332f518666..92cf65564d 100644 --- a/Doc/perl/python.perl +++ b/Doc/perl/python.perl @@ -807,6 +807,18 @@ sub do_cmd_production{ . $_); } +sub do_cmd_productioncont{ + local($_) = @_; + my $defn = next_argument(); + return ("<tr valign=\"baseline\">\n" + . " <td> </td>\n" + . " <td> </td>\n" + . " <td><code>" + . translate_commands($defn) + . "</code></td></tr>" + . $_); +} + sub process_grammar_files{ my $lang; my $filename; @@ -847,6 +859,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; |