[ragel-users] Scanner question
Adrian Thurston
thurston at complang.org
Sat Dec 6 02:07:16 UTC 2008
Try this:
'num' ( 'b' ('e' 'r'?)? )?
A long time ago there was talk of adding a machine construction function
(called prefix I think) for this case but it never got done because it
depended on adding some new syntax forms and I didn't have the time.
Hopefully I can revive that soon. I defended my PhD yesterday and life
should return to normal soon :)
-Adrian
Jose Quinteiro wrote:
> That also accepts "nume", "numr", etc., and I want those to be an error.
>
> Thanks,
> Jose.
>
> Diego E. "Flameeyes" Pettenò wrote:
>> On Sat, Dec 6, 2008 at 1:42 AM, Jose Quinteiro <jose at ordinate.com> wrote:
>>> I'm trying to write a scanner that accepts "num", "numb", "numbe", etc.
>>> as the same token. The only way I can think of that accomplishes this is:
>> I admit I haven't even tested, but I'd expect something like 'num'
>> 'b'?'e'?'r'? to work
>>
>
> _______________________________________________
> ragel-users mailing list
> ragel-users at complang.org
> http://www.complang.org/mailman/listinfo/ragel-users
More information about the ragel-users
mailing list