On May 26, 2006, at 5:14 PM, Jonathan Ragan-Kelley wrote:
Regular Expressions can do an awful lot in the arena of text processing; but a lot of what an editor used by programmers needs to do can not be done at all, or at least very well, by over reliance on Regular Expressions.
While I agree with the desire for ever more powerful mechanisms, I'd like to speak up quickly just to say that what Allan has effectively created with the scope system, used both for styling and for commands/etc. is a real parser -- a CFG or set of CFGs -- not a mere regular expression, because of the ability to nest elements in a language grammar. Just like in a conventional machine language parser, regular expressions are used to recognize individual parse elements, but the structure it generates and uses to analyze and represent the code or other file contents is context-free, and hence just about as powerful as anything used in other editors, even up to the level of Eclipse's fancy-dan refactoring tools and so forth. What could make this more accessible for more advanced tools might be a more direct API to run over (and potentially transform) the parse tree, not just the current context, but what it does now is still much more powerful than mere regular expressions. -jrk
While in general I agree with this, Ill make two points:
1) saying it's up to par with Eclipse is just laughable, and so self- evidently false that I'll leave it at that. Anyone wanting to debate the finer points of this are welcome to, but I'm not sure the list is up to it. :) Just e-mail me directly.
2) I have no problem calling it more that RegEx; call it what you will. It is powerful, and can do wonders. I'm impressed with it's abilities. But. It is still BUILT upon RegEx, and runs a RegEx engine, and therefore, is going to be much slower that what Eclipse, Visual SlickEdit, and BBEdit provide (just the editors of these products; not the full products).