2 /* Command-line: gperf -o -i 1 -C -k 1-3,$ -L C -H keyword_hash -N check_identifier -tT lexor_keyword.gperf */
5 #include "parse_misc.h"
8 #include "lexor_keyword.h"
11 struct lexor_keyword { const char*name; int tokenType; };
33 endfunction, K_endfunction
34 endgenerate, K_endgenerate
35 endmodule, K_endmodule
36 endprimitive, K_endprimitive
37 endspecify, K_endspecify
58 localparam, K_localparam
60 macromodule, K_macromodule
72 parameter, K_parameter
75 primitive, K_primitive
95 specparam, K_specparam
125 int lexor_keyword_code(const char*str, unsigned nstr)
127 const struct lexor_keyword*rc = check_identifier(str, nstr);
131 return rc->tokenType;