public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Ben Elliston <bje@redhat.com>
To: cgen@sources.redhat.com
Subject: Patch for parse error in operand scanning
Date: Tue, 20 Mar 2001 20:39:00 -0000	[thread overview]
Message-ID: <15032.12410.802034.620460@scooby.apac.redhat.com> (raw)

This patch has been tested and is self-documenting. :-) Okay to
commit?


2001-03-21  Ben Elliston  <bje@redhat.com>

	* opc-itab.scm (compute-syntax): Emit a parse error if an operand
	name is empty or invalid -- eg. "$(rs)" instead of "($rs)".

Index: opc-itab.scm
===================================================================
RCS file: /cvs/cvsfiles/devo/cgen/opc-itab.scm,v
retrieving revision 1.21
diff -u -c -r1.21 opc-itab.scm
*** opc-itab.scm	2001/03/20 19:49:10	1.21
--- opc-itab.scm	2001/03/21 04:37:59
***************
*** 162,167 ****
--- 162,169 ----
  						  (substring syn 2 n)))
  						"), ")))))
  		 (let ((n (id-len (string-drop1 syn))))
+ 		   (if (= n 0)
+ 		       (parse-error context "empty or invalid operand name" syntax))
  		   (loop (string-drop (1+ n) syn)
  			 (string-append result op-macro " ("
  					(string-upcase

                 reply	other threads:[~2001-03-20 20:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=15032.12410.802034.620460@scooby.apac.redhat.com \
    --to=bje@redhat.com \
    --cc=cgen@sources.redhat.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).