Hi, I want to set the "main" value of a Ragel dynamically based on the content
of a "main.h" file. Note however that I run Ragel using Ruby as host
language.
I've tryed the following:
main.h
-----------------
#define KEYWORD "comment"
-----------------
my_script.rl
------------------
#!/usr/bin/env ruby
# String to parse.
data = ARGV[0]
%%{
machine my_machine;
import 'main.h' ;
main := KEYWORD ;
write data;
}%%
...
------------------
Unfortunatelly I get the following error when trying to compile my_script.rl
file:
my_script.rl: graph lookup of "KEYWORD" failed
Is there any way to achieve it? Thanks a lot.
--
Iñaki Baz Castillo
_______________________________________________
ragel-users mailing list
[email protected]
http://www.complang.org/mailman/listinfo/ragel-users