[ragel-users] Re: Feature Request: Inline Scanner

Carlos Antunes cmantu... at gmail.com
Wed Nov 8 18:45:13 UTC 2006

Thanks, Adrian! I'll be anxiously waiting for something. And I'll be
happy to do some testing along the way if necessary.

On 11/8/06, Adrian Thurston <thurs... at cs.queensu.ca> wrote:
> Carlos,
> Okay, I've got a number of ideas to play with now. I'm still not sure which
> is the best way to approach it, but at some point I'll hack around and
> hopefully one idea will shine.
> Cheers,
>   Adrian
> Carlos Antunes wrote:
> > On 11/6/06, Adrian Thurston <thurs... at cs.queensu.ca> wrote:
> >> Another question which I just thought of is how does the
> >> system know when a user is done with a marker and should update
> >> alltokstarts? I know you didn't advocate this particular solution in the
> >> first place, I just thought I'd pose the question. I helps me to figure
> >> these things out :)
> >>
> >
> > If you want to support overlapping capture then the user needs to be
> > able to individually tag each capture start and capture stop with a
> > unique identifier. This identifier could be a variable and in C could
> > be a struct with members tokstart and tokend (or 'ts' and 'te'). This
> > way you'd always know when a capture is starting and ending.
> >
> >>> Another thing to consider is whether my initially proposal of strictly
> >>> relying on longest-match for capture makes sense. Maybe the programmer
> >>> should have a choice?
> >> My sudden feeling of enlightenment has not lasted from one paragraph to
> >> the next ... maybe it's the hour. Do you mean it would be cool to have
> >> the option to drop a scanner in there?
> >>
> >
> > Actually, I wasn't thinking of a scanner although that could be an
> > option if you think it's useful. I was thinking about just capturing
> > straight FSM input, in addition to longest-match capture.
> >
> > Carlos
> >
> >

"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