Lerche.jl icon indicating copy to clipboard operation
Lerche.jl copied to clipboard

Too hard to parse strings

Open stensmo opened this issue 5 months ago • 0 comments

It's a great tool, but parsing strings is too hard. Tried the example JSON parser.

text = read("large-file.json", String) j = Lerche.parse(json_parser,text)

The file large-file.json can be downloaded here: https://github.com/json-iterator/test-data/blob/master/large-file.json

Error is:

julia> j = Lerche.parse(json_parser,text) ERROR: No terminal defined for d at line 3819 col 701

message":"simpler non-flash version\","distinct":true,"url":"https://api.github. ^

Expecting: Set(["NULL", "TRUE", "FALSE", "RBRACE", "RSQB", "LBRACE", "SIGNED_NUMBER", "COMMA", "ESCAPED_STRING", "LSQB", "COLON"]) Previous tokens: "simpler non-flash version\","

After trying many combinations for ESCAPED_STRING I thought parsing strings is too hard. Many languages have strings in them. Perhaps a builtin for parsing strings? Otherwise the tool is great and easy to use.

stensmo avatar Sep 12 '24 19:09 stensmo