all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philipp Stephani <phst@google.com>
To: Kaushal Modi <kaushal.modi@gmail.com>,
	Eli Zaretskii <eliz@gnu.org>,
	emacs-devel@gnu.org, "wsnyder@wsnyder.org" <wsnyder@wsnyder.org>
Subject: Re: Help fix unescaped character literals detected warnings in verilog-mode (Was: Re: "unescaped character literals detected")
Date: Fri, 05 May 2017 20:02:18 +0000	[thread overview]
Message-ID: <CAP-RRPupp3vnWsmcr2Yjf2P=shFF3jiGUcBzHYV+0dmkN4-1jQ@mail.gmail.com> (raw)
In-Reply-To: <CAFyQvY2hxtWiJVHPstuHit5pEohuenRdpUy6MKPB_Py=kF9Muw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3794 bytes --]

Kaushal Modi <kaushal.modi@gmail.com> schrieb am Fr., 5. Mai 2017, 22:00:

> On Fri, May 5, 2017 at 3:49 PM Kaushal Modi <kaushal.modi@gmail.com>
> wrote:
>
>> verilog-mode.el has 14.5k lines. It would be very helpful to print the
>> line number where unescapted character literals are detected so that I can
>> attempt to fix it.
>>
>
> A quick followup:
>
> I byte-compiled verilog-mode.el, and it throws these warnings:
>
> verilog-mode.el:14003:1:Warning: unescaped character literals ; detected!
> verilog-mode.el:14013:1:Warning: unescaped character literals ; detected!
> verilog-mode.el:14205:1:Warning: unescaped character literals ; detected!
>
> I believe that the compiler does not like lines like
>
> > "task " '(verilog-sk-prompt-name) & ?; \n
>
> Changing that to the below fixes the warning:
>
> > "task " '(verilog-sk-prompt-name) & \?; \n
>
>
> But I am not familiar with the define-skeleton syntax. Does anyone know if
> changing "?" to "\?" in the below 3 instances of skeleton definitions would
> be fine?
>

You should change it to ?\;
I.e. escape the ; not the ?


> On line 14003, there is:
>
> (define-skeleton verilog-sk-task
>   "Insert a task definition."
>   ()
>   > "task " '(verilog-sk-prompt-name) & ?; \n
>   > _ \n
>   > "begin" \n
>   > \n
>   > (- verilog-indent-level-behavioral) "end" \n
>   > (- verilog-indent-level-behavioral) "endtask" (progn
> (electric-verilog-terminate-line) nil))
>
> On line 14013, there is:
>
> (define-skeleton verilog-sk-function
>   "Insert a function definition."
>   ()
>   > "function [" '(verilog-sk-prompt-width) | -1 '(verilog-sk-prompt-name)
> ?; \n
>   > _ \n
>   > "begin" \n
>   > \n
>   > (- verilog-indent-level-behavioral) "end" \n
>   > (- verilog-indent-level-behavioral) "endfunction" (progn
> (electric-verilog-terminate-line) nil))
>
> On line 14205, there is:
>
> (define-skeleton verilog-sk-state-machine
>   "Insert a state machine definition."
>   "Name of state variable: "
>   '(setq input "state")
>   > "// State registers for " str | -23 \n
>   '(setq verilog-sk-state str)
>   > "reg [" '(verilog-sk-prompt-width) | -1 verilog-sk-state ", next_"
> verilog-sk-state ?; \n
>   '(setq input nil)
>   > \n
>   > "// State FF for " verilog-sk-state \n
>   > "always @ ( " (read-string "clock:" "posedge clk") " or "
> (verilog-sk-prompt-reset) " ) begin" \n
>   > "if ( " verilog-sk-reset " ) " verilog-sk-state " = 0; else" \n
>   > verilog-sk-state " = next_" verilog-sk-state ?; \n
>   > (- verilog-indent-level-behavioral) "end" (progn
> (electric-verilog-terminate-line) nil)
>   > \n
>   > "// Next State Logic for " verilog-sk-state \n
>   > "always @ ( /*AUTOSENSE*/ ) begin\n"
>   > "case (" '(verilog-sk-prompt-state-selector) ") " \n
>   > ("case selector: " str ": begin" \n > "next_" verilog-sk-state " = " _
> ";" \n > (- verilog-indent-level-behavioral) "end" \n )
>   resume: >  (- verilog-case-indent) "endcase" (progn
> (electric-verilog-terminate-line) nil)
>   > (- verilog-indent-level-behavioral) "end" (progn
> (electric-verilog-terminate-line) nil))
>
> --
>
> Kaushal Modi
>
-- 

Google Germany GmbH
Erika-Mann-Straße 33
80636 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle

Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind,
leiten Sie diese bitte nicht weiter, informieren Sie den Absender und
löschen Sie die E-Mail und alle Anhänge. Vielen Dank.

This e-mail is confidential. If you are not the right addressee please do
not forward it, please inform the sender, and please erase this e-mail
including any attachments. Thanks.

[-- Attachment #2: Type: text/html, Size: 6114 bytes --]

  reply	other threads:[~2017-05-05 20:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-04 14:38 "unescaped character literals detected" Eli Zaretskii
2017-05-05 19:49 ` Kaushal Modi
2017-05-05 20:00   ` Help fix unescaped character literals detected warnings in verilog-mode (Was: Re: "unescaped character literals detected") Kaushal Modi
2017-05-05 20:02     ` Philipp Stephani [this message]
2017-05-05 20:14       ` Kaushal Modi
2017-05-05 21:35         ` Philipp Stephani
2017-05-07 12:36           ` Philipp Stephani
2017-05-07 12:48             ` Kaushal Modi
2017-05-07 16:36             ` Eli Zaretskii
2017-05-05 20:33     ` Help fix unescaped character literals detected warnings in verilog-mode Stefan Monnier
2017-05-06 22:44       ` Richard Stallman
2017-05-13 10:31         ` Philipp Stephani
2017-05-05 20:04   ` "unescaped character literals detected" Philipp Stephani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAP-RRPupp3vnWsmcr2Yjf2P=shFF3jiGUcBzHYV+0dmkN4-1jQ@mail.gmail.com' \
    --to=phst@google.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=kaushal.modi@gmail.com \
    --cc=wsnyder@wsnyder.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.