diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2018-08-19 17:34:27 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2018-08-19 17:47:59 +0200 |
commit | 32e0fd1a99308d5311ec8508b558cb2401863d23 (patch) | |
tree | dcb0e139c93f43951f9cd2ebdba8647143c94e6a | |
parent | b610f43f25aa16d591f6a6b5bf36784050ede651 (diff) | |
download | bison-32e0fd1a99308d5311ec8508b558cb2401863d23.tar.gz |
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.
-rwxr-xr-x | examples/extexi | 3 | ||||
-rw-r--r-- | examples/local.mk | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/examples/extexi b/examples/extexi index 40d16e38..95c6c395 100755 --- a/examples/extexi +++ b/examples/extexi @@ -45,7 +45,7 @@ sub normalize($) { 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/^\@(error|result)\{\}//mg; s/\@([{}@])/$1/g; @@ -103,6 +103,7 @@ sub process ($) { if (/^\@(small)?example$/) { + $input .= "\n" unless defined $input; # Bison supports synclines, but not Flex. $input .= sprintf ("#line %s \"$in\"\n", $. + 1) if $synclines && $file =~ /\.[chy]*$/; diff --git a/examples/local.mk b/examples/local.mk index 13f8d492..2518da34 100644 --- a/examples/local.mk +++ b/examples/local.mk @@ -26,9 +26,9 @@ AM_CXXFLAGS = \ doc = $(top_srcdir)/doc/bison.texi extexi = $(top_srcdir)/%D%/extexi if ENABLE_GCC_WARNINGS -extexiFLAGS = --synclines +EXTEXIFLAGS = --synclines endif -extract = VERSION="$(VERSION)" $(PERL) $(extexi) $(extexiFLAGS) $(doc) -- +extract = VERSION="$(VERSION)" $(PERL) $(extexi) $(EXTEXIFLAGS) $(doc) -- extracted = CLEANFILES += $(extracted) %D%/extracted.stamp %D%/extracted.stamp: $(doc) $(extexi) |