[BioRuby] Parsing line-based formats with Ragel

Marjan Povolni marian.povolny at gmail.com
Sat Jun 2 14:18:40 UTC 2012


Cool, definitely something worth checking out for GFF3.

--
Marjan

On Sat, Jun 2, 2012 at 3:06 PM, Artem Tarasov <lomereiter at googlemail.com>wrote:

> Hi guys,
>
> I've recently discovered absolutely cool thing called Ragel (
> http://www.complang.org/ragel/). It is a finite state machine compiler,
> its
> applications include parsing Cucumber features in Gherkin, parsing HTTP
> requests in Mongrel, and implementing pack/unpack functions in Rubinius.
>
> It can be used for creating parser for any regular language, that includes
> nearly every line-based format. It generates code for C, C++, Objective C,
> D(!), Java, and Go. The speed of generated code is incredible.
>
> I wrote a few words more about it in my blog:
> http://lomereiter.wordpress.com/2012/06/02/ragel-and-bioinformatics/
>
> Basically, you write a formal grammar, define which snippets of code to
> execute on state transitions, and everything just works. As for me, I'm
> going to implement SAM parser with this tool.
>
> It can also be useful for Marjan. I wrote a GFF3 grammar, but it might be
> incorrect in some places. Here's a basic example of usage:
> https://github.com/lomereiter/bioragel/blob/master/examples/d/gff3.rl
>
>
>
> --
> Artem
> _______________________________________________
> BioRuby Project - http://www.bioruby.org/
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby
>



More information about the BioRuby mailing list