From: Clifford Heath Date: 2008-09-26T09:59:43+09:00 Subject: Re: ANTLR Target for Ruby Wincent Colaiuta wrote: > Like Treetop, it is fairly slow, but it works. Nice! > But an academic itch that I've wanted to scratch for some time now has > been turning it into a performance powerhouse; either by replacing the > dynamically generated parser with a custom Ragel lexer (packaged as a > C extension for Ruby) or by doing static grammar analysis like ANTLR > does to identify places where prediction could be used to circumvent > unnecessary backtracking and jump straight to the right alternative. What do you think of my third option: Provide memoization only where a test workload shows the need for it? Backtrack in every situation just in case, but memoize where testing shows it's useful - totally pragmatic approach... > One of the things I always liked about the system was that you wrote > your grammars in Ruby. I think that's an error, based on the presumption that "is Ruby, is good". Not all that's Ruby is golden,,, err... red ;-). By which I mean that one size doesn't fit all, or we wouldn't need parsers in the first place. Clifford Heath.