aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxlu_cfg_y.y
diff options
context:
space:
mode:
authorIan Jackson <Ian.Jackson@eu.citrix.com>2012-09-14 10:25:15 +0100
committerIan Jackson <Ian.Jackson@eu.citrix.com>2012-09-14 10:25:15 +0100
commit3e71234b6a0587c370c6573c5efa6fcbf13a6877 (patch)
tree381d6bf5b06aa4828037a1a31c195c90a03a97fe /tools/libxl/libxlu_cfg_y.y
parent9d3a9e4d734bfe371891d1d3446c4cdaa57a45f0 (diff)
downloadxen-3e71234b6a0587c370c6573c5efa6fcbf13a6877.tar.gz
xen-3e71234b6a0587c370c6573c5efa6fcbf13a6877.tar.bz2
xen-3e71234b6a0587c370c6573c5efa6fcbf13a6877.zip
libxl: Tolerate xl config files missing trailing newline
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl/libxlu_cfg_y.y')
-rw-r--r--tools/libxl/libxlu_cfg_y.y12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/libxl/libxlu_cfg_y.y b/tools/libxl/libxlu_cfg_y.y
index 29aedca783..aa9f787d0e 100644
--- a/tools/libxl/libxlu_cfg_y.y
+++ b/tools/libxl/libxlu_cfg_y.y
@@ -44,14 +44,18 @@
%%
-file: /* empty */
- | file assignment
+file: stmts
+ | stmts assignment
-assignment: IDENT '=' value endstmt
- { xlu__cfg_set_store(ctx,$1,$3,@3.first_line); }
+stmts: /* empty */
+ | stmts stmt
+
+stmt: assignment endstmt
| endstmt
| error NEWLINE
+assignment: IDENT '=' value { xlu__cfg_set_store(ctx,$1,$3,@3.first_line); }
+
endstmt: NEWLINE
| ';'