aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/Makefile.am2
-rw-r--r--lib/Makefile.in476
-rw-r--r--lib/grammar.c1401
-rw-r--r--lib/grammar.h95
-rw-r--r--lib/grammar.y4
-rw-r--r--lib/libconfig.c190
-rw-r--r--lib/libconfig.h19
-rw-r--r--lib/libconfig.h++468
-rw-r--r--lib/libconfig.hh2
-rw-r--r--lib/libconfigcpp.c++441
-rw-r--r--lib/libconfigcpp.cc2
-rw-r--r--lib/parsectx.h2
-rw-r--r--lib/scanctx.c3
-rw-r--r--lib/scanctx.h2
-rw-r--r--lib/scanner.c206
-rw-r--r--lib/scanner.h62
-rw-r--r--lib/scanner.l7
-rw-r--r--lib/strbuf.c3
-rw-r--r--lib/strbuf.h2
-rw-r--r--lib/wincompat.h4
-rw-r--r--libconfig.spec2
21 files changed, 1911 insertions, 1482 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 5c1c4e0..6a22494 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -24,7 +24,7 @@ endif
#
# For more info see section 6.3 of the GNU Libtool Manual.
-VERINFO = -version-info 10:3:1
+VERINFO = -version-info 11:0:2
PARSER_PREFIX = libconfig_yy
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 3ff722b..cce0faf 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -18,6 +17,51 @@
VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -43,11 +87,16 @@ target_triplet = @target@
@BUILDCXX_TRUE@am__append_4 = $(libinc_cpp)
@BUILDCXX_TRUE@am__append_5 = libconfig++.pc
subdir = lib
-DIST_COMMON = $(am__include_HEADERS_DIST) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/libconfig++.pc.in \
- $(srcdir)/libconfig.pc.in grammar.c grammar.h scanner.c
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/aux-build/mkinstalldirs \
+ $(srcdir)/libconfig.pc.in $(srcdir)/libconfig++.pc.in \
+ scanner.c grammar.h grammar.c $(top_srcdir)/aux-build/depcomp \
+ $(top_srcdir)/aux-build/ylwrap $(am__include_HEADERS_DIST)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/aux-build/mkinstalldirs
@@ -75,6 +124,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \
"$(DESTDIR)$(includedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
@@ -85,9 +140,14 @@ am__objects_1 = libconfig___la-libconfig.lo libconfig___la-scanner.lo \
am__objects_2 = $(am__objects_1) libconfig___la-libconfigcpp.lo
am_libconfig___la_OBJECTS = $(am__objects_2)
libconfig___la_OBJECTS = $(am_libconfig___la_OBJECTS)
-libconfig___la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
- $(CXXFLAGS) $(libconfig___la_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+libconfig___la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(libconfig___la_LDFLAGS) \
+ $(LDFLAGS) -o $@
@BUILDCXX_TRUE@am_libconfig___la_rpath = -rpath $(libdir)
libconfig_la_LIBADD =
am__objects_3 = libconfig_la-libconfig.lo libconfig_la-scanner.lo \
@@ -95,48 +155,111 @@ am__objects_3 = libconfig_la-libconfig.lo libconfig_la-scanner.lo \
libconfig_la-strbuf.lo
am_libconfig_la_OBJECTS = $(am__objects_3)
libconfig_la_OBJECTS = $(am_libconfig_la_OBJECTS)
-libconfig_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+libconfig_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libconfig_la_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/aux-build/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
-LTLEXCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
+LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS)
+LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS)
+AM_V_LEX = $(am__v_LEX_@AM_V@)
+am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@)
+am__v_LEX_0 = @echo " LEX " $@;
+am__v_LEX_1 =
YLWRAP = $(top_srcdir)/aux-build/ylwrap
-YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
-LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS)
+am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \
+ -e s/c++$$/h++/ -e s/c$$/h/
+YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS)
+LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS)
+AM_V_YACC = $(am__v_YACC_@AM_V@)
+am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@)
+am__v_YACC_0 = @echo " YACC " $@;
+am__v_YACC_1 =
SOURCES = $(libconfig___la_SOURCES) $(libconfig_la_SOURCES)
DIST_SOURCES = $(libconfig___la_SOURCES) $(libconfig_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
DATA = $(pkgconfig_DATA)
am__include_HEADERS_DIST = libconfig.h libconfig.h++
HEADERS = $(include_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
@@ -283,7 +406,7 @@ lib_LTLIBRARIES = libconfig.la $(am__append_1)
# This release has a new, but backwards incompatible interface.
#
# For more info see section 6.3 of the GNU Libtool Manual.
-VERINFO = -version-info 10:3:1
+VERINFO = -version-info 11:0:2
PARSER_PREFIX = libconfig_yy
libconfig_la_LDFLAGS = $(VERINFO) -no-undefined
libconfig___la_LDFLAGS = $(VERINFO) -no-undefined
@@ -349,9 +472,9 @@ libconfig.pc: $(top_builddir)/config.status $(srcdir)/libconfig.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
libconfig++.pc: $(top_builddir)/config.status $(srcdir)/libconfig++.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
@@ -359,6 +482,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
@@ -374,21 +499,23 @@ uninstall-libLTLIBRARIES:
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
+ @list='$(lib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
grammar.h: grammar.c
- @if test ! -f $@; then \
- rm -f grammar.c; \
- $(MAKE) $(AM_MAKEFLAGS) grammar.c; \
- else :; fi
-libconfig++.la: $(libconfig___la_OBJECTS) $(libconfig___la_DEPENDENCIES)
- $(libconfig___la_LINK) $(am_libconfig___la_rpath) $(libconfig___la_OBJECTS) $(libconfig___la_LIBADD) $(LIBS)
-libconfig.la: $(libconfig_la_OBJECTS) $(libconfig_la_DEPENDENCIES)
- $(libconfig_la_LINK) -rpath $(libdir) $(libconfig_la_OBJECTS) $(libconfig_la_LIBADD) $(LIBS)
+ @if test ! -f $@; then rm -f grammar.c; else :; fi
+ @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) grammar.c; else :; fi
+
+libconfig++.la: $(libconfig___la_OBJECTS) $(libconfig___la_DEPENDENCIES) $(EXTRA_libconfig___la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(libconfig___la_LINK) $(am_libconfig___la_rpath) $(libconfig___la_OBJECTS) $(libconfig___la_LIBADD) $(LIBS)
+
+libconfig.la: $(libconfig_la_OBJECTS) $(libconfig_la_DEPENDENCIES) $(EXTRA_libconfig_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libconfig_la_LINK) -rpath $(libdir) $(libconfig_la_OBJECTS) $(libconfig_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -409,129 +536,129 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libconfig_la-strbuf.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
libconfig___la-libconfig.lo: libconfig.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig___la-libconfig.lo -MD -MP -MF $(DEPDIR)/libconfig___la-libconfig.Tpo -c -o libconfig___la-libconfig.lo `test -f 'libconfig.c' || echo '$(srcdir)/'`libconfig.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libconfig___la-libconfig.Tpo $(DEPDIR)/libconfig___la-libconfig.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libconfig.c' object='libconfig___la-libconfig.lo' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig___la-libconfig.lo -MD -MP -MF $(DEPDIR)/libconfig___la-libconfig.Tpo -c -o libconfig___la-libconfig.lo `test -f 'libconfig.c' || echo '$(srcdir)/'`libconfig.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libconfig___la-libconfig.Tpo $(DEPDIR)/libconfig___la-libconfig.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libconfig.c' object='libconfig___la-libconfig.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig___la-libconfig.lo `test -f 'libconfig.c' || echo '$(srcdir)/'`libconfig.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig___la-libconfig.lo `test -f 'libconfig.c' || echo '$(srcdir)/'`libconfig.c
libconfig___la-scanner.lo: scanner.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig___la-scanner.lo -MD -MP -MF $(DEPDIR)/libconfig___la-scanner.Tpo -c -o libconfig___la-scanner.lo `test -f 'scanner.c' || echo '$(srcdir)/'`scanner.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libconfig___la-scanner.Tpo $(DEPDIR)/libconfig___la-scanner.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scanner.c' object='libconfig___la-scanner.lo' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig___la-scanner.lo -MD -MP -MF $(DEPDIR)/libconfig___la-scanner.Tpo -c -o libconfig___la-scanner.lo `test -f 'scanner.c' || echo '$(srcdir)/'`scanner.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libconfig___la-scanner.Tpo $(DEPDIR)/libconfig___la-scanner.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scanner.c' object='libconfig___la-scanner.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig___la-scanner.lo `test -f 'scanner.c' || echo '$(srcdir)/'`scanner.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig___la-scanner.lo `test -f 'scanner.c' || echo '$(srcdir)/'`scanner.c
libconfig___la-grammar.lo: grammar.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig___la-grammar.lo -MD -MP -MF $(DEPDIR)/libconfig___la-grammar.Tpo -c -o libconfig___la-grammar.lo `test -f 'grammar.c' || echo '$(srcdir)/'`grammar.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libconfig___la-grammar.Tpo $(DEPDIR)/libconfig___la-grammar.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='grammar.c' object='libconfig___la-grammar.lo' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig___la-grammar.lo -MD -MP -MF $(DEPDIR)/libconfig___la-grammar.Tpo -c -o libconfig___la-grammar.lo `test -f 'grammar.c' || echo '$(srcdir)/'`grammar.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libconfig___la-grammar.Tpo $(DEPDIR)/libconfig___la-grammar.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='grammar.c' object='libconfig___la-grammar.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig___la-grammar.lo `test -f 'grammar.c' || echo '$(srcdir)/'`grammar.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig___la-grammar.lo `test -f 'grammar.c' || echo '$(srcdir)/'`grammar.c
libconfig___la-scanctx.lo: scanctx.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig___la-scanctx.lo -MD -MP -MF $(DEPDIR)/libconfig___la-scanctx.Tpo -c -o libconfig___la-scanctx.lo `test -f 'scanctx.c' || echo '$(srcdir)/'`scanctx.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libconfig___la-scanctx.Tpo $(DEPDIR)/libconfig___la-scanctx.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scanctx.c' object='libconfig___la-scanctx.lo' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig___la-scanctx.lo -MD -MP -MF $(DEPDIR)/libconfig___la-scanctx.Tpo -c -o libconfig___la-scanctx.lo `test -f 'scanctx.c' || echo '$(srcdir)/'`scanctx.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libconfig___la-scanctx.Tpo $(DEPDIR)/libconfig___la-scanctx.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scanctx.c' object='libconfig___la-scanctx.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig___la-scanctx.lo `test -f 'scanctx.c' || echo '$(srcdir)/'`scanctx.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig___la-scanctx.lo `test -f 'scanctx.c' || echo '$(srcdir)/'`scanctx.c
libconfig___la-strbuf.lo: strbuf.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig___la-strbuf.lo -MD -MP -MF $(DEPDIR)/libconfig___la-strbuf.Tpo -c -o libconfig___la-strbuf.lo `test -f 'strbuf.c' || echo '$(srcdir)/'`strbuf.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libconfig___la-strbuf.Tpo $(DEPDIR)/libconfig___la-strbuf.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='strbuf.c' object='libconfig___la-strbuf.lo' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig___la-strbuf.lo -MD -MP -MF $(DEPDIR)/libconfig___la-strbuf.Tpo -c -o libconfig___la-strbuf.lo `test -f 'strbuf.c' || echo '$(srcdir)/'`strbuf.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libconfig___la-strbuf.Tpo $(DEPDIR)/libconfig___la-strbuf.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='strbuf.c' object='libconfig___la-strbuf.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig___la-strbuf.lo `test -f 'strbuf.c' || echo '$(srcdir)/'`strbuf.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig___la-strbuf.lo `test -f 'strbuf.c' || echo '$(srcdir)/'`strbuf.c
libconfig_la-libconfig.lo: libconfig.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig_la-libconfig.lo -MD -MP -MF $(DEPDIR)/libconfig_la-libconfig.Tpo -c -o libconfig_la-libconfig.lo `test -f 'libconfig.c' || echo '$(srcdir)/'`libconfig.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libconfig_la-libconfig.Tpo $(DEPDIR)/libconfig_la-libconfig.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libconfig.c' object='libconfig_la-libconfig.lo' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig_la-libconfig.lo -MD -MP -MF $(DEPDIR)/libconfig_la-libconfig.Tpo -c -o libconfig_la-libconfig.lo `test -f 'libconfig.c' || echo '$(srcdir)/'`libconfig.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libconfig_la-libconfig.Tpo $(DEPDIR)/libconfig_la-libconfig.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libconfig.c' object='libconfig_la-libconfig.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig_la-libconfig.lo `test -f 'libconfig.c' || echo '$(srcdir)/'`libconfig.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig_la-libconfig.lo `test -f 'libconfig.c' || echo '$(srcdir)/'`libconfig.c
libconfig_la-scanner.lo: scanner.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig_la-scanner.lo -MD -MP -MF $(DEPDIR)/libconfig_la-scanner.Tpo -c -o libconfig_la-scanner.lo `test -f 'scanner.c' || echo '$(srcdir)/'`scanner.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libconfig_la-scanner.Tpo $(DEPDIR)/libconfig_la-scanner.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scanner.c' object='libconfig_la-scanner.lo' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig_la-scanner.lo -MD -MP -MF $(DEPDIR)/libconfig_la-scanner.Tpo -c -o libconfig_la-scanner.lo `test -f 'scanner.c' || echo '$(srcdir)/'`scanner.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libconfig_la-scanner.Tpo $(DEPDIR)/libconfig_la-scanner.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scanner.c' object='libconfig_la-scanner.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig_la-scanner.lo `test -f 'scanner.c' || echo '$(srcdir)/'`scanner.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig_la-scanner.lo `test -f 'scanner.c' || echo '$(srcdir)/'`scanner.c
libconfig_la-grammar.lo: grammar.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig_la-grammar.lo -MD -MP -MF $(DEPDIR)/libconfig_la-grammar.Tpo -c -o libconfig_la-grammar.lo `test -f 'grammar.c' || echo '$(srcdir)/'`grammar.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libconfig_la-grammar.Tpo $(DEPDIR)/libconfig_la-grammar.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='grammar.c' object='libconfig_la-grammar.lo' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig_la-grammar.lo -MD -MP -MF $(DEPDIR)/libconfig_la-grammar.Tpo -c -o libconfig_la-grammar.lo `test -f 'grammar.c' || echo '$(srcdir)/'`grammar.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libconfig_la-grammar.Tpo $(DEPDIR)/libconfig_la-grammar.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='grammar.c' object='libconfig_la-grammar.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig_la-grammar.lo `test -f 'grammar.c' || echo '$(srcdir)/'`grammar.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig_la-grammar.lo `test -f 'grammar.c' || echo '$(srcdir)/'`grammar.c
libconfig_la-scanctx.lo: scanctx.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig_la-scanctx.lo -MD -MP -MF $(DEPDIR)/libconfig_la-scanctx.Tpo -c -o libconfig_la-scanctx.lo `test -f 'scanctx.c' || echo '$(srcdir)/'`scanctx.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libconfig_la-scanctx.Tpo $(DEPDIR)/libconfig_la-scanctx.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scanctx.c' object='libconfig_la-scanctx.lo' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig_la-scanctx.lo -MD -MP -MF $(DEPDIR)/libconfig_la-scanctx.Tpo -c -o libconfig_la-scanctx.lo `test -f 'scanctx.c' || echo '$(srcdir)/'`scanctx.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libconfig_la-scanctx.Tpo $(DEPDIR)/libconfig_la-scanctx.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scanctx.c' object='libconfig_la-scanctx.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig_la-scanctx.lo `test -f 'scanctx.c' || echo '$(srcdir)/'`scanctx.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig_la-scanctx.lo `test -f 'scanctx.c' || echo '$(srcdir)/'`scanctx.c
libconfig_la-strbuf.lo: strbuf.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig_la-strbuf.lo -MD -MP -MF $(DEPDIR)/libconfig_la-strbuf.Tpo -c -o libconfig_la-strbuf.lo `test -f 'strbuf.c' || echo '$(srcdir)/'`strbuf.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libconfig_la-strbuf.Tpo $(DEPDIR)/libconfig_la-strbuf.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='strbuf.c' object='libconfig_la-strbuf.lo' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libconfig_la-strbuf.lo -MD -MP -MF $(DEPDIR)/libconfig_la-strbuf.Tpo -c -o libconfig_la-strbuf.lo `test -f 'strbuf.c' || echo '$(srcdir)/'`strbuf.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libconfig_la-strbuf.Tpo $(DEPDIR)/libconfig_la-strbuf.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='strbuf.c' object='libconfig_la-strbuf.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig_la-strbuf.lo `test -f 'strbuf.c' || echo '$(srcdir)/'`strbuf.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libconfig_la-strbuf.lo `test -f 'strbuf.c' || echo '$(srcdir)/'`strbuf.c
.c++.o:
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
.c++.obj:
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c++.lo:
-@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
libconfig___la-libconfigcpp.lo: libconfigcpp.c++
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libconfig___la-libconfigcpp.lo -MD -MP -MF $(DEPDIR)/libconfig___la-libconfigcpp.Tpo -c -o libconfig___la-libconfigcpp.lo `test -f 'libconfigcpp.c++' || echo '$(srcdir)/'`libconfigcpp.c++
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libconfig___la-libconfigcpp.Tpo $(DEPDIR)/libconfig___la-libconfigcpp.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='libconfigcpp.c++' object='libconfig___la-libconfigcpp.lo' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libconfig___la-libconfigcpp.lo -MD -MP -MF $(DEPDIR)/libconfig___la-libconfigcpp.Tpo -c -o libconfig___la-libconfigcpp.lo `test -f 'libconfigcpp.c++' || echo '$(srcdir)/'`libconfigcpp.c++
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libconfig___la-libconfigcpp.Tpo $(DEPDIR)/libconfig___la-libconfigcpp.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libconfigcpp.c++' object='libconfig___la-libconfigcpp.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libconfig___la-libconfigcpp.lo `test -f 'libconfigcpp.c++' || echo '$(srcdir)/'`libconfigcpp.c++
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libconfig___la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libconfig___la-libconfigcpp.lo `test -f 'libconfigcpp.c++' || echo '$(srcdir)/'`libconfigcpp.c++
.l.c:
- $(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)
+ $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)
.y.c:
- $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
+ $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE)
mostlyclean-libtool:
-rm -f *.lo
@@ -540,8 +667,11 @@ clean-libtool:
-rm -rf .libs _libs
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
- test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@@ -555,13 +685,14 @@ uninstall-pkgconfigDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
+ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL)
- test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@@ -575,30 +706,17 @@ uninstall-includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(includedir)" && rm -f $$files
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -610,15 +728,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -627,6 +741,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -680,10 +809,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
@@ -773,21 +907,21 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \
.MAKE: all check install install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libLTLIBRARIES clean-libtool ctags distclean \
- distclean-compile distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-includeHEADERS install-info \
- install-info-am install-libLTLIBRARIES install-man install-pdf \
- install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-includeHEADERS uninstall-libLTLIBRARIES \
- uninstall-pkgconfigDATA
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
+ ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am \
+ install-includeHEADERS install-info install-info-am \
+ install-libLTLIBRARIES install-man install-pdf install-pdf-am \
+ install-pkgconfigDATA install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am uninstall-includeHEADERS \
+ uninstall-libLTLIBRARIES uninstall-pkgconfigDATA
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/lib/grammar.c b/lib/grammar.c
index e95a569..38b9ab0 100644
--- a/lib/grammar.c
+++ b/lib/grammar.c
@@ -1,21 +1,19 @@
+/* A Bison parser, made by GNU Bison 3.0.2. */
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -28,7 +26,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -46,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "3.0.2"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -60,23 +58,17 @@
/* Pull parsers. */
#define YYPULL 1
-/* Using locations. */
-#define YYLSP_NEEDED 0
/* Substitute the variable and function names. */
#define yyparse libconfig_yyparse
#define yylex libconfig_yylex
#define yyerror libconfig_yyerror
-#define yylval libconfig_yylval
-#define yychar libconfig_yychar
#define yydebug libconfig_yydebug
#define yynerrs libconfig_yynerrs
/* Copy the first part of user declarations. */
-
-/* Line 189 of yacc.c */
-#line 32 "grammar.y"
+#line 32 "grammar.y" /* yacc.c:339 */
#include <string.h>
#include <stdlib.h>
@@ -128,14 +120,15 @@ void libconfig_yyerror(void *scanner, struct parse_context *ctx,
}
+#line 124 "grammar.c" /* yacc.c:339 */
-/* Line 189 of yacc.c */
-#line 134 "grammar.c"
-
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
+# ifndef YY_NULLPTR
+# if defined __cplusplus && 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
@@ -145,39 +138,44 @@ void libconfig_yyerror(void *scanner, struct parse_context *ctx,
# define YYERROR_VERBOSE 0
#endif
-/* Enabling the token table. */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
+/* In a future release of Bison, this section will be replaced
+ by #include "y.tab.h". */
+#ifndef YY_LIBCONFIG_YY_GRAMMAR_H_INCLUDED
+# define YY_LIBCONFIG_YY_GRAMMAR_H_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int libconfig_yydebug;
#endif
-
-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- TOK_BOOLEAN = 258,
- TOK_INTEGER = 259,
- TOK_HEX = 260,
- TOK_INTEGER64 = 261,
- TOK_HEX64 = 262,
- TOK_FLOAT = 263,
- TOK_STRING = 264,
- TOK_NAME = 265,
- TOK_EQUALS = 266,
- TOK_NEWLINE = 267,
- TOK_ARRAY_START = 268,
- TOK_ARRAY_END = 269,
- TOK_LIST_START = 270,
- TOK_LIST_END = 271,
- TOK_COMMA = 272,
- TOK_GROUP_START = 273,
- TOK_GROUP_END = 274,
- TOK_SEMICOLON = 275,
- TOK_GARBAGE = 276,
- TOK_ERROR = 277
- };
+ enum yytokentype
+ {
+ TOK_BOOLEAN = 258,
+ TOK_INTEGER = 259,
+ TOK_HEX = 260,
+ TOK_INTEGER64 = 261,
+ TOK_HEX64 = 262,
+ TOK_FLOAT = 263,
+ TOK_STRING = 264,
+ TOK_NAME = 265,
+ TOK_EQUALS = 266,
+ TOK_NEWLINE = 267,
+ TOK_ARRAY_START = 268,
+ TOK_ARRAY_END = 269,
+ TOK_LIST_START = 270,
+ TOK_LIST_END = 271,
+ TOK_COMMA = 272,
+ TOK_GROUP_START = 273,
+ TOK_GROUP_END = 274,
+ TOK_SEMICOLON = 275,
+ TOK_GARBAGE = 276,
+ TOK_ERROR = 277
+ };
#endif
/* Tokens. */
#define TOK_BOOLEAN 258
@@ -201,37 +199,33 @@ void libconfig_yyerror(void *scanner, struct parse_context *ctx,
#define TOK_GARBAGE 276
#define TOK_ERROR 277
-
-
-
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+typedef union YYSTYPE YYSTYPE;
+union YYSTYPE
{
-
-/* Line 214 of yacc.c */
-#line 85 "grammar.y"
+#line 85 "grammar.y" /* yacc.c:355 */
int ival;
long long llval;
double fval;
char *sval;
-
-
-/* Line 214 of yacc.c */
-#line 223 "grammar.c"
-} YYSTYPE;
+#line 215 "grammar.c" /* yacc.c:355 */
+};
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
-/* Copy the second part of user declarations. */
+int libconfig_yyparse (void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx);
-/* Line 264 of yacc.c */
-#line 235 "grammar.c"
+#endif /* !YY_LIBCONFIG_YY_GRAMMAR_H_INCLUDED */
+
+/* Copy the second part of user declarations. */
+
+#line 229 "grammar.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -245,11 +239,8 @@ typedef unsigned char yytype_uint8;
#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
#else
-typedef short int yytype_int8;
+typedef signed char yytype_int8;
#endif
#ifdef YYTYPE_UINT16
@@ -269,8 +260,7 @@ typedef short int yytype_int16;
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# elif ! defined YYSIZE_T
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
@@ -281,41 +271,70 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
# endif
# endif
# ifndef YY_
-# define YY_(msgid) msgid
+# define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
+# define YYUSE(E) ((void) (E))
#else
-# define YYUSE(e) /* empty */
+# define YYUSE(E) /* empty */
#endif
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(n) (n)
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
-#else
-static int
-YYID (yyi)
- int yyi;
+# define YY_INITIAL_VALUE(Value) Value
#endif
-{
- return yyi;
-}
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
#if ! defined yyoverflow || YYERROR_VERBOSE
@@ -334,11 +353,11 @@ YYID (yyi)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# endif
@@ -346,8 +365,8 @@ YYID (yyi)
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
@@ -361,25 +380,23 @@ YYID (yyi)
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
-# if (defined __cplusplus && ! defined _STDLIB_H \
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
+ && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
@@ -389,7 +406,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
@@ -407,42 +424,46 @@ union yyalloc
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
-/* Copy COUNT objects from FROM to TO. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(To, From, Count) \
- __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-# else
-# define YYCOPY(To, From, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (To)[yyi] = (From)[yyi]; \
- } \
- while (YYID (0))
-# endif
-# endif
+# define YYCOPY_NEEDED 1
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
#endif
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 6
/* YYLAST -- Last index in YYTABLE. */
@@ -454,17 +475,19 @@ union yyalloc
#define YYNNTS 20
/* YYNRULES -- Number of rules. */
#define YYNRULES 39
-/* YYNRULES -- Number of states. */
+/* YYNSTATES -- Number of states. */
#define YYNSTATES 47
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 277
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, without out-of-bounds checking. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -498,31 +521,7 @@ static const yytype_uint8 yytranslate[] =
};
#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint8 yyprhs[] =
-{
- 0, 0, 3, 4, 6, 8, 11, 12, 14, 15,
- 17, 19, 20, 26, 27, 32, 33, 38, 40, 42,
- 44, 46, 48, 51, 53, 55, 57, 59, 61, 63,
- 65, 67, 71, 72, 74, 76, 80, 81, 83, 84
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
-{
- 24, 0, -1, -1, 25, -1, 28, -1, 25, 28,
- -1, -1, 25, -1, -1, 20, -1, 17, -1, -1,
- 10, 29, 11, 34, 27, -1, -1, 13, 31, 40,
- 14, -1, -1, 15, 33, 38, 16, -1, 36, -1,
- 30, -1, 32, -1, 41, -1, 9, -1, 35, 9,
- -1, 3, -1, 4, -1, 6, -1, 5, -1, 7,
- -1, 8, -1, 35, -1, 34, -1, 37, 17, 34,
- -1, -1, 37, -1, 36, -1, 39, 17, 36, -1,
- -1, 39, -1, -1, 18, 42, 26, 19, -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
0, 100, 100, 102, 106, 107, 110, 112, 115, 117,
@@ -532,7 +531,7 @@ static const yytype_uint16 yyrline[] =
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+#if YYDEBUG || YYERROR_VERBOSE || 0
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
@@ -545,13 +544,13 @@ static const char *const yytname[] =
"configuration", "setting_list", "setting_list_optional",
"setting_terminator", "setting", "$@1", "array", "$@2", "list", "$@3",
"value", "string", "simple_value", "value_list", "value_list_optional",
- "simple_value_list", "simple_value_list_optional", "group", "$@4", 0
+ "simple_value_list", "simple_value_list_optional", "group", "$@4", YY_NULLPTR
};
#endif
# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
@@ -560,46 +559,18 @@ static const yytype_uint16 yytoknum[] =
};
# endif
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 23, 24, 24, 25, 25, 26, 26, 27, 27,
- 27, 29, 28, 31, 30, 33, 32, 34, 34, 34,
- 34, 35, 35, 36, 36, 36, 36, 36, 36, 36,
- 37, 37, 38, 38, 39, 39, 40, 40, 42, 41
-};
+#define YYPACT_NINF -26
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 0, 1, 1, 2, 0, 1, 0, 1,
- 1, 0, 5, 0, 4, 0, 4, 1, 1, 1,
- 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 3, 0, 1, 1, 3, 0, 1, 0, 4
-};
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-26)))
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
- STATE-NUM when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint8 yydefact[] =
-{
- 2, 11, 0, 3, 4, 0, 1, 5, 0, 23,
- 24, 26, 25, 27, 28, 21, 13, 15, 38, 18,
- 19, 8, 29, 17, 20, 36, 32, 6, 10, 9,
- 12, 22, 34, 37, 0, 30, 33, 0, 7, 0,
- 0, 14, 0, 16, 39, 35, 31
-};
+#define YYTABLE_NINF -1
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int8 yydefgoto[] =
-{
- -1, 2, 3, 39, 30, 4, 5, 19, 25, 20,
- 26, 21, 22, 23, 36, 37, 33, 34, 24, 27
-};
+#define yytable_value_is_error(Yytable_value) \
+ 0
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -26
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
static const yytype_int8 yypact[] =
{
-8, -26, 12, -8, -26, 5, -26, -26, 0, -26,
@@ -609,18 +580,35 @@ static const yytype_int8 yypact[] =
23, -26, 0, -26, -26, -26, -26
};
-/* YYPGOTO[NTERM-NUM]. */
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 2, 11, 0, 3, 4, 0, 1, 5, 0, 23,
+ 24, 26, 25, 27, 28, 21, 13, 15, 38, 18,
+ 19, 8, 29, 17, 20, 36, 32, 6, 10, 9,
+ 12, 22, 34, 37, 0, 30, 33, 0, 7, 0,
+ 0, 14, 0, 16, 39, 35, 31
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
-26, -26, -5, -26, -26, -3, -26, -26, -26, -26,
-26, -25, -26, -15, -26, -26, -26, -26, -26, -26
};
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If zero, do what YYDEFACT says.
- If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -1
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int8 yydefgoto[] =
+{
+ -1, 2, 3, 39, 30, 4, 5, 19, 25, 20,
+ 26, 21, 22, 23, 36, 37, 33, 34, 24, 27
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_uint8 yytable[] =
{
7, 35, 1, 9, 10, 11, 12, 13, 14, 15,
@@ -637,8 +625,8 @@ static const yytype_int8 yycheck[] =
7, 8, 9, 19, -1, 38
};
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
0, 10, 24, 25, 28, 29, 0, 28, 11, 3,
@@ -648,95 +636,59 @@ static const yytype_uint8 yystos[] =
17, 14, 17, 16, 19, 36, 34
};
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 23, 24, 24, 25, 25, 26, 26, 27, 27,
+ 27, 29, 28, 31, 30, 33, 32, 34, 34, 34,
+ 34, 35, 35, 36, 36, 36, 36, 36, 36, 36,
+ 37, 37, 38, 38, 39, 39, 40, 40, 42, 41
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 0, 1, 1, 2, 0, 1, 0, 1,
+ 1, 0, 5, 0, 4, 0, 4, 1, 1, 1,
+ 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 3, 0, 1, 1, 3, 0, 1, 0, 4
+};
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
-/* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
-#define YYFAIL goto yyerrlab
#define YYRECOVERING() (!!yyerrstatus)
-#define YYBACKUP(Token, Value) \
-do \
- if (yychar == YYEMPTY && yylen == 1) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- yytoken = YYTRANSLATE (yychar); \
- YYPOPSTACK (1); \
- goto yybackup; \
- } \
- else \
- { \
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
yyerror (scanner, ctx, scan_ctx, YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
-
-
-#define YYTERROR 1
-#define YYERRCODE 256
-
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
- If N is 0, then set CURRENT to the empty location which ends
- the previous symbol: RHS[0] (always defined). */
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- do \
- if (YYID (N)) \
- { \
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
- } \
- else \
- { \
- (Current).first_line = (Current).last_line = \
- YYRHSLOC (Rhs, 0).last_line; \
- (Current).first_column = (Current).last_column = \
- YYRHSLOC (Rhs, 0).last_column; \
- } \
- while (YYID (0))
-#endif
-
+ YYERROR; \
+ } \
+while (0)
-/* YY_LOCATION_PRINT -- Print the location on the stream.
- This macro was not mandated originally: define only if we know
- we won't break user code: when these are the locations we know. */
-
-#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
-# define YY_LOCATION_PRINT(File, Loc) \
- fprintf (File, "%d.%d-%d.%d", \
- (Loc).first_line, (Loc).first_column, \
- (Loc).last_line, (Loc).last_column)
-# else
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
-#endif
+/* Error token number */
+#define YYTERROR 1
+#define YYERRCODE 256
-/* YYLEX -- calling `yylex' with the right arguments. */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (&yylval, YYLEX_PARAM)
-#else
-# define YYLEX yylex (&yylval, scanner)
-#endif
/* Enable debugging if requested. */
#if YYDEBUG
@@ -746,60 +698,49 @@ while (YYID (0))
# define YYFPRINTF fprintf
# endif
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value, scanner, ctx, scan_ctx); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, scanner, ctx, scan_ctx); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
+
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner, ctx, scan_ctx)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
- void *scanner;
- struct parse_context *ctx;
- struct scan_context *scan_ctx;
-#endif
{
- if (!yyvaluep)
- return;
+ FILE *yyo = yyoutput;
+ YYUSE (yyo);
YYUSE (scanner);
YYUSE (ctx);
YYUSE (scan_ctx);
+ if (!yyvaluep)
+ return;
# ifdef YYPRINT
if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
# endif
- switch (yytype)
- {
- default:
- break;
- }
+ YYUSE (yytype);
}
@@ -807,25 +748,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner, ctx, scan_ctx)
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep, scanner, ctx, scan_ctx)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
- void *scanner;
- struct parse_context *ctx;
- struct scan_context *scan_ctx;
-#endif
{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner, ctx, scan_ctx);
YYFPRINTF (yyoutput, ")");
@@ -836,16 +763,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, scanner, ctx, scan_ctx)
| TOP (included). |
`------------------------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
@@ -856,52 +775,42 @@ yy_stack_print (yybottom, yytop)
YYFPRINTF (stderr, "\n");
}
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule, void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx)
-#else
-static void
-yy_reduce_print (yyvsp, yyrule, scanner, ctx, scan_ctx)
- YYSTYPE *yyvsp;
- int yyrule;
- void *scanner;
- struct parse_context *ctx;
- struct scan_context *scan_ctx;
-#endif
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx)
{
+ unsigned long int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
- unsigned long int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
+ yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- , scanner, ctx, scan_ctx);
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ , scanner, ctx, scan_ctx);
YYFPRINTF (stderr, "\n");
}
}
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, Rule, scanner, ctx, scan_ctx); \
-} while (YYID (0))
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule, scanner, ctx, scan_ctx); \
+} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
@@ -915,7 +824,7 @@ int yydebug;
/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
+#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
@@ -930,7 +839,6 @@ int yydebug;
# define YYMAXDEPTH 10000
#endif
-
#if YYERROR_VERBOSE
@@ -939,15 +847,8 @@ int yydebug;
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
{
YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
@@ -963,16 +864,8 @@ yystrlen (yystr)
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
{
char *yyd = yydest;
const char *yys = yysrc;
@@ -1002,27 +895,27 @@ yytnamerr (char *yyres, const char *yystr)
char const *yyp = yystr;
for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
do_not_strip_quotes: ;
}
@@ -1033,205 +926,181 @@ yytnamerr (char *yyres, const char *yystr)
}
# endif
-/* Copy into YYRESULT an error message about the unexpected token
- YYCHAR while in state YYSTATE. Return the number of bytes copied,
- including the terminating null byte. If YYRESULT is null, do not
- copy anything; just return the number of bytes that would be
- copied. As a special case, return 0 if an ordinary "syntax error"
- message will do. Return YYSIZE_MAXIMUM if overflow occurs during
- size calculation. */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
+
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
{
- int yyn = yypact[yystate];
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = YY_NULLPTR;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
+ {
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+ }
+ }
+ }
- if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
- return 0;
- else
+ switch (yycount)
{
- int yytype = YYTRANSLATE (yychar);
- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- int yysize_overflow = 0;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- int yyx;
-
-# if 0
- /* This is so xgettext sees the translatable formats that are
- constructed on the fly. */
- YY_("syntax error, unexpected %s");
- YY_("syntax error, unexpected %s, expecting %s");
- YY_("syntax error, unexpected %s, expecting %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
- char *yyfmt;
- char const *yyf;
- static char const yyunexpected[] = "syntax error, unexpected %s";
- static char const yyexpecting[] = ", expecting %s";
- static char const yyor[] = " or %s";
- char yyformat[sizeof yyunexpected
- + sizeof yyexpecting - 1
- + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
- * (sizeof yyor - 1))];
- char const *yyprefix = yyexpecting;
-
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
-
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 1;
-
- yyarg[0] = yytname[yytype];
- yyfmt = yystpcpy (yyformat, yyunexpected);
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- yyformat[sizeof yyunexpected - 1] = '\0';
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (0, yytname[yyx]);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
- yyfmt = yystpcpy (yyfmt, yyprefix);
- yyprefix = yyor;
- }
-
- yyf = YY_(yyformat);
- yysize1 = yysize + yystrlen (yyf);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
-
- if (yysize_overflow)
- return YYSIZE_MAXIMUM;
-
- if (yyresult)
- {
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- char *yyp = yyresult;
- int yyi = 0;
- while ((*yyp = *yyf) != '\0')
- {
- if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyf += 2;
- }
- else
- {
- yyp++;
- yyf++;
- }
- }
- }
- return yysize;
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
+
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
}
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
}
#endif /* YYERROR_VERBOSE */
-
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep, scanner, ctx, scan_ctx)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
- void *scanner;
- struct parse_context *ctx;
- struct scan_context *scan_ctx;
-#endif
{
YYUSE (yyvaluep);
YYUSE (scanner);
YYUSE (ctx);
YYUSE (scan_ctx);
-
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
- switch (yytype)
- {
-
- default:
- break;
- }
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
}
-/* Prevent warnings from -Wmissing-prototypes. */
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
+/*----------.
+| yyparse. |
+`----------*/
-/*-------------------------.
-| yyparse or yypush_parse. |
-`-------------------------*/
-
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
int
yyparse (void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx)
-#else
-int
-yyparse (scanner, ctx, scan_ctx)
- void *scanner;
- struct parse_context *ctx;
- struct scan_context *scan_ctx;
-#endif
-#endif
{
/* The lookahead symbol. */
int yychar;
+
/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval;
+/* Default value used for initialization, for pacifying older GCCs
+ or non-GCC compilers. */
+YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
+YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
/* Number of syntax errors so far. */
int yynerrs;
@@ -1241,10 +1110,10 @@ YYSTYPE yylval;
int yyerrstatus;
/* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
- Refer to the stacks thru separate pointers, to allow yyoverflow
+ Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
@@ -1262,7 +1131,7 @@ YYSTYPE yylval;
int yyn;
int yyresult;
/* Lookahead token as an internal (translated) token number. */
- int yytoken;
+ int yytoken = 0;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
@@ -1280,9 +1149,8 @@ YYSTYPE yylval;
Keep to zero when no symbol should be popped. */
int yylen = 0;
- yytoken = 0;
- yyss = yyssa;
- yyvs = yyvsa;
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
yystacksize = YYINITDEPTH;
YYDPRINTF ((stderr, "Starting parse\n"));
@@ -1291,14 +1159,6 @@ YYSTYPE yylval;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
- yyssp = yyss;
- yyvsp = yyvs;
-
goto yysetstate;
/*------------------------------------------------------------.
@@ -1319,23 +1179,23 @@ YYSTYPE yylval;
#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yystacksize);
-
- yyss = yyss1;
- yyvs = yyvs1;
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
@@ -1343,22 +1203,22 @@ YYSTYPE yylval;
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
+ yystacksize = YYMAXDEPTH;
{
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
@@ -1367,10 +1227,10 @@ YYSTYPE yylval;
yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
+ (unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
+ YYABORT;
}
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
@@ -1390,7 +1250,7 @@ yybackup:
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
- if (yyn == YYPACT_NINF)
+ if (yypact_value_is_default (yyn))
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
@@ -1399,7 +1259,7 @@ yybackup:
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
+ yychar = yylex (&yylval, scanner);
}
if (yychar <= YYEOF)
@@ -1421,8 +1281,8 @@ yybackup:
yyn = yytable[yyn];
if (yyn <= 0)
{
- if (yyn == 0 || yyn == YYTABLE_NINF)
- goto yyerrlab;
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
@@ -1439,7 +1299,9 @@ yybackup:
yychar = YYEMPTY;
yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
goto yynewstate;
@@ -1462,7 +1324,7 @@ yyreduce:
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
+ '$$ = $1'.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
@@ -1476,11 +1338,9 @@ yyreduce:
switch (yyn)
{
case 11:
-
-/* Line 1455 of yacc.c */
-#line 123 "grammar.y"
+#line 123 "grammar.y" /* yacc.c:1646 */
{
- ctx->setting = config_setting_add(ctx->parent, (yyvsp[(1) - (1)].sval), CONFIG_TYPE_NONE);
+ ctx->setting = config_setting_add(ctx->parent, (yyvsp[0].sval), CONFIG_TYPE_NONE);
if(ctx->setting == NULL)
{
@@ -1492,12 +1352,11 @@ yyreduce:
CAPTURE_PARSE_POS(ctx->setting);
}
}
+#line 1356 "grammar.c" /* yacc.c:1646 */
break;
case 13:
-
-/* Line 1455 of yacc.c */
-#line 142 "grammar.y"
+#line 142 "grammar.y" /* yacc.c:1646 */
{
if(IN_LIST())
{
@@ -1511,22 +1370,20 @@ yyreduce:
ctx->setting = NULL;
}
}
+#line 1374 "grammar.c" /* yacc.c:1646 */
break;
case 14:
-
-/* Line 1455 of yacc.c */
-#line 157 "grammar.y"
+#line 157 "grammar.y" /* yacc.c:1646 */
{
if(ctx->parent)
ctx->parent = ctx->parent->parent;
}
+#line 1383 "grammar.c" /* yacc.c:1646 */
break;
case 15:
-
-/* Line 1455 of yacc.c */
-#line 165 "grammar.y"
+#line 165 "grammar.y" /* yacc.c:1646 */
{
if(IN_LIST())
{
@@ -1540,41 +1397,37 @@ yyreduce:
ctx->setting = NULL;
}
}
+#line 1401 "grammar.c" /* yacc.c:1646 */
break;
case 16:
-
-/* Line 1455 of yacc.c */
-#line 180 "grammar.y"
+#line 180 "grammar.y" /* yacc.c:1646 */
{
if(ctx->parent)
ctx->parent = ctx->parent->parent;
}
+#line 1410 "grammar.c" /* yacc.c:1646 */
break;
case 21:
-
-/* Line 1455 of yacc.c */
-#line 194 "grammar.y"
- { parsectx_append_string(ctx, (yyvsp[(1) - (1)].sval)); free((yyvsp[(1) - (1)].sval)); }
+#line 194 "grammar.y" /* yacc.c:1646 */
+ { parsectx_append_string(ctx, (yyvsp[0].sval)); free((yyvsp[0].sval)); }
+#line 1416 "grammar.c" /* yacc.c:1646 */
break;
case 22:
-
-/* Line 1455 of yacc.c */
-#line 195 "grammar.y"
- { parsectx_append_string(ctx, (yyvsp[(2) - (2)].sval)); free((yyvsp[(2) - (2)].sval)); }
+#line 195 "grammar.y" /* yacc.c:1646 */
+ { parsectx_append_string(ctx, (yyvsp[0].sval)); free((yyvsp[0].sval)); }
+#line 1422 "grammar.c" /* yacc.c:1646 */
break;
case 23:
-
-/* Line 1455 of yacc.c */
-#line 200 "grammar.y"
+#line 200 "grammar.y" /* yacc.c:1646 */
{
if(IN_ARRAY() || IN_LIST())
{
config_setting_t *e = config_setting_set_bool_elem(ctx->parent, -1,
- (int)(yyvsp[(1) - (1)].ival));
+ (int)(yyvsp[0].ival));
if(! e)
{
@@ -1587,18 +1440,17 @@ yyreduce:
}
}
else
- config_setting_set_bool(ctx->setting, (int)(yyvsp[(1) - (1)].ival));
+ config_setting_set_bool(ctx->setting, (int)(yyvsp[0].ival));
}
+#line 1446 "grammar.c" /* yacc.c:1646 */
break;
case 24:
-
-/* Line 1455 of yacc.c */
-#line 220 "grammar.y"
+#line 220 "grammar.y" /* yacc.c:1646 */
{
if(IN_ARRAY() || IN_LIST())
{
- config_setting_t *e = config_setting_set_int_elem(ctx->parent, -1, (yyvsp[(1) - (1)].ival));
+ config_setting_t *e = config_setting_set_int_elem(ctx->parent, -1, (yyvsp[0].ival));
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -1612,20 +1464,19 @@ yyreduce:
}
else
{
- config_setting_set_int(ctx->setting, (yyvsp[(1) - (1)].ival));
+ config_setting_set_int(ctx->setting, (yyvsp[0].ival));
config_setting_set_format(ctx->setting, CONFIG_FORMAT_DEFAULT);
}
}
+#line 1472 "grammar.c" /* yacc.c:1646 */
break;
case 25:
-
-/* Line 1455 of yacc.c */
-#line 242 "grammar.y"
+#line 242 "grammar.y" /* yacc.c:1646 */
{
if(IN_ARRAY() || IN_LIST())
{
- config_setting_t *e = config_setting_set_int64_elem(ctx->parent, -1, (yyvsp[(1) - (1)].llval));
+ config_setting_t *e = config_setting_set_int64_elem(ctx->parent, -1, (yyvsp[0].llval));
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -1639,20 +1490,19 @@ yyreduce:
}
else
{
- config_setting_set_int64(ctx->setting, (yyvsp[(1) - (1)].llval));
+ config_setting_set_int64(ctx->setting, (yyvsp[0].llval));
config_setting_set_format(ctx->setting, CONFIG_FORMAT_DEFAULT);
}
}
+#line 1498 "grammar.c" /* yacc.c:1646 */
break;
case 26:
-
-/* Line 1455 of yacc.c */
-#line 264 "grammar.y"
+#line 264 "grammar.y" /* yacc.c:1646 */
{
if(IN_ARRAY() || IN_LIST())
{
- config_setting_t *e = config_setting_set_int_elem(ctx->parent, -1, (yyvsp[(1) - (1)].ival));
+ config_setting_t *e = config_setting_set_int_elem(ctx->parent, -1, (yyvsp[0].ival));
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -1666,20 +1516,19 @@ yyreduce:
}
else
{
- config_setting_set_int(ctx->setting, (yyvsp[(1) - (1)].ival));
+ config_setting_set_int(ctx->setting, (yyvsp[0].ival));
config_setting_set_format(ctx->setting, CONFIG_FORMAT_HEX);
}
}
+#line 1524 "grammar.c" /* yacc.c:1646 */
break;
case 27:
-
-/* Line 1455 of yacc.c */
-#line 286 "grammar.y"
+#line 286 "grammar.y" /* yacc.c:1646 */
{
if(IN_ARRAY() || IN_LIST())
{
- config_setting_t *e = config_setting_set_int64_elem(ctx->parent, -1, (yyvsp[(1) - (1)].llval));
+ config_setting_t *e = config_setting_set_int64_elem(ctx->parent, -1, (yyvsp[0].llval));
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -1693,20 +1542,19 @@ yyreduce:
}
else
{
- config_setting_set_int64(ctx->setting, (yyvsp[(1) - (1)].llval));
+ config_setting_set_int64(ctx->setting, (yyvsp[0].llval));
config_setting_set_format(ctx->setting, CONFIG_FORMAT_HEX);
}
}
+#line 1550 "grammar.c" /* yacc.c:1646 */
break;
case 28:
-
-/* Line 1455 of yacc.c */
-#line 308 "grammar.y"
+#line 308 "grammar.y" /* yacc.c:1646 */
{
if(IN_ARRAY() || IN_LIST())
{
- config_setting_t *e = config_setting_set_float_elem(ctx->parent, -1, (yyvsp[(1) - (1)].fval));
+ config_setting_t *e = config_setting_set_float_elem(ctx->parent, -1, (yyvsp[0].fval));
if(! e)
{
libconfig_yyerror(scanner, ctx, scan_ctx, err_array_elem_type);
@@ -1718,14 +1566,13 @@ yyreduce:
}
}
else
- config_setting_set_float(ctx->setting, (yyvsp[(1) - (1)].fval));
+ config_setting_set_float(ctx->setting, (yyvsp[0].fval));
}
+#line 1572 "grammar.c" /* yacc.c:1646 */
break;
case 29:
-
-/* Line 1455 of yacc.c */
-#line 326 "grammar.y"
+#line 326 "grammar.y" /* yacc.c:1646 */
{
if(IN_ARRAY() || IN_LIST())
{
@@ -1750,12 +1597,11 @@ yyreduce:
_delete(s);
}
}
+#line 1601 "grammar.c" /* yacc.c:1646 */
break;
case 38:
-
-/* Line 1455 of yacc.c */
-#line 374 "grammar.y"
+#line 374 "grammar.y" /* yacc.c:1646 */
{
if(IN_LIST())
{
@@ -1769,24 +1615,33 @@ yyreduce:
ctx->setting = NULL;
}
}
+#line 1619 "grammar.c" /* yacc.c:1646 */
break;
case 39:
-
-/* Line 1455 of yacc.c */
-#line 389 "grammar.y"
+#line 389 "grammar.y" /* yacc.c:1646 */
{
if(ctx->parent)
ctx->parent = ctx->parent->parent;
}
+#line 1628 "grammar.c" /* yacc.c:1646 */
break;
-
-/* Line 1455 of yacc.c */
-#line 1788 "grammar.c"
+#line 1632 "grammar.c" /* yacc.c:1646 */
default: break;
}
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
@@ -1795,7 +1650,7 @@ yyreduce:
*++yyvsp = yyval;
- /* Now `shift' the result of the reduction. Determine what state
+ /* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
@@ -1810,10 +1665,14 @@ yyreduce:
goto yynewstate;
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
@@ -1821,37 +1680,36 @@ yyerrlab:
#if ! YYERROR_VERBOSE
yyerror (scanner, ctx, scan_ctx, YY_("syntax error"));
#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
{
- YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
- if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
- {
- YYSIZE_T yyalloc = 2 * yysize;
- if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
- yyalloc = YYSTACK_ALLOC_MAXIMUM;
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yyalloc);
- if (yymsg)
- yymsg_alloc = yyalloc;
- else
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- }
- }
-
- if (0 < yysize && yysize <= yymsg_alloc)
- {
- (void) yysyntax_error (yymsg, yystate, yychar);
- yyerror (scanner, ctx, scan_ctx, yymsg);
- }
- else
- {
- yyerror (scanner, ctx, scan_ctx, YY_("syntax error"));
- if (yysize != 0)
- goto yyexhaustedlab;
- }
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (scanner, ctx, scan_ctx, yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
}
+# undef YYSYNTAX_ERROR
#endif
}
@@ -1860,20 +1718,20 @@ yyerrlab:
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
- error, discard it. */
+ error, discard it. */
if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval, scanner, ctx, scan_ctx);
- yychar = YYEMPTY;
- }
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, scanner, ctx, scan_ctx);
+ yychar = YYEMPTY;
+ }
}
/* Else will try to reuse lookahead token after shifting the error
@@ -1892,7 +1750,7 @@ yyerrorlab:
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
@@ -1905,35 +1763,37 @@ yyerrorlab:
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
{
yyn = yypact[yystate];
- if (yyn != YYPACT_NINF)
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
- YYABORT;
+ YYABORT;
yydestruct ("Error: popping",
- yystos[yystate], yyvsp, scanner, ctx, scan_ctx);
+ yystos[yystate], yyvsp, scanner, ctx, scan_ctx);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
/* Shift the error token. */
@@ -1957,7 +1817,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#if !defined(yyoverflow) || YYERROR_VERBOSE
+#if !defined yyoverflow || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -1969,16 +1829,21 @@ yyexhaustedlab:
yyreturn:
if (yychar != YYEMPTY)
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval, scanner, ctx, scan_ctx);
- /* Do not reclaim the symbols of the rule which action triggered
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval, scanner, ctx, scan_ctx);
+ }
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp, scanner, ctx, scan_ctx);
+ yystos[*yyssp], yyvsp, scanner, ctx, scan_ctx);
YYPOPSTACK (1);
}
#ifndef yyoverflow
@@ -1989,13 +1854,7 @@ yyreturn:
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
+ return yyresult;
}
-
-
-
-/* Line 1675 of yacc.c */
-#line 395 "grammar.y"
-
+#line 395 "grammar.y" /* yacc.c:1906 */
diff --git a/lib/grammar.h b/lib/grammar.h
index 2ce199d..a43f4fc 100644
--- a/lib/grammar.h
+++ b/lib/grammar.h
@@ -1,21 +1,19 @@
+/* A Bison parser, made by GNU Bison 3.0.2. */
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
-/* Skeleton interface for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -28,38 +26,46 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
+#ifndef YY_LIBCONFIG_YY_GRAMMAR_H_INCLUDED
+# define YY_LIBCONFIG_YY_GRAMMAR_H_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int libconfig_yydebug;
+#endif
-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- TOK_BOOLEAN = 258,
- TOK_INTEGER = 259,
- TOK_HEX = 260,
- TOK_INTEGER64 = 261,
- TOK_HEX64 = 262,
- TOK_FLOAT = 263,
- TOK_STRING = 264,
- TOK_NAME = 265,
- TOK_EQUALS = 266,
- TOK_NEWLINE = 267,
- TOK_ARRAY_START = 268,
- TOK_ARRAY_END = 269,
- TOK_LIST_START = 270,
- TOK_LIST_END = 271,
- TOK_COMMA = 272,
- TOK_GROUP_START = 273,
- TOK_GROUP_END = 274,
- TOK_SEMICOLON = 275,
- TOK_GARBAGE = 276,
- TOK_ERROR = 277
- };
+ enum yytokentype
+ {
+ TOK_BOOLEAN = 258,
+ TOK_INTEGER = 259,
+ TOK_HEX = 260,
+ TOK_INTEGER64 = 261,
+ TOK_HEX64 = 262,
+ TOK_FLOAT = 263,
+ TOK_STRING = 264,
+ TOK_NAME = 265,
+ TOK_EQUALS = 266,
+ TOK_NEWLINE = 267,
+ TOK_ARRAY_START = 268,
+ TOK_ARRAY_END = 269,
+ TOK_LIST_START = 270,
+ TOK_LIST_END = 271,
+ TOK_COMMA = 272,
+ TOK_GROUP_START = 273,
+ TOK_GROUP_END = 274,
+ TOK_SEMICOLON = 275,
+ TOK_GARBAGE = 276,
+ TOK_ERROR = 277
+ };
#endif
/* Tokens. */
#define TOK_BOOLEAN 258
@@ -83,31 +89,26 @@
#define TOK_GARBAGE 276
#define TOK_ERROR 277
-
-
-
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+typedef union YYSTYPE YYSTYPE;
+union YYSTYPE
{
-
-/* Line 1676 of yacc.c */
-#line 85 "grammar.y"
+#line 85 "grammar.y" /* yacc.c:1909 */
int ival;
long long llval;
double fval;
char *sval;
-
-
-/* Line 1676 of yacc.c */
-#line 105 "grammar.h"
-} YYSTYPE;
+#line 105 "grammar.h" /* yacc.c:1909 */
+};
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
+int libconfig_yyparse (void *scanner, struct parse_context *ctx, struct scan_context *scan_ctx);
+#endif /* !YY_LIBCONFIG_YY_GRAMMAR_H_INCLUDED */
diff --git a/lib/grammar.y b/lib/grammar.y
index f578897..a43b470 100644
--- a/lib/grammar.y
+++ b/lib/grammar.y
@@ -1,7 +1,7 @@
/* -*- mode: C -*- */
/* ----------------------------------------------------------------------------
libconfig - A library for processing structured configuration files
- Copyright (C) 2005-2010 Mark A Lindner
+ Copyright (C) 2005-2014 Mark A Lindner
This file is part of libconfig.
@@ -22,7 +22,7 @@
*/
%defines
-%output="y.tab.c"
+%output "y.tab.c"
%pure-parser
%lex-param{void *scanner}
%parse-param{void *scanner}
diff --git a/lib/libconfig.c b/lib/libconfig.c
index edf7b8b..6724c2e 100644
--- a/lib/libconfig.c
+++ b/lib/libconfig.c
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
libconfig - A library for processing structured configuration files
- Copyright (C) 2005-2010 Mark A Lindner
+ Copyright (C) 2005-2014 Mark A Lindner
This file is part of libconfig.
@@ -24,41 +24,46 @@
#include "ac_config.h"
#endif
-#include "libconfig.h"
-#include "grammar.h"
-#include "scanner.h"
-#include "scanctx.h"
-#include "parsectx.h"
-#include "wincompat.h"
-
#include <locale.h>
#ifdef HAVE_XLOCALE_H
#include <xlocale.h>
#endif
+#include <ctype.h>
+#include <float.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <ctype.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include "libconfig.h"
+#include "parsectx.h"
+#include "scanctx.h"
+#include "wincompat.h"
+#include "grammar.h"
+#include "scanner.h"
#define PATH_TOKENS ":./"
#define CHUNK_SIZE 16
-#define FLOAT_PRECISION 10
+#define FLOAT_PRECISION DBL_DIG
-#define _new(T) (T *)calloc(sizeof(T), 1) /* zeroed */
+#define _new(T) (T *)calloc(1, sizeof(T)) /* zeroed */
#define _delete(P) free((void *)(P))
/* ------------------------------------------------------------------------- */
#ifndef LIBCONFIG_STATIC
-#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__))
+#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) \
+ || defined(WIN64) || defined(_WIN64))
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
return(TRUE);
}
-#endif /* WIN32 */
+#endif /* WIN32 || WIN64 */
#endif /* LIBCONFIG_STATIC */
/* ------------------------------------------------------------------------- */
@@ -66,14 +71,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
static const char *__io_error = "file I/O error";
static void __config_list_destroy(config_list_t *list);
-static void __config_write_setting(const config_setting_t *setting,
- FILE *stream, int depth,
- unsigned short tab_width);
-
-extern int libconfig_yyparse(void *scanner, struct parse_context *ctx,
- struct scan_context *scan_ctx);
-extern int libconfig_yylex_init_extra(struct scan_context *scan_ctx,
- yyscan_t *scanner);
+static void __config_write_setting(const config_t *config,
+ const config_setting_t *setting,
+ FILE *stream, int depth);
/* ------------------------------------------------------------------------- */
@@ -104,6 +104,11 @@ static void __config_locale_override(void)
/* ------------------------------------------------------------------------- */
+#define __config_has_option(C, O) \
+ (((C)->options & (O)) != 0)
+
+/* ------------------------------------------------------------------------- */
+
static void __config_locale_restore(void)
{
#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__)) \
@@ -165,9 +170,9 @@ static void __config_indent(FILE *stream, int depth, unsigned short w)
/* ------------------------------------------------------------------------- */
-static void __config_write_value(const config_value_t *value, int type,
- int format, int depth,
- unsigned short tab_width, FILE *stream)
+static void __config_write_value(const config_t *config,
+ const config_value_t *value, int type,
+ int format, int depth, FILE *stream)
{
char fbuf[64];
@@ -304,9 +309,9 @@ static void __config_write_value(const config_value_t *value, int type,
for(s = list->elements; len--; s++)
{
- __config_write_value(&((*s)->value), (*s)->type,
- config_setting_get_format(*s),
- depth + 1, tab_width, stream);
+ __config_write_value(config, &((*s)->value), (*s)->type,
+ config_setting_get_format(*s), depth + 1,
+ stream);
if(len)
fputc(',', stream);
@@ -333,9 +338,9 @@ static void __config_write_value(const config_value_t *value, int type,
for(s = list->elements; len--; s++)
{
- __config_write_value(&((*s)->value), (*s)->type,
- config_setting_get_format(*s),
- depth + 1, tab_width, stream);
+ __config_write_value(config, &((*s)->value), (*s)->type,
+ config_setting_get_format(*s), depth + 1,
+ stream);
if(len)
fputc(',', stream);
@@ -355,14 +360,14 @@ static void __config_write_value(const config_value_t *value, int type,
if(depth > 0)
{
-#ifdef K_AND_R_STYLE /* Horrendous, but many people like it. */
- fputc(' ', stream);
-#else
- fputc('\n', stream);
+ if((config->options & CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE) != 0)
+ {
+ fputc('\n', stream);
+
+ if(depth > 1)
+ __config_indent(stream, depth, config->tab_width);
+ }
- if(depth > 1)
- __config_indent(stream, depth, tab_width);
-#endif
fprintf(stream, "{\n");
}
@@ -372,11 +377,11 @@ static void __config_write_value(const config_value_t *value, int type,
config_setting_t **s;
for(s = list->elements; len--; s++)
- __config_write_setting(*s, stream, depth + 1, tab_width);
+ __config_write_setting(config, *s, stream, depth + 1);
}
if(depth > 1)
- __config_indent(stream, depth, tab_width);
+ __config_indent(stream, depth, config->tab_width);
if(depth > 0)
fputc('}', stream);
@@ -554,14 +559,13 @@ static int __config_read(config_t *config, FILE *stream, const char *filename,
yyscan_t scanner;
struct scan_context scan_ctx;
struct parse_context parse_ctx;
- YY_BUFFER_STATE buffer = NULL;
int r;
/* Reinitialize the config */
void (*destructor)(void *) = config->destructor;
const char *include_dir = config->include_dir;
unsigned short tab_width = config->tab_width;
- unsigned short flags = config->flags;
+ int options = config->options;
config->include_dir = NULL;
config_destroy(config);
@@ -570,7 +574,7 @@ static int __config_read(config_t *config, FILE *stream, const char *filename,
config->destructor = destructor;
config->include_dir = include_dir;
config->tab_width = tab_width;
- config->flags = flags;
+ config->options = options;
parsectx_init(&parse_ctx);
parse_ctx.config = config;
@@ -580,13 +584,14 @@ static int __config_read(config_t *config, FILE *stream, const char *filename,
__config_locale_override();
scanctx_init(&scan_ctx, filename);
+ config->root->file = scanctx_current_filename(&scan_ctx);
scan_ctx.config = config;
libconfig_yylex_init_extra(&scan_ctx, &scanner);
if(stream)
libconfig_yyrestart(stream, scanner);
else /* read from string */
- buffer = libconfig_yy_scan_string(str, scanner);
+ (void)libconfig_yy_scan_string(str, scanner);
libconfig_yyset_lineno(1, scanner);
r = libconfig_yyparse(scanner, &parse_ctx, &scan_ctx);
@@ -628,26 +633,36 @@ int config_read_string(config_t *config, const char *str)
/* ------------------------------------------------------------------------- */
-static void __config_write_setting(const config_setting_t *setting,
- FILE *stream, int depth,
- unsigned short tab_width)
+static void __config_write_setting(const config_t *config,
+ const config_setting_t *setting,
+ FILE *stream, int depth)
{
+ char group_assign_char = __config_has_option(
+ config, CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS) ? ':' : '=';
+
+ char nongroup_assign_char = __config_has_option(
+ config, CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS) ? ':' : '=';
+
if(depth > 1)
- __config_indent(stream, depth, tab_width);
+ __config_indent(stream, depth, config->tab_width);
+
if(setting->name)
{
fputs(setting->name, stream);
- fprintf(stream, " %c ", (setting->type == CONFIG_TYPE_GROUP ? ':' : '='));
+ fprintf(stream, " %c ", ((setting->type == CONFIG_TYPE_GROUP)
+ ? group_assign_char
+ : nongroup_assign_char));
}
- __config_write_value(&(setting->value), setting->type,
- config_setting_get_format(setting),
- depth, tab_width, stream);
+ __config_write_value(config, &(setting->value), setting->type,
+ config_setting_get_format(setting), depth, stream);
if(depth > 0)
{
- fputc(';', stream);
+ if(__config_has_option(config, CONFIG_OPTION_SEMICOLON_SEPARATORS))
+ fputc(';', stream);
+
fputc('\n', stream);
}
}
@@ -658,7 +673,7 @@ void config_write(const config_t *config, FILE *stream)
{
__config_locale_override();
- __config_write_setting(config->root, stream, 0, config->tab_width);
+ __config_write_setting(config, config->root, stream, 0);
__config_locale_restore();
}
@@ -667,10 +682,28 @@ void config_write(const config_t *config, FILE *stream)
int config_read_file(config_t *config, const char *filename)
{
- int ret;
+ int ret, ok = 0;
+
FILE *stream = fopen(filename, "rt");
- if(! stream)
+ if(stream != NULL)
+ {
+ // On some operating systems, fopen() succeeds on a directory.
+ int fd = fileno(stream);
+ struct stat statbuf;
+
+ if(fstat(fd, &statbuf) == 0)
+ {
+ // Only proceed if this is not a directory.
+ if(!S_ISDIR(statbuf.st_mode))
+ ok = 1;
+ }
+ }
+
+ if(!ok)
{
+ if(stream != NULL)
+ fclose(stream);
+
config->error_text = __io_error;
config->error_type = CONFIG_ERR_FILE_IO;
return(CONFIG_FALSE);
@@ -686,16 +719,16 @@ int config_read_file(config_t *config, const char *filename)
int config_write_file(config_t *config, const char *filename)
{
- FILE *f = fopen(filename, "wt");
- if(! f)
+ FILE *stream = fopen(filename, "wt");
+ if(stream == NULL)
{
config->error_text = __io_error;
config->error_type = CONFIG_ERR_FILE_IO;
return(CONFIG_FALSE);
}
- config_write(config, f);
- fclose(f);
+ config_write(config, stream);
+ fclose(stream);
config->error_type = CONFIG_ERR_NONE;
return(CONFIG_TRUE);
}
@@ -727,6 +760,9 @@ void config_init(config_t *config)
config->root = _new(config_setting_t);
config->root->type = CONFIG_TYPE_GROUP;
config->root->config = config;
+ config->options = (CONFIG_OPTION_SEMICOLON_SEPARATORS
+ | CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS
+ | CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE);
config->tab_width = 2;
}
@@ -735,16 +771,30 @@ void config_init(config_t *config)
void config_set_auto_convert(config_t *config, int flag)
{
if(flag)
- config->flags |= CONFIG_OPTION_AUTOCONVERT;
+ config->options |= CONFIG_OPTION_AUTOCONVERT;
else
- config->flags &= ~CONFIG_OPTION_AUTOCONVERT;
+ config->options &= ~CONFIG_OPTION_AUTOCONVERT;
}
/* ------------------------------------------------------------------------- */
int config_get_auto_convert(const config_t *config)
{
- return((config->flags & CONFIG_OPTION_AUTOCONVERT) != 0);
+ return(__config_has_option(config, CONFIG_OPTION_AUTOCONVERT));
+}
+
+/* ------------------------------------------------------------------------- */
+
+void config_set_options(config_t *config, int options)
+{
+ config->options = options;
+}
+
+/* ------------------------------------------------------------------------- */
+
+int config_get_options(const config_t *config)
+{
+ return(config->options);
}
/* ------------------------------------------------------------------------- */
@@ -798,7 +848,7 @@ static int __config_setting_get_int(const config_setting_t *setting,
return(CONFIG_TRUE);
case CONFIG_TYPE_FLOAT:
- if((setting->config->flags & CONFIG_OPTION_AUTOCONVERT) != 0)
+ if(__config_has_option(setting->config, CONFIG_OPTION_AUTOCONVERT))
{
*value = (int)(setting->value.fval);
return(CONFIG_TRUE);
@@ -836,7 +886,7 @@ static int __config_setting_get_int64(const config_setting_t *setting,
return(CONFIG_TRUE);
case CONFIG_TYPE_FLOAT:
- if((setting->config->flags & CONFIG_OPTION_AUTOCONVERT) != 0)
+ if(__config_has_option(setting->config, CONFIG_OPTION_AUTOCONVERT))
{
*value = (long long)(setting->value.fval);
return(CONFIG_TRUE);
@@ -1047,7 +1097,7 @@ int config_setting_set_float(config_setting_t *setting, double value)
return(CONFIG_TRUE);
case CONFIG_TYPE_INT:
- if((setting->config->flags & CONFIG_OPTION_AUTOCONVERT) != 0)
+ if(__config_has_option(setting->config, CONFIG_OPTION_AUTOCONVERT))
{
setting->value.ival = (int)value;
return(CONFIG_TRUE);
@@ -1056,7 +1106,7 @@ int config_setting_set_float(config_setting_t *setting, double value)
return(CONFIG_FALSE);
case CONFIG_TYPE_INT64:
- if((setting->config->flags & CONFIG_OPTION_AUTOCONVERT) != 0)
+ if(__config_has_option(setting->config, CONFIG_OPTION_AUTOCONVERT))
{
setting->value.llval = (long long)value;
return(CONFIG_TRUE);
@@ -1136,8 +1186,8 @@ short config_setting_get_format(const config_setting_t *setting)
/* ------------------------------------------------------------------------- */
-config_setting_t *config_lookup_from(config_setting_t *setting,
- const char *path)
+config_setting_t *config_setting_lookup(config_setting_t *setting,
+ const char *path)
{
const char *p = path;
config_setting_t *found;
@@ -1171,7 +1221,7 @@ config_setting_t *config_lookup_from(config_setting_t *setting,
config_setting_t *config_lookup(const config_t *config, const char *path)
{
- return(config_lookup_from(config->root, path));
+ return(config_setting_lookup(config->root, path));
}
/* ------------------------------------------------------------------------- */
@@ -1613,4 +1663,4 @@ int config_setting_index(const config_setting_t *setting)
}
/* ------------------------------------------------------------------------- */
-/* eof */
+
diff --git a/lib/libconfig.h b/lib/libconfig.h
index 1774a26..e819038 100644
--- a/lib/libconfig.h
+++ b/lib/libconfig.h
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
libconfig - A library for processing structured configuration files
- Copyright (C) 2005-2010 Mark A Lindner
+ Copyright (C) 2005-2014 Mark A Lindner
This file is part of libconfig.
@@ -40,8 +40,8 @@ extern "C" {
#endif /* WIN32 */
#define LIBCONFIG_VER_MAJOR 1
-#define LIBCONFIG_VER_MINOR 4
-#define LIBCONFIG_VER_REVISION 9
+#define LIBCONFIG_VER_MINOR 5
+#define LIBCONFIG_VER_REVISION 0
#include <stdio.h>
@@ -58,7 +58,11 @@ extern "C" {
#define CONFIG_FORMAT_DEFAULT 0
#define CONFIG_FORMAT_HEX 1
-#define CONFIG_OPTION_AUTOCONVERT 0x01
+#define CONFIG_OPTION_AUTOCONVERT 0x01
+#define CONFIG_OPTION_SEMICOLON_SEPARATORS 0x02
+#define CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS 0x04
+#define CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS 0x08
+#define CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE 0x10
#define CONFIG_TRUE (1)
#define CONFIG_FALSE (0)
@@ -102,7 +106,7 @@ typedef struct config_t
{
config_setting_t *root;
void (*destructor)(void *);
- unsigned short flags;
+ int options;
unsigned short tab_width;
short default_format;
const char *include_dir;
@@ -120,6 +124,9 @@ extern LIBCONFIG_API void config_write(const config_t *config, FILE *stream);
extern LIBCONFIG_API void config_set_default_format(config_t *config,
short format);
+extern LIBCONFIG_API void config_set_options(config_t *config, int options);
+extern LIBCONFIG_API int config_get_options(const config_t *config);
+
extern LIBCONFIG_API void config_set_auto_convert(config_t *config, int flag);
extern LIBCONFIG_API int config_get_auto_convert(const config_t *config);
@@ -260,7 +267,7 @@ extern LIBCONFIG_API void config_setting_set_hook(config_setting_t *setting,
extern LIBCONFIG_API config_setting_t *config_lookup(const config_t *config,
const char *path);
-extern LIBCONFIG_API config_setting_t *config_lookup_from(
+extern LIBCONFIG_API config_setting_t *config_setting_lookup(
config_setting_t *setting, const char *path);
extern LIBCONFIG_API int config_lookup_int(const config_t *config,
diff --git a/lib/libconfig.h++ b/lib/libconfig.h++
index 04be7a9..a43672c 100644
--- a/lib/libconfig.h++
+++ b/lib/libconfig.h++
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
libconfig - A library for processing structured configuration files
- Copyright (C) 2005-2010 Mark A Lindner
+ Copyright (C) 2005-2014 Mark A Lindner
This file is part of libconfig.
@@ -40,8 +40,8 @@
#endif /* WIN32 */
#define LIBCONFIGXX_VER_MAJOR 1
-#define LIBCONFIGXX_VER_MINOR 4
-#define LIBCONFIGXX_VER_REVISION 9
+#define LIBCONFIGXX_VER_MINOR 5
+#define LIBCONFIGXX_VER_REVISION 0
struct config_t; // fwd decl
struct config_setting_t; // fwd decl
@@ -51,13 +51,18 @@ namespace libconfig {
class LIBCONFIGXX_API ConfigException : public std::exception { };
class Setting; // fwd decl
+class SettingIterator;
+class SettingConstIterator;
class LIBCONFIGXX_API SettingException : public ConfigException
{
- friend class Config;
-
public:
+ SettingException(const Setting &setting);
+ SettingException(const Setting &setting, int idx);
+ SettingException(const Setting &setting, const char *name);
+ SettingException(const char *path);
+
SettingException(const SettingException &other);
SettingException& operator=(const SettingException &other);
@@ -67,13 +72,6 @@ class LIBCONFIGXX_API SettingException : public ConfigException
virtual const char *what() const throw();
- protected:
-
- SettingException(const Setting &setting);
- SettingException(const Setting &setting, int idx);
- SettingException(const Setting &setting, const char *name);
- SettingException(const char *path);
-
private:
char *_path;
@@ -81,48 +79,33 @@ class LIBCONFIGXX_API SettingException : public ConfigException
class LIBCONFIGXX_API SettingTypeException : public SettingException
{
- friend class Config;
- friend class Setting;
-
public:
- virtual const char *what() const throw();
-
- private:
-
SettingTypeException(const Setting &setting);
SettingTypeException(const Setting &setting, int idx);
SettingTypeException(const Setting &setting, const char *name);
+
+ virtual const char *what() const throw();
};
class LIBCONFIGXX_API SettingNotFoundException : public SettingException
{
- friend class Config;
- friend class Setting;
-
public:
- virtual const char *what() const throw();
-
- private:
-
+ SettingNotFoundException(const char *path);
SettingNotFoundException(const Setting &setting, int idx);
SettingNotFoundException(const Setting &setting, const char *name);
- SettingNotFoundException(const char *path);
+
+ virtual const char *what() const throw();
};
class LIBCONFIGXX_API SettingNameException : public SettingException
{
- friend class Config;
- friend class Setting;
-
public:
- virtual const char *what() const throw();
-
- private:
-
SettingNameException(const Setting &setting, const char *name);
+
+ virtual const char *what() const throw();
};
class LIBCONFIGXX_API FileIOException : public ConfigException
@@ -134,29 +117,27 @@ class LIBCONFIGXX_API FileIOException : public ConfigException
class LIBCONFIGXX_API ParseException : public ConfigException
{
- friend class Config;
-
public:
+ ParseException(const char *file, int line, const char *error);
+
ParseException(const ParseException &other);
virtual ~ParseException() throw();
- inline const char *getFile() const throw()
+ inline const char *getFile() const
{ return(_file); }
- inline int getLine() const throw()
+ inline int getLine() const
{ return(_line); }
- inline const char *getError() const throw()
+ inline const char *getError() const
{ return(_error); }
virtual const char *what() const throw();
private:
- ParseException(const char *file, int line, const char *error);
-
const char *_file;
int _line;
const char *_error;
@@ -189,182 +170,288 @@ class LIBCONFIGXX_API Setting
FormatHex = 1
};
- private:
+ enum Option
+ {
+ OptionNone = 0,
+ OptionAutoConvert = 0x01,
+ OptionSemicolonSeparators = 0x02,
+ OptionColonAssignmentForGroups = 0x04,
+ OptionColonAssignmentForNonGroups = 0x08,
+ OptionOpenBraceOnSeparateLine = 0x10
+ };
- config_setting_t *_setting;
- Type _type;
- Format _format;
+ typedef SettingIterator iterator;
+ typedef SettingConstIterator const_iterator;
- Setting(config_setting_t *setting);
+ public:
- void assertType(Type type) const throw(SettingTypeException);
- static Setting & wrapSetting(config_setting_t *setting);
+ virtual ~Setting();
+
+ inline Type getType() const { return(_type); }
+
+ inline Format getFormat() const { return(_format); }
+ void setFormat(Format format);
+
+ operator bool() const;
+ operator int() const;
+ operator unsigned int() const;
+ operator long() const;
+ operator unsigned long() const;
+ operator long long() const;
+ operator unsigned long long() const;
+ operator double() const;
+ operator float() const;
+ operator const char *() const;
+ operator std::string() const;
+
+ inline const char *c_str() const
+ { return operator const char *(); }
+
+ Setting & operator=(bool value);
+ Setting & operator=(int value);
+ Setting & operator=(long value);
+ Setting & operator=(const long long &value);
+ Setting & operator=(const double &value);
+ Setting & operator=(float value);
+ Setting & operator=(const char *value);
+ Setting & operator=(const std::string &value);
+
+ Setting & lookup(const char *path) const;
+ inline Setting & lookup(const std::string &path) const
+ { return(lookup(path.c_str())); }
- Setting(const Setting& other); // not supported
- Setting& operator=(const Setting& other); // not supported
+ Setting & operator[](const char *name) const;
+ Setting & operator[](int index) const;
- public:
+ bool lookupValue(const char *name, bool &value) const;
+ bool lookupValue(const char *name, int &value) const;
+ bool lookupValue(const char *name, unsigned int &value) const;
+ bool lookupValue(const char *name, long long &value) const;
+ bool lookupValue(const char *name, unsigned long long &value) const;
+ bool lookupValue(const char *name, double &value) const;
+ bool lookupValue(const char *name, float &value) const;
+ bool lookupValue(const char *name, const char *&value) const;
+ bool lookupValue(const char *name, std::string &value) const;
- virtual ~Setting() throw();
-
- inline Type getType() const throw() { return(_type); }
-
- inline Format getFormat() const throw() { return(_format); }
- void setFormat(Format format) throw();
-
- operator bool() const throw(SettingTypeException);
- operator int() const throw(SettingTypeException);
- operator unsigned int() const throw(SettingTypeException);
- operator long() const throw(SettingTypeException);
- operator unsigned long() const throw(SettingTypeException);
- operator long long() const throw(SettingTypeException);
- operator unsigned long long() const throw(SettingTypeException);
- operator double() const throw(SettingTypeException);
- operator float() const throw(SettingTypeException);
- operator const char *() const throw(SettingTypeException);
- operator std::string() const throw(SettingTypeException);
-
- inline const char *c_str() const throw(SettingTypeException)
- { return operator const char*(); }
-
- Setting & operator=(bool value) throw(SettingTypeException);
- Setting & operator=(int value) throw(SettingTypeException);
- Setting & operator=(long value) throw(SettingTypeException);
- Setting & operator=(const long long &value) throw(SettingTypeException);
- Setting & operator=(const double &value) throw(SettingTypeException);
- Setting & operator=(float value) throw(SettingTypeException);
- Setting & operator=(const char *value) throw(SettingTypeException);
- Setting & operator=(const std::string &value) throw(SettingTypeException);
-
- Setting & operator[](const char *key) const
- throw(SettingTypeException, SettingNotFoundException);
-
- inline Setting & operator[](const std::string &key) const
- throw(SettingTypeException, SettingNotFoundException)
- { return(operator[](key.c_str())); }
-
- Setting & operator[](int index) const
- throw(SettingTypeException, SettingNotFoundException);
-
- bool lookupValue(const char *name, bool &value) const throw();
- bool lookupValue(const char *name, int &value) const throw();
- bool lookupValue(const char *name, unsigned int &value) const throw();
- bool lookupValue(const char *name, long long &value) const throw();
- bool lookupValue(const char *name, unsigned long long &value)
- const throw();
- bool lookupValue(const char *name, double &value) const throw();
- bool lookupValue(const char *name, float &value) const throw();
- bool lookupValue(const char *name, const char *&value) const throw();
- bool lookupValue(const char *name, std::string &value) const throw();
-
- inline bool lookupValue(const std::string &name, bool &value)
- const throw()
+ inline bool lookupValue(const std::string &name, bool &value) const
{ return(lookupValue(name.c_str(), value)); }
- inline bool lookupValue(const std::string &name, int &value)
- const throw()
+ inline bool lookupValue(const std::string &name, int &value) const
{ return(lookupValue(name.c_str(), value)); }
- inline bool lookupValue(const std::string &name, unsigned int &value)
- const throw()
+ inline bool lookupValue(const std::string &name, unsigned int &value) const
{ return(lookupValue(name.c_str(), value)); }
- inline bool lookupValue(const std::string &name, long long &value)
- const throw()
+ inline bool lookupValue(const std::string &name, long long &value) const
{ return(lookupValue(name.c_str(), value)); }
inline bool lookupValue(const std::string &name,
- unsigned long long &value) const throw()
+ unsigned long long &value) const
{ return(lookupValue(name.c_str(), value)); }
inline bool lookupValue(const std::string &name, double &value) const
- throw()
{ return(lookupValue(name.c_str(), value)); }
inline bool lookupValue(const std::string &name, float &value) const
- throw()
{ return(lookupValue(name.c_str(), value)); }
inline bool lookupValue(const std::string &name, const char *&value) const
- throw()
{ return(lookupValue(name.c_str(), value)); }
inline bool lookupValue(const std::string &name, std::string &value) const
- throw()
{ return(lookupValue(name.c_str(), value)); }
- void remove(const char *name)
- throw(SettingTypeException, SettingNotFoundException);
+ void remove(const char *name);
- inline void remove(const std::string & name)
- throw(SettingTypeException, SettingNotFoundException)
+ inline void remove(const std::string &name)
{ remove(name.c_str()); }
- void remove(unsigned int idx)
- throw(SettingTypeException, SettingNotFoundException);
+ void remove(unsigned int idx);
+
+ Setting & add(const char *name, Type type);
- inline Setting & add(const std::string & name, Type type)
- throw(SettingNameException, SettingTypeException)
+ inline Setting & add(const std::string &name, Type type)
{ return(add(name.c_str(), type)); }
- Setting & add(const char *name, Type type)
- throw(SettingNameException, SettingTypeException);
+ Setting & add(Type type);
- Setting & add(Type type) throw(SettingTypeException);
+ bool exists(const char *name) const;
- inline bool exists(const std::string &name) const throw()
+ inline bool exists(const std::string &name) const
{ return(exists(name.c_str())); }
- bool exists(const char *name) const throw();
-
- int getLength() const throw();
- const char *getName() const throw();
+ int getLength() const;
+ const char *getName() const;
std::string getPath() const;
- int getIndex() const throw();
+ int getIndex() const;
- const Setting & getParent() const throw(SettingNotFoundException);
- Setting & getParent() throw(SettingNotFoundException);
+ const Setting & getParent() const;
+ Setting & getParent();
- bool isRoot() const throw();
+ bool isRoot() const;
- inline bool isGroup() const throw()
+ inline bool isGroup() const
{ return(_type == TypeGroup); }
- inline bool isArray() const throw()
+ inline bool isArray() const
{ return(_type == TypeArray); }
- inline bool isList() const throw()
+ inline bool isList() const
{ return(_type == TypeList); }
- inline bool isAggregate() const throw()
+ inline bool isAggregate() const
{ return(_type >= TypeGroup); }
- inline bool isScalar() const throw()
+ inline bool isScalar() const
{ return((_type > TypeNone) && (_type < TypeGroup)); }
- inline bool isNumber() const throw()
- { return((_type == TypeInt) || (_type == TypeInt64)
- || (_type == TypeFloat)); }
+ inline bool isNumber() const
+ {
+ return((_type == TypeInt) || (_type == TypeInt64) || (_type == TypeFloat));
+ }
+
+ unsigned int getSourceLine() const;
+ const char *getSourceFile() const;
+
+ iterator begin();
+ iterator end();
- unsigned int getSourceLine() const throw();
- const char *getSourceFile() const throw();
+ const_iterator begin() const;
+ const_iterator end() const;
+
+ private:
+
+ config_setting_t *_setting;
+ Type _type;
+ Format _format;
+
+ Setting(config_setting_t *setting);
+
+ void assertType(Type type) const;
+ static Setting & wrapSetting(config_setting_t *setting);
+
+ Setting(const Setting& other); // not supported
+ Setting& operator=(const Setting& other); // not supported
};
-class LIBCONFIGXX_API Config
+
+class LIBCONFIGXX_API SettingIterator
{
+ public:
+
+ SettingIterator(Setting &setting, bool endIterator = false);
+ SettingIterator(const SettingIterator &other);
+ SettingIterator& operator=(const SettingIterator &other);
+
+ // Equality comparison.
+ inline bool operator==(SettingIterator const &other) const
+ { return((_setting == other._setting) && (_idx == other._idx)); }
+
+ inline bool operator!=(SettingIterator const &other) const
+ { return(!operator==(other)); }
+
+ bool operator<(SettingIterator const &other) const;
+
+ // Dereference operators.
+ inline Setting & operator*()
+ { return((*_setting)[_idx]); }
+
+ inline Setting * operator->()
+ { return(&(*_setting)[_idx]); }
+
+ inline const Setting & operator*() const
+ { return(*_setting)[_idx]; }
+ inline const Setting * operator->() const
+ { return(&(*_setting)[_idx]); }
+
+ // Increment and decrement operators.
+ SettingIterator & operator++();
+ SettingIterator operator++(int);
+
+ SettingIterator & operator--();
+ SettingIterator operator--(int);
+
+ // Arithmetic operators.
+ SettingIterator operator+(int offset) const;
+ SettingIterator & operator+=(int offset);
+
+ SettingIterator operator-(int offset) const;
+ SettingIterator & operator-=(int offset);
+
+ int operator-(const SettingIterator &other) const;
+
private:
- config_t *_config;
+ Setting *_setting;
- static void ConfigDestructor(void *arg);
- Config(const Config& other); // not supported
- Config& operator=(const Config& other); // not supported
+ int _count;
+ int _idx;
+};
+
+SettingIterator operator+(int offset, const SettingIterator &si);
+class LIBCONFIGXX_API SettingConstIterator
+{
+ public:
+
+ SettingConstIterator(const Setting &setting, bool endIterator = false);
+ SettingConstIterator(const SettingConstIterator &rhs);
+ SettingConstIterator& operator=(const SettingConstIterator &rhs);
+
+ // Equality comparison.
+ bool operator==(SettingConstIterator const &other) const
+ { return((_setting == other._setting) && (_idx == other._idx)); }
+
+ inline bool operator!=(SettingConstIterator const &other) const
+ { return(!operator==(other)); }
+
+ // Dereference operators.
+ inline Setting const & operator*()
+ { return((*_setting)[_idx]); }
+ inline Setting const * operator->()
+ { return(&(*_setting)[_idx]); }
+
+ inline const Setting& operator*() const
+ { return((*_setting)[_idx]); }
+ inline const Setting * operator->() const
+ { return(&(*_setting)[_idx]); }
+
+ // Increment and decrement operators.
+ SettingConstIterator & operator++();
+ SettingConstIterator operator++(int);
+
+ SettingConstIterator & operator--();
+ SettingConstIterator operator--(int);
+
+ // Arithmetic operators.
+ SettingConstIterator operator+(int offset) const;
+ SettingConstIterator & operator+=(int offset);
+
+ SettingConstIterator operator-(int offset) const;
+ SettingConstIterator & operator-=(int offset);
+
+ int operator-(const SettingConstIterator &other) const;
+
+ private:
+
+ const Setting *_setting;
+
+ int _count;
+ int _idx;
+};
+
+SettingConstIterator operator+(int offset, const SettingConstIterator &si);
+
+class LIBCONFIGXX_API Config
+{
public:
Config();
virtual ~Config();
+ void setOptions(int options);
+ int getOptions() const;
+
void setAutoConvert(bool flag);
bool getAutoConvert() const;
@@ -372,85 +459,80 @@ class LIBCONFIGXX_API Config
inline Setting::Format getDefaultFormat() const
{ return(_defaultFormat); }
- void setTabWidth(unsigned short width) throw();
- unsigned short getTabWidth() const throw();
+ void setTabWidth(unsigned short width);
+ unsigned short getTabWidth() const;
- void setIncludeDir(const char *includeDir) throw();
- const char *getIncludeDir() const throw();
+ void setIncludeDir(const char *includeDir);
+ const char *getIncludeDir() const;
- void read(FILE *stream) throw(ParseException);
+ void read(FILE *stream);
void write(FILE *stream) const;
- void readString(const char *str) throw(ParseException);
- inline void readString(const std::string &str) throw(ParseException)
+ void readString(const char *str);
+ inline void readString(const std::string &str)
{ return(readString(str.c_str())); }
- void readFile(const char *filename) throw(FileIOException, ParseException);
- void writeFile(const char *filename) throw(FileIOException);
+ void readFile(const char *filename);
+ void writeFile(const char *filename);
+ Setting & lookup(const char *path) const;
inline Setting & lookup(const std::string &path) const
- throw(SettingNotFoundException)
{ return(lookup(path.c_str())); }
- Setting & lookup(const char *path) const throw(SettingNotFoundException);
-
- inline bool exists(const std::string & path) const throw()
+ bool exists(const char *path) const;
+ inline bool exists(const std::string &path) const
{ return(exists(path.c_str())); }
- bool exists(const char *path) const throw();
-
- bool lookupValue(const char *path, bool &value) const throw();
- bool lookupValue(const char *path, int &value) const throw();
- bool lookupValue(const char *path, unsigned int &value) const throw();
- bool lookupValue(const char *path, long long &value) const throw();
- bool lookupValue(const char *path, unsigned long long &value)
- const throw();
- bool lookupValue(const char *path, double &value) const throw();
- bool lookupValue(const char *path, float &value) const throw();
- bool lookupValue(const char *path, const char *&value) const throw();
- bool lookupValue(const char *path, std::string &value) const throw();
-
- inline bool lookupValue(const std::string &path, bool &value) const throw()
+ bool lookupValue(const char *path, bool &value) const;
+ bool lookupValue(const char *path, int &value) const;
+ bool lookupValue(const char *path, unsigned int &value) const;
+ bool lookupValue(const char *path, long long &value) const;
+ bool lookupValue(const char *path, unsigned long long &value) const;
+ bool lookupValue(const char *path, double &value) const;
+ bool lookupValue(const char *path, float &value) const;
+ bool lookupValue(const char *path, const char *&value) const;
+ bool lookupValue(const char *path, std::string &value) const;
+
+ inline bool lookupValue(const std::string &path, bool &value) const
{ return(lookupValue(path.c_str(), value)); }
- inline bool lookupValue(const std::string &path, int &value) const throw()
+ inline bool lookupValue(const std::string &path, int &value) const
{ return(lookupValue(path.c_str(), value)); }
- inline bool lookupValue(const std::string &path, unsigned int &value)
- const throw()
+ inline bool lookupValue(const std::string &path, unsigned int &value) const
{ return(lookupValue(path.c_str(), value)); }
- inline bool lookupValue(const std::string &path, long long &value)
- const throw()
+ inline bool lookupValue(const std::string &path, long long &value) const
{ return(lookupValue(path.c_str(), value)); }
inline bool lookupValue(const std::string &path,
- unsigned long long &value) const throw()
+ unsigned long long &value) const
{ return(lookupValue(path.c_str(), value)); }
- inline bool lookupValue(const std::string &path, double &value)
- const throw()
+ inline bool lookupValue(const std::string &path, double &value) const
{ return(lookupValue(path.c_str(), value)); }
- inline bool lookupValue(const std::string &path, float &value)
- const throw()
+ inline bool lookupValue(const std::string &path, float &value) const
{ return(lookupValue(path.c_str(), value)); }
- inline bool lookupValue(const std::string &path, const char *&value)
- const throw()
+ inline bool lookupValue(const std::string &path, const char *&value) const
{ return(lookupValue(path.c_str(), value)); }
- inline bool lookupValue(const std::string &path, std::string &value)
- const throw()
+ inline bool lookupValue(const std::string &path, std::string &value) const
{ return(lookupValue(path.c_str(), value)); }
Setting & getRoot() const;
private:
+ static void ConfigDestructor(void *arg);
+ void handleError() const;
+
+ config_t *_config;
Setting::Format _defaultFormat;
- void handleError() const;
+ Config(const Config& other); // not supported
+ Config& operator=(const Config& other); // not supported
};
} // namespace libconfig
diff --git a/lib/libconfig.hh b/lib/libconfig.hh
index 6883a31..37fa052 100644
--- a/lib/libconfig.hh
+++ b/lib/libconfig.hh
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
libconfig - A structured configuration file parsing library
- Copyright (C) 2005-2010 Mark A Lindner
+ Copyright (C) 2005-2014 Mark A Lindner
This file is part of libconfig.
diff --git a/lib/libconfigcpp.c++ b/lib/libconfigcpp.c++
index 6d196e7..af06fc5 100644
--- a/lib/libconfigcpp.c++
+++ b/lib/libconfigcpp.c++
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
libconfig - A library for processing structured configuration files
- Copyright (C) 2005-2010 Mark A Lindner
+ Copyright (C) 2005-2014 Mark A Lindner
This file is part of libconfig.
@@ -327,6 +327,20 @@ void Config::setAutoConvert(bool flag)
// ---------------------------------------------------------------------------
+void Config::setOptions(int options)
+{
+ config_set_options(_config, options);
+}
+
+// ---------------------------------------------------------------------------
+
+int Config::getOptions() const
+{
+ return(config_get_options(_config));
+}
+
+// ---------------------------------------------------------------------------
+
bool Config::getAutoConvert() const
{
return(config_get_auto_convert(_config) != CONFIG_FALSE);
@@ -346,28 +360,28 @@ void Config::setDefaultFormat(Setting::Format format)
// ---------------------------------------------------------------------------
-void Config::setTabWidth(unsigned short width) throw()
+void Config::setTabWidth(unsigned short width)
{
config_set_tab_width(_config, width);
}
// ---------------------------------------------------------------------------
-unsigned short Config::getTabWidth() const throw()
+unsigned short Config::getTabWidth() const
{
return(config_get_tab_width(_config));
}
// ---------------------------------------------------------------------------
-void Config::setIncludeDir(const char *includeDir) throw()
+void Config::setIncludeDir(const char *includeDir)
{
config_set_include_dir(_config, includeDir);
}
// ---------------------------------------------------------------------------
-const char *Config::getIncludeDir() const throw()
+const char *Config::getIncludeDir() const
{
return(config_get_include_dir(_config));
}
@@ -395,7 +409,7 @@ void Config::handleError() const
// ---------------------------------------------------------------------------
-void Config::read(FILE *stream) throw(ParseException)
+void Config::read(FILE *stream)
{
if(! config_read(_config, stream))
handleError();
@@ -403,7 +417,7 @@ void Config::read(FILE *stream) throw(ParseException)
// ---------------------------------------------------------------------------
-void Config::readString(const char *str) throw(ParseException)
+void Config::readString(const char *str)
{
if(! config_read_string(_config, str))
handleError();
@@ -418,8 +432,7 @@ void Config::write(FILE *stream) const
// ---------------------------------------------------------------------------
-void Config::readFile(const char *filename) throw(FileIOException,
- ParseException)
+void Config::readFile(const char *filename)
{
if(! config_read_file(_config, filename))
handleError();
@@ -427,7 +440,7 @@ void Config::readFile(const char *filename) throw(FileIOException,
// ---------------------------------------------------------------------------
-void Config::writeFile(const char *filename) throw(FileIOException)
+void Config::writeFile(const char *filename)
{
if(! config_write_file(_config, filename))
handleError();
@@ -436,7 +449,6 @@ void Config::writeFile(const char *filename) throw(FileIOException)
// ---------------------------------------------------------------------------
Setting & Config::lookup(const char *path) const
- throw(SettingNotFoundException)
{
config_setting_t *s = config_lookup(_config, path);
if(! s)
@@ -447,7 +459,7 @@ Setting & Config::lookup(const char *path) const
// ---------------------------------------------------------------------------
-bool Config::exists(const char *path) const throw()
+bool Config::exists(const char *path) const
{
config_setting_t *s = config_lookup(_config, path);
@@ -470,64 +482,63 @@ bool Config::exists(const char *path) const throw()
// ---------------------------------------------------------------------------
-bool Config::lookupValue(const char *path, bool &value) const throw()
+bool Config::lookupValue(const char *path, bool &value) const
{
CONFIG_LOOKUP_NO_EXCEPTIONS(path, bool, value);
}
// ---------------------------------------------------------------------------
-bool Config::lookupValue(const char *path, int &value) const throw()
+bool Config::lookupValue(const char *path, int &value) const
{
CONFIG_LOOKUP_NO_EXCEPTIONS(path, int, value);
}
// ---------------------------------------------------------------------------
-bool Config::lookupValue(const char *path, unsigned int &value) const throw()
+bool Config::lookupValue(const char *path, unsigned int &value) const
{
CONFIG_LOOKUP_NO_EXCEPTIONS(path, unsigned int, value);
}
// ---------------------------------------------------------------------------
-bool Config::lookupValue(const char *path, long long &value) const throw()
+bool Config::lookupValue(const char *path, long long &value) const
{
CONFIG_LOOKUP_NO_EXCEPTIONS(path, long long, value);
}
// ---------------------------------------------------------------------------
-bool Config::lookupValue(const char *path, unsigned long long &value)
- const throw()
+bool Config::lookupValue(const char *path, unsigned long long &value) const
{
CONFIG_LOOKUP_NO_EXCEPTIONS(path, unsigned long long, value);
}
// ---------------------------------------------------------------------------
-bool Config::lookupValue(const char *path, double &value) const throw()
+bool Config::lookupValue(const char *path, double &value) const
{
CONFIG_LOOKUP_NO_EXCEPTIONS(path, double, value);
}
// ---------------------------------------------------------------------------
-bool Config::lookupValue(const char *path, float &value) const throw()
+bool Config::lookupValue(const char *path, float &value) const
{
CONFIG_LOOKUP_NO_EXCEPTIONS(path, float, value);
}
// ---------------------------------------------------------------------------
-bool Config::lookupValue(const char *path, const char *&value) const throw()
+bool Config::lookupValue(const char *path, const char *&value) const
{
CONFIG_LOOKUP_NO_EXCEPTIONS(path, const char *, value);
}
// ---------------------------------------------------------------------------
-bool Config::lookupValue(const char *path, std::string &value) const throw()
+bool Config::lookupValue(const char *path, std::string &value) const
{
CONFIG_LOOKUP_NO_EXCEPTIONS(path, const char *, value);
}
@@ -599,14 +610,14 @@ Setting::Setting(config_setting_t *setting)
// ---------------------------------------------------------------------------
-Setting::~Setting() throw()
+Setting::~Setting()
{
_setting = NULL;
}
// ---------------------------------------------------------------------------
-void Setting::setFormat(Format format) throw()
+void Setting::setFormat(Format format)
{
if((_type == TypeInt) || (_type == TypeInt64))
{
@@ -623,7 +634,7 @@ void Setting::setFormat(Format format) throw()
// ---------------------------------------------------------------------------
-Setting::operator bool() const throw(SettingTypeException)
+Setting::operator bool() const
{
assertType(TypeBoolean);
@@ -632,7 +643,7 @@ Setting::operator bool() const throw(SettingTypeException)
// ---------------------------------------------------------------------------
-Setting::operator int() const throw(SettingTypeException)
+Setting::operator int() const
{
assertType(TypeInt);
@@ -641,7 +652,7 @@ Setting::operator int() const throw(SettingTypeException)
// ---------------------------------------------------------------------------
-Setting::operator unsigned int() const throw(SettingTypeException)
+Setting::operator unsigned int() const
{
assertType(TypeInt);
@@ -655,7 +666,7 @@ Setting::operator unsigned int() const throw(SettingTypeException)
// ---------------------------------------------------------------------------
-Setting::operator long() const throw(SettingTypeException)
+Setting::operator long() const
{
if(sizeof(long) == sizeof(long long))
return operator long long();
@@ -665,7 +676,7 @@ Setting::operator long() const throw(SettingTypeException)
// ---------------------------------------------------------------------------
-Setting::operator unsigned long() const throw(SettingTypeException)
+Setting::operator unsigned long() const
{
if(sizeof(long) == sizeof(long long))
return operator unsigned long long();
@@ -675,7 +686,7 @@ Setting::operator unsigned long() const throw(SettingTypeException)
// ---------------------------------------------------------------------------
-Setting::operator long long() const throw(SettingTypeException)
+Setting::operator long long() const
{
assertType(TypeInt64);
@@ -684,7 +695,7 @@ Setting::operator long long() const throw(SettingTypeException)
// ---------------------------------------------------------------------------
-Setting::operator unsigned long long() const throw(SettingTypeException)
+Setting::operator unsigned long long() const
{
assertType(TypeInt64);
@@ -698,7 +709,7 @@ Setting::operator unsigned long long() const throw(SettingTypeException)
// ---------------------------------------------------------------------------
-Setting::operator double() const throw(SettingTypeException)
+Setting::operator double() const
{
assertType(TypeFloat);
@@ -707,7 +718,7 @@ Setting::operator double() const throw(SettingTypeException)
// ---------------------------------------------------------------------------
-Setting::operator float() const throw(SettingTypeException)
+Setting::operator float() const
{
assertType(TypeFloat);
@@ -717,7 +728,7 @@ Setting::operator float() const throw(SettingTypeException)
// ---------------------------------------------------------------------------
-Setting::operator const char *() const throw(SettingTypeException)
+Setting::operator const char *() const
{
assertType(TypeString);
@@ -726,7 +737,7 @@ Setting::operator const char *() const throw(SettingTypeException)
// ---------------------------------------------------------------------------
-Setting::operator std::string() const throw(SettingTypeException)
+Setting::operator std::string() const
{
assertType(TypeString);
@@ -741,7 +752,7 @@ Setting::operator std::string() const throw(SettingTypeException)
// ---------------------------------------------------------------------------
-Setting & Setting::operator=(bool value) throw(SettingTypeException)
+Setting & Setting::operator=(bool value)
{
assertType(TypeBoolean);
@@ -752,7 +763,7 @@ Setting & Setting::operator=(bool value) throw(SettingTypeException)
// ---------------------------------------------------------------------------
-Setting & Setting::operator=(int value) throw(SettingTypeException)
+Setting & Setting::operator=(int value)
{
assertType(TypeInt);
@@ -763,7 +774,7 @@ Setting & Setting::operator=(int value) throw(SettingTypeException)
// ---------------------------------------------------------------------------
-Setting & Setting::operator=(long value) throw(SettingTypeException)
+Setting & Setting::operator=(long value)
{
if(sizeof(long) == sizeof(long long))
return(operator=(static_cast<long long>(value)));
@@ -774,7 +785,6 @@ Setting & Setting::operator=(long value) throw(SettingTypeException)
// ---------------------------------------------------------------------------
Setting & Setting::operator=(const long long &value)
- throw(SettingTypeException)
{
assertType(TypeInt64);
@@ -785,7 +795,7 @@ Setting & Setting::operator=(const long long &value)
// ---------------------------------------------------------------------------
-Setting & Setting::operator=(const double &value) throw(SettingTypeException)
+Setting & Setting::operator=(const double &value)
{
assertType(TypeFloat);
@@ -796,7 +806,7 @@ Setting & Setting::operator=(const double &value) throw(SettingTypeException)
// ---------------------------------------------------------------------------
-Setting & Setting::operator=(float value) throw(SettingTypeException)
+Setting & Setting::operator=(float value)
{
assertType(TypeFloat);
@@ -809,7 +819,7 @@ Setting & Setting::operator=(float value) throw(SettingTypeException)
// ---------------------------------------------------------------------------
-Setting & Setting::operator=(const char *value) throw(SettingTypeException)
+Setting & Setting::operator=(const char *value)
{
assertType(TypeString);
@@ -821,7 +831,6 @@ Setting & Setting::operator=(const char *value) throw(SettingTypeException)
// ---------------------------------------------------------------------------
Setting & Setting::operator=(const std::string &value)
- throw(SettingTypeException)
{
assertType(TypeString);
@@ -832,31 +841,43 @@ Setting & Setting::operator=(const std::string &value)
// ---------------------------------------------------------------------------
-Setting & Setting::operator[](int i) const
- throw(SettingTypeException, SettingNotFoundException)
+Setting & Setting::lookup(const char *path) const
{
- if((_type != TypeArray) && (_type != TypeGroup) && (_type != TypeList))
- throw SettingTypeException(*this, i);
+ assertType(TypeGroup);
- config_setting_t *setting = config_setting_get_elem(_setting, i);
+ config_setting_t *setting = config_setting_lookup(_setting, path);
if(! setting)
- throw SettingNotFoundException(*this, i);
+ throw SettingNotFoundException(*this, path);
return(wrapSetting(setting));
}
// ---------------------------------------------------------------------------
-Setting & Setting::operator[](const char *key) const
- throw(SettingTypeException, SettingNotFoundException)
+Setting & Setting::operator[](const char *name) const
{
assertType(TypeGroup);
- config_setting_t *setting = config_setting_get_member(_setting, key);
+ config_setting_t *setting = config_setting_get_member(_setting, name);
if(! setting)
- throw SettingNotFoundException(*this, key);
+ throw SettingNotFoundException(*this, name);
+
+ return(wrapSetting(setting));
+}
+
+// ---------------------------------------------------------------------------
+
+Setting & Setting::operator[](int i) const
+{
+ if((_type != TypeArray) && (_type != TypeGroup) && (_type != TypeList))
+ throw SettingTypeException(*this, i);
+
+ config_setting_t *setting = config_setting_get_elem(_setting, i);
+
+ if(! setting)
+ throw SettingNotFoundException(*this, i);
return(wrapSetting(setting));
}
@@ -877,72 +898,70 @@ Setting & Setting::operator[](const char *key) const
// ---------------------------------------------------------------------------
-bool Setting::lookupValue(const char *name, bool &value) const throw()
+bool Setting::lookupValue(const char *name, bool &value) const
{
SETTING_LOOKUP_NO_EXCEPTIONS(name, bool, value);
}
// ---------------------------------------------------------------------------
-bool Setting::lookupValue(const char *name, int &value) const throw()
+bool Setting::lookupValue(const char *name, int &value) const
{
SETTING_LOOKUP_NO_EXCEPTIONS(name, int, value);
}
// ---------------------------------------------------------------------------
-bool Setting::lookupValue(const char *name, unsigned int &value)
- const throw()
+bool Setting::lookupValue(const char *name, unsigned int &value) const
{
SETTING_LOOKUP_NO_EXCEPTIONS(name, unsigned int, value);
}
// ---------------------------------------------------------------------------
-bool Setting::lookupValue(const char *name, long long &value) const throw()
+bool Setting::lookupValue(const char *name, long long &value) const
{
SETTING_LOOKUP_NO_EXCEPTIONS(name, long long, value);
}
// ---------------------------------------------------------------------------
-bool Setting::lookupValue(const char *name, unsigned long long &value)
- const throw()
+bool Setting::lookupValue(const char *name, unsigned long long &value) const
{
SETTING_LOOKUP_NO_EXCEPTIONS(name, unsigned long long, value);
}
// ---------------------------------------------------------------------------
-bool Setting::lookupValue(const char *name, double &value) const throw()
+bool Setting::lookupValue(const char *name, double &value) const
{
SETTING_LOOKUP_NO_EXCEPTIONS(name, double, value);
}
// ---------------------------------------------------------------------------
-bool Setting::lookupValue(const char *name, float &value) const throw()
+bool Setting::lookupValue(const char *name, float &value) const
{
SETTING_LOOKUP_NO_EXCEPTIONS(name, float, value);
}
// ---------------------------------------------------------------------------
-bool Setting::lookupValue(const char *name, const char *&value) const throw()
+bool Setting::lookupValue(const char *name, const char *&value) const
{
SETTING_LOOKUP_NO_EXCEPTIONS(name, const char *, value);
}
// ---------------------------------------------------------------------------
-bool Setting::lookupValue(const char *name, std::string &value) const throw()
+bool Setting::lookupValue(const char *name, std::string &value) const
{
SETTING_LOOKUP_NO_EXCEPTIONS(name, const char *, value);
}
// ---------------------------------------------------------------------------
-bool Setting::exists(const char *name) const throw()
+bool Setting::exists(const char *name) const
{
if(_type != TypeGroup)
return(false);
@@ -954,14 +973,14 @@ bool Setting::exists(const char *name) const throw()
// ---------------------------------------------------------------------------
-int Setting::getLength() const throw()
+int Setting::getLength() const
{
return(config_setting_length(_setting));
}
// ---------------------------------------------------------------------------
-const char * Setting::getName() const throw()
+const char * Setting::getName() const
{
return(config_setting_name(_setting));
}
@@ -979,7 +998,7 @@ std::string Setting::getPath() const
// ---------------------------------------------------------------------------
-const Setting & Setting::getParent() const throw(SettingNotFoundException)
+const Setting & Setting::getParent() const
{
config_setting_t *setting = config_setting_parent(_setting);
@@ -991,7 +1010,7 @@ const Setting & Setting::getParent() const throw(SettingNotFoundException)
// ---------------------------------------------------------------------------
-Setting & Setting::getParent() throw(SettingNotFoundException)
+Setting & Setting::getParent()
{
config_setting_t *setting = config_setting_parent(_setting);
@@ -1003,28 +1022,28 @@ Setting & Setting::getParent() throw(SettingNotFoundException)
// ---------------------------------------------------------------------------
-unsigned int Setting::getSourceLine() const throw()
+unsigned int Setting::getSourceLine() const
{
return(config_setting_source_line(_setting));
}
// ---------------------------------------------------------------------------
-const char *Setting::getSourceFile() const throw()
+const char *Setting::getSourceFile() const
{
return(config_setting_source_file(_setting));
}
// ---------------------------------------------------------------------------
-bool Setting::isRoot() const throw()
+bool Setting::isRoot() const
{
return(config_setting_is_root(_setting));
}
// ---------------------------------------------------------------------------
-int Setting::getIndex() const throw()
+int Setting::getIndex() const
{
return(config_setting_index(_setting));
}
@@ -1032,7 +1051,6 @@ int Setting::getIndex() const throw()
// ---------------------------------------------------------------------------
void Setting::remove(const char *name)
- throw(SettingTypeException, SettingNotFoundException)
{
assertType(TypeGroup);
@@ -1043,7 +1061,6 @@ void Setting::remove(const char *name)
// ---------------------------------------------------------------------------
void Setting::remove(unsigned int idx)
- throw(SettingTypeException, SettingNotFoundException)
{
if((_type != TypeArray) && (_type != TypeGroup) && (_type != TypeList))
throw SettingTypeException(*this, idx);
@@ -1055,7 +1072,6 @@ void Setting::remove(unsigned int idx)
// ---------------------------------------------------------------------------
Setting & Setting::add(const char *name, Setting::Type type)
- throw(SettingNameException, SettingTypeException)
{
assertType(TypeGroup);
@@ -1074,7 +1090,7 @@ Setting & Setting::add(const char *name, Setting::Type type)
// ---------------------------------------------------------------------------
-Setting & Setting::add(Setting::Type type) throw(SettingTypeException)
+Setting & Setting::add(Setting::Type type)
{
if((_type != TypeArray) && (_type != TypeList))
throw SettingTypeException(*this);
@@ -1134,7 +1150,7 @@ Setting & Setting::add(Setting::Type type) throw(SettingTypeException)
// ---------------------------------------------------------------------------
-void Setting::assertType(Setting::Type type) const throw(SettingTypeException)
+void Setting::assertType(Setting::Type type) const
{
if(type != _type)
{
@@ -1164,6 +1180,273 @@ Setting & Setting::wrapSetting(config_setting_t *s)
// ---------------------------------------------------------------------------
+Setting::iterator Setting::begin()
+{ return(iterator(*this)); }
+
+// ---------------------------------------------------------------------------
+
+Setting::iterator Setting::end()
+{ return(iterator(*this, true)); }
+
+// ---------------------------------------------------------------------------
+
+Setting::const_iterator Setting::begin() const
+{ return(const_iterator(*this)); }
+
+// ---------------------------------------------------------------------------
+
+Setting::const_iterator Setting::end() const
+{ return(const_iterator(*this, true)); }
+
+// ---------------------------------------------------------------------------
+
+SettingIterator::SettingIterator(Setting& setting, bool endIterator)
+ : _setting(&setting),
+ _count(setting.getLength()),
+ _idx(endIterator ? _count : 0)
+{
+ if(!setting.isAggregate())
+ throw SettingTypeException(setting);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingIterator::SettingIterator(const SettingIterator &other)
+ : _setting(other._setting),
+ _count(other._count),
+ _idx(other._idx)
+{
+}
+
+// ---------------------------------------------------------------------------
+
+SettingIterator& SettingIterator::operator=(const SettingIterator &other)
+{
+ _setting = other._setting;
+ _count = other._count;
+ _idx = other._idx;
+
+ return(*this);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingIterator& SettingIterator::operator++()
+{
+ ++_idx;
+
+ return(*this);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingIterator SettingIterator::operator++(int)
+{
+ SettingIterator tmp(*this);
+ ++_idx;
+
+ return(tmp);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingIterator& SettingIterator::operator--()
+{
+ --_idx;
+
+ return(*this);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingIterator SettingIterator::operator--(int)
+{
+ SettingIterator tmp(*this);
+ --_idx;
+
+ return(tmp);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingIterator SettingIterator::operator+(int offset) const
+{
+ SettingIterator copy(*this);
+ copy += offset;
+
+ return(copy);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingIterator& SettingIterator::operator+=(int offset)
+{
+ _idx += offset;
+
+ return(*this);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingIterator operator+(int offset, SettingIterator& si)
+{
+ SettingIterator copy(si);
+ copy += offset;
+
+ return(copy);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingIterator SettingIterator::operator-(int offset) const
+{
+ SettingIterator copy(*this);
+ copy._idx -= offset;
+
+ return(copy);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingIterator& SettingIterator::operator-=(int offset)
+{
+ _idx -= offset;
+
+ return(*this);
+}
+
+// ---------------------------------------------------------------------------
+
+int SettingIterator::operator-(SettingIterator const &other) const
+{
+ return(_idx - other._idx);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingConstIterator::SettingConstIterator(const Setting &setting,
+ bool endIterator)
+ : _setting(&setting),
+ _count(setting.getLength()),
+ _idx(endIterator ? _count : 0)
+{
+ if(!setting.isAggregate())
+ throw SettingTypeException(setting);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingConstIterator::SettingConstIterator(const SettingConstIterator &other)
+ : _setting(other._setting),
+ _count(other._count),
+ _idx(other._idx)
+{
+}
+
+// ---------------------------------------------------------------------------
+
+SettingConstIterator& SettingConstIterator::operator=(
+ const SettingConstIterator &other)
+{
+ _setting = other._setting;
+ _count = other._count;
+ _idx = other._idx;
+ return(*this);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingConstIterator& SettingConstIterator::operator++()
+{
+ ++_idx;
+
+ return(*this);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingConstIterator SettingConstIterator::operator++(int)
+{
+ SettingConstIterator tmp(*this);
+ ++_idx;
+
+ return(tmp);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingConstIterator& SettingConstIterator::operator--()
+{
+ --_idx;
+
+ return(*this);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingConstIterator SettingConstIterator::operator--(int)
+{
+ SettingConstIterator tmp(*this);
+ --_idx;
+
+ return(tmp);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingConstIterator SettingConstIterator::operator+(int offset) const
+{
+ SettingConstIterator copy(*this);
+ copy += offset;
+
+ return(copy);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingConstIterator& SettingConstIterator::operator+=(int offset)
+{
+ _idx += offset;
+
+ return(*this);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingConstIterator operator+(int offset, SettingConstIterator &si)
+{
+ SettingConstIterator copy(si);
+ copy += offset;
+
+ return(copy);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingConstIterator SettingConstIterator::operator-(int offset) const
+{
+ SettingConstIterator copy(*this);
+ copy -= offset;
+
+ return(copy);
+}
+
+// ---------------------------------------------------------------------------
+
+SettingConstIterator& SettingConstIterator::operator-=(int offset)
+{
+ _idx -= offset;
+
+ return(*this);
+}
+
+// ---------------------------------------------------------------------------
+
+int SettingConstIterator::operator-(SettingConstIterator const &other) const
+{
+ return(_idx - other._idx);
+}
+
+
} // namespace libconfig
-// eof
diff --git a/lib/libconfigcpp.cc b/lib/libconfigcpp.cc
index 9431146..515a041 100644
--- a/lib/libconfigcpp.cc
+++ b/lib/libconfigcpp.cc
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
libconfig - A structured configuration file parsing library
- Copyright (C) 2005-2010 Mark A Lindner
+ Copyright (C) 2005-2014 Mark A Lindner
This file is part of libconfig.
diff --git a/lib/parsectx.h b/lib/parsectx.h
index af09b56..0c1b2e7 100644
--- a/lib/parsectx.h
+++ b/lib/parsectx.h
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
libconfig - A library for processing structured configuration files
- Copyright (C) 2005-2010 Mark A Lindner
+ Copyright (C) 2005-2014 Mark A Lindner
This file is part of libconfig.
diff --git a/lib/scanctx.c b/lib/scanctx.c
index f287fdf..61c885a 100644
--- a/lib/scanctx.c
+++ b/lib/scanctx.c
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
libconfig - A library for processing structured configuration files
- Copyright (C) 2005-2010 Mark A Lindner
+ Copyright (C) 2005-2014 Mark A Lindner
This file is part of libconfig.
@@ -168,4 +168,3 @@ const char *scanctx_current_filename(struct scan_context *ctx)
}
/* ------------------------------------------------------------------------- */
-/* eof */
diff --git a/lib/scanctx.h b/lib/scanctx.h
index 8ff934e..f6576fb 100644
--- a/lib/scanctx.h
+++ b/lib/scanctx.h
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
libconfig - A library for processing structured configuration files
- Copyright (C) 2005-2010 Mark A Lindner
+ Copyright (C) 2005-2014 Mark A Lindner
This file is part of libconfig.
diff --git a/lib/scanner.c b/lib/scanner.c
index a7a401a..e58e66a 100644
--- a/lib/scanner.c
+++ b/lib/scanner.c
@@ -9,7 +9,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_SUBMINOR_VERSION 39
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -159,15 +159,7 @@ typedef void* yyscan_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -179,6 +171,11 @@ typedef void* yyscan_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
@@ -197,6 +194,13 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
if ( yytext[yyl] == '\n' )\
--yylineno;\
}while(0)
+ #define YY_LINENO_REWIND_TO(dst) \
+ do {\
+ const char *p;\
+ for ( p = yy_cp-1; p >= (dst); --p)\
+ if ( *p == '\n' )\
+ --yylineno;\
+ }while(0)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
@@ -214,11 +218,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -236,7 +235,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -315,7 +314,7 @@ static void libconfig_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yys
YY_BUFFER_STATE libconfig_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE libconfig_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *libconfig_yyalloc (yy_size_t ,yyscan_t yyscanner );
void *libconfig_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
@@ -345,7 +344,7 @@ void libconfig_yyfree (void * ,yyscan_t yyscanner );
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-#define libconfig_yywrap(n) 1
+#define libconfig_yywrap(yyscanner) 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
@@ -551,7 +550,7 @@ static yyconst flex_int32_t yy_rule_can_match_eol[43] =
/* -*- mode: C -*- */
/* --------------------------------------------------------------------------
libconfig - A library for processing structured configuration files
- Copyright (C) 2005-2010 Mark A Lindner
+ Copyright (C) 2005-2014 Mark A Lindner
This file is part of libconfig.
@@ -571,7 +570,7 @@ static yyconst flex_int32_t yy_rule_can_match_eol[43] =
----------------------------------------------------------------------------
*/
#define YY_NO_UNISTD_H 1
-#line 35 "scanner.l"
+#line 36 "scanner.l"
#ifdef _MSC_VER
#pragma warning (disable: 4996)
@@ -580,10 +579,10 @@ static yyconst flex_int32_t yy_rule_can_match_eol[43] =
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
-#include "grammar.h"
-#include "wincompat.h"
#include "parsectx.h"
#include "scanctx.h"
+#include "grammar.h"
+#include "wincompat.h"
#define YY_NO_INPUT // Suppress generation of useless input() function
@@ -622,7 +621,7 @@ static unsigned long long fromhex(const char *s)
}
-#line 626 "scanner.c"
+#line 625 "scanner.c"
#define INITIAL 0
#define COMMENT 1
@@ -652,8 +651,8 @@ struct yyguts_t
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
- int yy_n_chars;
- int yyleng_r;
+ yy_size_t yy_n_chars;
+ yy_size_t yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
@@ -706,7 +705,7 @@ FILE *libconfig_yyget_out (yyscan_t yyscanner );
void libconfig_yyset_out (FILE * out_str ,yyscan_t yyscanner );
-int libconfig_yyget_leng (yyscan_t yyscanner );
+yy_size_t libconfig_yyget_leng (yyscan_t yyscanner );
char *libconfig_yyget_text (yyscan_t yyscanner );
@@ -714,6 +713,10 @@ int libconfig_yyget_lineno (yyscan_t yyscanner );
void libconfig_yyset_lineno (int line_number ,yyscan_t yyscanner );
+int libconfig_yyget_column (yyscan_t yyscanner );
+
+void libconfig_yyset_column (int column_no ,yyscan_t yyscanner );
+
YYSTYPE * libconfig_yyget_lval (yyscan_t yyscanner );
void libconfig_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
@@ -750,12 +753,7 @@ static int input (yyscan_t yyscanner );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -862,11 +860,6 @@ YY_DECL
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 100 "scanner.l"
-
-
-#line 869 "scanner.c"
-
yylval = yylval_param;
if ( !yyg->yy_init )
@@ -895,6 +888,12 @@ YY_DECL
libconfig_yy_load_buffer_state(yyscanner );
}
+ {
+#line 101 "scanner.l"
+
+
+#line 896 "scanner.c"
+
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = yyg->yy_c_buf_p;
@@ -912,7 +911,7 @@ YY_DECL
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -927,22 +926,18 @@ yy_match:
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
- while ( yy_base[yy_current_state] != 204 );
+ while ( yy_current_state != 102 );
+ yy_cp = yyg->yy_last_accepting_cpos;
+ yy_current_state = yyg->yy_last_accepting_state;
yy_find_action:
yy_act = yy_accept[yy_current_state];
- if ( yy_act == 0 )
- { /* have to back up */
- yy_cp = yyg->yy_last_accepting_cpos;
- yy_current_state = yyg->yy_last_accepting_state;
- yy_act = yy_accept[yy_current_state];
- }
YY_DO_BEFORE_ACTION;
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
{
- int yyl;
+ yy_size_t yyl;
for ( yyl = 0; yyl < yyleng; ++yyl )
if ( yytext[yyl] == '\n' )
@@ -965,69 +960,69 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 102 "scanner.l"
+#line 103 "scanner.l"
{ BEGIN COMMENT; }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 103 "scanner.l"
+#line 104 "scanner.l"
{ BEGIN INITIAL; }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 104 "scanner.l"
+#line 105 "scanner.l"
{ /* ignore */ }
YY_BREAK
case 4:
/* rule 4 can match eol */
YY_RULE_SETUP
-#line 105 "scanner.l"
+#line 106 "scanner.l"
{ /* ignore */ }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 107 "scanner.l"
+#line 108 "scanner.l"
{ BEGIN STRING; }
YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
-#line 108 "scanner.l"
+#line 109 "scanner.l"
{ scanctx_append_string(yyextra, yytext); }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 109 "scanner.l"
+#line 110 "scanner.l"
{ scanctx_append_string(yyextra, "\n"); }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 110 "scanner.l"
+#line 111 "scanner.l"
{ scanctx_append_string(yyextra, "\r"); }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 111 "scanner.l"
+#line 112 "scanner.l"
{ scanctx_append_string(yyextra, "\t"); }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 112 "scanner.l"
+#line 113 "scanner.l"
{ scanctx_append_string(yyextra, "\f"); }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 113 "scanner.l"
+#line 114 "scanner.l"
{ scanctx_append_string(yyextra, "\\"); }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 114 "scanner.l"
+#line 115 "scanner.l"
{ scanctx_append_string(yyextra, "\""); }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 115 "scanner.l"
+#line 116 "scanner.l"
{
char c[2] = { (char)(strtol(yytext + 2, NULL, 16) & 0xFF),
0 };
@@ -1036,12 +1031,12 @@ YY_RULE_SETUP
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 120 "scanner.l"
+#line 121 "scanner.l"
{ scanctx_append_string(yyextra, "\\"); }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 121 "scanner.l"
+#line 122 "scanner.l"
{
yylval->sval = scanctx_take_string(yyextra);
BEGIN INITIAL;
@@ -1050,28 +1045,28 @@ YY_RULE_SETUP
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 127 "scanner.l"
+#line 128 "scanner.l"
{ BEGIN INCLUDE; }
YY_BREAK
case 17:
/* rule 17 can match eol */
YY_RULE_SETUP
-#line 128 "scanner.l"
+#line 129 "scanner.l"
{ scanctx_append_string(yyextra, yytext); }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 129 "scanner.l"
+#line 130 "scanner.l"
{ scanctx_append_string(yyextra, "\\"); }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 130 "scanner.l"
+#line 131 "scanner.l"
{ scanctx_append_string(yyextra, "\""); }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 131 "scanner.l"
+#line 132 "scanner.l"
{
const char *error;
FILE *fp = scanctx_push_include(yyextra,
@@ -1097,67 +1092,67 @@ YY_RULE_SETUP
case 21:
/* rule 21 can match eol */
YY_RULE_SETUP
-#line 155 "scanner.l"
+#line 156 "scanner.l"
{ /* ignore */ }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 156 "scanner.l"
+#line 157 "scanner.l"
{ /* ignore */ }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 158 "scanner.l"
+#line 159 "scanner.l"
{ return(TOK_EQUALS); }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 159 "scanner.l"
+#line 160 "scanner.l"
{ return(TOK_COMMA); }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 160 "scanner.l"
+#line 161 "scanner.l"
{ return(TOK_GROUP_START); }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 161 "scanner.l"
+#line 162 "scanner.l"
{ return(TOK_GROUP_END); }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 162 "scanner.l"
+#line 163 "scanner.l"
{ yylval->ival = 1; return(TOK_BOOLEAN); }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 163 "scanner.l"
+#line 164 "scanner.l"
{ yylval->ival = 0; return(TOK_BOOLEAN); }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 164 "scanner.l"
+#line 165 "scanner.l"
{ yylval->sval = yytext; return(TOK_NAME); }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 165 "scanner.l"
+#line 166 "scanner.l"
{ yylval->fval = atof(yytext); return(TOK_FLOAT); }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 166 "scanner.l"
+#line 167 "scanner.l"
{ yylval->ival = atoi(yytext); return(TOK_INTEGER); }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 167 "scanner.l"
+#line 168 "scanner.l"
{ yylval->llval = atoll(yytext); return(TOK_INTEGER64); }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 168 "scanner.l"
+#line 169 "scanner.l"
{
yylval->ival = strtoul(yytext, NULL, 16);
return(TOK_HEX);
@@ -1165,32 +1160,32 @@ YY_RULE_SETUP
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 172 "scanner.l"
+#line 173 "scanner.l"
{ yylval->llval = fromhex(yytext); return(TOK_HEX64); }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 173 "scanner.l"
+#line 174 "scanner.l"
{ return(TOK_ARRAY_START); }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 174 "scanner.l"
+#line 175 "scanner.l"
{ return(TOK_ARRAY_END); }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 175 "scanner.l"
+#line 176 "scanner.l"
{ return(TOK_LIST_START); }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 176 "scanner.l"
+#line 177 "scanner.l"
{ return(TOK_LIST_END); }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 177 "scanner.l"
+#line 178 "scanner.l"
{ return(TOK_SEMICOLON); }
YY_BREAK
case 40:
@@ -1198,19 +1193,19 @@ case 40:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 178 "scanner.l"
+#line 179 "scanner.l"
{ /* ignore */ }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 179 "scanner.l"
+#line 180 "scanner.l"
{ return(TOK_GARBAGE); }
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(COMMENT):
case YY_STATE_EOF(STRING):
case YY_STATE_EOF(INCLUDE):
-#line 181 "scanner.l"
+#line 182 "scanner.l"
{
YY_BUFFER_STATE buf = (YY_BUFFER_STATE)scanctx_pop_include(
yyextra);
@@ -1225,10 +1220,10 @@ case YY_STATE_EOF(INCLUDE):
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 192 "scanner.l"
+#line 193 "scanner.l"
ECHO;
YY_BREAK
-#line 1232 "scanner.c"
+#line 1227 "scanner.c"
case YY_END_OF_BUFFER:
{
@@ -1293,7 +1288,8 @@ ECHO;
else
{
- yy_cp = yyg->yy_c_buf_p;
+ yy_cp = yyg->yy_last_accepting_cpos;
+ yy_current_state = yyg->yy_last_accepting_state;
goto yy_find_action;
}
}
@@ -1357,6 +1353,7 @@ ECHO;
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
+ } /* end of user's declarations */
} /* end of libconfig_yylex */
/* yy_get_next_buffer - try to read in a new buffer
@@ -1413,21 +1410,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
- int num_to_read =
+ yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) (yyg->yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
- int new_size = b->yy_buf_size * 2;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -1458,7 +1455,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, (size_t) num_to_read );
+ yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@@ -1556,6 +1553,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 102);
+ (void)yyg;
return yy_is_jam ? 0 : yy_current_state;
}
@@ -1584,7 +1582,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{ /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -1756,10 +1754,6 @@ static void libconfig_yy_load_buffer_state (yyscan_t yyscanner)
libconfig_yyfree((void *) b ,yyscanner );
}
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a libconfig_yyrestart() or at EOF.
@@ -1784,7 +1778,7 @@ extern int isatty (int );
b->yy_bs_column = 0;
}
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+ b->yy_is_interactive = 0;
errno = oerrno;
}
@@ -1876,7 +1870,7 @@ void libconfig_yypop_buffer_state (yyscan_t yyscanner)
*/
static void libconfig_yyensure_buffer_stack (yyscan_t yyscanner)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@@ -1974,12 +1968,12 @@ YY_BUFFER_STATE libconfig_yy_scan_string (yyconst char * yystr , yyscan_t yyscan
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
- int i;
+ yy_size_t i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
@@ -2089,7 +2083,7 @@ FILE *libconfig_yyget_out (yyscan_t yyscanner)
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-int libconfig_yyget_leng (yyscan_t yyscanner)
+yy_size_t libconfig_yyget_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
@@ -2125,7 +2119,7 @@ void libconfig_yyset_lineno (int line_number , yyscan_t yyscanner)
/* lineno is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "libconfig_yyset_lineno called with no buffer" , yyscanner);
+ YY_FATAL_ERROR( "libconfig_yyset_lineno called with no buffer" );
yylineno = line_number;
}
@@ -2140,7 +2134,7 @@ void libconfig_yyset_column (int column_no , yyscan_t yyscanner)
/* column is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "libconfig_yyset_column called with no buffer" , yyscanner);
+ YY_FATAL_ERROR( "libconfig_yyset_column called with no buffer" );
yycolumn = column_no;
}
@@ -2364,4 +2358,4 @@ void libconfig_yyfree (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
-#line 192 "scanner.l"
+#line 193 "scanner.l"
diff --git a/lib/scanner.h b/lib/scanner.h
index baa6f77..8dabb30 100644
--- a/lib/scanner.h
+++ b/lib/scanner.h
@@ -13,7 +13,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 33
+#define YY_FLEX_SUBMINOR_VERSION 39
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -35,7 +35,7 @@
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-#if __STDC_VERSION__ >= 199901L
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
* if you want the limit (max/min) macros for int types.
@@ -58,7 +58,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -89,6 +88,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -98,11 +99,12 @@ typedef unsigned int flex_uint32_t;
#else /* ! __cplusplus */
-#if __STDC__
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
#define YY_USE_CONST
-#endif /* __STDC__ */
+#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */
#ifdef YY_USE_CONST
@@ -128,21 +130,19 @@ typedef void* yyscan_t;
#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
#define yy_flex_debug yyg->yy_flex_debug_r
-int libconfig_yylex_init (yyscan_t* scanner);
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE 16384
+#endif
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
-typedef unsigned int yy_size_t;
+typedef size_t yy_size_t;
#endif
#ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -162,7 +162,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -206,13 +206,13 @@ void libconfig_yypop_buffer_state (yyscan_t yyscanner );
YY_BUFFER_STATE libconfig_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE libconfig_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *libconfig_yyalloc (yy_size_t ,yyscan_t yyscanner );
void *libconfig_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
void libconfig_yyfree (void * ,yyscan_t yyscanner );
-#define libconfig_yywrap(n) 1
+#define libconfig_yywrap(yyscanner) 1
#define YY_SKIP_YYWRAP
#define yytext_ptr yytext_r
@@ -220,13 +220,25 @@ void libconfig_yyfree (void * ,yyscan_t yyscanner );
#ifdef YY_HEADER_EXPORT_START_CONDITIONS
#define INITIAL 0
#define COMMENT 1
+#define STRING 2
+#define INCLUDE 3
#endif
-#ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
#endif
+#define YY_EXTRA_TYPE struct scan_context *
+
+int libconfig_yylex_init (yyscan_t* scanner);
+
+int libconfig_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
@@ -248,7 +260,7 @@ FILE *libconfig_yyget_out (yyscan_t yyscanner );
void libconfig_yyset_out (FILE * out_str ,yyscan_t yyscanner );
-int libconfig_yyget_leng (yyscan_t yyscanner );
+yy_size_t libconfig_yyget_leng (yyscan_t yyscanner );
char *libconfig_yyget_text (yyscan_t yyscanner );
@@ -256,6 +268,10 @@ int libconfig_yyget_lineno (yyscan_t yyscanner );
void libconfig_yyset_lineno (int line_number ,yyscan_t yyscanner );
+int libconfig_yyget_column (yyscan_t yyscanner );
+
+void libconfig_yyset_column (int column_no ,yyscan_t yyscanner );
+
YYSTYPE * libconfig_yyget_lval (yyscan_t yyscanner );
void libconfig_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
@@ -300,9 +316,11 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int libconfig_yylex (YYSTYPE * yylval_param ,yyscan_t yyscanner);
+extern int libconfig_yylex \
+ (YYSTYPE * yylval_param ,yyscan_t yyscanner);
-#define YY_DECL int libconfig_yylex (YYSTYPE * yylval_param , yyscan_t yyscanner)
+#define YY_DECL int libconfig_yylex \
+ (YYSTYPE * yylval_param , yyscan_t yyscanner)
#endif /* !YY_DECL */
/* yy_get_previous_state - get the state just before the EOB char was reached */
@@ -319,8 +337,8 @@ extern int libconfig_yylex (YYSTYPE * yylval_param ,yyscan_t yyscanner);
#undef YY_DECL
#endif
-#line 130 "scanner.l"
+#line 193 "scanner.l"
-#line 325 "scanner.h"
+#line 343 "scanner.h"
#undef libconfig_yyIN_HEADER
#endif /* libconfig_yyHEADER_H */
diff --git a/lib/scanner.l b/lib/scanner.l
index fb467cf..7ea02dc 100644
--- a/lib/scanner.l
+++ b/lib/scanner.l
@@ -1,7 +1,7 @@
/* -*- mode: C -*- */
/* --------------------------------------------------------------------------
libconfig - A library for processing structured configuration files
- Copyright (C) 2005-2010 Mark A Lindner
+ Copyright (C) 2005-2014 Mark A Lindner
This file is part of libconfig.
@@ -22,6 +22,7 @@
*/
%option nounistd
+%option never-interactive
%option reentrant
%option noyywrap
%option yylineno
@@ -40,10 +41,10 @@
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
-#include "grammar.h"
-#include "wincompat.h"
#include "parsectx.h"
#include "scanctx.h"
+#include "grammar.h"
+#include "wincompat.h"
#define YY_NO_INPUT // Suppress generation of useless input() function
diff --git a/lib/strbuf.c b/lib/strbuf.c
index f7f48d3..5bffc65 100644
--- a/lib/strbuf.c
+++ b/lib/strbuf.c
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
libconfig - A library for processing structured configuration files
- Copyright (C) 2005-2010 Mark A Lindner
+ Copyright (C) 2005-2014 Mark A Lindner
This file is part of libconfig.
@@ -55,4 +55,3 @@ void strbuf_append(strbuf_t *buf, const char *text)
}
/* ------------------------------------------------------------------------- */
-/* eof */
diff --git a/lib/strbuf.h b/lib/strbuf.h
index 62cd782..6572934 100644
--- a/lib/strbuf.h
+++ b/lib/strbuf.h
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
libconfig - A library for processing structured configuration files
- Copyright (C) 2005-2010 Mark A Lindner
+ Copyright (C) 2005-2014 Mark A Lindner
This file is part of libconfig.
diff --git a/lib/wincompat.h b/lib/wincompat.h
index 23d7379..30b5619 100644
--- a/lib/wincompat.h
+++ b/lib/wincompat.h
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
libconfig - A library for processing structured configuration files
- Copyright (C) 2005-2010 Mark A Lindner
+ Copyright (C) 2005-2014 Mark A Lindner
This file is part of libconfig.
@@ -32,6 +32,8 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
+#define fileno _fileno
+#define fstat _fstat
#define snprintf _snprintf
#ifndef __MINGW32__
diff --git a/libconfig.spec b/libconfig.spec
index b1b03d8..0477e79 100644
--- a/libconfig.spec
+++ b/libconfig.spec
@@ -1,5 +1,5 @@
Name: libconfig
-Version: 1.4.9
+Version: 1.5
Release: 1
Summary: C/C++ Configuration File Library