[ragel-users] Parallel machines

Filipp Andronov filipp.andronov at gmail.com
Sun Dec 16 08:33:59 UTC 2018


Good day,

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
machine with using a bit of python magic.

>From that compiled databse Im able to build a scanner:
main := |*
  Database => {issue_token; fbreak}
  any; # ignore unmatched
*|

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?

For each property I could easealy generate FSM from UnicodeData files but
have no idea how to compose machines to run in parallel?

Idially a such combined machine would analyse input stream and call actions
like:
- PatternStart
- New rune
- New Class
- New rune
- New Class
- New Script
- PatternFound

But some other approximation is fine too :)

-- 
Thanks and regards,

Philip Andronov
------------------------------------------
Leading software engineer,
mail.ru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20181216/849738e9/attachment.html>


More information about the ragel-users mailing list