Results 51 comments of Francis Galiegue

I have implemented something like this: https://github.com/fge/parboiled-css/blob/master/src/main/java/org/eel/kitchen/css/base/RuleSetRunner.java But it is not really "generic". I suppose it could be made generic enough if you registered rules instead of parser classes as...

Maybe a LongestOf()? I have a similar problem with CSS where, for instance, font-size has "small" as a possible value, and font-variant has "small-caps". My plan was to implement LongestOf()...

Well, another possibility would have been to wrap _the whole_ byte[] into a CharBuffer to begin with. A .subsequence() would then have been marginally cheaper. The problem here is basically...

Sorry but those are purely hypothetical. And like I said, another implementation (I can provide it) would just have been to wrap the whole char array. This way a call...

Done. Note however that this could be vastly improved. In particular, it looks like pop() could be rewritten as a simple get() on the buffer which in turn means the...

In grappa, I use what is called an `InputBuffer`. What parboiled did in the past, for no good reason, was to specialize implementations for `String` and `char[]` where `CharSequence` could...

As to this: > And I repeat - not hypothetical, but a real issue faced in past would you please elaborate? The interface is quite simple to implement. In fact,...

Then why don't you just return a `String`? `String` implements `CharSequence`... Which means you don't need to pass a hidden reference to the caller... I can modify the patch to...

Ate my own dog's food, new patch. (oh, and tests still pass)

Further note about the patch: it fully obeys the contract in that if an index is passed which is out of bounds, or start is greater than end etc, it...