Age | Commit message (Collapse) | Author | Files |
|
|
|
|
|
* am/grecs.m4: Quote [] in substitution of DEFAULT_PREPROCESSOR.
|
|
absolute pathname
This might be necessary when creating binary packages that use grecs.
Imagine a preprocessor program that is to be installed along with the
package. It is not installed when the package is being created, so
requiring it to exist will break packaging.
* am/grecs.m4: If DEFAULT_PREPROCESSOR is given as absolute pathname,
don't bail out if it doesn't exist on disk: packagers may need to
set DEFAULT_PREPROCESSOR prior to actually installing it.
|
|
|
|
* am/grecs.m4: Quote the use of $DEFAULT_PREPROCESSOR as argument to
expr.
* tests/Makefile.am: Fix LDADD
|
|
* Makefile.am (WORDSPLIT_SRC)
(WORDSPLIT_TEST,WORDSPLIT_DOC): New variables.
(EXTRA_DIST): Add WORDSPLIT_SRC (unconditionally) and @GRECS_EXTRA_DIST@
(gets set depending on whether docs and testsuite is required).
* am/grecs.m4: Set GRECS_EXTRA_DIST to $(WORDSPLIT_TEST) if testsuite
is required. Append to it $(WORDSPLIT_DOC) if documentation is
required as well.
|
|
* .gitmodules: New module: wordsplit
* Makefile.am: Distribute wordsplit files.
* am/grecs.m4 (GRECS_INCLUDES): Add wordsplit directory
* doc/Makefile.am (dist_man_MANS): Distribute wordsplit/wordsplit.3
* doc/wordsplit.3: Remove.
* include/Makefile.am (GRECS_HDR): Add wordsplit/wordsplit.
* include/wordsplit.h: Remove.
* src/Make-inst.am: Define nodist_libgrecs_la_SOURCES.
* src/Make-shared.am: Likewise.
* src/Make-static.am: Define nodist_libgrecs_a_SOURCES.
* src/Make.am (GRECS_SRC): Remove wordsplit.c
(NODIST_GRECS_SRC): Define to wordsplit.c
(VPATH): Add the wordsplit directory.
* src/wordsplit.c: Remove.
* tests/wordsplit.at: Remove.
* tests/wsp.c: Remove.
* tests/Makefile.am: Build separate testsuite for wordsplit. Use VPATH
to build wsp.
* tests/.gitignore: Update.
|
|
New variable GRECS_HOST_PROJECT_LDADD complements
GRECS_HOST_PROJECT_INCLUDES. It provides a way to link test binaries
with host project libraries. This may be useful if config.h redefines
missing or defective library functions to their replacements, which are
provided in third-party libraries, such as e.g. gnulib,
* am/grecs.m4 (GRECS_HOST_PROJECT_LDADD): New substitution variable.
* tests/Makefile.am (LDADD): Add GRECS_HOST_PROJECT_LDADD.
|
|
* Makefile.am (SUBDIRS): Add include
* am/grecs.m4 (GRECS_INCLUDES): Update
(GRECS_COND_BUILD_INSTALL)
(GRECS_COND_BUILD_SHARED)
(GRECS_COND_BUILD_STATIC): New conditions.
Build include/Makefile and include/grecs/Makefile.
* configure.ac: Use src/grecs-gram.y as a source
validity marker
* include/Makefile.a: New file.
* src/grecs.hin: Remove. Split into include/*. See below.
* include/grecs.h: New file.
* include/grecs/.gitignore: New file.
* include/grecs/Makefile.am: New file.
* include/grecs/doc.h: New file.
* include/grecs/error.h: New file.
* include/grecs/format.h: New file.
* include/grecs/lex.h: New file.
* include/grecs/list.h: New file.
* include/grecs/mem.h: New file.
* include/grecs/node.h: New file.
* include/grecs/parser.h: New file.
* include/grecs/preproc.h: New file.
* include/grecs/sockaddr.h: New file.
* include/grecs/symtab.h: New file.
* include/grecs/table.h: New file.
* include/grecs/tree.h: New file.
* include/grecs/txtacc.h: New file.
* include/grecs/types.h.in: New file.
* include/grecs/util.h: New file.
* include/grecs/value.h: New file.
* include/grecs/version.h: New file.
* src/grecs-locus.h: Move to ...
* include/grecs/locus.h: ... here
* src/grecsopt.h: Move to ...
* include/grecs/opt.h: ... here
* src/json.h: Move to ...
* include/grecs/json.h: ... here
* src/wordsplit.h: Move to ...
* include/wordsplit.h: ... here
* src/Make-inst.am (include_HEADERS): Remove.
* src/Make-shared.am (grecsinclude_HEADERS)
(noinst_HEADERS): Remove.
* src/Make-static.am (noinst_HEADERS): Remove.
* src/Make.am: Remove header-related stuff
* src/bind-gram.y: Fix includes.
* src/bind-lex.l: Likewise.
* src/cidr.c: Likewise.
* src/dhcpd-gram.y: Likewise.
* src/dhcpd-lex.l: Likewise.
* src/diag.c: Likewise.
* src/format.c: Likewise.
* src/grecs-gram.y: Likewise.
* src/grecs-lex.l: Likewise.
* src/json-gram.y: Likewise.
* src/json-lex.l: Likewise.
* src/jsonfmt.c: Likewise.
* src/lookup.c: Likewise.
* src/meta1-gram.y: Likewise.
* src/meta1-lex.l: Likewise.
* src/opthelp.c: Likewise.
* src/preproc.c: Likewise.
* src/sockaddr.c: Likewise.
* src/txtacc.c: Likewise.
* src/version.c: Likewise.
* tests/gcfenum.c: Likewise.
* tests/gcffmt.c: Likewise.
* tests/gcfpeek.c: Likewise.
* tests/gcfset.c: Likewise.
* tests/gcfver.c: Likewise.
* tests/json.c: Likewise.
|
|
|
|
* src/Make-inst.am: Add json.h
* src/Make-shared.am: Likewise.
* src/Make-static.am: Likewise.
* src/Make.am: Likewise.
* src/json-gram.y: New file.
* src/json-lex.l: New file.
* src/json.h: New file.
* src/yytrans: Translate json prefixes.
* src/.gitignore: Update.
* tests/json.c: New file.
* tests/json00.at: New file.
* tests/json01.at: New file.
* tests/Makefile.am: Add new tests; build json
* tests/testsuite.at: Add new tests.
* tests/.gitignore: Update.
* am/grecs.m4: New flag "json"
* configure.ac (GRECS_SETUP): Require json
* src/Make-inst.am (include_HEADERS): Assign GRECS_HDR value.
* src/Make-shared.a [GRECS_COND_INSTALLHEADERS] (grecsinclude_HEADERS)
[!GRECS_COND_INSTALLHEADERS] (noinst_HEADERS): Likewise.
* src/Make-static.am (noinst_HEADERS): Likewise.
* src/Make.am [GRECS_COND_JSON]: Define GRECS_JSON and GRECS_EXTRA_JSON.
|
|
|
|
* am/grecs.m4: Reset DEFAULT_PREPROCESSOR to NULL and emit a warning
if the requested preprocessor command couldn't be found.
|
|
* am/grecs.m4 (GRECS_SETUP): Fix GRECS_INCLUDES
|
|
* am/grecs.m4 (GRECS_SETUP): New option sockaddr-list.
Build grecs.h at configure stage.
* src/Make.am (GRECS_SRC): Add cidr.c and ipstr.c
[GRECS_COND_SOCKADDR_LIST] (GRECS_SRC): Add sockaddr.c
Remove rule for building grecs.h (see above).
* src/cidr.c: New file.
* src/ipstr.c: New file.
* src/sockaddr.c: New file.
* src/format.c (grecs_data_type_string): Change spelling of sockaddr.
* src/grecs-lex.l: Treat square brackets as part of word.
* src/grecs.hin (GRECS_SOCKADDR_LIST): New define.
[GRECS_SOCKADDR_LIST] (grecs_sockaddr): New member: next.
(grecs_str_is_ipv4,grecs_str_is_ipv6)
(grecs_str_is_ipaddr,grecs_str_is_num): New functions.
[GRECS_SOCKADDR_LIST] (grecs_sockaddr_hints): New struct.
[GRECS_SOCKADDR_LIST] (grecs_sockaddr_new,grecs_sockaddr_free)
(grecs_str_to_sockaddr): New protos.
(grecs_cidr): New struct.
(grecs_str_to_cidr,grecs_sockaddr_to_cidr)
(grecs_sockadd_cidr_match): New protos.
* src/tree.c [GRECS_SOCKADDR_LIST] (grecs_sockaddr_hints): New global.
[!GRECS_SOCKADDR_LIST] (string_to_sockaddr): Retain for backward
compatibility.
[GRECS_SOCKADDR_LIST] (grecs_string_convert): Use grecs_str_to_sockaddr.
(grecs_prop_tab): Add entry for grecs_type_cidr
|
|
Depending on the tree-api option to the GRECS_SETUP macro,
the signature of callback functions changes. If the option
is supplied, a pointer to grecs_node_t is passwd to callback
functions as an argument instead of pointers to the value and
locus.
* am/grecs.m4 (GRECS_SETUP): New option tree-api.
* src/.gitignore: Add grecs.h
* src/Make.am: Build grecs.h
* src/grecs.h: Rename to src/grecs.hin
(GRECS_TREE_API): New define
(grecs_callback_fn): Provide two alternative
signatures depending on the value of GRECS_TREE_API.
All uses updated.
* src/tree.c (fake_callback): Update signature.
(grecs_process_ident)
(stmt_begin,stmt_end): Update calls to callback.
* tests/gcfset.c: Likewise.
|
|
* am/grecs.m4 (parser-dhcpd): New option.
* doc/GRECS_SETUP.3: Document parser-dhcpd
* src/.gitignore: Add dhcpd-* generated files.
* src/Make.am [GRECS_COND_DHCPD_PARSER]: Define DHCPD variables.
(GRECS_SRC, EXTRA_DIST): Reference them.
* src/dhcpd-gram.y: New file.
* src/dhcpd-lex.l: New file.
* src/grecs.h (grecs_dhcpd_parser): New proto.
* src/tree.c (node_reduce): Fix return without a value.
|
|
* am/grecs.m4 (GRECS_SETUP): New option install-headers.
New subst variable GRECS_INCLUDE_DIR.
* doc/GRECS_SETUP.3: Document the install-headers option.
* src/Make-shared.am [GRECS_COND_INSTALLHEADERS]: Install
headers in GRECS_INCLUDE_DIR.
|
|
|
|
* Makefile.am (EXTRA_DIST): Add @GRECS_DISTDOC@.
* am/grecs.m4 (GRECS_SETUP): New flag syntax-doc sets
GRECS_DISTDOC.
* doc/GRECS_SETUP.3: Update.
* src/format.c (grecs_format_node): Print value if GRECS_NODE_FLAG_VALUE
is set.
* tests/glob01.at: Update.
|
|
* am/grecs.m4: New option: parser-git
* doc/GRECS_SETUP.3: Document new options.
* src/git-parser.c: New file.
* src/Make.am [GRECS_COND_GIT_PARSER]: Define GRECS_PARSER_GIT.
(GRECS_SRC): Add GRECS_PARSER_GIT.
* src/grecs.h (grecs_git_parser): New proto.
* src/txtacc.c (grecs_txtacc_free): Ignore NULL argument.
|
|
* am/grecs.m4: New option: parser-bind.
* src/.gitignore: Update.
* src/Make.am [GRECS_COND_BIND_PARSER]: Set GRECS_PARSER_BIND
and GRECS_EXTRA_BIND.
(GRECS_SRC): Include GRECS_PARSER_BIND.
(EXTRA_DIST): Include GRECS_EXTRA_BIND.
* src/bind-gram.y: New file.
* src/bind-lex.l: New file.
* src/format.c (grecs_txtacc_format_value): New function.
* src/grecs.h (grecs_bind_parser): New proto.
* src/parser.c: Set grecs_current_locus.
* src/tree.c (grecs_node_bind): Return immediately if node==NULL.
* src/yytrans: Update.
|
|
* Makefile.am (EXTRA_DIST): Add build-aux/yyrename
* am/grecs.m4: New options: parser-meta1 and all-parsers
* src/.gitignore: Update.
* src/Make.am [GRECS_COND_META1_PARSER]: Set GRECS_PARSER_META1 and
GRECS_EXTRA_META1
(GRECS_SRC): Add new files.
(EXTRA_DIST): Add GRECS_EXTRA_META1.
(LEXCOMPILE,YACCCOMPILE): Redefine
* src/grecs-gram.y: Don't include yygrecs.h
(grecs_vasprintf,grecs_asprintf): Move to a separate file.
(grecs_parse): Rename to grecs_grecs_parser.
Actual grecs_parse is defined in parser.c
(grecs_gram_trace): Move to parser.c
* src/grecs-lex.l: Don't include yygrecs.h
Use line_acc functions.
* src/grecs.h (grecs_trace_flags): New extern.
(GRECS_TRACE_GRAM, GRECS_TRACE_LEX): New flags.
(grecs_lex_begin): Change signature.
(grecs_grecs_parser,grecs_meta1_parser): New protos.
(grecs_line_acc_create)
(grecs_line_acc_free,grecs_line_acc_grow_char)
(grecs_line_acc_grow_char_unescape)
(grecs_line_acc_grow)
(grecs_line_acc_grow_unescape_last): New protos.
(GRECS_TXTACC_BUFSIZE): New const
(grecs_txtacc_create,grecs_txtacc_free)
(grecs_txtacc_grow,grecs_txtacc_finish)
(grecs_txtacc_free_string): New protos.
(grecs_value_match): New proto.
* src/wordsplit.c (quote_transtab): Translate \"
* src/yygrecs.h: Remove.
* src/yytrans: New file.
* build-aux/yyrename: New file.
* src/asprintf.c: New file.
* src/lineacc.c: New file.
* src/meta1-gram.y: New file.
* src/meta1-lex.l: New file.
* src/parser.c: New file.
* src/txtacc.c: New file.
* doc/grecs_parse.3: Update.
* doc/GRECS_SETUP.3: Update.
|
|
* build-aux/git2chg.awk: New configuration variables:
since=YYYY-MM-DD, to cut off entries earlier than the
given date, and append=FILE, to append FILE to the
generated ChangeLog.
* am/grecs.m4 (GRECS_HOST_PROJECT_INCLUDES): New substitution
variable.
* src/Make.am (INCLUDES): Expand GRECS_HOST_PROJECT_INCLUDES.
* tests/Makefile.am: Likewise.
|
|
|
|
* .gitignore: Add gitid.h
* Makefile.am: Build gitid.h.
* am/grecs.m4: Remove GRECS_VEROK_AT.
* build-aux/getopt.m4 (print_version_hook): New variable.
(print_version): Call print_version_hook, if defined.
* src/Make.am (INCLUDES): Update.
* src/grecs.h (grecs_version_info) <id>: New member.
* src/version.c (grecs_version): Initialize id.
* tests/Makefile.am: Remove GRECS_VEROK_AT.
* tests/testsuite.at: Likewise.
|
|
* am/grecs.m4: Define GRECS_VEROK_AT if package version matches
the standard scheme.
Define GRECS_DISTCK_AT if install flag is set.
* src/grecs.h (GRECS_VERSION_MAJOR)
(GRECS_VERSION_MINOR): New defines.
(grecs_version_info)<buffer>: New member.
(grecs_version): Return allocated grecs_version_info structure.
(grecs_version_cmp): Change prototype.
(grecs_version_ok)
(grecs_version_info_cmp)
(grecs_version_split)
(grecs_version_info_free): New protos.
* src/version.c: Rewrite.
* src/libgrecs.m4 (AM_LIBGRECS): Use grecs_version_ok
* tests/.gitignore: Add distck.
* tests/Makefile.am: Add new tests.
* tests/testsuite.at: Add new tests.
* tests/gcfver.c: Update.
* tests/vercmp.at: Rewrite.
* tests/verok.at: New file (from old vercmp.at).
* tests/distck.at: New file.
* tests/distck.c: New file.
|
|
* AUTHORS, COPYING, NEWS, README: New files.
* .gitignore: Update.
* am/.gitignore: New file.
* build-aux/.gitignore: New file.
* build-aux/ylwrap: Remove.
* Makefile.am: Define ACLOCAL_AMFLAGS
[GRECS_CHANGELOG]: Build ChangeLog.
* am/grecs.m4: Define GRECS_CHANGELOG and GRECS_SRCDIR.
Fixup first argument, if it is [.].
* configure.ac: New file.
* src/Make-inst.am (include_HEADERS): Add wordsplit.h.
Install libgrecs.m4.
* Make-shared.am (noinst_HEADERS): Add wordsplit.h.
* src/Make-static.am: Likewise.
* src/Make.am (GRECS_SRC): Remove wordsplit.h
(noinst_HEADERS): Add yygrecs.h
(YLWRAP): Remove.
* src/libgrecs.m4: New file.
* src/yygrecs.h: New file.
* src/grecs-gram.y: Include yygrecs.h.
* src/grecs-lex.l: Likewise.
* src/preproc.c (yy_grecs_flex_debug): Rename to grecs_yy_flex_debug.
|
|
* am/grecs.m4 (GRECS_SETUP): New option: shared.
* doc/GRECS_SETUP.3: Document new options.
* doc/grecs_format_locus.3: Update.
* doc/grecs_format_node.3: Document new flags.
* src/.gitignore: Update.
* src/version.c: New file.
* src/Make.am (GRECS_SRC): Add version.c
(EXTRA_DIST): Update.
* src/diag.c (default_print_diag): Flush stdout as per the docs.
* src/format.c (grecs_format_locus): Don't print trailing semicolon.
(grecs_format_value): Handle GRECS_NODE_FLAG_NOQUOTE flag.
(grecs_format_node): Print delimiters when needed.
* src/grecs.h (grecs_version_info): New struct.
(grecs_version, grecs_version_cmp): New protos.
(GRECS_NODE_FLAG_NOQUOTE): New flag.
* tests/gcfver.c: New file.
* tests/vercmp.at: New file.
* tests/.gitignore: Update.
* tests/Makefile.am: Define GRECS_VERCMP_AT in package.m4
(TESTSUITE_AT): Add vercmp.at (conditionally).
(noinst_PROGRAMS): Add gcfver.
* tests/testsuite.at: Conditionally include vercmp.at.
|
|
|
|
* am/grecs.m4 (GRECS_SETUP): New flags: getopt and git2chg.
* src/format.c (grecs_format_locus): Ignore NULL loci.
(grecs_format_node_ident): Rename to grecs_format_node_path.
Change semantics of the second argument.
(grecs_format_value): Change signature (take flags).
Correctly quote string values.
* src/grecs.h: Protect the contents with #ifndef _GRECS_H.
(GRECS_AGGR): New flag (for future use).
(grecs_node) <prev>: New member.
(grecs_format_value): Change signature.
(grecs_format_node_ident): Rename to grecs_format_node_path.
(GRECS_NODE_FLAG_PATH,GRECS_NODE_FLAG_VALUE)
(GRECS_NODE_FLAG_QUOTE,GRECS_NODE_FLAG_QUOTE_HEX)
(GRECS_NODE_FLAG_DEFAULT): New flags.
(grecs_node_from_path): New proto.
* src/lookup.c (grecs_node_from_path): New function.
* src/tree.c (grecs_node_bind): Keep track of node->prev.
|
|
The configuration file parser creates a syntax tree. This step
does not require any knowledge about which keywords are allowed.
The user can then either use that tree directly, or post-process
it using parser tables. The latter approach is equivalent to
previous versions of grecs.
|
|
|
|
* am/grecs.m4 (GRECS_SETUP): Call AC_PROG_YACC and AM_PROG_LEX.
* src/grecs.h: Add a missing prototype.
|
|
* am/grecs.m4 (GRECS_INCLUDES): New substitute variable.
* src/Makefile.am (INCLUDES): Add GRECS_INCLUDES.
* src/grecs-gram.y: Remove leftover uses of xmalloc.
* src/grecs.h (grecs_zalloc, grecs_calloc): New protos.
* src/mem.c (grecs_zalloc, grecs_calloc): New functions.
* src/wordsplit.c [ENABLE_NLS]: include gettext.h
|
|
The macro takes an optional second argument. When given, it supplies
the name of the preprocessor setup file to install.
Options available for use in the 1st argument are:
no-preproc Generate the --without-preprocessor option.
std-pp-setup Install the default pp-setup file. Note for
upgraders: earlier this was the default!
pp-setup-option Generate the --with-pp-setup-file option.
* am/grecs.m4 (GRECS_SETUP): Handle new options.
|
|
Happy GNU Year!
|
|
|