1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00

530 Commits

Author SHA1 Message Date
c0a2f1ab47 Add min, max, min_by, max_by functions. 2012-12-04 22:45:03 +00:00
76c8706145 fix rpm mv command when rpm stashes the package in a subdirectory 2012-12-04 16:29:01 -06:00
277249ffe6 change rpmbuild target to rpm 2012-12-04 14:49:39 -06:00
616e8f9924 Refactor function argument passing into what it always should have been.
Most visible change is that error messages when a function is called
with the wrong number of arguments are much better.
2012-12-04 00:39:21 +00:00
00e4feba81 get rpm building from tarball with autoconf 2012-12-03 17:27:40 -06:00
26bbed29f7 start work on getting RPM to work with tarball 2012-12-03 16:19:45 -06:00
a88d53d2fd Extend {foo} syntax to allow {"foo"} as well.
Useful when "foo" contains unusual characters. Should help with
the issues #7, #38, #40, #42.
2012-12-03 20:31:40 +00:00
5f6a95c7b5 General cleanup - rename a few things, delete dead code. 2012-12-03 20:02:02 +00:00
fadeb66365 Add a unique function. 2012-12-03 02:02:12 +00:00
c8bbfed041 See, I told you colour was a bad idea! #11
Last commit broke the build, minor fix needed to testsuite.
2012-12-03 02:00:29 +00:00
e9c7548b82 Oh alright then, if you insist.
Colo(u)red output for jq. Enabled by default if isatty(stdout).
Closes #11.
2012-12-03 01:21:07 +00:00
67f8ad9435 Ignore a UTF-8 BOM if one appears at the start of a JSON document.
Closes #45.
2012-12-02 23:53:55 +00:00
5b45184a1a Make the -c output more compact. Closes #44. 2012-12-02 23:24:07 +00:00
11965aaa2e sort_by and group_by functions, tests and docs. 2012-12-02 23:22:15 +00:00
ed7f95a492 Demote "contains" to a built-in function rather than an operator. 2012-12-02 22:52:38 +00:00
63d10433c9 Fix a horrible scoping/associativity bug.
`1 as $x | . | $x` didn't compile, as it was parsed as

    (1 as $x | .) | $x

where `$x` is undefined, rather than as

    1 as $x | (. | $x)
2012-12-02 22:22:08 +00:00
ea9db414ed Clean up implementation of builtin functions. 2012-12-02 22:12:08 +00:00
b6f2fbbe62 Move all the includes one place to the left 2012-12-02 21:25:54 +00:00
125e278502 Clean up calls to C functions, unify opcodes 2012-12-02 20:45:55 +00:00
251f221b85 Refactor of function call codegen. Separate codegen for C and jq calls. 2012-12-02 20:45:06 +00:00
9e743d517a Sort function and more general comparison operators. 2012-11-30 20:27:16 +00:00
ddeec45b2e revert back to make invoking flex, fix a few bugs 2012-11-28 01:08:23 -06:00
006357f954 initial attempt at autoconf implementation, removed all generated code from git 2012-11-27 16:02:59 -06:00
2dad2bdd97 Merge remote-tracking branch 'origin/master' 2012-11-26 22:24:04 +00:00
d56370f734 Move some higher-level JSON manipulation functions into jv_aux.{c,h} 2012-11-26 22:22:45 +00:00
334a79b704 Define bytecoded builtins more concisely. 2012-11-26 18:53:47 +00:00
4c65847568 Raise a proper error from the lexer on unmatched },),] 2012-11-26 01:40:35 +00:00
4747f8681b Transparent handling for CBV arguments to C functions.
C function arguments closures are inlined before the call.
2012-11-26 01:36:55 +00:00
3e3fe51959 Clean up function creation API and epilogue generation. 2012-11-26 00:39:01 +00:00
924aeda504 Add some preprocessor junk to make codegen cleaner. 2012-11-25 23:49:57 +00:00
f19ba32fdd Minor refactor of function call setup to allow for multiple arguments. 2012-11-25 23:07:43 +00:00
a33c6f3df9 Fixed to work under CentOS 5.4 2012-10-30 14:30:36 -07:00
04640aeaeb Added initial support for packaging jq as an RPM 2012-10-30 10:26:08 -07:00
0923c79fee Merge pull request #36 from stroan/contains-operator
Implemented contains operator
2012-10-25 11:51:55 -07:00
50bcbc2271 Merge branch 'master' of https://github.com/stedolan/jq into contains-operator
Conflicts:
	lexer.gen.c
	parser.gen.c
	parser.gen.h
	parser.gen.info
	parser.y
2012-10-25 10:02:02 -07:00
1b556315af Remove redundant code from jv_object_contains 2012-10-25 06:29:23 -07:00
ecc8998d38 Restructure contains methods to use public jv methods 2012-10-24 18:29:33 -07:00
72691b4909 Fix a bug in string parsing. Closes #35 2012-10-25 00:13:39 +01:00
5e25c2a259 Implemented contains operator 2012-10-24 13:50:26 -07:00
033d9b2fd5 Merge pull request #34 from dgryski/master
Add != (not equal) to list of supported binops
2012-10-24 02:43:54 -07:00
0adf4638d1 Update generated lexer.gen.* and parser.gen.* files 2012-10-24 09:31:21 +02:00
e40778727b Replace yyscan_t with another pointer type that we control.
This prevents the circuluar dependency between parser.gen.h and
lexer.gen.h.  Newer versions of bison add a prototype for yyparse() to
parser.gen.h that include the as-yet-undeclared yyscan_t type.
2012-10-24 09:28:27 +02:00
5a64a29774 Remove .gitignore from tarballs. 2012-10-23 21:58:50 +01:00
45b6fc8148 Add some in/equality test cases 2012-10-23 21:12:47 +02:00
8ad3b6f9b9 Merge pull request #22 from alexchamberlain/patch-1
Arch Packaging docs
2012-10-23 11:24:12 -07:00
409456f581 Regenerate lex/yacc files 2012-10-23 17:02:19 +02:00
553de39b2a Implement 'not equal' (!=) as a binop 2012-10-23 17:01:39 +02:00
b193bca563 yyscan_t isn't exposed by some versions of flex. 2012-10-23 17:00:42 +02:00
56aa4cf1df Add docs for installing on Arch Linux. 2012-10-23 14:46:44 +01:00
2a610da2d1 Allow the 'keys' function to take arrays. 2012-10-22 23:31:07 +01:00