[ragel-users] Trouble referencing definitions from included machines (6.6)

Austin Hastings ah08010-d at yahoo.com
Tue Mar 22 18:27:02 UTC 2011


Howdy,

I was playing a bit with Ragel, and trying to include one machine from 
another. I spent some time with a "graph lookup ... failed" error, until 
I put my test file in the same place.

As a test case, I have this:

===== testinc.rl =====
%%{
machine inner;
one = "one";
two = "two";
}%%
===== test.rl =====
%%{
     machine test;
     include inner "testinc.rl";

     main := one;
}%%
===== =====

When I have test.rl and testinc.rl in the same directory, I can do

     ragel test.rl

with no problems. When I move testinc.rl to a different directory:

     mkdir x
     mv testinc.rl x
     ragel test.rl

I get errors (as expected):

test.rl:3:28: include: failed to locate file
test.rl:3:28: include: attempted: "testinc.rl"
test.rl:5:10: graph lookup of "one" failed

When I then specify the include path:

     ragel -I x test.rl

I get:

$ ragel -I x test.rl
test.rl:5:10: graph lookup of "one" failed

Apparently ragel now finds the included file okay, but for some reason 
the exact same file which worked before has problems with finding the 
"one" tag.

What am I doing wrong, or is this a bug?

=Austin


_______________________________________________
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