[ragel-users] Strange difference between C and Java

Jose Quinteiro jose at ordinate.com
Fri Dec 5 00:34:09 UTC 2008


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.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: client_java.rl
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20081204/0feb0adf/attachment-0002.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: client_c.rl
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20081204/0feb0adf/attachment-0003.ksh>


More information about the ragel-users mailing list