[ragel-users] Re: Parsing indented structures (again)

Adrian Thurston thurs... at cs.queensu.ca
Thu Oct 4 22:15:29 UTC 2007


Hi Jonathan,

Not currently. This is something I'd like to add to 6.0.

-Adrian

namelessjon wrote:
> Hi Adrian
> 
> It works now, so thanks for the solution (and so quickly). :)
> I could tell it wasn't being called, since at one point I had printf
> statements in amongst the various actions.  I just couldn't think
> why.  It hadn't occurred to me that the scanner action was yanking it
> away before that point. In hindsight it was a little obvious.
> 
> Is it possible to embed an action in another? As in:
> 
> 'ina:' double_on_line => {term;array[0] = atof(buffer);};
> 
> I am assuming not, as I can't find it in the manual. It would just be
> a little neater than the if statements I have now in all the actions,
> but ...
> 
> Thanks,
> Jonathan.
> 
> On Oct 2, 11:32 pm, Adrian Thurston <thurs... at cs.queensu.ca> wrote:
>> I recognize that this situation, where actions fail to execute without
>> warning, is not optimal.
>>
>> -Adrian
>>
>> Adrian Thurston wrote:
>>> Hi Jonathan,
>>> The problem is that leaving actions embedded in the final state of a
>>> scanner pattern action are not executed. In this case it is %term from
>>> double that is not executed.
>>> To solve this lift the term action up into the scanner pattern action.
>>> -Adrian
> 
> 
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups "ragel-users" group.
> To post to this group, send email to ragel-users at googlegroups.com
> To unsubscribe from this group, send email to ragel-users-unsubscribe at googlegroups.com
> For more options, visit this group at http://groups.google.com/group/ragel-users?hl=en
> -~----------~----~----~----~------~----~------~--~---
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20071004/1179239e/attachment-0001.sig>


More information about the ragel-users mailing list