Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 369 lines (363 sloc) 15.693 kb
bb5ca97 @caryr Fix some -Wextra warnings and some other bug fixes/enhancements.
caryr authored
1 /*
2 * We need this to prevent -Wextra (-W) from complaining that the mask and
3 * tokenType values are not initialized for the empty table entries.
4 */
5 %define initializer-suffix ,0,0
6
0c7722c Hashed keyword lookup for the lexor.
steve authored
7 %{
8 /* Command-line: gperf -o -i 1 -C -k 1-3,$ -L C -H keyword_hash -N check_identifier -tT lexor_keyword.gperf */
9
b825f8d Create a config.h.in file to hold all the config
steve authored
10 #include "config.h"
0c7722c Hashed keyword lookup for the lexor.
steve authored
11 #include "parse_misc.h"
12 #include "parse.h"
1993bf6 @caryr Remove malloc.h support and for C++ files use <c...> include files.
caryr authored
13 #include <cstring>
6eef545 Support localparam.
steve authored
14 #include "lexor_keyword.h"
149bfa0 @steveicarus Support for the begin_keywords directive.
authored
15 #include "compiler.h"
0c7722c Hashed keyword lookup for the lexor.
steve authored
16
17 %}
149bfa0 @steveicarus Support for the begin_keywords directive.
authored
18 struct lexor_keyword { const char*name; int mask; int tokenType; };
0c7722c Hashed keyword lookup for the lexor.
steve authored
19 %%
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
20 above, GN_KEYWORDS_VAMS_2_3, K_above
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
21 abs, GN_KEYWORDS_VAMS_2_3, K_abs
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
22 absdelay, GN_KEYWORDS_VAMS_2_3, K_absdelay
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
23 abstol, GN_KEYWORDS_VAMS_2_3, K_abstol
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
24 accept_on, GN_KEYWORDS_1800_2009, K_accept_on
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
25 access, GN_KEYWORDS_VAMS_2_3, K_access
26 acos, GN_KEYWORDS_VAMS_2_3, K_acos
27 acosh, GN_KEYWORDS_VAMS_2_3, K_acosh
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
28 ac_stim, GN_KEYWORDS_VAMS_2_3, K_ac_stim
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
29 alias, GN_KEYWORDS_1800_2005, K_alias
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
30 aliasparam, GN_KEYWORDS_VAMS_2_3, K_aliasparam
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
31 always, GN_KEYWORDS_1364_1995, K_always
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
32 always_comb, GN_KEYWORDS_1800_2005, K_always_comb
33 always_ff, GN_KEYWORDS_1800_2005, K_always_ff
34 always_latch, GN_KEYWORDS_1800_2005, K_always_latch
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
35 analog, GN_KEYWORDS_VAMS_2_3, K_analog
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
36 analysis, GN_KEYWORDS_VAMS_2_3, K_analysis
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
37 and, GN_KEYWORDS_1364_1995, K_and
38 asin, GN_KEYWORDS_VAMS_2_3, K_asin
39 asinh, GN_KEYWORDS_VAMS_2_3, K_asinh
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
40 # This is defined by both SystemVerilog 1800-2005 and Verilog-AMS 2.3
41 assert, GN_KEYWORDS_1800_2005|GN_KEYWORDS_VAMS_2_3, K_assert
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
42 assign, GN_KEYWORDS_1364_1995, K_assign
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
43 assume, GN_KEYWORDS_1800_2005, K_assume
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
44 atan, GN_KEYWORDS_VAMS_2_3, K_atan
45 atan2, GN_KEYWORDS_VAMS_2_3, K_atan2
46 atanh, GN_KEYWORDS_VAMS_2_3, K_atanh
47 automatic, GN_KEYWORDS_1364_2001, K_automatic
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
48 before, GN_KEYWORDS_1800_2005, K_before
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
49 begin, GN_KEYWORDS_1364_1995, K_begin
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
50 bind, GN_KEYWORDS_1800_2005, K_bind
51 bins, GN_KEYWORDS_1800_2005, K_bins
52 binsof, GN_KEYWORDS_1800_2005, K_binsof
53 bit, GN_KEYWORDS_1800_2005, K_bit
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
54 branch, GN_KEYWORDS_VAMS_2_3, K_branch
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
55 break, GN_KEYWORDS_1800_2005, K_break
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
56 bool, GN_KEYWORDS_ICARUS, K_bool
57 buf, GN_KEYWORDS_1364_1995, K_buf
58 bufif0, GN_KEYWORDS_1364_1995, K_bufif0
59 bufif1, GN_KEYWORDS_1364_1995, K_bufif1
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
60 byte, GN_KEYWORDS_1800_2005, K_byte
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
61 case, GN_KEYWORDS_1364_1995, K_case
62 casex, GN_KEYWORDS_1364_1995, K_casex
63 casez, GN_KEYWORDS_1364_1995, K_casez
64 ceil, GN_KEYWORDS_VAMS_2_3, K_ceil
65 cell, GN_KEYWORDS_1364_2001_CONFIG, K_cell
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
66 chandle, GN_KEYWORDS_1800_2005, K_chandle
67 checker, GN_KEYWORDS_1800_2009, K_checker
68 class, GN_KEYWORDS_1800_2005, K_class
69 clocking, GN_KEYWORDS_1800_2005, K_clocking
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
70 cmos, GN_KEYWORDS_1364_1995, K_cmos
71 config, GN_KEYWORDS_1364_2001_CONFIG, K_config
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
72 connect, GN_KEYWORDS_VAMS_2_3, K_connect
73 connectmodule, GN_KEYWORDS_VAMS_2_3, K_connectmodule
74 connectrules, GN_KEYWORDS_VAMS_2_3, K_connectrules
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
75 const, GN_KEYWORDS_1800_2005, K_const
76 constraint, GN_KEYWORDS_1800_2005, K_constraint
77 context, GN_KEYWORDS_1800_2005, K_context
78 continue, GN_KEYWORDS_1800_2005, K_continue
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
79 continuous, GN_KEYWORDS_VAMS_2_3, K_continuous
80 cos, GN_KEYWORDS_VAMS_2_3, K_cos
81 cosh, GN_KEYWORDS_VAMS_2_3, K_cosh
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
82 cover, GN_KEYWORDS_1800_2005, K_cover
83 covergroup, GN_KEYWORDS_1800_2005, K_covergroup
84 coverpoint, GN_KEYWORDS_1800_2005, K_coverpoint
85 cross, GN_KEYWORDS_1800_2005, K_cross
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
86 ddt, GN_KEYWORDS_VAMS_2_3, K_ddt
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
87 ddt_nature, GN_KEYWORDS_VAMS_2_3, K_ddt_nature
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
88 ddx, GN_KEYWORDS_VAMS_2_3, K_ddx
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
89 deassign, GN_KEYWORDS_1364_1995, K_deassign
90 default, GN_KEYWORDS_1364_1995, K_default
91 defparam, GN_KEYWORDS_1364_1995, K_defparam
92 design, GN_KEYWORDS_1364_2001_CONFIG, K_design
93 disable, GN_KEYWORDS_1364_1995, K_disable
94 discipline, GN_KEYWORDS_VAMS_2_3, K_discipline
95 discrete, GN_KEYWORDS_VAMS_2_3, K_discrete
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
96 dist, GN_KEYWORDS_1800_2005, K_dist
97 do, GN_KEYWORDS_1800_2005, K_do
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
98 domain, GN_KEYWORDS_VAMS_2_3, K_domain
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
99 driver_update, GN_KEYWORDS_VAMS_2_3, K_driver_update
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
100 edge, GN_KEYWORDS_1364_1995, K_edge
101 else, GN_KEYWORDS_1364_1995, K_else
102 end, GN_KEYWORDS_1364_1995, K_end
103 endcase, GN_KEYWORDS_1364_1995, K_endcase
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
104 endchecker, GN_KEYWORDS_1800_2009, K_endchecker
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
105 endconfig, GN_KEYWORDS_1364_2001_CONFIG, K_endconfig
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
106 endclass, GN_KEYWORDS_1800_2005, K_endclass
107 endclocking, GN_KEYWORDS_1800_2005, K_endclocking
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
108 endconnectrules, GN_KEYWORDS_VAMS_2_3, K_endconnectrules
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
109 enddiscipline, GN_KEYWORDS_VAMS_2_3, K_enddiscipline
110 endfunction, GN_KEYWORDS_1364_1995, K_endfunction
111 endgenerate, GN_KEYWORDS_1364_2001, K_endgenerate
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
112 endgroup, GN_KEYWORDS_1800_2005, K_endgroup
113 endinterface, GN_KEYWORDS_1800_2005, K_endinterface
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
114 endmodule, GN_KEYWORDS_1364_1995, K_endmodule
115 endnature, GN_KEYWORDS_VAMS_2_3, K_endnature
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
116 endpackage, GN_KEYWORDS_1800_2005, K_endpackage
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
117 endparamset, GN_KEYWORDS_VAMS_2_3, K_endparamset
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
118 endprimitive, GN_KEYWORDS_1364_1995, K_endprimitive
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
119 endprogram, GN_KEYWORDS_1800_2005, K_endprogram
120 endproperty, GN_KEYWORDS_1800_2005, K_endproperty
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
121 endspecify, GN_KEYWORDS_1364_1995, K_endspecify
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
122 endsequence, GN_KEYWORDS_1800_2005, K_endsequence
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
123 endtable, GN_KEYWORDS_1364_1995, K_endtable
124 endtask, GN_KEYWORDS_1364_1995, K_endtask
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
125 enum, GN_KEYWORDS_1800_2005, K_enum
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
126 event, GN_KEYWORDS_1364_1995, K_event
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
127 eventually, GN_KEYWORDS_1800_2009, K_eventually
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
128 exclude, GN_KEYWORDS_VAMS_2_3, K_exclude
129 exp, GN_KEYWORDS_VAMS_2_3, K_exp
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
130 expect, GN_KEYWORDS_1800_2005, K_expect
131 export, GN_KEYWORDS_1800_2005, K_export
132 extends, GN_KEYWORDS_1800_2005, K_extends
133 extern, GN_KEYWORDS_1800_2005, K_extern
134 final, GN_KEYWORDS_1800_2005, K_final
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
135 final_step, GN_KEYWORDS_VAMS_2_3, K_final_step
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
136 first_match, GN_KEYWORDS_1800_2005, K_first_match
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
137 flicker_noise, GN_KEYWORDS_VAMS_2_3, K_flicker_noise
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
138 floor, GN_KEYWORDS_VAMS_2_3, K_floor
139 flow, GN_KEYWORDS_VAMS_2_3, K_flow
140 for, GN_KEYWORDS_1364_1995, K_for
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
141 foreach, GN_KEYWORDS_1800_2005, K_foreach
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
142 force, GN_KEYWORDS_1364_1995, K_force
143 forever, GN_KEYWORDS_1364_1995, K_forever
144 fork, GN_KEYWORDS_1364_1995, K_fork
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
145 forkjoin, GN_KEYWORDS_1800_2005, K_forkjoin
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
146 from, GN_KEYWORDS_VAMS_2_3, K_from
147 function, GN_KEYWORDS_1364_1995, K_function
148 generate, GN_KEYWORDS_1364_2001, K_generate
149 genvar, GN_KEYWORDS_1364_2001, K_genvar
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
150 global, GN_KEYWORDS_1800_2009, K_global
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
151 ground, GN_KEYWORDS_VAMS_2_3, K_ground
152 highz0, GN_KEYWORDS_1364_1995, K_highz0
153 highz1, GN_KEYWORDS_1364_1995, K_highz1
154 hypot, GN_KEYWORDS_VAMS_2_3, K_hypot
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
155 idt, GN_KEYWORDS_VAMS_2_3, K_idt
156 idtmod, GN_KEYWORDS_VAMS_2_3, K_idtmod
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
157 idt_nature, GN_KEYWORDS_VAMS_2_3, K_idt_nature
158 if, GN_KEYWORDS_1364_1995, K_if
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
159 iff, GN_KEYWORDS_1800_2005, K_iff
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
160 ifnone, GN_KEYWORDS_1364_1995, K_ifnone
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
161 ignore_bins, GN_KEYWORDS_1800_2005, K_ignore_bins
162 illegal_bins, GN_KEYWORDS_1800_2005, K_illegal_bins
163 implies, GN_KEYWORDS_1800_2009, K_implies
164 import, GN_KEYWORDS_1800_2005, K_import
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
165 incdir, GN_KEYWORDS_1364_2001_CONFIG, K_incdir
166 include, GN_KEYWORDS_1364_2001_CONFIG, K_include
167 inf, GN_KEYWORDS_VAMS_2_3, K_inf
168 initial, GN_KEYWORDS_1364_1995, K_initial
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
169 initial_step, GN_KEYWORDS_VAMS_2_3, K_initial_step
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
170 inout, GN_KEYWORDS_1364_1995, K_inout
171 input, GN_KEYWORDS_1364_1995, K_input
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
172 inside, GN_KEYWORDS_1800_2005, K_inside
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
173 instance, GN_KEYWORDS_1364_2001_CONFIG, K_instance
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
174 int, GN_KEYWORDS_1800_2005, K_int
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
175 integer, GN_KEYWORDS_1364_1995, K_integer
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
176 interface, GN_KEYWORDS_1800_2005, K_interface
177 intersect, GN_KEYWORDS_1800_2005, K_intersect
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
178 join, GN_KEYWORDS_1364_1995, K_join
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
179 join_any, GN_KEYWORDS_1800_2005, K_join_any
180 join_none, GN_KEYWORDS_1800_2005, K_join_none
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
181 laplace_nd, GN_KEYWORDS_VAMS_2_3, K_laplace_nd
182 laplace_np, GN_KEYWORDS_VAMS_2_3, K_laplace_np
183 laplace_zd, GN_KEYWORDS_VAMS_2_3, K_laplace_zd
184 laplace_zp, GN_KEYWORDS_VAMS_2_3, K_laplace_zp
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
185 large, GN_KEYWORDS_1364_1995, K_large
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
186 last_crossing, GN_KEYWORDS_VAMS_2_3, K_last_crossing
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
187 let, GN_KEYWORDS_1800_2009, K_let
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
188 liblist, GN_KEYWORDS_1364_2001_CONFIG, K_liblist
189 library, GN_KEYWORDS_1364_2001_CONFIG, K_library
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
190 limexp, GN_KEYWORDS_VAMS_2_3, K_limexp
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
191 ln, GN_KEYWORDS_VAMS_2_3, K_ln
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
192 local, GN_KEYWORDS_1800_2005, K_local
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
193 localparam, GN_KEYWORDS_1364_2001, K_localparam
194 log, GN_KEYWORDS_VAMS_2_3, K_log
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
195 # This is defined by SystemVerilog 1800-2005 and as an Icarus extension.
196 logic, GN_KEYWORDS_1800_2005|GN_KEYWORDS_ICARUS, K_logic
197 longint, GN_KEYWORDS_1800_2005, K_longint
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
198 macromodule, GN_KEYWORDS_1364_1995, K_macromodule
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
199 matches, GN_KEYWORDS_1800_2005, K_matches
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
200 max, GN_KEYWORDS_VAMS_2_3, K_max
201 medium, GN_KEYWORDS_1364_1995, K_medium
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
202 merged, GN_KEYWORDS_VAMS_2_3, K_merged
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
203 min, GN_KEYWORDS_VAMS_2_3, K_min
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
204 modport, GN_KEYWORDS_1800_2005, K_modport
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
205 module, GN_KEYWORDS_1364_1995, K_module
206 nand, GN_KEYWORDS_1364_1995, K_nand
207 nature, GN_KEYWORDS_VAMS_2_3, K_nature
208 negedge, GN_KEYWORDS_1364_1995, K_negedge
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
209 net_resolution, GN_KEYWORDS_VAMS_2_3, K_net_resolution
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
210 new, GN_KEYWORDS_1800_2005, K_new
211 nexttime, GN_KEYWORDS_1800_2009, K_nexttime
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
212 nmos, GN_KEYWORDS_1364_1995, K_nmos
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
213 noise_table, GN_KEYWORDS_VAMS_2_3, K_noise_table
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
214 nor, GN_KEYWORDS_1364_1995, K_nor
215 noshowcancelled, GN_KEYWORDS_1364_2001, K_noshowcancelled
216 not, GN_KEYWORDS_1364_1995, K_not
217 notif0, GN_KEYWORDS_1364_1995, K_notif0
218 notif1, GN_KEYWORDS_1364_1995, K_notif1
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
219 null, GN_KEYWORDS_1800_2005, K_null
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
220 or, GN_KEYWORDS_1364_1995, K_or
221 output, GN_KEYWORDS_1364_1995, K_output
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
222 package, GN_KEYWORDS_1800_2005, K_package
223 packed, GN_KEYWORDS_1800_2005, K_packed
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
224 parameter, GN_KEYWORDS_1364_1995, K_parameter
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
225 paramset, GN_KEYWORDS_VAMS_2_3, K_paramset
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
226 pmos, GN_KEYWORDS_1364_1995, K_pmos
227 posedge, GN_KEYWORDS_1364_1995, K_posedge
228 potential, GN_KEYWORDS_VAMS_2_3, K_potential
229 pow, GN_KEYWORDS_VAMS_2_3, K_pow
230 primitive, GN_KEYWORDS_1364_1995, K_primitive
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
231 priority, GN_KEYWORDS_1800_2005, K_priority
232 program, GN_KEYWORDS_1800_2005, K_program
233 property, GN_KEYWORDS_1800_2005, K_property
234 protected, GN_KEYWORDS_1800_2005, K_protected
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
235 pull0, GN_KEYWORDS_1364_1995, K_pull0
236 pull1, GN_KEYWORDS_1364_1995, K_pull1
237 pulldown, GN_KEYWORDS_1364_1995, K_pulldown
238 pullup, GN_KEYWORDS_1364_1995, K_pullup
239 pulsestyle_onevent, GN_KEYWORDS_1364_2001, K_pulsestyle_onevent
240 pulsestyle_ondetect, GN_KEYWORDS_1364_2001, K_pulsestyle_ondetect
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
241 pure, GN_KEYWORDS_1800_2005, K_pure
242 rand, GN_KEYWORDS_1800_2005, K_rand
243 randc, GN_KEYWORDS_1800_2005, K_randc
244 randcase, GN_KEYWORDS_1800_2005, K_randcase
245 randsequence, GN_KEYWORDS_1800_2005, K_randsequence
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
246 rcmos, GN_KEYWORDS_1364_1995, K_rcmos
247 real, GN_KEYWORDS_1364_1995, K_real
248 realtime, GN_KEYWORDS_1364_1995, K_realtime
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
249 ref, GN_KEYWORDS_1800_2005, K_ref
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
250 reg, GN_KEYWORDS_1364_1995, K_reg
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
251 reject_on, GN_KEYWORDS_1800_2009, K_reject_on
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
252 release, GN_KEYWORDS_1364_1995, K_release
253 repeat, GN_KEYWORDS_1364_1995, K_repeat
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
254 resolveto, GN_KEYWORDS_VAMS_2_3, K_resolveto
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
255 restrict, GN_KEYWORDS_1800_2009, K_restrict
256 return, GN_KEYWORDS_1800_2005, K_return
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
257 rnmos, GN_KEYWORDS_1364_1995, K_rnmos
258 rpmos, GN_KEYWORDS_1364_1995, K_rpmos
259 rtran, GN_KEYWORDS_1364_1995, K_rtran
260 rtranif0, GN_KEYWORDS_1364_1995, K_rtranif0
261 rtranif1, GN_KEYWORDS_1364_1995, K_rtranif1
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
262 s_always, GN_KEYWORDS_1800_2009, K_s_always
263 s_eventually, GN_KEYWORDS_1800_2009, K_s_eventually
264 s_nexttime, GN_KEYWORDS_1800_2009, K_s_nexttime
265 s_until, GN_KEYWORDS_1800_2009, K_s_until
266 s_until_with, GN_KEYWORDS_1800_2009, K_s_until_with
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
267 scalared, GN_KEYWORDS_1364_1995, K_scalared
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
268 sequence, GN_KEYWORDS_1800_2005, K_sequence
269 shortint, GN_KEYWORDS_1800_2005, K_shortint
270 shortreal, GN_KEYWORDS_1800_2005, K_shortreal
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
271 showcancelled, GN_KEYWORDS_1364_2001, K_showcancelled
272 signed, GN_KEYWORDS_1364_2001, K_signed
273 sin, GN_KEYWORDS_VAMS_2_3, K_sin
274 sinh, GN_KEYWORDS_VAMS_2_3, K_sinh
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
275 slew, GN_KEYWORDS_VAMS_2_3, K_slew
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
276 small, GN_KEYWORDS_1364_1995, K_small
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
277 solve, GN_KEYWORDS_1800_2005, K_solve
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
278 specify, GN_KEYWORDS_1364_1995, K_specify
279 specparam, GN_KEYWORDS_1364_1995, K_specparam
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
280 split, GN_KEYWORDS_VAMS_2_3, K_split
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
281 sqrt, GN_KEYWORDS_VAMS_2_3, K_sqrt
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
282 static, GN_KEYWORDS_1800_2005, K_static
283 # This is defined by both SystemVerilog 1800-2005 and Verilog-AMS 2.3
284 string, GN_KEYWORDS_1800_2005|GN_KEYWORDS_VAMS_2_3, K_string
285 strong, GN_KEYWORDS_1800_2009, K_strong
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
286 strong0, GN_KEYWORDS_1364_1995, K_strong0
287 strong1, GN_KEYWORDS_1364_1995, K_strong1
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
288 struct, GN_KEYWORDS_1800_2005, K_struct
289 super, GN_KEYWORDS_1800_2005, K_super
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
290 supply0, GN_KEYWORDS_1364_1995, K_supply0
291 supply1, GN_KEYWORDS_1364_1995, K_supply1
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
292 sync_accept_on, GN_KEYWORDS_1800_2009, K_sync_accept_on
293 sync_reject_on, GN_KEYWORDS_1800_2009, K_sync_reject_on
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
294 table, GN_KEYWORDS_1364_1995, K_table
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
295 tagged, GN_KEYWORDS_1800_2005, K_tagged
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
296 tan, GN_KEYWORDS_VAMS_2_3, K_tan
297 tanh, GN_KEYWORDS_VAMS_2_3, K_tanh
298 task, GN_KEYWORDS_1364_1995, K_task
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
299 this, GN_KEYWORDS_1800_2005, K_this
300 throughout, GN_KEYWORDS_1800_2005, K_throughout
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
301 time, GN_KEYWORDS_1364_1995, K_time
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
302 timeprecision, GN_KEYWORDS_1800_2005, K_timeprecision
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
303 timer, GN_KEYWORDS_VAMS_2_3, K_timer
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
304 timeunit, GN_KEYWORDS_1800_2005, K_timeunit
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
305 tran, GN_KEYWORDS_1364_1995, K_tran
306 tranif0, GN_KEYWORDS_1364_1995, K_tranif0
307 tranif1, GN_KEYWORDS_1364_1995, K_tranif1
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
308 transition, GN_KEYWORDS_VAMS_2_3, K_transition
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
309 tri, GN_KEYWORDS_1364_1995, K_tri
310 tri0, GN_KEYWORDS_1364_1995, K_tri0
311 tri1, GN_KEYWORDS_1364_1995, K_tri1
312 triand, GN_KEYWORDS_1364_1995, K_triand
313 trior, GN_KEYWORDS_1364_1995, K_trior
314 trireg, GN_KEYWORDS_1364_1995, K_trireg
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
315 type, GN_KEYWORDS_1800_2005, K_type
316 typedef, GN_KEYWORDS_1800_2005, K_typedef
317 union, GN_KEYWORDS_1800_2005, K_union
318 unique, GN_KEYWORDS_1800_2005, K_unique
319 unique0, GN_KEYWORDS_1800_2009, K_unique
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
320 units, GN_KEYWORDS_VAMS_2_3, K_units
321 # Reserved for future use!
322 unsigned, GN_KEYWORDS_1364_2001, K_unsigned
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
323 until, GN_KEYWORDS_1800_2009, K_until
324 until_with, GN_KEYWORDS_1800_2009, K_until_with
325 untyped, GN_KEYWORDS_1800_2009, K_untyped
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
326 use, GN_KEYWORDS_1364_2001_CONFIG, K_use
327 uwire, GN_KEYWORDS_1364_2005, K_uwire
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
328 var, GN_KEYWORDS_1800_2005, K_var
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
329 vectored, GN_KEYWORDS_1364_1995, K_vectored
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
330 virtual, GN_KEYWORDS_1800_2005, K_virtual
331 void, GN_KEYWORDS_1800_2005, K_void
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
332 wait, GN_KEYWORDS_1364_1995, K_wait
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
333 wait_order, GN_KEYWORDS_1800_2005, K_wait_order
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
334 wand, GN_KEYWORDS_1364_1995, K_wand
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
335 weak, GN_KEYWORDS_1800_2009, K_weak
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
336 weak0, GN_KEYWORDS_1364_1995, K_weak0
337 weak1, GN_KEYWORDS_1364_1995, K_weak1
338 while, GN_KEYWORDS_1364_1995, K_while
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
339 white_noise, GN_KEYWORDS_VAMS_2_3, K_white_noise
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
340 wildcard, GN_KEYWORDS_1800_2005, K_wildcard
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
341 wire, GN_KEYWORDS_1364_1995, K_wire
d4a97b4 @caryr Add a generation for 1800-2005, etc.
caryr authored
342 with, GN_KEYWORDS_1800_2005, K_with
343 within, GN_KEYWORDS_1800_2005, K_within
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
344 # This is the name originally proposed for uwire and is deprecated!
345 wone, GN_KEYWORDS_1364_2005, K_wone
346 wor, GN_KEYWORDS_1364_1995, K_wor
ee2d0c7 @caryr Make wreal an extra keyword in Icarus.
caryr authored
347 # This is defined by Verilog-AMS 2.3 and as an Icarus extension.
348 wreal, GN_KEYWORDS_VAMS_2_3|GN_KEYWORDS_ICARUS, K_wreal
ca7e64a @caryr Fix some keywords, add -g2001-noconfig and fix up uwire/wone.
caryr authored
349 xnor, GN_KEYWORDS_1364_1995, K_xnor
350 xor, GN_KEYWORDS_1364_1995, K_xor
634d47b @caryr Add all the Verilog-AMS 2.3.1 keywords.
caryr authored
351 zi_nd, GN_KEYWORDS_VAMS_2_3, K_zi_nd
352 zi_np, GN_KEYWORDS_VAMS_2_3, K_zi_np
353 zi_zd, GN_KEYWORDS_VAMS_2_3, K_zi_zd
354 zi_zp, GN_KEYWORDS_VAMS_2_3, K_zi_zp
6eef545 Support localparam.
steve authored
355 %%
356
149bfa0 @steveicarus Support for the begin_keywords directive.
authored
357 int lexor_keyword_mask = 0;
358
6eef545 Support localparam.
steve authored
359 int lexor_keyword_code(const char*str, unsigned nstr)
360 {
361 const struct lexor_keyword*rc = check_identifier(str, nstr);
362 if (rc == 0)
363 return IDENTIFIER;
0c29e54 @steveicarus Check ketwords against active keyword subset mask.
authored
364 else if ((rc->mask & lexor_keyword_mask) == 0)
365 return IDENTIFIER;
6eef545 Support localparam.
steve authored
366 else
367 return rc->tokenType;
368 }
Something went wrong with that request. Please try again.