Stephen Dolan
6ed2da6d43
Merge pull request #132 from dolmen/fix/github-urls
...
Fix Github URLs: stedolan.github.com -> stedolan.github.io
2013-05-23 09:16:34 -07:00
Stephen Dolan
22006172ba
fix typo and clean up docs build
2013-05-20 13:24:48 +01:00
Stephen Dolan
0535e724a2
jq 1.3 release
2013-05-19 11:48:18 +01:00
Stephen Dolan
fd1ac5dd79
EACH need not make a backtrack point on the last iteration
2013-05-17 22:49:08 +01:00
Stephen Dolan
9b91eafac4
Make array construction use LOADVN (slightly faster)
2013-05-16 15:09:59 +01:00
Stephen Dolan
bc42812715
Remove the insane "fold" operation, replace with saner "reduce".
2013-05-16 15:07:53 +01:00
Stephen Dolan
8fbee891b3
Add LOADVN opcode.
...
Does a variable load, but sets the variable to be null afterwards.
2013-05-16 15:02:18 +01:00
Stephen Dolan
919292764a
Reverse function. Closes #94 .
2013-05-16 14:25:28 +01:00
Stephen Dolan
a1e4dfa324
Better debug info for struct bytecode.
...
--debug-dump-disasm produces more comprehensible output now.
2013-05-16 00:51:17 +01:00
Stephen Dolan
f8644c31a3
Only generate code for those builtin functions actually used.
...
Makes output of --debug-dump-disasm much simpler.
2013-05-15 01:37:15 +01:00
Stephen Dolan
1e2851cdb3
Remove the YIELD opcode (use RET instead)
2013-05-15 01:23:06 +01:00
Stephen Dolan
e83e51eb56
'length' function now measures string length in codepoints, not bytes.
2013-05-15 00:37:38 +01:00
Stephen Dolan
c496a924ce
Bugfix for array slices.
2013-05-15 00:22:44 +01:00
Stephen Dolan
81be37b236
Add the range function
2013-05-14 16:09:10 +01:00
Stephen Dolan
4d540b7102
Fix some documentation bugs
2013-05-13 20:26:44 +01:00
Stephen Dolan
33901b74b1
Array slicing. Closes #2 .
2013-05-13 20:16:19 +01:00
Stephen Dolan
a47cfa4757
Delete unnecessary _POSIX_SOURCE. Closes #89
2013-05-13 16:41:11 +01:00
Stephen Dolan
a625d2821e
Add to_entries, from_entries and with_entries functions.
...
Closes #97 .
2013-05-13 16:15:49 +01:00
Stephen Dolan
d8706fd460
Fix the //= operator.
...
Closes #62 .
2013-05-13 16:04:30 +01:00
Stephen Dolan
e13f24ab45
Better error handling for INSERT opcode
...
jq 'null | {(.a): 1}' no longer crashes.
2013-05-13 15:42:57 +01:00
Stephen Dolan
34a63246ab
Remove the is_backtrack_frame special case hack.
2013-05-13 15:37:57 +01:00
Stephen Dolan
8c708f3c7a
Refactor path logic.
2013-05-13 15:00:05 +01:00
Stephen Dolan
b0e65d149f
Fix a bug triggered by jv_array_slice.
2013-05-13 14:10:39 +01:00
Stephen Dolan
e29db8d272
Fix bug with path handling (used in assignments).
...
Closes #67
2013-05-11 18:10:21 +01:00
Stephen Dolan
7ca5127fcc
Merge branch 'autotools'
2013-05-11 15:21:23 +01:00
Stephen Dolan
4b1b9c219a
Delete some Autotools junk and update README.
...
Autotools autogenerated files that change frequently have been
removed, those that don't are still checked in.
2013-05-11 15:15:56 +01:00
Stephen Dolan
4a5405e4b8
Rake task to build website including source dist and binaries.
2013-05-11 14:57:58 +01:00
Stephen Dolan
d03149f4df
Rake task to build source distribution for website
2013-05-11 14:48:39 +01:00
Stephen Dolan
18cf4ad475
Add the docs to the distributed tarballs
2013-05-09 20:53:51 +01:00
Stephen Dolan
ba4bb136bb
Fix manpage build.
2013-05-09 20:43:26 +01:00
Stephen Dolan
e6494857fc
Add some build instructions for how to install doc dependencies.
...
jq can now build without Ruby, but you won't get a nice manpage.
2013-05-09 20:35:19 +01:00
Stephen Dolan
12d2d4d1f5
Don't build the manpage unless there's a working Ruby setup.
2013-05-09 15:22:38 +01:00
Stephen Dolan
d75414bc94
support for out-of-tree tests
2013-05-09 13:40:00 +01:00
Stephen Dolan
a592c98461
Fail properly when attempting to build manpage without rake
2013-05-09 13:10:09 +01:00
Stephen Dolan
f6089a627a
Autotools hackery so that "make dist" builds lexer and parser.
2013-05-09 11:31:17 +01:00
Stephen Dolan
898dc8978b
Add a redundant intialisation to squash a gcc warning.
2013-05-09 11:30:49 +01:00
Stephen Dolan
d43084086b
Make manpage building more robust.
2013-05-09 02:38:57 +01:00
Stephen Dolan
124bda6993
Add a "binaries" target to the website Rakefile.
2013-05-09 02:18:28 +01:00
Stephen Dolan
7fbc50239c
Minor docs fix to get rid of Bonsai warnings.
2013-05-09 02:01:01 +01:00
Stephen Dolan
282667bbd4
Script for cross-compiling jq binaries for other platforms.
2013-05-09 01:50:20 +01:00
Stephen Dolan
63b689bf54
Use the version number from configure.ac in the website.
2013-05-08 19:57:29 +01:00
Stephen Dolan
c710f91257
Add the parser to BUILT_SOURCES
2013-05-08 19:57:05 +01:00
Stephen Dolan
a511d03d85
Configure whether colour is displayed by default directly in source
2013-05-08 19:37:12 +01:00
Stephen Dolan
9d245c88c4
Check in a pile of Autotools junk, including the configure script.
2013-05-08 18:55:10 +01:00
Stephen Dolan
7813f363a2
Merge pull request #115 from nicowilliams/complex
...
Rename complex to nontrivial for safety (#113 )
2013-05-08 07:07:31 -07:00
Stephen Dolan
d121420757
Clean up autotools config.
...
Remove some of @stagrlee's hard work since jq's testsuite is
less silly than when he wrote the autotools config.
2013-05-08 02:42:23 +01:00
Stephen Dolan
1ebb382540
Check in jv_utf8_tables.gen.h, it is unlikely to change.
2013-05-08 01:33:04 +01:00
Stephen Dolan
2363246eea
Merge remote-tracking branch 'stagrlee/master' into autotools
...
Conflicts:
Makefile
jq_test.c
2013-05-08 00:52:24 +01:00
Stephen Dolan
46814da91a
Merge pull request #119 from 13ren/master
...
tiny typo fix in manual
2013-05-07 03:57:47 -07:00
Stephen Dolan
74eb914aba
Add trailing slashes to various internal doc links.
...
Fixes #110
2013-05-06 15:03:14 +01:00
Stephen Dolan
5be97463ec
Add a --arg option to allow variables to be passed from the cmdline.
...
Closes #107
2013-05-06 14:21:00 +01:00
Stephen Dolan
48be23233a
Add the "has" function. Closes #74 .
2013-05-06 13:46:54 +01:00
Stephen Dolan
88a6dc5343
Merge pull request #77 from jkleint/patch-1
...
Clarify description of `as`
2013-05-05 18:39:59 -07:00
Stephen Dolan
fee38afd8b
Document behaviour of .[] on objects.
...
Closes #57 .
2013-05-06 02:37:34 +01:00
Stephen Dolan
cacda19e75
Add documentation for "type".
...
Closes #75 .
2013-05-06 02:34:02 +01:00
Stephen Dolan
7f979cf1c7
Update gems and use HTTPS to get them.
2013-05-06 01:15:33 +01:00
Stephen Dolan
8bf4a73f3d
Fix some bad escaping
2013-05-06 01:14:53 +01:00
Stephen Dolan
d04bd897e3
Merge commit 'e45f93f85f22c73025830a6bd0b2807263068996'
...
See #87
2013-05-05 23:58:24 +01:00
Stephen Dolan
1741d8c161
Remove JQ_DEBUG #define and jq_test binary, simplifying build.
...
The debugging features previously available via JQ_DEBUG are now
command-line options.
2013-05-05 23:12:10 +01:00
Stephen Dolan
c1748fa633
WIP
2013-05-05 22:59:53 +01:00
Stephen Dolan
a49402c53a
Combine the functionality of jq and jq_test
...
One binary is much simpler. ./jq --run-tests now runs the tests.
2013-05-05 22:59:53 +01:00
Stephen Dolan
47e015e946
Make a few constant globals actually const.
...
This means the .data and .bss sections are empty, a good thing
in a shared library (see #98 ).
2013-05-05 22:59:53 +01:00
Stephen Dolan
ab1a97472c
Merge pull request #109 from nicowilliams/no_mutable_globals-rebased
...
Remove globals/make jq_init/next/teardown() an API
2013-05-05 12:29:07 -07:00
Stephen Dolan
74df082283
Merge pull request #93 from shayel/master
...
Allow manpage to build
2013-05-05 12:13:36 -07:00
Stephen Dolan
925ec3751f
Fix negative number syntax. Add a unary '-' operator.
...
Closes #63 .
2013-01-03 12:53:23 +00:00
Stephen Dolan
c013b557a2
Change APPEND opcode to directly modify a variable.
...
Avoids a big O(n^2) loop in constructing arrays. Fixes #61 .
2013-01-03 12:51:33 +00:00
Stephen Dolan
fb84541e11
Clean up jv_object_foreach and add jv_array_foreach
2012-12-31 23:27:00 +00:00
Stephen Dolan
38fe6fc0cb
Ignore some more stuff.
2012-12-31 23:25:12 +00:00
Stephen Dolan
b3bad59dd7
Add the recurse function. See #37 .
2012-12-29 22:59:07 +00:00
Stephen Dolan
e0cda536f3
Make null + foo return foo, rather than an error.
...
This also allows 'add' to be implemented in jq rather than C.
2012-12-29 16:52:26 +00:00
Stephen Dolan
d5fdf70434
Refactor assignment.
...
New version is much more elegant and probably slower. Uses
library functions implemented in jq rather than dedicated opcodes.
2012-12-29 16:43:36 +00:00
Stephen Dolan
465a4ec565
Improvements to del(foo).
...
del(foo,bar) is now very different from del(foo),del(bar).
See #37 .
2012-12-29 16:13:06 +00:00
Stephen Dolan
3a5377e183
Fix a bug in URI-encoding of certain non-ASCII characters.
...
Oh how I hate C casting rules.
2012-12-29 01:37:22 +00:00
Stephen Dolan
79c9c418c6
Path manipulation (path/getpath/setpath/delpath) and docs.
...
del function should fix #37 .
2012-12-28 16:08:29 +00:00
Stephen Dolan
f1e23448e7
Support for two-argument functions.
...
Should probably support n args instead. This is a quick hack.
Also, ';' is a slightly ugly argument separator.
2012-12-28 15:07:27 +00:00
Stephen Dolan
417899f9a0
Fold operation (code/docs/test)
2012-12-28 15:05:34 +00:00
Stephen Dolan
9302b16247
Docs typos.
2012-12-28 14:23:28 +00:00
Stephen Dolan
89e26969ae
@foo syntax for encoding of strings into various formats.
...
Fixes part of #47 and #48 .
2012-12-28 01:23:09 +00:00
Stephen Dolan
52db8000c6
Fix an embarassing I/O bug.
...
Pulling some I/O out to a function meant that buf changed from
"char buf[4096]" to "char* buf", and "sizeof(buf)" got a lot
less interesting. The upshot of this is that jq read input eight
bytes at a time, which is not the fastest.
2012-12-27 01:57:09 +00:00
Stephen Dolan
d327772dfc
JSON parsing error messages now specify a location of the error.
...
Should help with #53 .
2012-12-27 01:56:23 +00:00
Stephen Dolan
cedda2084d
Sneaky valgrind trick to detect stack memory issues.
...
After something is popped from a stack, we overwrite the memory
with uninitialised data (if JQ_DEBUG is on). This means that
valgrind reports use-after-pop as an uninitialised memory error.
2012-12-24 17:11:18 +00:00
Stephen Dolan
0fed03f35a
Fix a bad memory leak when using --raw-output
2012-12-23 15:41:20 +00:00
Stephen Dolan
5578ec0f69
Give Windows builds a proper .exe suffix.
2012-12-20 15:12:14 +00:00
Stephen Dolan
a05904b226
Version 1.2!
2012-12-20 12:26:15 +00:00
Stephen Dolan
c181a9185a
Add a few lines to the bottom of the manpage.
2012-12-20 12:25:50 +00:00
Stephen Dolan
6a597b41a6
Update download page and build system to handle more platforms.
2012-12-20 12:17:56 +00:00
Stephen Dolan
c85d8d8b4e
Don't enable coloured output by default on Windows.
2012-12-20 12:16:22 +00:00
Stephen Dolan
dcdb996085
Merge pull request #50 from stesh/master
...
Add information about installing dev environment on OS X
2012-12-20 03:41:19 -08:00
Stephen Dolan
5968f54f55
Fix a bug in stack reallocation during deep recursion.
2012-12-18 17:36:24 +00:00
Stephen Dolan
8dca3ef10d
Print an error message and abort in out-of-memory situations.
...
Closes #43 .
Tested with:
ulimit -v 5000
./jq -n -c 'def f(x): x,f([x,x]); f(0)'
2012-12-18 17:01:23 +00:00
Stephen Dolan
04daafbde3
Add wrappers for malloc/realloc/free. See #43 .
2012-12-18 16:53:51 +00:00
Stephen Dolan
75421cbfe3
Add the ability to specify input files on the commandline.
...
See #21 .
2012-12-16 19:46:41 +00:00
Stephen Dolan
b0aa62f2b7
Improve manpage introduction, add examples to manpage.
...
Closes #19
2012-12-16 17:11:40 +00:00
Stephen Dolan
3ae8fb7371
Fix a bug uncovered by tests extracted from manual.
...
`null | length` should give 0, and now does.
2012-12-16 13:10:48 +00:00
Stephen Dolan
73c657cdc4
Lots of build system and docs improvements, including a manpage.
...
- Build binaries for multiple platforms
- Make a manpage out of the manual (see #19 )
- Extract more tests from the documentation
- Fix a few documentation bugs uncovered by above.
2012-12-16 13:06:03 +00:00
Stephen Dolan
2b48ee4a8f
Add a Gemfile to make building the documentation easier.
...
Use "bundle install" in the docs folder to install ruby dependencies.
2012-12-12 23:18:43 +00:00
Stephen Dolan
8ba2cef913
Delete autogenerated source from the repository.
...
This was a horrible hack to fix build issues on OS X some time
ago. There are better ways to fix build issues on OS X :)
See #49 .
2012-12-10 22:36:01 +00:00
Stephen Dolan
dcc93042d3
some words explaining struct inst a little
2012-12-10 22:35:33 +00:00
Stephen Dolan
34ff993059
error() function
2012-12-10 22:30:09 +00:00
Stephen Dolan
b660bd2be6
Fix Rack setup so that viewing documentation locally is less painful.
2012-12-10 22:25:11 +00:00