Skip to contentSkip to conversation

Reducing visibility and cleanup of .cfg parsing symbols

PATCH In review Elliott Mitchell 1 participant 9 messages Jul 19, 2023

lore
Share & tools
lore
#0 lore raw

cover Reducing visibility and cleanup of .cfg parsing symbols

These patches started as an effort to try to isolate the layers of the domain configuration file parsing. Theory being it might be possible to replace the lowest layer with something better.

I noticed libxlutil.h isn't very consistent. Some functions were naming the configuration argument "cfg" and some were leaving it unnamed. There were also some very short names.

Then inside tools/libs/util, far too much layer-specific detail was in the headers and didn't need to be. Turned out most things in libxlu_internal.h didn't even need to be in a header. Then some portions should have been in other headers since they didn't need to be so visible.

There are a bunch of headers in tools/libs/util. Due to their number I need a guess as to their intended purpose. I've concluded "libxlu_internal.h" is meant to be a general utility header for anything used by multiple layers. I've concluded the *_i.h headers are meant to be isolated to specific layers.

Elliott Mitchell (7):
tools/utils: cleanup formatting of libxlutil.h tools/utils: rename "n" arguments to "key"
tools/utils: move XLU_Operation to libxlu_cfg_i.h.h tools/utils: introduce xlu_cfg_printf() function tools/utils: move XLU_ConfigSetting & xlu__cfg_set_free() to
libxl_cfg.c
tools/utils: remove libxlu_cfg_i.h from libxlu_disk.c tools/utils: move remaining lower-layer data from libxlu_internal.h

 tools/include/libxlutil.h         | 31 +++++++++-----------
 tools/libs/util/libxlu_cfg.c      | 37 ++++++++++++++++++++++--
 tools/libs/util/libxlu_cfg_i.h    | 37 +++++++++++++++++++++++-
 tools/libs/util/libxlu_disk.c     | 15 ++++------
 tools/libs/util/libxlu_internal.h | 47 ++-----------------------------
 tools/libs/util/libxlu_pci.c      |  3 +-
 tools/libs/util/libxlu_vif.c      |  4 +--
 7 files changed, 94 insertions(+), 80 deletions(-)
Signature · 1 line
2.30.2
#1 lore raw

PATCH 1/7 tools/utils: cleanup formatting of libxlutil.h

Some arguments included a name, but not all did. Now use "cfg" for all uses of XLU_Config * and "list" for uses of XLU_ConfigList *.

Also fix some spaces missing from xlu_cfg_get_defbool()'s prototype.

Rename the "b" argument of xlu_cfg_get_defbool() to "value_r". Similar to other functions this is where the returned value is stored.

---
 tools/include/libxlutil.h | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
tools/include/libxlutil.h +11 -11
index 4dd3c5e92b..fcbe41b15a 100644
@@ -40,12 +40,12 @@ XLU_Config *xlu_cfg_init(FILE *report, const char *report_filename);
   /* report_filename is copied; report is saved and must remain valid
    *  until the Config is destroyed. */
 
-int xlu_cfg_readfile(XLU_Config*, const char *real_filename);
-int xlu_cfg_readdata(XLU_Config*, const char *data, int length);
+int xlu_cfg_readfile(XLU_Config *cfg, const char *real_filename);
+int xlu_cfg_readdata(XLU_Config *cfg, const char *data, int length);
   /* If these fail, then it is undefined behaviour to call xlu_cfg_get_...
    * functions.  You have to just xlu_cfg_destroy. */
 
-void xlu_cfg_destroy(XLU_Config*);
+void xlu_cfg_destroy(XLU_Config *cfg);
 
 
 /* All of the following print warnings to "report" if there is a problem.
@@ -56,26 +56,26 @@ void xlu_cfg_destroy(XLU_Config*);
  *   ERANGE   value out of range (from strtol)
  */
 
-int xlu_cfg_get_string(const XLU_Config*, const char *n, const char **value_r,
-                       int dont_warn);
+int xlu_cfg_get_string(const XLU_Config *cfg, const char *n,
+                       const char **value_r, int dont_warn);
 /* free/strdup version */
 int xlu_cfg_replace_string(const XLU_Config *cfg, const char *n,
                            char **value_r, int dont_warn);
