summaryrefslogtreecommitdiffstats
path: root/parser.l
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-01-10 23:52:28 -0800
committerKaz Kylheku <kaz@kylheku.com>2022-01-10 23:52:28 -0800
commite2e4c5a3de3a948054f58c9ba5e8ce14ce02a94a (patch)
tree8d37da3ce705fd052232047614f1b88f45391d37 /parser.l
parent15a45c00d9d8acaaa6e4eb43f553243230760c54 (diff)
downloadtxr-e2e4c5a3de3a948054f58c9ba5e8ce14ce02a94a.tar.gz
txr-e2e4c5a3de3a948054f58c9ba5e8ce14ce02a94a.tar.bz2
txr-e2e4c5a3de3a948054f58c9ba5e8ce14ce02a94a.zip
parser: bug: carriage returns in JSON causing errors.
* parser.l (NJPUNC): This inverted class lexical category must exclude the carriage return character \r, otherwise it matches it. The JSON keywords true, false and null are recognized as sequences of NJPUNC. If we don't exclude \r from NJPUNC, it looks like a symbol constituent, comprising an unrecognized JSON keyword. * lex.yy.c.shipped: Updated.
Diffstat (limited to 'parser.l')
-rw-r--r--parser.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/parser.l b/parser.l
index 34cea4fe..9e15461c 100644
--- a/parser.l
+++ b/parser.l
@@ -282,7 +282,7 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
JNUM -?(0|{DIG19}{DIG}*)([.]{DIG}+)?{EXP}?
JPUNC [(){},:\[\]"~*^]
-NJPUNC [^(){},:\[\]"~*^ \t\n]
+NJPUNC [^(){},:\[\]"~*^ \t\r\n]
%x SPECIAL BRACED NESTED REGEX SREGEX STRLIT CHRLIT
%x QSILIT QSPECIAL WLIT QWLIT BUFLIT