diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-05-28 21:07:46 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-05-28 21:07:46 -0700 |
commit | 5d42362d611c9103a07f768d8d2bcc1911e0f41b (patch) | |
tree | b3108e56546a98596fcded61d559cd89ddf8d317 /lex.yy.c.shipped | |
parent | f24dad0044cd108c537477373a20027ee660de4c (diff) | |
download | txr-5d42362d611c9103a07f768d8d2bcc1911e0f41b.tar.gz txr-5d42362d611c9103a07f768d8d2bcc1911e0f41b.tar.bz2 txr-5d42362d611c9103a07f768d8d2bcc1911e0f41b.zip |
json: get-json function.
* eval.c (eval_init): get-json intrinsic registered.
* parser.c (prime_parser): Handle prime_json.
(lisp_parse_impl): Take enum prime_parser argument
directly instead of the interactive flag.
(lisp_parse, nread, iread): Pass appropriate prime_parser
value instead of the original flag.
(get_json): New function. Like nread, but passes prime_json.
* parser.h (enum prime_parser): New constant, prime_json.
(get_json): Declared.
* parser.l (prime_scanner): Handle prime_json.
* parser.y (SECRET_ESCAPE_J): New terminal symbol.
(spec): New productions around SECRET_ESCAPE_J for parsing
JSON.
* lex.yy.c.shipped, y.tab.c.shipped, y.tab.h.shipped: Updated.
* txr.1: Documented.
* share/txr/stdlib/doc-syms.tl: Updated.
Diffstat (limited to 'lex.yy.c.shipped')
-rw-r--r-- | lex.yy.c.shipped | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lex.yy.c.shipped b/lex.yy.c.shipped index d9d251db..1e3cf4ff 100644 --- a/lex.yy.c.shipped +++ b/lex.yy.c.shipped @@ -7342,6 +7342,9 @@ void prime_scanner(scanner_t *yyg, enum prime_parser prim) case prime_regex: yy_push_state(SREGEX, yyg); break; + case prime_json: + yy_push_state(JSON, yyg); + break; } } |