Nicolas Williams
1ba8c2cfa6
Add module directive, modulemeta builtin
...
Fix #425 .
2014-08-14 03:26:26 -05:00
William Langford
38b939688a
Added library system with -l, -L, and JQ_LIBRARY_PATH
...
Created util.[ch] to hold common utilities.
2014-07-22 22:51:11 -05:00
Nicolas Williams
5a863bf010
Add foreach and limit
2014-07-06 19:40:05 -05:00
Nicolas Williams
7fce34292e
Add try EXP catch EXP
2014-07-06 01:29:42 -05:00
Nicolas Williams
fe29d3d3fa
Add ?, .[]?, and .. operators
...
Make XPath-like `//a/b` recursive structure traversal easier in jq,
which then becomes:
..|.a?.b?
The `?` operator suppresses errors about . not being an array or object.
The `..` operator is equivalent to calling the new `recurse_down`
built-in, which in turn is equivalent to
recurse(.[]?)
Note that `..a` is not supported; neither is `...a`. That could be add
added, but it doesn't seem worth the trouble of saving the need to type
a '|'.
2014-02-20 15:33:07 -06:00
Stephen Dolan
dae2422fd1
Merge branch 'libjq'
...
Conflicts:
Makefile.am
configure.ac
2013-09-14 19:30:39 +01:00
Stephen Dolan
37cfc912c1
Remove #includes from jv.h
2013-06-23 14:23:07 +01:00
Nicolas Williams
3403d07912
Add mod (and setmod) operators
2013-06-21 15:27:34 -05:00
Stephen Dolan
2ffbb9d6b7
Lex and parse .foo better.
...
'.as' is now valid, '. foo' is now invalid. See #141 .
2013-06-05 13:41:56 +01:00
Stephen Dolan
bc42812715
Remove the insane "fold" operation, replace with saner "reduce".
2013-05-16 15:07:53 +01:00
Stephen Dolan
e83e51eb56
'length' function now measures string length in codepoints, not bytes.
2013-05-15 00:37:38 +01:00
Lee Thompson
c7725a8d4d
merging upstream stedolan changes
2013-02-02 20:39:23 -06:00
Stephen Dolan
925ec3751f
Fix negative number syntax. Add a unary '-' operator.
...
Closes #63 .
2013-01-03 12:53:23 +00:00
Stephen Dolan
417899f9a0
Fold operation (code/docs/test)
2012-12-28 15:05:34 +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
04daafbde3
Add wrappers for malloc/realloc/free. See #43 .
2012-12-18 16:53:51 +00:00
Stephen Dolan
ed7f95a492
Demote "contains" to a built-in function rather than an operator.
2012-12-02 22:52:38 +00:00
Lee Thompson
ddeec45b2e
revert back to make invoking flex, fix a few bugs
2012-11-28 01:08:23 -06:00
Stephen Dolan
2dad2bdd97
Merge remote-tracking branch 'origin/master'
2012-11-26 22:24:04 +00:00
Stephen Dolan
4c65847568
Raise a proper error from the lexer on unmatched },),]
2012-11-26 01:40:35 +00:00
Stephen Roantree
5e25c2a259
Implemented contains operator
2012-10-24 13:50:26 -07:00
Damian Gryski
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
Damian Gryski
553de39b2a
Implement 'not equal' (!=) as a binop
2012-10-23 17:01:39 +02:00
Stephen Dolan
48fb7c61b3
Support a -f option to load from a file, and # comments
...
This means '#!/usr/local/bin/jq -f' is now a sensible way
to start a file.
Closes #13
2012-10-22 19:18:30 +01:00
Stephen Dolan
afec2544f1
A string interpolation syntax that I don't hate. Also tests.
...
You can interpolate values into strings using \(this syntax), e.g.
"best \("str" + "ing") ever"
2012-10-20 00:09:20 +01:00
Stephen Roantree
0618e61e0b
Add <,>,<=,>= binops
2012-10-07 22:34:12 +01:00
Stephen Dolan
a2643cc0d5
Allow underscores in IDENT tokens. Fixes #3 .
...
IDENT syntax now includes ASCII letters and underscores, so
'.foo_bar' now works. Non-ASCII letters won't work in IDENT
tokens (it's impossible to tell which non-ascii characters are
"letters" without full unicode tables), so '.données' is still
a syntax error (the workaround is '.["données"]', since you can
put anything you like in a string).
2012-09-22 14:03:46 +01:00
Stephen Dolan
a4eea165bb
Move everything around - delete old Haskell code, clean up build.
2012-09-18 17:44:43 +01:00