public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* Patch for parse error in operand scanning
@ 2001-03-20 20:39 Ben Elliston
  0 siblings, 0 replies; only message in thread
From: Ben Elliston @ 2001-03-20 20:39 UTC (permalink / raw)
  To: cgen

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-03-20 20:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-20 20:39 Patch for parse error in operand scanning Ben Elliston

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).