Ryan Bigg
2012-11-19 22:09:24 UTC
Section 6.3's second code example is this:
word = [a-z]+;
head_name = ?Header?;
header := |*
word;
? ?;
?\n? => { fret; };
*|;
main := ( head_name ?:? @{ fcall header; } )*;
The guide doesn't say, but I assume we use it in this fashion:
%%{
machine example;
word = [a-z]+;
head_name = ?Header?;
header := |*
word;
? ?;
?\n? => { fret; };
*|;
main := ( head_name ?:? @{ fcall header; } )*;
}%%
When I try this and run `ragel` over it, it produces these errors:
email3.rl:4:18: graph lookup of "Header" failed
email3.rl:7:10: at token ";": parse error
Is it my fault, or is the documentation wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.complang.org/pipermail/ragel-users/attachments/20121120/ce557634/attachment.html>
word = [a-z]+;
head_name = ?Header?;
header := |*
word;
? ?;
?\n? => { fret; };
*|;
main := ( head_name ?:? @{ fcall header; } )*;
The guide doesn't say, but I assume we use it in this fashion:
%%{
machine example;
word = [a-z]+;
head_name = ?Header?;
header := |*
word;
? ?;
?\n? => { fret; };
*|;
main := ( head_name ?:? @{ fcall header; } )*;
}%%
When I try this and run `ragel` over it, it produces these errors:
email3.rl:4:18: graph lookup of "Header" failed
email3.rl:7:10: at token ";": parse error
Is it my fault, or is the documentation wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.complang.org/pipermail/ragel-users/attachments/20121120/ce557634/attachment.html>