[ragel-users] Strange difference between C and Java
Jose Quinteiro
jose at ordinate.com
Fri Dec 5 01:58:24 UTC 2008
I figured I missing something simple. Thanks for the quick reply!
Adrian Thurston wrote:
> Hi Jose,
>
> It looks like there is no newline on the end of the string being passed
> to the Java version. That could be it.
>
> -Adrian
>
> Jose Quinteiro wrote:
>> I have created what I think are identical machines (except for the host
>> code, that is) that don't behave the same way. The ragel files are
>> attached.
>>
>> Here's a typical session with the C machine:
>>
>> $ ragel client_c.rl
>> $ gcc -o client_c client_c.c
>> $ echo "OK callnum 8108" | ./client_c
>> figure out how to print out the call number.
>> $ echo "OK callnum 8108 foo" | ./client_c
>> Parse error.
>>
>>
>> Here's the same session with the Java machine:
>>
>> $ ragel -J client_java.rl -o ClientParser.java
>> $ javac ClientParser.java
>> $ java ClientParser "OK callnum 8108"
>> $ java ClientParser "OK callnum 8108 foo"
>> Parse error.
>>
>>
>> It seems like the "%" transition action works differently in Java and C.
>> If I change the transition action to and "@" I get "figure out how to
>> print out the call number." several times. This is true for both the C
>> and Java versions.
>>
>> What am I doing wrong?
>>
>> Thanks,
>> Jose.
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> ragel-users mailing list
>> ragel-users at complang.org
>> http://www.complang.org/mailman/listinfo/ragel-users
>
> _______________________________________________
> 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