Pass local scope precision from compiler to vvp/etc.
[iverilog.git] / lexor_keyword.gperf
blob6d6c4b95c9049c6b2280f02af48cb5f65afe907f
1 %{
2 /* Command-line: gperf -o -i 1 -C -k 1-3,$ -L C -H keyword_hash -N check_identifier -tT lexor_keyword.gperf */
4 #include "config.h"
5 #include "parse_misc.h"
6 #include "parse.h"
7 #include <string.h>
8 #include "lexor_keyword.h"
11 struct lexor_keyword { const char*name; int tokenType; };
13 always,         K_always
14 and,            K_and
15 assign,         K_assign
16 begin,          K_begin
17 bool,           K_bool
18 buf,            K_buf
19 bufif0,         K_bufif0
20 bufif1,         K_bufif1
21 case,           K_case
22 casex,          K_casex
23 casez,          K_casez
24 cmos,           K_cmos
25 deassign,       K_deassign
26 default,        K_default
27 defparam,       K_defparam
28 disable,        K_disable
29 edge,           K_edge
30 else,           K_else
31 end,            K_end
32 endcase,        K_endcase
33 endfunction,    K_endfunction
34 endgenerate,    K_endgenerate
35 endmodule,      K_endmodule
36 endprimitive,   K_endprimitive
37 endspecify,     K_endspecify
38 endtable,       K_endtable
39 endtask,        K_endtask
40 event,          K_event
41 for,            K_for
42 force,          K_force
43 forever,        K_forever
44 fork,           K_fork
45 function,       K_function
46 generate,       K_generate
47 genvar,         K_genvar
48 highz0,         K_highz0
49 highz1,         K_highz1
50 if,             K_if
51 ifnone,         K_ifnone
52 initial,        K_initial
53 inout,          K_inout
54 input,          K_input
55 integer,        K_integer
56 join,           K_join
57 large,          K_large
58 localparam,     K_localparam
59 logic,          K_logic
60 macromodule,    K_macromodule
61 medium,         K_medium
62 module,         K_module
63 nand,           K_nand
64 negedge,        K_negedge
65 nmos,           K_nmos
66 nor,            K_nor
67 not,            K_not
68 notif0,         K_notif0
69 notif1,         K_notif1
70 or,             K_or
71 output,         K_output
72 parameter,      K_parameter
73 pmos,           K_pmos
74 posedge,        K_posedge
75 primitive,      K_primitive
76 pull0,          K_pull0
77 pull1,          K_pull1
78 pulldown,       K_pulldown
79 pullup,         K_pullup
80 rcmos,          K_rcmos
81 real,           K_real
82 realtime,       K_realtime
83 reg,            K_reg
84 release,        K_release
85 repeat,         K_repeat
86 rnmos,          K_rnmos
87 rpmos,          K_rpmos
88 rtran,          K_rtran
89 rtranif0,       K_rtranif0
90 rtranif1,       K_rtranif1
91 scalared,       K_scalared
92 signed,         K_signed
93 small,          K_small
94 specify,        K_specify
95 specparam,      K_specparam
96 strong0,        K_strong0
97 strong1,        K_strong1
98 supply0,        K_supply0
99 supply1,        K_supply1
100 table,          K_table
101 task,           K_task
102 time,           K_time
103 tran,           K_tran
104 tranif0,        K_tranif0
105 tranif1,        K_tranif1
106 tri,            K_tri
107 tri0,           K_tri0
108 tri1,           K_tri1
109 triand,         K_triand
110 trior,          K_trior
111 trireg,         K_trireg
112 vectored,       K_vectored
113 wait,           K_wait
114 wand,           K_wand
115 weak0,          K_weak0
116 weak1,          K_weak1
117 while,          K_while
118 wire,           K_wire
119 wone,           K_wone
120 wor,            K_wor
121 xnor,           K_xnor
122 xor,            K_xor
125 int lexor_keyword_code(const char*str, unsigned nstr)
127       const struct lexor_keyword*rc = check_identifier(str, nstr);
128       if (rc == 0)
129           return IDENTIFIER;
130       else
131           return rc->tokenType;