Skip to content

Issue when using \ followed by " #1831

Open
@LapinFou

Description

@LapinFou

Hi folks,

I encountered an issue when using AUTO features with the following Verilog code.

Updating AUTOs...
verilog-modi-current: Search failed: "\\<\\(end\\(?:c\\(?:lass\\|on\\(?:fig\\|nectmodule\\)\\)\\|interface\\|module\\|p\\(?:ackage\\|r\\(?:imitive\\|ogram\\)\\)\\)\\)\\>"

After some investigation, I found the problematic line (see below).

   task tbPassed;
      begin
           begin
              $display("\n                  xx");
              $display("                xxx    _____         _____ _____");
              $display("              xxxx    |  __ \\ /\\    / ____/ ____|");
              $display("            xxxxx     | |__) /  \\  | (___| (___");
              $display("  xxx     xxxxxx      |  ___/ /\\ \\  \\___ \\\\___ \\"); // Generate error -> "verilog-modi-current: Search failed [...]"
              $display("  xxxx  xxxxxx        | |  / ____ \\ ____) |___) |");
              $display("    xxxxxxxx          |_| /_/    \\_\\_____/_____/");
              $display("      xxxx");
          end
      end
   endtask

If I add a space before the final " (\\ ") instead of \\")), then it does work.
Please see the corrected code below:

   task tbPassed;
      begin
           begin
              $display("\n                  xx");
              $display("                xxx    _____         _____ _____");
              $display("              xxxx    |  __ \\ /\\    / ____/ ____|");
              $display("            xxxxx     | |__) /  \\  | (___| (___");
              $display("  xxx     xxxxxx      |  ___/ /\\ \\  \\___ \\\\___ \\ "); // This i OK
              $display("  xxxx  xxxxxx        | |  / ____ \\ ____) |___) |");
              $display("    xxxxxxxx          |_| /_/    \\_\\_____/_____/");
              $display("      xxxx");
          end
      end
   endtask

I'm using the Verilog mode version 2023.06.06.141322628 with GNU Emacs 28.2 on Linux (RHEL7).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions