This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Those pesky incomprehensible if statements



zackw@stanford.edu said:
> But I still had to stare at it for, oh, thirty seconds before I could
> see what it does, because it's buried under all the verbiage.  And I
> said to myself, what we need here is some syntactic sugar.  Something
> like

>   if (match_p (set, '(set (stack_pointer_rtx) 
> 			  (plus (stack_pointer_rtx) (const_int)))))

> Isn't that so much easier to read?

> Of course, I have not the slightest notion how to implement such a
> thing such that the minilanguage has a sensible grammar and the
> implementation doesn't slow the compiler to a crawl. 

Um, um... A special preprocessor ;-)
Ugly... definitely, but clearly an improved readability !!!
Of course, the sensible grammar problem remains...



--------------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
 --------------------------------------------------------------------

-- 
--------------------------------------------------------------------------------
	Theodore Papadopoulo (papadop@sophia.inria.fr)

   Projet Robotvis, INRIA - Sophia Antipolis,
   2004, route des Lucioles, BP 93, 06902 Sophia Antipolis Cedex -- FRANCE
   Phone: (33) 04 92 38 76 01, Fax: (33) 04 92 38 78 45
--------------------------------------------------------------------------------


PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]