Thanks, So, what's the difference between 'statement' and 'expression'? I guess statement means a complete line in c code, such as 's = socket(...);' while expression means an incomplete part, e.g. right hand of operator, 'socket(inet, 0, 0, 0)' ?
-----邮件原件----- 发件人: Julia Lawall [mailto:[email protected]] 发送时间: 2014年2月18日 15:35 收件人: 林嘉(程二 福州) 抄送: [email protected] 主题: Re: [Cocci] 答复: what is the function of 'position' in SMPL On Tue, 18 Feb 2014, 林嘉(程二 福州) wrote: > Thank to all > > What the differentce among 'Identifier declaration statement' in > metavariable portion? > I just guess they all can be used to express a name of variable or > function An identifier can be used to express the name of a variable, a function, a field, the name of a structure, the name of an enum, the name of a #define, etc. julia > > For example: > > @@ > Identifier a; or declaration a;? > @@ > ........... > > > > -----邮件原件----- > 发件人: Peter Senna Tschudin [mailto:[email protected]] > 发送时间: 2014年2月17日 21:35 > 收件人: 林嘉(程二 福州) > 抄送: [email protected] > 主题: Re: [Cocci] what is the function of 'position' in SMPL > > p is a position metavariable. It is useful when you want to print line and > column numbers of interesting parts. > > The @p means that the position of what matches to 'i' will be saved into p. > > There is some information available at: > http://coccinelle.lip6.fr/docs/main_grammar.pdf > > On Mon, Feb 17, 2014 at 6:45 AM, 林嘉(程二 福州) <[email protected]> wrote: > > e.g. in find_unsigned.cocci > > > > @u@ type T; unsigned T i; position p; @@ i@p < 0 > > > > > > what is the difference with > > > > @u@ type T; unsigned T i; @@ > > i < 0 > > > > > > and what is the meaning of operator '@' ahead 'p'? > > > > _______________________________________________ > > Cocci mailing list > > [email protected] > > https://systeme.lip6.fr/mailman/listinfo/cocci > > > > -- > Peter > _______________________________________________ > Cocci mailing list > [email protected] > https://systeme.lip6.fr/mailman/listinfo/cocci > _______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
