[foreign] RFR: refresh layout grammar

Henry Jen henry.jen at oracle.com
Wed May 23 19:28:42 UTC 2018


On May 23, 2018, at 12:26 PM, Henry Jen <henry.jen at oracle.com> wrote:
> 
> On May 23, 2018, at 11:40 AM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>> 
>> 
>> 
>> On 23/05/18 19:10, Henry Jen wrote:
>>> 
>>>> On May 23, 2018, at 9:46 AM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>>>> 
>>>> Hi,
>>>> I've put together a change which tweaks the grammar of layout descriptions used in annotations to correspond to what's described here [1].
>>>> 
>>>> The big changes are in DescriptorParser, which now has to understand the new grammar, and also in TestDescriptorGrammar, which has to combinatorially generate sentences of the new grammar.
>>>> 
>>>> All the other tedious changes are test changes, required to go from the old to the new grammar; I've adhered to the following rules:
>>>> 
>>>> 'b' -> ‘u8'
>>> b is a bit, so should it be u1?
>> uhm - booleans don't exist in C, so typically a byte will be allocated holding a 1 or a 0. You can think of it as u8[u1(value)u7(padding)] if you want, but the results are the same?
> 
> b is for bit-field, so that definitely a u1.

To be precise, size is actually depends on repetition prefix. u1 if not specified.

Cheers,
Henry



More information about the panama-dev mailing list