aboutsummaryrefslogtreecommitdiff
path: root/src/git-parser.c
AgeCommit message (Collapse)AuthorFiles
2016-08-08Rename the projectargotSergey Poznyakoff1
2016-07-04Update copyright yearsSergey Poznyakoff1
2015-12-17Update copyright yearsSergey Poznyakoff1
2012-01-03Happy GNU YearSergey Poznyakoff1
2011-06-27Bugfixes.Sergey Poznyakoff1
2011-06-26Keep track of columns in the node and value locations. Improve error ↵Sergey Poznyakoff1
diagnostics. * src/grecs.h (grecs_locus_point): New struct. (grecs_locus_point_advance_line): New macro. (grecs_locus_t): Redesign. (grecs_value) <locus>: New member. (grecs_node) <idloc>: New member. (grecs_print_diag_fun): Change signature. (grecs_warning,grecs_error): Change signature. (grecs_parse_line_directive) (grecs_parse_line_directive_cpp) (grecs_string_convert): Change signature. (grecs_current_locus): Remove. (grecs_current_locus_point): New extern. * src/grecs-locus.h: New file. * src/Make.am (noinst_HEADERS): Add grecs-locus.h. * src/join.c (reset_locus): Rewrite. * src/lookup.c: Initialize new members of grecs_value and grecs_node. (split_cfg_path): Return wrdse error code. (grecs_node_from_path_locus): Take two grecs_locus_t arguments. Make sure all created nodes have their locus members properly initialized. * src/parser.c (grecs_parse): Initialize grecs_current_locus_point. * src/tree.c (grecs_node_create_points): New function. (string_to_bool,string_to_host,string_to_sockaddr) (grecs_string_convert): Change signatures. Be more precise in what locus to report. * src/diag.c (default_print_diag): Use YY_LOCATION_PRINT to output locus. (grecs_print_diag_fun): Change signature. (grecs_warning,grecs_error): Change signature. * src/format.c (grecs_format_locus): Rewrite. (grecs_format_node): Be more precise in what locus is being output. * src/bind-gram.y: Keep track of locations. Turn on error-verbose mode. * src/grecs-gram.y: Likewise. * src/meta1-gram.y: Likewise. * src/bind-lex.l: Keep track of locations. * src/git-parser.c: Likewise. * src/grecs-lex.l: Likewise. * src/meta1-lex.l: Likewise. * src/path-parser.c: Likewise. * src/preproc.c: Likewise. * tests/gcf1.conf: Untabify. * tests/format01.at: Reflect changes in the output. * tests/join.at: Likewise. * tests/set.at: Likewise. * tests/locus-bind.at: New testcase. * tests/locus-git.at: New testcase. * tests/locus-meta1.at: New testcase. * tests/locus00.at: New testcase. * tests/locus01.at: New testcase. * tests/locus02.at: New testcase. * tests/path-locus.at: New testcase.
2011-05-24Improve git parser.Sergey Poznyakoff1
* src/git-parser.c (token)<tag>: Remove. (token)<path>: New field. (rawinput): Set input_char to 0 on EOF. (collect_tag): Remove. (collect_unquoted,collect_subsection_name): New functions. (collect_string): Remove. (gettoken): Handle multiple subsections. Handle dot-delimited section names. (create_subsection_node): New function. (read_section): Rewrite using create_subsection_node. (grecs_git_parser): Initialize and free tok.path. * tests/git.conf: Provide a dot-delimited section name. * tests/parser-git.at: Change. expected output.
2011-05-23git: fix parserSergey Poznyakoff1
Accept ; as a comment starter. Accept partially or fully quoted values. Support the backslash escapes allowed by Git. * src/git-parser.c (input): semicolon starts a comment, too. (collect_substring): New function. (collect_string): Rewrite via collect_substring. (collect_value): New function. (getvalue): Use collect_value.
2011-05-16Add tests for MeTA1 and Git parsers.Sergey Poznyakoff1
* src/git-parser.c: Hanlde end-of-line comments. * tests/Makefile.am (EXTRA_DIST): Add meta1.conf and git.conf (TESTSUITE_AT): Add parser-git.at and parser-meta1.at. * tests/testsuite.at: Include parser-git.at and parser-meta1.at. * tests/meta1.conf: New file. * tests/git.conf: New file. * tests/parser-git.at: New file. * tests/parser-meta1.at: New file. * tests/gcffmt.c (main): Handle -type= option.
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.

Return to:

Send suggestions and report system problems to the System administrator.