News for hackers. Stuff that matters.
Re:Parsing the Infamous Japanese Postal CSV by Cloudef on Monday November 09, 2020 @01:48AM (#25032034)
This sounds like a good task for ragel http://www.colm.net/open-source/ragel/
Re:Parsing the Infamous Japanese Postal CSV by jacobush on Monday November 09, 2020 @03:16AM (#25032491)
Why?
Re:Parsing the Infamous Japanese Postal CSV by Cloudef on Monday November 09, 2020 @03:34AM (#25032614)
Ragel (or more like finite state machines) excel at parsing streams with all sorts of nuances while still being rigid and bailing on invalid input. Considering the ken_all.csv isn't really standard csv anymore, it's better to write tailored parser for it, than to approach it as a typical csv file.
Re:Parsing the Infamous Japanese Postal CSV by jacobush on Monday November 09, 2020 @03:50AM (#25032724)
I thought you meant using Ragel would be better than https://github.com/polm/posuto what Posuto is currently doing.
Re:Parsing the Infamous Japanese Postal CSV by Cloudef on Monday November 09, 2020 @07:33AM (#25034075)
Nah, didn't imply that. Just that ragel would be suitable to generate the parser for this kind of data.