[ragel] Binary data and bits

sothy shan sothy.e98 at gmail.com
Sat Sep 30 10:43:00 UTC 2017


Thanks Adrain,

I am new to Ragel. I have one question.
One BYTE information: 010 1 1 000
I need to take firrst three bits into one int, other two bits are two
boolean values and other three are together for one int.

How to write grammar for parsing this data?

Thanks for your help.

Best regards
Sothy

On Fri, Sep 29, 2017 at 10:08 PM, Adrian Thurston <thurston at colm.net> wrote:

> Hi Sothy, you need to specify the grammar at the byte level. You can union
> bit patterns together, however.
>
> On 2017-09-27 15:35, sothy shan wrote:
>
> Hi,
> I need to parse 4 bytes of data and some bits of data has valid
> information.
> How can I go with Ragel?
> I am going to use Ragel with  C++.
>
> Best regards
> Sothy
>
>
> _______________________________________________
> ragel mailing listragel at colm.nethttp://www.colm.net/cgi-bin/mailman/listinfo/ragel
>
>
> _______________________________________________
> ragel mailing list
> ragel at colm.net
> http://www.colm.net/cgi-bin/mailman/listinfo/ragel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20170930/a37b74d9/attachment-0002.html>


More information about the ragel-users mailing list