File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
regression/verilog/preprocessor Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 13
13
14
14
x-y-z
15
15
x-y-value
16
+ moo-foo-bar
16
17
^EXIT=0$
17
18
^SIGNAL=0$
18
19
--
Original file line number Diff line number Diff line change 7
7
`define with_parameter(a, b, c) a- b- c
8
8
`with_parameter(x , y, z )
9
9
`with_parameter(x , y, `with_value)
10
+ `with_parameter (moo, foo, bar)
11
+ `define no_parameter (1 + 2 )
12
+ `no_parameter
Original file line number Diff line number Diff line change @@ -281,6 +281,9 @@ auto verilog_preprocessort::parse_define_arguments(const definet &define)
281
281
if (define.parameters .empty ())
282
282
return {};
283
283
284
+ // skip whitespace
285
+ tokenizer ().skip_ws ();
286
+
284
287
if (tokenizer ().next_token () != ' (' )
285
288
throw verilog_preprocessor_errort () << " expecting define arguments" ;
286
289
@@ -366,11 +369,10 @@ void verilog_preprocessort::directive()
366
369
auto &identifier = identifier_token.text ;
367
370
auto &define = defines[identifier];
368
371
369
- // skip whitespace
370
- tokenizer ().skip_ws ();
371
-
372
372
// Is there a parameter list?
373
373
// These have been introduced in Verilog 2001.
374
+ // 1800-2017: "The left parenthesis shall follow the text macro name
375
+ // immediately, with no space in between."
374
376
if (tokenizer ().peek () == ' (' )
375
377
define.parameters = parse_define_parameters ();
376
378
You can’t perform that action at this time.
0 commit comments