<div dir="ltr">Good day,<div><br></div><div>Please help me to understand if the following thing is possible with using ragel. I have a database of UTF-8 patterns, which I've compiled in ragel <span class="gmail-il">machine</span> with using a bit of python magic.</div><div><br></div><div>From that compiled databse Im able to build a scanner:</div><div>main := |*</div><div>  Database => {issue_token; fbreak}<br></div><div>  any; # ignore unmatched</div><div>*|</div><div><br></div><div>Having a stream of recognized tokens, I'd like to calculate some properties of each token, like how many runes are inside, different Unicode Scripts bounds and Class bounds. Right now Im doing that by a separate scan of found tokens text, but could it be done better and embbed inside scanner itself?</div><div><br></div><div>For each property I could easealy generate FSM from UnicodeData files but have no idea how to compose machines to run in parallel?</div><div><br></div><div>Idially a such combined <span class="gmail-il">machine</span> would analyse input stream and call actions like:</div><div>- PatternStart</div><div>- New rune</div><div>- New Class</div><div>- New rune</div><div>- New Class</div><div>- New Script</div><div>- PatternFound</div><div><br></div><div>But some other approximation is fine too :)</div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Thanks and regards,<br><br>Philip Andronov<br>------------------------------------------<br>Leading software engineer,<div><a href="http://mail.ru" target="_blank">mail.ru</a></div><div><div><br></div></div></div></div></div></div></div>