Skip to main content
Share Your Experience: Take the 2024 Developer Survey

New answers tagged

1 vote

Concatenating strings given a BNF grammar

A production rule for an empty string (or equivalently an empty token) can always succeed by consuming nothing from the input. So, when you peek '(', the parser first tries the production <Letter&...
Bart van Ingen Schenau's user avatar
1 vote

Is there a standard way or standard alternative to packing a struct in c?

Alluded to elsewhere, but not obvious to me until I saw it explicitly, is the option to use byte arrays everywhere. So instead of: struct aligned { uint16_t s; uint32_t i; uint8_t c; }; which ...
Heath Raftery's user avatar

Top 50 recent answers are included