[ragel-users] Scanner question

Jose Quinteiro jose at ordinate.com
Sat Dec 6 02:14:16 UTC 2008


Yep, that does it.  Thanks again.  I was trying something similar with 
Kleene stars and getting nowhere.  I don't have a good feel for this yet.

Saludos,
Jose.

Adrian Thurston wrote:
> 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
> 
> _______________________________________________
> 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