From mboxrd@z Thu Jan 1 00:00:00 1970 From: elfring@users.sourceforge.net (SF Markus Elfring) Date: Mon, 18 Aug 2014 13:31:45 +0200 Subject: [Cocci] cocci: char* indexing style for linux In-Reply-To: References: <1408219616.2683.101.camel@joe-AO725> <1408222763.2683.107.camel@joe-AO725> <1408280475.17489.4.camel@joe-AO725> <53F0D3CB.4000803@users.sourceforge.net> <1408292542.17489.11.camel@joe-AO725> <53F1BB55.8080008@metafoo.de> Message-ID: <53F1E421.5000408@users.sourceforge.net> To: cocci@systeme.lip6.fr List-Id: cocci@systeme.lip6.fr >> I think for these kinds of problems it would be helpful to have a metavariable >> type that is somewhere in the middle of idexpression and expression. Something >> that matches an identifier or accessing a field in an identifier, or a field >> of a field of an identifier and so on. >> >> In the past I had cocci scripts where I ended up doing >> >> ( >> id->fld1 >> | >> id->fld1.fld2 >> | >> id->fld1.fld2.fld3 >> ... >> ) >> >> to kind of make this work. > It's probably true, But I don't know what one would call it, and I think > that if one had a name for it, no one would understand it... Do you dare to suggest another type name for a metavariable in the semantic patch language? Regards, Markus