[Pkg-libvirt-commits] [libguestfs] 89/233: builder: allow more empty lines in index files

Hilko Bengen bengen at moszumanska.debian.org
Wed Feb 19 21:11:20 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit 4505f61979a9737da53cdad419ae6d22538780d5
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Tue Jan 21 17:54:23 2014 +0100

    builder: allow more empty lines in index files
    
    Improve the index grammar to allow more than one empty line between
    sections, and to allow any number of empty lines at the end of the file
    (after the last section).
---
 builder/index-parse.y | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/builder/index-parse.y b/builder/index-parse.y
index f5e551b..a8d2f62 100644
--- a/builder/index-parse.y
+++ b/builder/index-parse.y
@@ -80,10 +80,10 @@ index:
         { parsed_index = $2; }
 
 sections:
-      section
+      section emptylines
         { $$ = $1; }
-    | section EMPTY_LINE sections
-        { $$ = $1; $$->next = $3; }
+    | section EMPTY_LINE emptylines sections
+        { $$ = $1; $$->next = $4; }
 
 section:
       SECTION_HEADER fields
@@ -113,6 +113,12 @@ continuations:
           free ($1);
           free ($2); }
 
+emptylines:
+      /* empty */
+        {}
+    | EMPTY_LINE emptylines
+        {}
+
 %%
 
 void

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list