path: root/lib/forlanlex.l
AgeCommit message (Collapse)AuthorFiles
2018-03-15Minor fixesSergey Poznyakoff1
2018-03-15Upgrade grecsSergey Poznyakoff1
* grecs: pull * Enable json * lib/ (AM_CPPFLAGS): Use @GRECS_INCLUDES@ (libeclat_a_SOURCES): Remove json sources. * src/ (AM_CPPFLAGS): Use @GRECS_INCLUDES@ * tests/ Likewise. * lib/json.h: Remove. * lib/jsongrm.y: Remove. * lib/jsonlex.l: Remove. * tests/tjson.c: Remove. * src/config.c (eclat_kw): Mark statically initialized memory locations as such. * src/mktags.c (process_tags): Use wordsplit to process quoted arguments. * lib/bidimap.c (bidimap_config): Fill allocated memory with 0's * lib/filemap.c (filemap_config): Likewise. * lib/gdbmmap.c (gdbm_map_config): Likewise. * lib/seqmap.c (seqmap_config): Likewise.
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/ Add new tests. * tests/ Likewise. * tests/ New file. * tests/ New file. * tests/ New file. * tests/ New file. * tests/ New file. * tests/tforlan.c (main): Optionally read XML from standard input.
2014-02-03Update copyright yearsSergey Poznyakoff1
2013-05-21Various minor fixes.Sergey Poznyakoff1
* doc/eclat.conf.5: Document EC2 maps. * etc/eclat.cfin: Provide default maps. * lib/ (AM_LFLAGS): Remove -v. * lib/bidimap.c (cb_submap): Remove unused variable. * lib/forlan.c: Minor change. * lib/forlangrm.y: Declare prototype for yylex. * lib/forlanlex.l: Add option nounput * lib/libeclat.h (eclat_map) <locus>: New member. * lib/map.c (eclat_map_config): Warn if attempting to redeclare an existing map. * src/ec2map.c (ec2_map_get): Minor change.
2013-01-19Update copyright years.Sergey Poznyakoff1
2012-10-11Trivial fixes.Sergey Poznyakoff1
2012-10-03Implement eq/ne comparisons in forlan; Implement describe-security-groups ↵Sergey Poznyakoff1
command. * etc/ Add new file. * etc/describe-security-groups.fln: New file. * lib/forlan.c: Implement equality and inequality comparisons. * lib/forlan.h (forlan_opcode_eq) (forlan_opcode_ne): New opcodes. (FORLAN_NTYPES): New constants. * lib/forlangrm.y: Add equality and inequality productions. * lib/forlanlex.l: New tokens: == and != * src/dscrsecgrps-cl.opt: New file. * src/dscrsecgrps.c: New file. * src/ Add new files. * src/eclat.c: Implement describe-security-groups * src/eclat.h (eclat_describe_security_groups): New proto. * src/cretags.c: Fix memory leaks. * src/deltags.c: Likewise. * src/dscrtags.c: Likewise. * tests/ New test case. * tests/ Include new test case. * tests/ Add new test case.
2012-10-01Implement exit; add some docs.Sergey Poznyakoff1
* (SUBDIRS): Add doc. * Build doc/Makefile * doc/ 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/ New file. * tests/ Add new files. * tests/ 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-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
* 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/ Add new file. * lib/libeclat.h: Add diagnostics-related stuff. * src/ (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/ New testcase. * tests/ Include * tests/tforlan.c: New file. * tests/.gitignore: Add new files. * tests/ Add new files.

Return to:

Send suggestions and report system problems to the System administrator.