4 ms·
Parsing speed is no longer important inside of compilers, but it still matters inside of text editors and IDEs. In those contexts, you have to choose between th
by jimrandomh 11y ago
Parsing speed is no longer important inside of compilers, but it still matters inside of text editors and IDEs. In those contexts, you have to choose between the extra complexity of managing parser generation, or the extra complexity of avoiding too many reparses.
- wtetzner 11y agoUnfortunately, you can't really use a parser generator for editors and IDEs, unless they're structured editors. If they're not structured editors, then the parser has to be able to gracefully handle broken parses.
- ltratt 11y agoIncremental parsing is designed for just this use case. The last major work in the area that I know of is Tim Wagner's PhD thesis http://www.cs.berkeley.edu/Research/Projects/harmonia/papers/twagner-thesis.pdf http://www.cs.berkeley.edu/Research/Projects/harmonia/papers...
- troutwine 11y ago> Parsing speed is no longer important inside of compilers, but it still matters inside of text editors and IDEs. Maybe! I agree with the second half there but I think the first half is not totally spot on. For _small_ projects modern machines will parse through faster than you can perceive but as source code grows a pokey parser will out. Becomes increasingly frustrating as the parser sub-system is tied up with early analysis, making it difficult to modify without getting deeply involved in the rest of the compilation steps.
- deleted 11y ago[deleted]