<div>[Cross post from the D news group]</div><div><br></div><div>Hi All,</div><div><br></div><div>To gain a better understanding of how the D compiler works I am</div><div>trying to implement support for bit fields in structures. I have</div>


<div>modified the parser code to admit the following syntax (for now)...</div><div><br></div><div>struct A{</div><div>    uint:8 a;</div><div>    uint:5 b;</div><div>    uint:* unused; //Takes up the remaining space.</div>


<div>    //Raise an error when the computed size is zero.</div><div>}</div><div><br></div><div>You can see my changes here...<a href="https://github.com/SDX2000/dmd" target="_blank">https://github.com/SDX2000/dmd</a></div>

<div><br></div>
<div>I have been trying to work out a strategy for modifying the compiler</div><div>code generation for quite some time now but haven't been able to</div><div>make much headway in this direction.</div><div><br></div>

<div>
I would appreciate any help at this point.</div><div><br></div><div>Regards,</div><div>Sandeep Datta.</div><div><br></div>