aboutsummaryrefslogtreecommitdiff
path: root/tests/tforlan.c
AgeCommit message (Collapse)AuthorFiles
2023-10-30Update copyleft datesHEADmasterSergey Poznyakoff1
2021-01-06Update copyright yearsSergey Poznyakoff1
2018-03-15Update copyright yearsSergey Poznyakoff1
2015-01-22Update copyright years.Sergey Poznyakoff1
2014-12-10Fix coredump when comparing non-existing nodes.Sergey Poznyakoff1
* lib/forlan.c (coerce_value): Handle NULL nodes. (values_equal): Handle NULL strings. (dump_expr): Handle EQ and NE. * lib/forlanlex.l: Fix distinction before negative numeric and identifier. * etc/describe-security-groups.fln: ipProtocol == "-1" means "all". * tests/Makefile.am: Add new tests. * tests/testsuite.at: Likewise. * tests/comp00.at: New file. * tests/comp01.at: New file. * tests/comp02.at: New file. * tests/comp03.at: New file. * tests/comp04.at: New file. * tests/tforlan.c (main): Optionally read XML from standard input.
2014-02-03Update copyright yearsSergey Poznyakoff1
2013-01-19Update copyright years.Sergey Poznyakoff1
2012-10-11Trivial fixes.Sergey Poznyakoff1
2012-10-01Implement exit; add some docs.Sergey Poznyakoff1
* Makefile.am (SUBDIRS): Add doc. * configure.ac: Build doc/Makefile * doc/Makefile.am: New file. * doc/eclat-associate-address.1: New file. * doc/eclat.1: New file. * etc/associate-address.fln: Call exit if the request fails. * etc/default.fln: Call exit if error is returned or if the response is not recognized. * lib/forlan.c (forlan_eval_env) <exit_code>: New member. New built-in function: exit. (forlan_run): Return exit code. * lib/forlan.h (forlan_run): Change return type. * lib/forlanlex.l: Treat unquoted decimal number as a quoted string. * src/asscaddr-cl.opt: Minor changes. * src/cmdline.opt: Minor changes. * src/eclat.c: Return EX_NOPERM on unsufficient permissions to open the configuration file. * tests/exit.at: New file. * tests/Makefile.am: Add new files. * tests/testsuite.at: Include new test cases. * tests/tforlan.c: Propagate the return from forlan_run to the shell.
2012-09-25Use forlan to format the output.Sergey Poznyakoff1
* lib/forlan.h (forlan_lex_begin): Remove (forlan_lex_from_buffer) (forlan_lex_from_file): New protos. (forlan_parse): Remove. (forlan_parse_bufferm,forlan_parse_file): New protos. * lib/forlangrm.y (forlan_parse): Remove. (forlan_parse_bufferm,forlan_parse_file): New functions. * lib/forlanlex.l (YY_INPUT): Optionally, read input from file. (forlan_lex_begin): Remove (forlan_lex_from_buffer) (forlan_lex_from_file): New functions. * src/cmdline.opt: New options: --format, --sort * src/config.c: New statement: format. * src/eclat.c: Use output format scripts, if provided. * src/eclat.conf: Define output format for DescribeTags. * src/eclat.h: Include forlan.h (define_format): New proto. * tests/tforlan.c: New option: -s
2012-09-25Implement variables and loops in forlan.Sergey Poznyakoff1
* lib/forlan.c (free_type_comp): Free labels and argv. (dump_comp): Rewrite. (eval_node_finder): Remove. (eval_comp): Rewrite. (eval_comp0): New function. (free_type_loop, dump_loop, eval_loop) (dump_continue, eval_continue) (dump_break, eval_break) (dump_stop, eval_stop): New methods. (f_tab): Add new methods. * lib/forlan.h (forlan_node_comp): Change structure. * lib/forlangrm.y: Implement loops. * tests/Makefile.am: Add new tests. * tests/testsuite.at: Likewise. * tests/forlan01.at: Update. * tests/tforlan.c: New option -s (sort tree). * tests/dump01.at: New file. * tests/dump02.at: New file. * tests/last.at: New file. * tests/let.at: New file. * tests/listall.at: New file. * tests/print01.at: New file. * tests/print02.at: New file. * tests/print03.at: New file. * tests/tags.xml: New file. * tests/tagshairy.at: New file.
2012-09-24Implement loops and variablesSergey Poznyakoff1
* lib/forlan.c: Implement loops and variables. * lib/forlangrm.y: Likewise. * lib/forlanlex.l: Likewise. * lib/forlan.h (forlan_parse): Change return type. (forlan_type): New types. (forlan_dump_tree): Change signature. (forlan_value_type) <forlan_value_boolean>: New type. * tests/tforlan.c: Update.
2012-09-22Introduce output formatting languageSergey Poznyakoff1
* configure.ac: Check for lex and yacc. * lib/diag.c: New file (moved from ../src with edits) * lib/forlan.c: New file. * lib/forlan.h: New file. * lib/forlangrm.y: New file. * lib/forlanlex.l: New file. * lib/.gitignore: Add new files. * lib/Makefile.am: Add new file. * lib/libeclat.h: Add diagnostics-related stuff. * src/Makefile.am (eclat_SOURCES): Remove diag.c * src/cmdline.opt (set_program_name): Move to ../lib/diag.c * src/diag.c: Remove (see above). * src/config.c: Reflect changes to the diagnostics subsystem. * src/eclat.c: Likewise. * src/eclat.h: Remove diagnostics-related stuff. It lives in libeclat.h from now on. * src/error.c: Remove. * tests/forlan01.at: New testcase. * tests/testsuite.at: Include forlan01.at * tests/tforlan.c: New file. * tests/.gitignore: Add new files. * tests/Makefile.am: Add new files.

Return to:

Send suggestions and report system problems to the System administrator.