diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2014-06-15 16:31:14 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2014-06-15 20:59:37 +0200 |
commit | f3830138661374ca10fe6a0b6f2f4b949dea3e5c (patch) | |
tree | 22c1e28df47e02f941dba8160090186481941a0c /main.c | |
parent | 960dafd0b61eb14032d13c1562566618be55133f (diff) | |
download | jsonpath-f3830138661374ca10fe6a0b6f2f4b949dea3e5c.tar.gz |
Switch to sqlite3's lemon parser generator.
This commit drops the flex + bison code in favor to a hand-written
lexer and a new grammar file in lemon syntax.
The change results in a much smaller binary and easier to maintain
code. Code required to build and maintain the AST has been split
off into the ast.c and ast.h files.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -263,8 +263,9 @@ filter_json(int opt, struct json_object *jsobj, char *expr) if (!state || state->error) { - fprintf(stderr, "In expression '%s': %s\n", - expr, state ? state->error : "Out of memory"); + fprintf(stderr, "Syntax error near {%s}: %s\n", + state ? expr + state->erroff : expr, + state ? state->error : "Out of memory"); goto out; } |