From thurston at colm.net Wed Oct 10 11:17:18 2018 From: thurston at colm.net (Adrian Thurston) Date: Wed, 10 Oct 2018 12:17:18 -0300 Subject: [ragel-users] Issue with rust on 7.0.0.11 In-Reply-To: References: Message-ID: Hi, Short answer: you need to use fnbreak. In languages that do not have a goto statement, fbreak, fgoto, etc cannot be implemented the same way they are implemented in C. In ragel 6 those statements fall through if there is no goto, which is not good. Totally inconsistent. In ragel 7 they have been removed and you need to use the fall through versions instead. fnbreak stands for f-next-break. It will break after the action list has been executed, instead of immediately jumping out of the list. Adrian On 2018-09-04 02:19, 王納米 wrote: > Hi. I'm using ragel-7 with host lang being Rust and encountered "cannot use fbreak in -B mode". > > I did some digging with the code yet got no luck by far. Seems like some arguments are not available by now? > > Would like to provide some re-pro case. > > Thanks! > > --- > > Nami W > > _______________________________________________ > ragel-users mailing list > ragel-users at colm.net > http://www.colm.net/cgi-bin/mailman/listinfo/ragel-users [1] Links: ------ [1] http://www.colm.net/cgi-bin/mailman/listinfo/ragel-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ming.Fu at esentire.com Wed Oct 31 15:48:54 2018 From: Ming.Fu at esentire.com (Ming Fu) Date: Wed, 31 Oct 2018 19:48:54 +0000 Subject: [ragel-users] How to process a block of random sized data Message-ID: <664d10b287c4443d8d963473969f9878@esentire.com> Hi, I have the following ragel rule: any* $( Some_expensive_call(*p) } However, I do not necessary have to make the some_expensive_call per input char, I can call some_less_expensive_call(*p, len) to be more efficient. How do I figure out the len and adjust pe. Consider the input may not be in contiguous memory block. Thanks, Ming -------------- next part -------------- An HTML attachment was scrubbed... URL: