From 4cd2f03e36d09f936d39f8499e26fb0a2bc897f9 Mon Sep 17 00:00:00 2001 From: Thomas Sailer Date: Wed, 25 Aug 2021 21:34:26 +0200 Subject: preprocessor: do not destroy double slash escaped identifiers The preprocessor currently destroys double slash containing escaped identifiers (for example \a//b ). This is due to next_token trying to convert single line comments (//) into /* */ comments. This then leads to an unintuitive error message like this: ERROR: syntax error, unexpected '*' This patch fixes the error by recognizing escaped identifiers and returning them as single token. It also adds a testcase. --- tests/verilog/doubleslash.ys | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/verilog/doubleslash.ys (limited to 'tests/verilog/doubleslash.ys') diff --git a/tests/verilog/doubleslash.ys b/tests/verilog/doubleslash.ys new file mode 100644 index 000000000..8a51f12c2 --- /dev/null +++ b/tests/verilog/doubleslash.ys @@ -0,0 +1,19 @@ +read_verilog -sv <