From 5381588073eced38d37a4cb5ab89d7bd9579b71c Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 15 Mar 2002 23:21:37 +0000 Subject: 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. --- Doc/perl/python.perl | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Doc/perl/python.perl') 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 ("\n" + . "  \n" + . "  \n" + . " " + . translate_commands($defn) + . "" + . $_); +} + 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; -- cgit v1.2.1