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

19 Commits

Author SHA1 Message Date
25cbab056b Slightly better string interpolation. 2012-09-18 13:22:22 +01:00
830610cef8 Make "not" a builtin function rather than syntax.
Fixes a really awkward grammar issue.
2012-09-17 21:08:43 +01:00
3db27b01a1 First pass at string interpolation.
Requires a lexer hack, but a surprisingly un-hideous one. The lexer
maintains a stack of bracket characters so that it can match
parens/brackets/braces to tell where a subexp nested in a string
actually ends.
2012-09-17 20:41:57 +01:00
df195b3187 Add update operators (+=, -=, *=, /= and //=) 2012-09-11 23:55:59 +01:00
0ce437ea97 More error handling in the parser.
Add a special case in the lexer to detect unterminated strings.
Add some error recovery in the parser for more copious error spam.
2012-09-11 10:18:18 +01:00
ac3f8bcc52 Proper error messages from lexer errors (e.g. bad characters). 2012-09-11 09:13:20 +01:00
95dd64b0f0 Much, much better error reporting from the parser.
Getting proper locations through flex/bison was more effort than
was advertised.
2012-09-11 00:04:47 +01:00
aa3ebdfe9b Multiplication and division operators.
It is an error to use these on anything but numbers. Maybe later
implementing python/ruby-style ("a" * 100) might be handy.
2012-09-10 16:57:17 +01:00
6f3abbac62 Subtraction - as expected for numbers, ruby-style set diff for arrays. 2012-09-10 16:49:25 +01:00
da5d653de8 Add a Boolean "not" operator.
Not wholly convinced this is a good idea, maybe "not" should be a
builtin function instead? 'not (.a == .b)' vs. '.a == .b | not'
2012-09-04 20:43:40 +01:00
6e6ea50763 Short-circuiting Boolean "and" and "or" operators. 2012-09-04 20:38:59 +01:00
328c4a13f1 Add "elif" to if-then-else constructs. 2012-09-04 16:05:24 +01:00
5add2c2ceb if-then-else and defined-or operators 2012-09-04 15:34:34 +01:00
d8fad1ed9b Disallow a + before numbers (makes parsing easier, agrees with JSON) 2012-09-03 15:32:50 +01:00
6041fd7661 Literal strings and better literal numbers. 2012-09-03 13:57:47 +01:00
2cb9a6e61d Move from Jansson to JV - everything but the interpreter loop
Passes valgrind --leak-check=full.
2012-09-02 16:31:59 +01:00
6c8b55793a first pass at assignment 2012-08-27 10:12:02 +01:00
c128c2029e First pass at functions + tests 2012-08-21 18:14:13 +01:00
2002dc1a2f Most of a C implementation of jq 2012-08-16 01:00:30 +01:00