Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
priceishere
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
priceishere
6mo ago
An even simpler way imo, is explicit functions instead of a precedence table, then the code pretty much has the same structure as EBNF. Need to parse * before +? Begin at add, have it call parse_mul for its left and right sides, and so on.
2.
▲
by
priceishere
6mo ago
But does it even conserve memory? Copying a string when you have the length is 2 bytes of machine code on x86 (rep movsb). Remember, code takes up memory too.
3.
▲
by
priceishere
6mo ago
How do you drop nulls in the middle of a string without requiring O(N) extra space to restore the original characters?