mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
examples: add empty lines
Currently the examples are too dense, let's put empty lines where '#line' would be issued. And also remove some spurious empty lines (remains from @group, @end group, etc.). * examples/extexi: Do that. * examples/local.mk (extexiFLAGS): Rename as... (EXTEXIFLAGS): this.
This commit is contained in:
@@ -45,7 +45,7 @@ sub normalize($)
|
|||||||
{
|
{
|
||||||
local ($_) = @_;
|
local ($_) = @_;
|
||||||
|
|
||||||
s/^\@(c |comment|dots|end (ignore|group)|ignore|group).*//mg;
|
s/^\@(c |comment|dots|end (ignore|group)|ignore|group).*\n//mg;
|
||||||
s/\@value\{VERSION\}/$ENV{VERSION}/g;
|
s/\@value\{VERSION\}/$ENV{VERSION}/g;
|
||||||
s/^\@(error|result)\{\}//mg;
|
s/^\@(error|result)\{\}//mg;
|
||||||
s/\@([{}@])/$1/g;
|
s/\@([{}@])/$1/g;
|
||||||
@@ -103,6 +103,7 @@ sub process ($)
|
|||||||
{
|
{
|
||||||
if (/^\@(small)?example$/)
|
if (/^\@(small)?example$/)
|
||||||
{
|
{
|
||||||
|
$input .= "\n" unless defined $input;
|
||||||
# Bison supports synclines, but not Flex.
|
# Bison supports synclines, but not Flex.
|
||||||
$input .= sprintf ("#line %s \"$in\"\n", $. + 1)
|
$input .= sprintf ("#line %s \"$in\"\n", $. + 1)
|
||||||
if $synclines && $file =~ /\.[chy]*$/;
|
if $synclines && $file =~ /\.[chy]*$/;
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ AM_CXXFLAGS = \
|
|||||||
doc = $(top_srcdir)/doc/bison.texi
|
doc = $(top_srcdir)/doc/bison.texi
|
||||||
extexi = $(top_srcdir)/%D%/extexi
|
extexi = $(top_srcdir)/%D%/extexi
|
||||||
if ENABLE_GCC_WARNINGS
|
if ENABLE_GCC_WARNINGS
|
||||||
extexiFLAGS = --synclines
|
EXTEXIFLAGS = --synclines
|
||||||
endif
|
endif
|
||||||
extract = VERSION="$(VERSION)" $(PERL) $(extexi) $(extexiFLAGS) $(doc) --
|
extract = VERSION="$(VERSION)" $(PERL) $(extexi) $(EXTEXIFLAGS) $(doc) --
|
||||||
extracted =
|
extracted =
|
||||||
CLEANFILES += $(extracted) %D%/extracted.stamp
|
CLEANFILES += $(extracted) %D%/extracted.stamp
|
||||||
%D%/extracted.stamp: $(doc) $(extexi)
|
%D%/extracted.stamp: $(doc) $(extexi)
|
||||||
|
|||||||
Reference in New Issue
Block a user