From: vikkous Date: 2005-04-24T17:04:32+09:00 Subject: Re: Announcing Reg 0.4.0 > Can it also match on IO ? I'm particularly thinking of a stream > implementation that supports illimited pushback of characters... I would very much like to do this, but right now, no. I'm not sure exactly what would be involved in having the array matcher match files as well; it seems like you might have to rip out the guts of the backtracking engine to support it... but maybe not. Anyway, stay tuned for a future release. Just having the ability to compare regexps directly against files would be really helpful in the construction of lexers of all sorts. Java has this; why doesn't ruby? > Because if it does, then you've got a lexer system that is also good as > something else than just a damn lexer. Lexers, parsers, and pattern matching languages get too short a shrift in my opinion. There's really a lot more they could be used for, if only people would see... of course, it doesn't help that almost all existing tools of this kind are string-oriented, and hard to use for other data. > And by making regexps unified with the rest of the language, it brings > Ruby closer to the Icon language, isn't it? I wouldn't know... please let know about regexp integration in icon; maybe there's some features I can steal.