[ragel-users] Re: Inline scanner

Carlos Antunes cmantu... at gmail.com
Tue Jul 10 23:47:07 UTC 2007


On 7/5/07, Adrian Thurston <thurs... at cs.queensu.ca> wrote:
>
>
> > Assuming I understand the idea you are trying to convey here (there's
> > a good chance that I don't), isn't it possible to transition directly
> > to the scanner by looking at all the potential transitions of the
> > scanner as if it was a "normal" state machine?
>
> Yes, that's possible. The code I sent does exactly that, only it's
> explicitly implemented. When it sees a whitespace character it jumps to
> the whitespace scanner. I'll rework what I sent so hopefully it's clear
> that it is an implementation of an inline scanner.
>

Adrian, now that you've been able to explicitly design an inline
scanner, would you be able to code ragel to do it implicitly? Although
one can always do it by hand, as you did, it is error prone and
sometimes somewhat difficult, depending on what you have inside the
scanner. This feature would be very much appreciated.

Thanks!

Carlos Antunes

-- 
"We hold [...] that all men are created equal; that they are
endowed [...] with certain inalienable rights; that among
these are life, liberty, and the pursuit of happiness"
        -- Thomas Jefferson



More information about the ragel-users mailing list