Thank you for your introduce of ragel fork. It seemed that actions along with lexical rules are written in OCaml, Go, and C (not in Julia).
So it is useful for DSL related works, but slightly far from I imagined. the ragel manipulates DFA, so I should write DFA based lexical scanner (fast but limited regex). May be flex(1) code helps me a lot. I know that I should study deeper for lexical scanner written in Dragon Book, so, I will study several topics, and will decide where I'd like to go (=design of target implementation). Thank you again. Takeshi KIMURA 2014年9月7日日曜日 0時49分28秒 UTC+9 Daniel Jones: > > > If you're interested, I have a ragel fork > <https://github.com/dcjones/ragel> that let's one generate scanners and > parsers for regular languages. We've been using it to generate parsers as > part of the BioJulia project. > > It's generally as fast or faster than PCRE and let's you insert arbitrary > code in the DFA, like the PCRE callout feature but much more flexible. > > > On Saturday, September 6, 2014 8:35:21 AM UTC-7, Takeshi Kimura wrote: >> >> Hi there, >> >> I'd like to create old Lex/Yacc like lexical scanner and parser (may be >> LL(1) or LALR(1)) by implementing Julia Module(s). >> >> The goal is too far, but I'd like to start to write lexical scanner at >> first. >> >> The lexical scanner is related to Regular Expression objects (NFA(Perl >> compatible), or DFA (not compatible)). >> >> So, I'd like to use PCRE(3) as its use. May be call out facilities will >> help me a lot. >> >> But call out facilities only handle 256 call-outs, so we need extend call >> out by sequentially callouts (callout 0x01, callout 0x01 = callout 257, >> etc.) >> >> Have you any ideas for this type of lexical scanners? >> >> If we can not use PCRE(3), may be the flex(1) internal APIs should be >> called. >> >> >> Takeshi KIMURA >> >
