[ragel-users] Ragel goes while(1) with the following scanner.

david.keller at litchis.fr david.keller at litchis.fr
Sat Jun 6 17:58:01 UTC 2009



Hi 

When using this scanner (I removed actions), ragel seems to loop endless. 

%%{
 machine configuration_parser;
 include scanner_common "scanner.rl";

 newline = 'r'? 'n';

 comment = '#' any* -- newline;

 bulk = ([tvf ] | comment | newline)+;

 key = bulk? (alnum ([_.]? alnum)*); 

 value = bulk? """ any* :>> """;

 values = bulk? value (bulk? ',' value)*;

 assign = key bulk? '=' values;

 main := assign* bulk?;
}%% 

But I works like a charm when: 

 comment = '#' any* -- newline; 

become: 

 comment = '#' any* :>> newline; 

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20090606/cb9e5872/attachment-0001.html>


More information about the ragel-users mailing list