5 ms·
You can even take the derivative of a grammar to get a parser! http://matt.might.net/papers/might2011derivatives.pdf http://matt.might.net/papers/might2011deri
by quotemstr 12y ago
You can even take the derivative of a grammar to get a parser!
http://matt.might.net/papers/might2011derivatives.pdf http://matt.might.net/papers/might2011derivatives.pdf
- kazinator 12y agoYes, this seems to build on the idea of regex derivatives. If regex derivatives can be used to transform a regular expression into a recognizer for strings, why not transform a more general grammar into a recognizer of strings.
- kazinator 12y agoI implemented Brzozowski's regex derivatives to build a regex implementation back-end. That back-end is used whenever exotic constructs (negation, intersection) appear in the abstract syntax of the regex; in their absence, the implementation falls back on the NFA-graph-based back end.