diff --git a/gen_intrange.c b/gen_intrange.c index 458df2f8c4dd879a35736053d0d9a3232fcab96a..456ef5c6ca0d65b01e7c6657272c24c85d281893 100644 --- a/gen_intrange.c +++ b/gen_intrange.c @@ -75,7 +75,9 @@ void HCFS_ADD_CHAR(uint8_t chr) { // and we can just store it in an array or something (and expand the array if we need it) // so we don't need tree-writing code, but we *do* need a way to traverse the output generated by -// gen_int_range -- which is tree-shaped +// gen_int_range -- which *is* tree-shaped + + void gen_int_range(uint64_t low, uint64_t high, uint8_t bytes, uint8_t starting_byte_index) { uint8_t current_byte_index = starting_byte_index; diff --git a/span.c b/span.c index 53f5ecb9d84c3de18d39fafe0e6cd099d4229c64..1466e4fc14918459da4dad3c137f50c0627087ee 100755 --- a/span.c +++ b/span.c @@ -22,6 +22,12 @@ HParser *int16_big(int16_t left, int16_t right) { } +HParser *int16_un_endianned(int16_t left, int16_t right) { + H_RULE(bigint16, h_int16()); + H_RULE(int16range, h_int_range(bigint16, left, right)); + return h_sequence(int16range,h_end_p(),NULL); +} +