On Saturday, July 07, 2012 18:37:54 Roman D. Boiko wrote: > On Saturday, 7 July 2012 at 16:27:00 UTC, Philippe Sigaud wrote: > > I added dstrings because > > > > 1- at the time (a few months ago), the lists here were awash in > > UTF-32 > > discussions and I thought that'd be the way to go anyway > > 2- other D parsing libraries seemed to go to UTF32 also (CTPG) > > 3- I wanted to be able to parse mathematical notation like > > nabla, > > derivatives, etc. which all have UTF32 symbols. > > I propose to switch code to use S if(isSomeString!S) everywhere. > Client code would first determine source encoding scheme, and > then instantiate parsers specifying a string type. This is not a > trivial change, but I'm willing to help implementing it.
I don't know about this particular case, because I haven't really looked at pegged, but in general, string parsing stuff should be taking ranges of dchar and then specializing on string type where appropriate for efficiency. - Jonathan M Davis
