summaryrefslogtreecommitdiffstats
path: root/sysif.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-06-20 09:07:45 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-06-20 09:07:45 -0700
commita9835d6c37d2a3c762c4620294d0b2a13d543ccb (patch)
tree7089aff7f2d274ed013115f4152ac311f79c21ea /sysif.c
parent7c34d91f30e5a77bc12b811f6c836cea71905529 (diff)
downloadtxr-a9835d6c37d2a3c762c4620294d0b2a13d543ccb.tar.gz
txr-a9835d6c37d2a3c762c4620294d0b2a13d543ccb.tar.bz2
txr-a9835d6c37d2a3c762c4620294d0b2a13d543ccb.zip
read/get-json: reject trailing junk in string input.
* parser.c (lisp_parse_impl): If parsing from string, check for trailing junk and diagnose. JSON parsing doesn't use lookahead because it doesn't have a.b syntax, so the recent_tok gives the last token that actually went into the syntax, and not a lookahead token. So in the case of JSON, we call yylex to see if there is any trailing token. * tests/010/json.tl: Extend get-json tests to more kinds of objects, and then replicate with trailing whitespace and trailing junk to provide coverage for these cases. * tests/012/parse.t: Slew of new read tests and iread also. * txr.1: Documented.
Diffstat (limited to 'sysif.c')
0 files changed, 0 insertions, 0 deletions