Switch to sqlite3's lemon parser generator.
[oweals/jsonpath.git] / main.c
diff --git a/main.c b/main.c
index eaa1ee09216f2b22141804831205ba847dbcbea3..ebd52c0cecf0cbb5542cb52ce20a43ec9d6bd150 100644 (file)
--- a/main.c
+++ b/main.c
@@ -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;
        }