4 ms·
The source file isn't the main memory concern, it's the memoization.
by tgv 4y ago
The source file isn't the main memory concern, it's the memoization.
- fjfaase 4y agoThere is no need for full memoization. The above JavaScript implmentation caches for each non-terminal the last location a parsing attempt was made and the out come of that: either false, or true with an abstract syntax tree and the next location after the part of the input that was parsed.