[ragel-users] arithmetic overflow in generated C# code
Adrian Thurston
thurston at complang.org
Thu Jan 28 03:00:13 UTC 2010
I'm trying to reproduce by compiling with mono-gmcs, but I don't seem to
have ILexer and the compilation stops there. Is that a system library or
something from Gherkin?
Attila Sztupák wrote:
> Hi,
>
> We've run into a possible bug in the c# code generation - for a set of
> input files (http://gist.github.com/287694), the generated
> _lexer_actions table have a length of 130, while the generated type of
> the indexers (_acts and __acts) is sbyte ([-128..127]), causing an
> overflow (and an index out of range exception afterwards) when executing
> the actions. Using Java as output, or changing the types of these
> variables to short in C# result in the generated machine working as
> expected. Based on the sources, for all output languages except C#,
> these indexers have a hardcoded type of UINT.
>
> Can someone please confirm whether it's really a bug, and/or if there's
> any workaround?
>
> thx,
> sztupi
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ragel-users mailing list
> ragel-users at complang.org
> http://www.complang.org/mailman/listinfo/ragel-users
More information about the ragel-users
mailing list