I think there is a copy-paste error. The quotes have not translated to something legal WRT ragel syntax.

-Adrian

On 12-11-19 05:09 PM, Ryan Bigg wrote:
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?




_______________________________________________
ragel-users mailing list
ragel-users@complang.org
http://www.complang.org/mailman/listinfo/ragel-users


_______________________________________________
ragel-users mailing list
ragel-users@complang.org
http://www.complang.org/mailman/listinfo/ragel-users

Reply via email to