aboutsummaryrefslogtreecommitdiff
path: root/doc
AgeCommit message (Collapse)AuthorFiles
2016-08-08Rename the projectargotSergey Poznyakoff19
2016-07-16Disable adjacent string concatenation.Sergey Poznyakoff1
The adjacent string concatenation feature doesn't work well with multiple-argument statements. The common example (found in GNU pies) is the "env" statement: env "PATH=/sbin:$PATH" "PRELOAD=true" The intent was to pass it two arguments, but in fact they get concatenated into one. To control this, the grecs_parser_options variable is introduced. If it has the GRECS_OPTION_QUOTED_STRING_CONCAT bit set, adjacent string concatenation is enabled. By default it is disabled. The GRECS_OPTION_ADJUST_STRING_LOCATIONS bit controls the way the quoted sring locations are computed. If it is set, the beginning of the string is counted at the first character after the opening double quote, and its end at the character immediately preceding the closing double quote. Otherwise, both double-quote characters are included in the location (the default). The change is backward incompatible. * doc/grecs-syntax.texi: Update. * include/grecs/parser.h (grecs_adjust_string_locations): Remove. (grecs_parser_options): New extern. * src/grecs-lex.l: QSTRING is returned only if GRECS_OPTION_QUOTED_STRING_CONCAT option is set. The GRECS_OPTION_ADJUST_STRING_LOCATIONS option controls string locus adjustment. * src/parser.c (grecs_adjust_string_locations): Remove. (grecs_parser_options): New variable. * tests/Makefile.am: Add strcat.at, stradj.at * tests/testsuite.at: Likewise. * tests/gcffmt.c: New options -strcat and -stradj * tests/stradj.at: New test case. * tests/strcat.at: New test case.
2016-07-04Update copyright yearsSergey Poznyakoff19
2015-12-17Update copyright yearsSergey Poznyakoff19
2015-12-17Minor fixes in wordsplit documentationSergey Poznyakoff1
2015-12-17wordsplit: minor fixesSergey Poznyakoff1
2015-12-17wordsplit: improve docs, add new functionSergey Poznyakoff1
* src/wordsplit.c (wordsplit_getwords): New functon. * src/wordsplit.h (wordsplit_getwords): New proto. * doc/wordsplit.3: Add example section, document wordsplit_getwords.
2015-12-17Finish wordsplit docs, improve testsSergey Poznyakoff1
2015-12-17Improve wordsplitSergey Poznyakoff1
* src/wordsplit.c: Implement default assignment, word expansion in variable defaults, distinction between ${variable:-word} and ${variable-word}. * doc/wordsplit.3: New file. * src/wordsplit.h (wordsplit)<ws_envbuf,ws_envidx> <ws_envsiz>: New members. (WRDSF_ARGV): Remove. (WRDSF_OPTIONS): New flag. (WRDSO_ARGV): New option bit. * tests/wordsplit.at: Add new tests. * tests/wsp.c: Set WRDSF_OPTIONS flag if one of the options is requested.
2014-12-26Add globbing pattern support to #include and #include_onceSergey Poznyakoff2
* doc/grecs-syntax.texi: Document changes to the #include statement. * doc/grecs_config.5: Likewise. * src/preproc.c (include_glob, include_pos) (include_once): New statics. (pp_list_find): Return 0 if list is NULL. (incl_copy): New statics. (source_lookup): Use incl_copy as the copy function. (pop_source): If more glob expansions are available, push next one onto input stack. (isglob): New static. (parse_include): Support globbing patterns. * tests/Makefile.am: Add new testes. * tests/testsuite.at: Likewise. * tests/incl00.at: New test case. * tests/incl01.at: New test case. * tests/incl02.at: New test case. * tests/incl03.at: New test case.
2012-08-13Implement a parser for dhcpd.confSergey Poznyakoff1
* 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.
2012-01-10Provide a way to install headers if using a shared convenience library.Sergey Poznyakoff1
* 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.
2012-01-03Happy GNU YearSergey Poznyakoff18
2011-07-01Update the docs.Sergey Poznyakoff2
2011-05-26Fix output formatting.Sergey Poznyakoff1
* 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.
2011-05-24Minor changeSergey Poznyakoff1
* doc/grecs-syntax.texi: Remove the topmost @section to let includers specify their own sectioning command.
2011-05-19Reimplement grecs_format_ familiy as output-independent functions.Sergey Poznyakoff4
* src/format.c (grecs_format_docstring): Rename to grecs_print_docstring. (grecs_format_simple_statement): Rename to grecs_print_simple_statement. (grecs_format_block_statement): Rename to grecs_print_block_statement. (grecs_format_statement_array): Rename to grecs_print_statement_array. (grecs_format_locus): Rename to grecs_print_locus. (grecs_format_node_path): Rename to grecs_print_node_path. (grecs_format_value): Rename to grecs_print_value. (grecs_format_node): Rename to grecs_print_node. (grecs_format_locus,grecs_format_node_path) (grecs_format_value,grecs_format_node): Reimplement as output-independent functions. All uses changed. * src/grecs.h: Update prototypes. * doc/grecs_format_locus.3: Update. * doc/grecs_format_node.3: Update. * doc/grecs_format_node_path.3: Update. * doc/grecs_format_value.3: Update.
2011-05-16Implement parser for git-style config files.Sergey Poznyakoff1
* 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.
2011-05-15Provide a framework for multiple parsers. Implement meta1 parser.Sergey Poznyakoff2
* 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.
2011-05-08Various fixes.Sergey Poznyakoff16
* .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.
2011-05-07Redo memory management (2).Sergey Poznyakoff3
* src/grecs.h (grecs_free_fun): New extern. (grecs_free): New proto. * src/format.c: Use grecs_free where appropriate. * src/grecs-lex.l: Likewise. * src/preproc.c: Likewise. * src/tree.c: Likewise. * src/lookup.c (parse_label): Use grecs_value_list_create. * src/mem.c: Initialize hooks with the default values. (grecs_free_fun): New hook. (grecs_free): New function. * doc/grecs_malloc.3: Document grecs_free. * doc/grecs_parse.3: Document the recent changes. * doc/grecs_strdup.3: Update.
2011-05-05Improve node formatting. Add version comparasion functions.Sergey Poznyakoff3
* 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.
2011-05-04Improve docs. Add an option to create installable distribution.Sergey Poznyakoff18
2011-05-01Update copyright years. Add docs.Sergey Poznyakoff1

Return to:

Send suggestions and report system problems to the System administrator.