Brian Jones <[EMAIL PROTECTED]> writes: > Giannis Georgalis <[EMAIL PROTECTED]> writes: > > > Please, tell me your thoughts and suggestions about this matter. > > ANTLR is usually the better choice for parsing as far as I know, but > I'm not really that knowledgable on grammars and parsing anyway. It's > fine to do this btw, since we can checkin the parser generated classes > to avoid a build dependency here.
I agree with you. I found JFlex <http://www.jflex.de>, that is *much* faster than a hand-written scanner, as the benchmarks below show. JFlex is under the GPL, so there's no problem in using it for classpath. If there's no objection I'll implement the parser using JFlex. lines KB JVM handwritten scanner JFlex generated scanner 19050 496 hotspot 824 ms 248 ms 235 % faster 6350 165 hotspot 272 ms 84 ms 232 % faster 1270 33 hotspot 53 ms 18 ms 194 % faster 19050 496 interpreted 5.83 s 3.85 s 51 % faster 6350 165 interpreted 1.95 s 1.29 s 51 % faster 1270 33 interpreted 0.38 s 0.25 s 52 % faster -- Object-oriented programming is an exceptionally bad idea which could only have originated in California. - Edsger Dijkstra (attributed) _______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath

