This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH][RFC] Automatized pattern matching


Hello,

> > I want to keep the syntax independent on whitespace. I don't like that
> > there would be a fundamental semantical difference between
> >
> > (const (plus @base const_int@1))
> >
> > and
> >
> > (const (plus@base const_int@1))
> 
> Mm, but your syntax is unavoidably dependent on whitespace
> anyway... the S-expression notation forces it.

the only place where indeed spaces are meaningful is difference
between [5...] and [ 5...].  Given that you almost never really want
to use the later form, I may simply issue a warning if it occurs (and
if programmer is sure he's doing whatever he wants, he may put the
expressions into parentheses to avoid this).  Considering this and
relative elegancy of MATCH_RTX ("(plus $1 [1])") in comparison with
MATCH_RTX ("(plus $1 [_match1])") I have decided to add this special
case to the grammar. I don't see any such justification for what you
propose.

Zdenek


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