3 ms·
The chart parsing (CYK and friends) will produce exactly what is needed - as little contiguous completely parsed parts of program as it is possible. The syntax
by thesz 6y ago
The chart parsing (CYK and friends) will produce exactly what is needed - as little contiguous completely parsed parts of program as it is possible. The syntax tree from example above will be different, but not much - parts "fn f(" and "struct { ... }" will be adjacent, not included in partial tree.
There's a paper [1] about efficient parallel implementation possible.
[1] https://jyp.github.io/pdf/PP.pdf https://jyp.github.io/pdf/PP.pdf
Enjoy. ;)