This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Those pesky incomprehensible if statements
- To: "Zack Weinberg" <zackw at stanford dot edu>
- Subject: Re: Those pesky incomprehensible if statements
- From: Theodore Papadopoulo <Theodore dot Papadopoulo at sophia dot inria dot fr>
- Date: Mon, 19 Feb 2001 20:48:40 +0100
- Cc: gcc at gcc dot gnu dot org
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