Spirit2 lexer feature request

Hi Hartmut, I'm looking at the lexer library, and I must say I'm loving it. But there's a feature request I would like to make. Is it possible to allow paramiterization of the ID type. It is now fixed in std::size_t, and it is possibly a very good default. But how would one do to parse UTF-32 in a 32 bit machine? Also, allowing any other type (EqualComparable) would let people use string types as IDs, making it easier to log a execution, since you wouldn't have to map enum values to strings. Thanks, -- Felipe Magno de Almeida

Felipe,
I'm looking at the lexer library, and I must say I'm loving it.
Thanks!
But there's a feature request I would like to make. Is it possible to allow paramiterization of the ID type. It is now fixed in std::size_t, and it is possibly a very good default.
But how would one do to parse UTF-32 in a 32 bit machine?
Also, allowing any other type (EqualComparable) would let people use string types as IDs, making it easier to log a execution, since you wouldn't have to map enum values to strings.
Ok, I didn't think of this and I agree it would be a good extension (even if it may compromise performance, at least when using string). I'll try to have a look to see what's involved. Probably I won't be able to do anything wrt this before BoostCon, though. Regards Hartmut
participants (2)
-
Felipe Magno de Almeida
-
Hartmut Kaiser