aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxlu_cfg_i.h
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-03-03 17:39:22 +0000
committerKeir Fraser <keir.fraser@citrix.com>2010-03-03 17:39:22 +0000
commitb104c3762dcbe310318a14bed35f0813db48a26d (patch)
tree6ec4448b8b7c28e306348ebad1b41a4555ff83f7 /tools/libxl/libxlu_cfg_i.h
parent24c2f2ccee02f7bf83bf8a9ffdb204cf8d40c653 (diff)
downloadxen-b104c3762dcbe310318a14bed35f0813db48a26d.tar.gz
xen-b104c3762dcbe310318a14bed35f0813db48a26d.tar.bz2
xen-b104c3762dcbe310318a14bed35f0813db48a26d.zip
Replace config file parser for "xl"
This provides a replacement config file parser for "xl" based on bison and flex. Benefits: * proper error reporting with line numbers * parser can understand nearly all "xm" configuration files directly (doesn't understand Python code but should do everything else) * parser also understands the ;-infested "xl" style files * removes the dependency on libconfig * better checking for certain kinds of mistakes * eliminates the strange "massage file and try again" code This is intended to support all config files currently supported by "xl" and almost all files supported by "xm". (NB that whether a feature works depends on the implementation of that feature in xl/libxl of course.) This patch also introduces a new library "libxlutil" which is mainly for the benefit of "xl". Users of libxl do not need to use libxlutil, but they can do so if they want to parse "xl" files without being "xl". Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxlu_cfg_i.h')
-rw-r--r--tools/libxl/libxlu_cfg_i.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/libxl/libxlu_cfg_i.h b/tools/libxl/libxlu_cfg_i.h
new file mode 100644
index 0000000000..f6b241cf09
--- /dev/null
+++ b/tools/libxl/libxlu_cfg_i.h
@@ -0,0 +1,25 @@
+#ifndef LIBXLU_CFG_I_H
+#define LIBXLU_CFG_I_H
+
+#include "libxlu_internal.h"
+#include "libxlu_cfg_y.h"
+
+void xlu__cfg_set_free(XLU_ConfigSetting *set);
+XLU_ConfigSetting *xlu__cfg_set_mk(CfgParseContext*, int alloc, char *atom);
+void xlu__cfg_set_add(CfgParseContext*, XLU_ConfigSetting *set, char *atom);
+void xlu__cfg_set_store(CfgParseContext*, char *name,
+ XLU_ConfigSetting *set, int lineno);
+
+char *xlu__cfgl_strdup(CfgParseContext*, const char *src);
+char *xlu__cfgl_dequote(CfgParseContext*, const char *src);
+
+void xlu__cfg_yyerror(YYLTYPE *locp, CfgParseContext*, char const *msg);
+void xlu__cfgl_lexicalerror(CfgParseContext*, char const *msg);
+
+
+
+/* Why oh why does bison not declare this in its autogenerated .h ? */
+int xlu__cfg_yyparse(CfgParseContext *ctx);
+
+
+#endif /*LIBXLU_CFG_I_H*/