marianoguerra / efene

OFICIAL REPO IS AT https://github.com/efene/efene
https://github.com/efene/efene
Other
145 stars 32 forks source link

Length as variable in bitstrings #24

Closed josephwecker closed 13 years ago

josephwecker commented 13 years ago

(As usual- huge thank you Mariano- I've been using efene for more and more complicated projects)

Currently efene's syntax (I use ifene)- supports the following:

B = <[0,1,2,3,4,5,6,7]>
<[ This:3/binary, Char, Tail/binary ]> = B

However, the following doesn't work. Alas, I need it to be able to implement my super-awesome bitstring library ;)

B = <[0,1,2,3,4,5,6,7]>
Idx = 3
<[ This:Idx/binary, Char, Tail/binary ]> = B
marianoguerra commented 13 years ago

allow a variable as part of a binary item, closed by e3010bd14a6662da6f51ba5aaee1b7e1c0d05d49, example:

>>> B = <[0,1,2,3,4,5,6,7]> <<0,1,2,3,4,5,6,7>> >>> Idx = 3 3 >>> <[ This:Idx/binary, Char, Tail/binary ]> = B <<0,1,2,3,4,5,6,7>> >>> This <<0,1,2>> >>>

marianoguerra commented 13 years ago

thanks for the report!