sergeybratus / HammerPrimer

Introduction to using the Hammer parser construction toolkit by Meredith L. Patterson
79 stars 5 forks source link

lecture 12 out of sync with current hammer #1

Open tomime opened 8 years ago

tomime commented 8 years ago

Hi Sergey,

lecture 12 seems to be out of sync with the current version of Hammer. Compiling the base64.c (from the repository) yields

base64.c: In function ‘act_b64_3oct’:
base64.c:36:39: error: macro "H_MAKE_BYTES" requires 2 arguments, but only 1 given
     HParsedToken *ret = H_MAKE_BYTES(3);
                                       ^
base64.c:36:25: error: ‘H_MAKE_BYTES’ undeclared (first use in this function)
     HParsedToken *ret = H_MAKE_BYTES(3);
                         ^
base64.c:36:25: note: each undeclared identifier is reported only once for each function it appears in
base64.c: In function ‘act_b64_2oct’:
base64.c:50:39: error: macro "H_MAKE_BYTES" requires 2 arguments, but only 1 given
     HParsedToken *ret = H_MAKE_BYTES(2);
                                       ^
base64.c:50:25: error: ‘H_MAKE_BYTES’ undeclared (first use in this function)
     HParsedToken *ret = H_MAKE_BYTES(2);
                         ^
base64.c: In function ‘act_b64_1oct’:
base64.c:61:39: error: macro "H_MAKE_BYTES" requires 2 arguments, but only 1 given
     HParsedToken *ret = H_MAKE_BYTES(1);
                                       ^
base64.c:61:25: error: ‘H_MAKE_BYTES’ undeclared (first use in this function)
     HParsedToken *ret = H_MAKE_BYTES(1);

Regards, tomime