On Saturday, August 04, 2012 17:45:58 Dmitry Olshansky wrote: > On 04-Aug-12 15:48, Jonathan M Davis wrote: > > On Saturday, August 04, 2012 15:32:22 Dmitry Olshansky wrote: > >> I see it as a compile-time policy, that will fit nicely and solve both > >> issues. Just provide a templates with a few hooks, and add a Noop policy > >> that does nothing. > > > > It's starting to look like figuring out what should and shouldn't be > > configurable and how to handle it is going to be the largest problem in > > the > > lexer... > > Let's add some meat to my post. > I've seen it mostly as follows: [snip]
It would probably be a bit more user friendly to pass a struct as a template argument (which you can't do in the normal sense, but you can pass it as an alias). Regardless, the problem isn't so much how to provide a configuration as how the configuration options affect the lexer and what it does. I'll figure it out, but it does definitely complicate things. I wasn't originally planning an having anything be configurable. But if we want it to be such that no one will want to write another one (as Walter is looking for), then it's going to need to be configurable enough to make it efficient for all of the common lexing scenarios rather than efficient for one particular scenario. - Jonathan M Davis