<p>Hi</p>
<p>When using this scanner (I removed actions), ragel seems to loop endless.</p>
<p>%%{<br /> machine configuration_parser;<br /> include scanner_common "scanner.rl";<br /><br /> newline = '\r'? '\n';<br /><br /> comment = '#' any* -- newline;<br /><br /> bulk = ([\t\v\f\ ] | comment | newline)+;<br /><br /> key = bulk? (alnum ([\_\.]? alnum)*); <br /><br /> value = bulk? "\"" any* :>> "\"";<br /><br /> values = bulk? value (bulk? ',' value)*;<br /><br /> assign = key bulk? '=' values;<br /><br /> main := assign* bulk?;<br />}%%</p>
<p> </p>
<p>But I works like a charm when:</p>
<p> comment = '#' any* -- newline;</p>
<p>become:</p>
<p> comment = '#' any* :>> newline;</p>
<p> </p>