[ragel-users] Re: (unexpected) problem with accented chars

Adrian Thurston thurs... at cs.queensu.ca
Fri Jan 11 19:52:32 UTC 2008

jupp_g wrote:
> mea culpa. I changed alphtype to unsigned char but did not update p
> and pe. I have not looked at the generated code in detail, but I guess
> the problem was related to a spurious sign extension. Of course that
> leaves the question why the "all" machine worked.

You'd probably have to look closely at the generated code. Since the all
machine is only a single range there is a lot less testing of the
character that needs to be done. Also, if the range goes right up to a
limit of the alphabet type then ragel doesn't bother to check that end
(assuming your working with -G2). My guess is that the error was just
avoided by luck.


More information about the ragel-users mailing list