Use smaller integer types for parse table

This commit is contained in:
Max Brunsfeld 2014-05-08 08:45:41 -07:00
parent 4700e33746
commit 013572671f
2 changed files with 4 additions and 4 deletions

View file

@ -92,7 +92,7 @@ ts_parser constructor_name() { \
/*
* Stack
*/
typedef int state_id;
typedef short state_id;
typedef struct {
size_t size;
struct {
@ -187,10 +187,10 @@ typedef enum {
typedef struct {
ts_parse_action_type type;
union {
state_id to_state;
int to_state;
struct {
ts_symbol symbol;
int child_count;
unsigned short child_count;
};
} data;
} ts_parse_action;

View file

@ -7,7 +7,7 @@ extern "C" {
#include <stdlib.h>
typedef unsigned int ts_symbol;
typedef unsigned short ts_symbol;
#define ts_builtin_sym_error 0
#define ts_builtin_sym_end 1