3 ms·
Ragel – A State Machine Compiler
- deleted 3y ago[deleted]
- worldsayshi 3y agoThe concept of a language specifically for compiling state machines seem very interesting in a single responsibility principle kind of way. I found it through this stackoverflow answer. The project readme wasn't very descriptive and the answer seem to better capture what's interesting about it.
- great_thanks 3y agointeresting indeed, don't know if you still can change the title, it's called Ragel
- worldsayshi 3y agoThanks for the heads up! I could indeed.
- worldsayshi 3y agoHere is the github repo: https://github.com/adrian-thurston/ragel https://github.com/adrian-thurston/ragel
- guillohm 3y agoI was first made aware of this Ragel project when _why was still around and he announced the hpricot html parser. https://www.ruby-forum.com/t/hpricot-0-1-quick-cinchy-html-parsing/97009 https://www.ruby-forum.com/t/hpricot-0-1-quick-cinchy-html-p... I really looked upon him (and Zed too for the mongrel project). His parser was built around xpath/css-selectors and it blew my mind at the time. I was interning at a company that built hundreds of web scrapers around regexes, Perl 5 and some other in-house DSL. I was wrapping up my university classes on theory of computation and compilers. Although I never made a career in that field, this was perfect timing and it allowed me to connect the dots. One day, I introduced the more senior employees to the limitations of regexes, capabilities that an html parser could bring to our projects as well as some freshly learned theory of context free grammars :P https://en.wikipedia.org/wiki/Chomsky_hierarchy https://en.wikipedia.org/wiki/Chomsky_hierarchy
- worldsayshi 3y agoDo you know if Ragel be used to parse context free grammars? I couldn't easily understand how. Context free grammar parsers have to be Turing Complete no?
- deleted 3y ago[deleted]