Great, thanks for working on this!
Did you have a look at the java code generator? There were a few
concessions that had to be made in the Ruby code generator that might
not need to be made in JS.
-Adrian
On 10-10-11 04:07 AM, Dominic Marks wrote:
Hi all,
I've got the table code generation strategy working. I'm going to work
on building a set of RL files for testing purposes and then have a crack
at writing a code generation backend that targets modern JavaScript VMs
(e.g. produces JavaScript that best suits a JIT/tracer). If anyone would
like to help with any part of this process, I'd be most grateful.
I've forked Ragel trunk into a github repo while I work on this. There
is a sample script (I translated the maillbox.rl file from the Ragel
distribution) which you can play with if you install Node.js (a
JavaScript application framework powered by Google's V8 VM). Note that
while the sample script uses Node.js for IO, but the code generated is
plain JavaScript. I look forward to being able to use Ragel in the
browser soon too.
Github:
http://github.com/dominicmarks/ragel-js
A diff against Ragel trunk is here:
http://goodforbusiness.co.uk/~dom/ragel-js-20101011.diff
<http://goodforbusiness.co.uk/%7Edom/ragel-js-20101011.diff>
The code is mostly a cut-paste-and-replace from Ruby at the moment. I'll
be tidying it up over the next few weeks, as my time allows. However, it
does at least run one Ragel state machine correctly already.
Mailbox.rl/Mailbox.js:
http://goodforbusiness.co.uk/~dom/mailbox.js
<http://goodforbusiness.co.uk/%7Edom/mailbox.js> (Requires Node.js).
Cheers,
Dom
_______________________________________________
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