-int xlu_cfg_get_long(const XLU_Config*, const char *n, long *value_r,
+int xlu_cfg_get_long(const XLU_Config *cfg, const char *n, long *value_r,
                      int dont_warn);
-int xlu_cfg_get_bounded_long(const XLU_Config*, const char *n, long min,
+int xlu_cfg_get_bounded_long(const XLU_Config *cfg, const char *n, long min,
                              long max, long *value_r, int dont_warn);
-int xlu_cfg_get_defbool(const XLU_Config*, const char *n, libxl_defbool *b,
-                     int dont_warn);
+int xlu_cfg_get_defbool(const XLU_Config *cfg, const char *n,
+                        libxl_defbool *value_r, int dont_warn);
 
-int xlu_cfg_get_list(const XLU_Config*, const char *n,
+int xlu_cfg_get_list(const XLU_Config *cfg, const char *n,
                      XLU_ConfigList **list_r /* may be 0 */,
                      int *entries_r /* may be 0 */,
                      int dont_warn);
   /* there is no need to free *list_r; lifetime is that of the XLU_Config */
 int xlu_cfg_get_list_as_string_list(const XLU_Config *cfg, const char *n,
                                     libxl_string_list *sl, int dont_warn);
-const char *xlu_cfg_get_listitem(const XLU_ConfigList*, int entry);
+const char *xlu_cfg_get_listitem(const XLU_ConfigList *list, int entry);
   /* xlu_cfg_get_listitem cannot fail, except that if entry is
    * out of range it returns 0 (not setting errno) */
 
Signature · 1 line
2.30.2
#2 lore raw

PATCH 2/7 tools/utils: rename "n" arguments to "key"

In reply to Elliott Mitchell

Hopefully make it clearer to others this is the key associated with the storage value to retrieve.

---
 tools/include/libxlutil.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
tools/include/libxlutil.h +7 -7
index fcbe41b15a..0ce66c2096 100644
@@ -56,24 +56,24 @@ void xlu_cfg_destroy(XLU_Config *cfg);
  *   ERANGE   value out of range (from strtol)
  */
 
-int xlu_cfg_get_string(const XLU_Config *cfg, const char *n,
+int xlu_cfg_get_string(const XLU_Config *cfg, const char *key,
                        const char **value_r, int dont_warn);
 /* free/strdup version */
-int xlu_cfg_replace_string(const XLU_Config *cfg, const char *n,
+int xlu_cfg_replace_string(const XLU_Config *cfg, const char *key,
                            char **value_r, int dont_warn);
-int xlu_cfg_get_long(const XLU_Config *cfg, const char *n, long *value_r,
+int xlu_cfg_get_long(const XLU_Config *cfg, const char *key, long *value_r,
                      int dont_warn);
-int xlu_cfg_get_bounded_long(const XLU_Config *cfg, const char *n, long min,
+int xlu_cfg_get_bounded_long(const XLU_Config *cfg, const char *key, long min,
                              long max, long *value_r, int dont_warn);
-int xlu_cfg_get_defbool(const XLU_Config *cfg, const char *n,
+int xlu_cfg_get_defbool(const XLU_Config *cfg, const char *key,
                         libxl_defbool *value_r, int dont_warn);
 
-int xlu_cfg_get_list(const XLU_Config *cfg, const char *n,
+int xlu_cfg_get_list(const XLU_Config *cfg, const char *key,
                      XLU_ConfigList **list_r /* may be 0 */,
                      int *entries_r /* may be 0 */,
                      int dont_warn);
   /* there is no need to free *list_r; lifetime is that of the XLU_Config */
-int xlu_cfg_get_list_as_string_list(const XLU_Config *cfg, const char *n,
+int xlu_cfg_get_list_as_string_list(const XLU_Config *cfg, const char *key,
                                     libxl_string_list *sl, int dont_warn);
 const char *xlu_cfg_get_listitem(const XLU_ConfigList *list, int entry);
   /* xlu_cfg_get_listitem cannot fail, except that if entry is
Signature · 1 line
2.30.2
#3 lore raw

PATCH 3/7 tools/utils: move XLU_Operation to libxlu_cfg_i.h.h

In reply to Elliott Mitchell

This enumerated value is never used outside of the lowest layer of the configuration parser. As such, move to the internal header.

Fixes a30910bfd7 ("libxlu: Handle += in config files")

---
I'm unsure whether this is fixing a30910bfd7. Placing XLU_Operation in libxlutil.h was certainly erroneous, but it is quite unlikely to directly result in actual bugs.

---
 tools/include/libxlutil.h      | 5 -----
 tools/libs/util/libxlu_cfg_i.h | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)
tools/include/libxlutil.h +0 -5
index 0ce66c2096..de57ca4200 100644
@@ -25,11 +25,6 @@ enum XLU_ConfigValueType {
     XLU_LIST,
 };
 
-enum XLU_Operation {
-    XLU_OP_ASSIGNMENT = 0,
-    XLU_OP_ADDITION,
-};
-
 /* Unless otherwise stated, all functions return an errno value. */
 typedef struct XLU_Config XLU_Config;
 typedef struct XLU_ConfigList XLU_ConfigList;
tools/libs/util/libxlu_cfg_i.h +5 -0
index 4217f5b28d..3d1e4ed568 100644
@@ -21,6 +21,11 @@
 #include "libxlu_internal.h"
 #include "libxlu_cfg_y.h"
 
+enum XLU_Operation {
+    XLU_OP_ASSIGNMENT = 0,
+    XLU_OP_ADDITION,
+};
+
 void xlu__cfg_set_free(XLU_ConfigSetting *set);
 void xlu__cfg_set_store(CfgParseContext*, char *name,
                         enum XLU_Operation op,
Signature · 1 line
2.30.2
#4 lore raw

PATCH 4/7 tools/utils: introduce xlu_cfg_printf() function

In reply to Elliott Mitchell

Isolate the lower layer configuration handling from the upper layer. Now only the lowest layer of configuration handling looks inside XLU_Config.

Also make error messages a bit more consistent. Now PCI device parsing will report filename.

---
Someone else can decide where xlu__disk_err() should have its linebreaks and indentation. That string isn't very good.

I'm wondering about the return codes. *printf() can return errors, but so many places are ignoring them. If the output is a console the errors are fairly unlikely, but full storage does happen.

---
 tools/libs/util/libxlu_cfg.c      | 25 +++++++++++++++++++++++++
 tools/libs/util/libxlu_disk.c     | 14 +++++---------
 tools/libs/util/libxlu_internal.h |  9 +++------
 tools/libs/util/libxlu_pci.c      |  3 +--
 tools/libs/util/libxlu_vif.c      |  4 +---
 5 files changed, 35 insertions(+), 20 deletions(-)
tools/libs/util/libxlu_cfg.c +25 -0
index 874f5abfb9..b2947cbfc9 100644
@@ -18,12 +18,19 @@
 #define _GNU_SOURCE
 
 #include <limits.h>
+#include <stdarg.h>
 
 #include "libxlu_internal.h"
 #include "libxlu_cfg_y.h"
 #include "libxlu_cfg_l.h"
 #include "libxlu_cfg_i.h"
 
+struct XLU_Config {
+    XLU_ConfigSetting *settings;
+    FILE *report;
+    char *config_source;
+};
+
 XLU_Config *xlu_cfg_init(FILE *report, const char *report_source) {
     XLU_Config *cfg;
 
@@ -703,6 +710,24 @@ void xlu__cfg_yyerror(YYLTYPE *loc, CfgParseContext *ctx, char const *msg) {
     if (!ctx->err) ctx->err= EINVAL;
 }
 
+int xlu_cfg_printf(XLU_Config *cfg, const char *format, ...)
+{
+	va_list args;
+	int ret;
+
+	if (!cfg || !cfg->report)
+		return EFAULT;
+
+	fwrite(cfg->config_source, 1, strlen(cfg->config_source), cfg->report);
+	fwrite(": ", 2, 1, cfg->report);
+
+	va_start(args, format);
+	ret = vfprintf(cfg->report, format, args);
+	va_end(args);
+
+	return ret;
+}
+
 /*
  * Local variables:
  * mode: C
tools/libs/util/libxlu_disk.c +5 -9
index 1de16a6a06..a4d08ab7e9 100644
@@ -5,13 +5,10 @@
 
 void xlu__disk_err(DiskParseContext *dpc, const char *erroneous,
                    const char *message) {
-    fprintf(dpc->cfg->report,
-            "%s: config parsing error in disk specification: %s"
-            "%s%s%s"
-            " in `%s'\n",
-            dpc->cfg->config_source, message,
-            erroneous?": near `":"", erroneous?erroneous:"", erroneous?"'":"",
-            dpc->spec);
+    xlu_cfg_printf(dpc->cfg,
+            "config parsing error in disk specification: %s%s%s%s in `%s'\n",
+            message, erroneous?": near `":"", erroneous?erroneous:"",
+            erroneous?"'":"", dpc->spec);
     if (!dpc->err) dpc->err= EINVAL;
 }
 
@@ -29,8 +26,7 @@ static int dpc_prep(DiskParseContext *dpc, const char *spec) {
     return 0;
 
  fail:
-    fprintf(dpc->cfg->report, "cannot init disk scanner: %s\n",
-            strerror(errno));
+    xlu_cfg_printf(dpc->cfg, "cannot init disk scanner: %s\n", strerror(errno));
     return e;
 }
 
tools/libs/util/libxlu_internal.h +3 -6
index 1f7559ecd9..2ef5eb7f5e 100644
@@ -57,12 +57,6 @@ typedef struct XLU_ConfigSetting { /* transparent */
     int lineno;
 } XLU_ConfigSetting;
 
-struct XLU_Config {
-    XLU_ConfigSetting *settings;
-    FILE *report;
-    char *config_source;
-};
-
 typedef struct {
     XLU_Config *cfg;
     int err, lexerrlineno, likely_python;
@@ -73,6 +67,9 @@ typedef struct {
 #define STRINGIFY(x) #x
 #define TOSTRING(x) STRINGIFY(x)
 
+extern int xlu_cfg_printf(XLU_Config *cfg, const char *format, ...)
+    __attribute__((__format__ (__printf__, 2, 3)));
+
 #endif /*LIBXLU_INTERNAL_H*/
 
 /*
tools/libs/util/libxlu_pci.c +1 -2
index 294482c6d7..d6abbc1c1f 100644
@@ -5,8 +5,7 @@
 #include "libxlu_internal.h"
 
 
-#define XLU__PCI_ERR(_c, _x, _a...) \
-    if((_c) && (_c)->report) fprintf((_c)->report, _x, ##_a)
+#define XLU__PCI_ERR(_c, _x, _a...) xlu_cfg_printf((_c), _x, ##_a)
 
 static int parse_bdf(libxl_device_pci *pci, const char *str, const char **endp)
 {
tools/libs/util/libxlu_vif.c +1 -3
index ccf0cbdf57..93c449e213 100644
@@ -6,9 +6,7 @@ static const char *vif_bytes_per_sec_re = "^[0-9]+[GMK]?[Bb]/s$";
 static const char *vif_internal_usec_re = "^[0-9]+[mu]?s?$";
 
 static void xlu__vif_err(XLU_Config *cfg, const char *msg, const char *rate) {
-    fprintf(cfg->report,
-            "%s: config parsing error in vif: %s in `%s'\n",
-            cfg->config_source, msg, rate);
+    xlu_cfg_printf(cfg, "config parsing error in vif: %s in `%s'\n", msg, rate);
 }
 
 static int vif_parse_rate_bytes_per_sec(XLU_Config *cfg, const char *bytes,
Signature · 1 line
2.30.2
#5 lore raw

Re: [PATCH 4/7] tools/utils: introduce xlu_cfg_printf() function

tools/libs/util/libxlu_cfg.c line 24

Quoted 13 lines · Elliott Mitchell
tools/libs/util/libxlu_cfg.c +5 -0
index 874f5abfb9..b2947cbfc9 100644
@@ -18,12 +18,19 @@
 #include "libxlu_cfg_i.h"
 
+struct XLU_Config {
+    XLU_ConfigSetting *settings;
+    FILE *report;
+    char *config_source;
+};

When exploring further, for several places config_source being constant works better. The single exception is xlu_cfg_destroy() which would then need to cast it to void *.

Quoted 4 lines
tools/libs/util/libxlu_cfg.c +0 -0
@@ -703,6 +710,24 @@ void xlu__cfg_yyerror(YYLTYPE *loc, CfgParseContext *ctx, char const *msg) {
     if (!ctx->err) ctx->err= EINVAL;
 }
 

tools/libs/util/libxlu_cfg.c void xlu__cfg_yyerror(YYLTYPE *loc, CfgParseContext *ctx, char const *msg) { · line 722

Quoted 10 lines
tools/libs/util/libxlu_cfg.c +10 -0
+int xlu_cfg_printf(XLU_Config *cfg, const char *format, ...)
+{
+	va_list args;
+	int ret;
+
+	if (!cfg || !cfg->report)
+		return EFAULT;
+
+	fwrite(cfg->config_source, 1, strlen(cfg->config_source), cfg->report);
+	fwrite(": ", 2, 1, cfg->report);

The spots where this doesn't work so well are in libxlu_cfg.c. Several spots in libxlu_cfg.c use a format of "%s:%d: <message>" where the %d is a line number.

Two approaches come to mind to use xlu_cfg_printf() for those. First, those messages could be modified to include the space. Second, xlu_cfg_printf() could merely add the colon, but not the space.

I'm pretty sure the upsides and downsides to those approaches are obvious. Only issue is which the maintainers would prefer.

(either messages get modified, or else have to add the space in many places)

tools/libs/util/libxlu_internal.h typedef struct { · line 71

Quoted 10 lines
tools/libs/util/libxlu_internal.h +2 -0
index 1f7559ecd9..2ef5eb7f5e 100644
@@ -73,6 +67,9 @@ typedef struct {
 #define STRINGIFY(x) #x
 #define TOSTRING(x) STRINGIFY(x)
 
+extern int xlu_cfg_printf(XLU_Config *cfg, const char *format, ...)
+    __attribute__((__format__ (__printf__, 2, 3)));

Again, after a bit more experimentation, the first argument should be declared constant.

Hopefully 1-3 go through fine though.

Signature · 4 lines
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         [email protected]  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445
#6 lore raw

PATCH 5/7 tools/utils: move XLU_ConfigSetting & xlu__cfg_set_free() to libxl_cfg.c

In reply to Elliott Mitchell

XLU_ConfigSetting is only used inside libxl_cfg.c, so no need for it in the internal header.

Similarly, xlu__cfg_set_free() is no longer used outside libxl_cfg.c, so remove from header and redeclare static.

---
 tools/libs/util/libxlu_cfg.c      | 10 +++++++++-
 tools/libs/util/libxlu_cfg_i.h    |  1 -
 tools/libs/util/libxlu_internal.h |  8 --------
 3 files changed, 9 insertions(+), 10 deletions(-)
tools/libs/util/libxlu_cfg.c +9 -1
index b2947cbfc9..2979d775a6 100644
@@ -25,6 +25,14 @@
 #include "libxlu_cfg_l.h"
 #include "libxlu_cfg_i.h"
 
+typedef struct XLU_ConfigSetting { /* transparent */
+    struct XLU_ConfigSetting *next;
+    char *name;
+    XLU_ConfigValue *value;
+    enum XLU_Operation op;
+    int lineno;
+} XLU_ConfigSetting;
+
 struct XLU_Config {
     XLU_ConfigSetting *settings;
     FILE *report;
@@ -155,7 +163,7 @@ void xlu__cfg_value_free(XLU_ConfigValue *value)
     free(value);
 }
 
-void xlu__cfg_set_free(XLU_ConfigSetting *set) {
+static void xlu__cfg_set_free(XLU_ConfigSetting *set) {
     if (!set) return;
     free(set->name);
     xlu__cfg_value_free(set->value);
tools/libs/util/libxlu_cfg_i.h +0 -1
index 3d1e4ed568..7193867422 100644
@@ -26,7 +26,6 @@ enum XLU_Operation {
     XLU_OP_ADDITION,
 };
 
-void xlu__cfg_set_free(XLU_ConfigSetting *set);
 void xlu__cfg_set_store(CfgParseContext*, char *name,
                         enum XLU_Operation op,
                         XLU_ConfigValue *val, int lineno);
tools/libs/util/libxlu_internal.h +0 -8
index 2ef5eb7f5e..97303391c6 100644
@@ -49,14 +49,6 @@ struct XLU_ConfigValue {
     YYLTYPE loc;
 };
 
-typedef struct XLU_ConfigSetting { /* transparent */
-    struct XLU_ConfigSetting *next;
-    char *name;
-    XLU_ConfigValue *value;
-    enum XLU_Operation op;
-    int lineno;
-} XLU_ConfigSetting;
-
 typedef struct {
     XLU_Config *cfg;
     int err, lexerrlineno, likely_python;
Signature · 1 line
2.30.2
#7 lore raw

PATCH 6/7 tools/utils: remove libxlu_cfg_i.h from libxlu_disk.c

In reply to Elliott Mitchell

The upper layer disk string parser doesn't need the internals of the lower layer file parser. Split the layers apart. This is viable due to the lower-layer internals having been removed from libxlu_internals.h.

---
 tools/libs/util/libxlu_disk.c | 1 -
 1 file changed, 1 deletion(-)
tools/libs/util/libxlu_disk.c +0 -1
index a4d08ab7e9..92da9bd3b1 100644
@@ -1,7 +1,6 @@
 #include "libxlu_internal.h"
 #include "libxlu_disk_l.h"
 #include "libxlu_disk_i.h"
-#include "libxlu_cfg_i.h"
 
 void xlu__disk_err(DiskParseContext *dpc, const char *erroneous,
                    const char *message) {
Signature · 1 line
2.30.2
#8 lore raw

PATCH 7/7 tools/utils: move remaining lower-layer data from libxlu_internal.h

In reply to Elliott Mitchell

Correcting the order of #includes and data type declarations allows the remaining lower-layer structures to move to libxlu_cfg_i.h. Now libxlu_internal.h is purely generalized routines meant to be shared between all layers.

---
 tools/libs/util/libxlu_cfg.c      |  2 +-
 tools/libs/util/libxlu_cfg_i.h    | 31 +++++++++++++++++++++++++++++++
 tools/libs/util/libxlu_internal.h | 30 ------------------------------
 3 files changed, 32 insertions(+), 31 deletions(-)
tools/libs/util/libxlu_cfg.c +1 -1
index 2979d775a6..2913c99478 100644
@@ -21,9 +21,9 @@
 #include <stdarg.h>
 
 #include "libxlu_internal.h"
+#include "libxlu_cfg_i.h"
 #include "libxlu_cfg_y.h"
 #include "libxlu_cfg_l.h"
-#include "libxlu_cfg_i.h"
 
 typedef struct XLU_ConfigSetting { /* transparent */
     struct XLU_ConfigSetting *next;
tools/libs/util/libxlu_cfg_i.h +31 -0
index 7193867422..1c6a44b60f 100644
@@ -19,6 +19,37 @@
 #define LIBXLU_CFG_I_H
 
 #include "libxlu_internal.h"
+
+struct XLU_ConfigList {
+    int avalues; /* available slots */
+    int nvalues; /* actual occupied slots */
+    XLU_ConfigValue **values;
+};
+
+typedef struct YYLTYPE
+{
+  int first_line;
+  int first_column;
+  int last_line;
+  int last_column;
+} YYLTYPE;
+#define YYLTYPE_IS_DECLARED
+
+struct XLU_ConfigValue {
+    enum XLU_ConfigValueType type;
+    union {
+        char *string;
+        XLU_ConfigList list;
+    } u;
+    YYLTYPE loc;
+};
+
+typedef struct {
+    XLU_Config *cfg;
+    int err, lexerrlineno, likely_python;
+    void *scanner;
+} CfgParseContext;
+
 #include "libxlu_cfg_y.h"
 
 enum XLU_Operation {
tools/libs/util/libxlu_internal.h +0 -30
index 97303391c6..7cbb2e632d 100644
@@ -25,36 +25,6 @@
 
 #include "libxlutil.h"
 
-struct XLU_ConfigList {
-    int avalues; /* available slots */
-    int nvalues; /* actual occupied slots */
-    XLU_ConfigValue **values;
-};
-
-typedef struct YYLTYPE
-{
-  int first_line;
-  int first_column;
-  int last_line;
-  int last_column;
-} YYLTYPE;
-#define YYLTYPE_IS_DECLARED
-
-struct XLU_ConfigValue {
-    enum XLU_ConfigValueType type;
-    union {
-        char *string;
-        XLU_ConfigList list;
-    } u;
-    YYLTYPE loc;
-};
-
-typedef struct {
-    XLU_Config *cfg;
-    int err, lexerrlineno, likely_python;
-    void *scanner;
-} CfgParseContext;
-
 
 #define STRINGIFY(x) #x
 #define TOSTRING(x) STRINGIFY(x)
Signature · 1 line
2.30.2