Re:On the Complexity and Performance of Parsing with Derivat...
by yoklov on Sunday June 26, 2016 @06:09PM
(#11983017)
A unicode_next_character function is very simple to write regardless of unicode support in your language.
I usually write it as a small (256 byte) lookup table where each entry tells you how many characters to skip next. If you don't use a lookup table, its 4 single-line `if` statements (and if you do it's a one liner, plus however many lines the table takes).
I usually write it as a small (256 byte) lookup table where each entry tells you how many characters to skip next. If you don't use a lookup table, its 4 single-line `if` statements (and if you do it's a one liner, plus however many lines the table takes).