28 Sep 2000 11:09:28 +0200, [EMAIL PROTECTED] <[EMAIL PROTECTED]> pisze:

> Doaitse Swierstra's [This is the correct spelling!] parser combinators
> in their newest incarnation have symbol ranges as their basis.
> Internally they are also used to allow binary search

Certainly better than character lists.

I'm not sure if basing on character predicates would not be better.
E.g. these 45443 isAlpha characters are split into 255 ranges.

My character category table is internally implemented as 256 vectors
of 256 vectors of categories (all characters larger than '\xFFFF'
currently have the same category).

Even though eight comparisons is not much compared to two table
lookups, neither Haskell98 nor my library provides easy access to
character ranges for predicates like isAlpha.

It would not be a problem to provide it, but it makes the interface
almost twice bigger.

-- 
 __("<  Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK


Reply via email to