I too feel the same way as David. We need many more examples. 
Adrian
Where should we put these on the web? 

Simtree Information Systems
17621 Island Rd
Martintown, Ontario
K0C 1S0
Bus: 1-613-938-6549
Cell: 1-613-864-7370
Fax: 1-613-936-0111
Email: [email protected]
Sent from my iPhone

On 2012-08-30, at 2:36 PM, David James <[email protected]> wrote:

> I've read the manual -- it is a great start, but it doesn't spell it
> out. There is a lack of simple, clear examples on how to do this on
> the web. So I asked a concrete version of the question here:
> http://stackoverflow.com/questions/12015684/simple-ragel-example-that-balances-parentheses
> 
> On Thu, Aug 30, 2012 at 2:23 PM, Adrian Thurston <[email protected]> 
> wrote:
>> Hi David, section 6.7 in the manual covers this.
>> 
>> Thanks,
>> Adrian
>> 
>> 
>> On 12-08-17 04:16 PM, David James wrote:
>>> 
>>> Hello,
>>> 
>>> This is my first post. Being trained as a Electrical and Computer
>>> engineer, I really enjoy finding tools that blur the gap between
>>> computer science and hardware. (This brings back great memories of
>>> Mealy and Moore machines!)
>>> 
>>> Now, my question. Per RFC 2616's grammar:
>>> 
>>>     comment = "(" *( ctext | quoted-pair | comment ) ")"
>>> 
>>> I would like to write it like this in Ragel, but it is not allowed
>>> because recursive rules are not directly supported:
>>> 
>>>     comment = "(" ( ctext | quoted_pair | comment )* ")"
>>> 
>>> How might I handle this?
>>> 
>>> If a workaround is needed, all I need, I think, is to keep the
>>> parenthesis balanced. I don't really need to fire actions on nested
>>> comments; I'm fine with everything clumping up to the top level.
>>> 
>>> -David
>>> 
>>> _______________________________________________
>>> ragel-users mailing list
>>> [email protected]
>>> http://www.complang.org/mailman/listinfo/ragel-users
>>> 
>> 
>> _______________________________________________
>> ragel-users mailing list
>> [email protected]
>> http://www.complang.org/mailman/listinfo/ragel-users
> 
> _______________________________________________
> ragel-users mailing list
> [email protected]
> http://www.complang.org/mailman/listinfo/ragel-users

_______________________________________________
ragel-users mailing list
[email protected]
http://www.complang.org/mailman/listinfo/ragel-users

Reply via email to