[ragel-users] problems with java generation in ragel 6.x trunk
thurs... at cs.queensu.ca
Tue Mar 25 03:02:51 UTC 2008
For java code set eof to -1 to pacify ragel. Since java doesn't have pointers I use array offsets and -1 is used to represent null.
From: Stephen Bannasch <stephen.bannasch at deanbrook.org>
Date: Mon, 24 Mar 2008 13:47:19
To:ragel-users at googlegroups.com
Subject: [ragel-users] problems with java generation in ragel 6.x trunk
At 12:05 PM -0400 3/24/08, Adrian Thurston wrote:
>Stephen Bannasch wrote:
>> I'd like to be able to create a ragel file that will compile
>> in ragel 5.x and 6.x but didn't see any macro capability in Ragel.
>I'm not sure how much of Hpricot is affected by the 6.0 changes, but my
>feeling is that a compatibility layer isn't worth the effort. The
>changes to the operators > % :> :>> and <: could require some minor
>refactoring of ragel definitions.
In the C ragel source I only needed to:
convert tokstart, tokend => ts, te
and failing tests went from 2 to 0 ;-)
In the Java ragel source I did the above and added:
There are a couple of failing tests but I don't think it has anything to do with ragel.
Regarding: changes to operators > % :> :>>
I'll take a look at where those are used and if needed try and make sure the test coverage includes problems that might occur.
>People normally side-step ragel version issues by distributing the files
>generated by ragel.
That makes sense -- distribute both *.c and *.java files (actually the Java class fles can be bundled into a Jar and the only dependency with be on JVM version).
Right now I'm working on the hpricot source release and on the redcloth source release -- fixing bugs, seeing about
Redcloth needs ragel trunk.
I think the changes I made to (Hpricot which I'm testing with ragel trunk) will also work fine with ragel v6.0 and 6.trunk.
I could create dependency on ragel >= 6.0 for compiling the ragel source for hpricot.
Now that 6.0 seems to be distributed widely that might be fine.
More information about the ragel-users