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

Adrian Thurston adrian.thurston at esentire.com
Tue Mar 22 12:05:31 PDT 2011


I've been unable to reproduce this problem using the ragel 6.6 
distribution tarball on my ubuntu lucid system. Can you tell me which 
architecture you are on? Where did you get the build? Also, could you 
attach an strace log?

Thanks,
  Adrian

On 11-03-22 11:27 AM, Austin Hastings wrote:
> 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