summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-12-20 11:27:28 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2019-12-20 11:27:28 +0000
commitdd84dfcc00e72fea383249801836b36d379c868f (patch)
tree40c81631d592a9f2eef7e2920237d1c70da65982
parentAdd a test suitable for perf testing (diff)
downloadlibjsonpp-dd84dfcc00e72fea383249801836b36d379c868f.tar.bz2
libjsonpp-dd84dfcc00e72fea383249801836b36d379c868f.tar.xz
libjsonpp-dd84dfcc00e72fea383249801836b36d379c868f.zip
Add a lexer rule for parsing text in bulk
-rw-r--r--libjsonpp/json.ll3
1 files changed, 2 insertions, 1 deletions
diff --git a/libjsonpp/json.ll b/libjsonpp/json.ll
index fa6ad8d..cae25e5 100644
--- a/libjsonpp/json.ll
+++ b/libjsonpp/json.ll
@@ -29,6 +29,7 @@ number [-+]?[0-9]+(\.[0-9]+)?
colon ":"
separator ","
escape "\\"
+text [^\\\"]*
%x OBJECT_ITEM
%x OBJECT_NEXT
@@ -139,7 +140,7 @@ escape "\\"
yy_pop_state();
}
-<STRING>. {
+<STRING>{text} {
buf += YYText();
}