Hi thanks for your patch! I'm hoping to integrate it in the next couple
of weeks. At that time I'll look into the issue of dynamic arrays that
you pointed out.
Regards,
Adrian
Johannes Pfau wrote:
Hello,
I attached a patch to add D2 support to Ragel. D2 is quite different
from D1 so I created new D2 subclasses in the cd* files. I chose -E for
the commandline switch, but it could be changed to something else. D2
also needs a special syntax for const pointers: const(uint)* is a
mutable pointer to a const uint. I introduced a PTR_CONST_END function
to generate that D2 output. The generated D2 code is entirely correct
now and I tested it with some HTML header parsers.
There's one performance related problem though: In D2 a ubyte[] is
different from a ubyte[n], even if both arrays are initialized at
compile time. The ubyte[] generates a resizeable array at runtime, which
causes a performance problem. The ubyte[n] syntax should instead be used
for static constant arrays. But as ragel doesn't pass the number of
array entries to the OPEN_ARRAY function, there's no easy way to fix
that. So I wanted to ask for advice on how to implement that properly.
------------------------------------------------------------------------
_______________________________________________
ragel-users mailing list
[email protected]
http://www.complang.org/mailman/listinfo/ragel-users
_______________________________________________
ragel-users mailing list
[email protected]
http://www.complang.org/mailman/listinfo/ragel-users