Re: [Cocci] [PATCH 01/26] parsing_cocci: Add Function Prototype token

2020-03-19 Thread Julia Lawall
On Thu, 19 Mar 2020, Jaskaran Singh wrote: > On Thu, 2020-03-19 at 16:54 +0100, Julia Lawall wrote: > > > > On Thu, 19 Mar 2020, Jaskaran Singh wrote: > > > > > On Wed, 2020-03-18 at 18:25 +0100, Julia Lawall wrote: > > > > On Mon, 16 Mar 2020, Jaskaran Singh wrote: > > > > > > > > > To add

Re: [Cocci] [PATCH 01/26] parsing_cocci: Add Function Prototype token

2020-03-19 Thread Jaskaran Singh
On Thu, 2020-03-19 at 21:55 +0530, Jaskaran Singh wrote: > On Thu, 2020-03-19 at 16:54 +0100, Julia Lawall wrote: > > On Thu, 19 Mar 2020, Jaskaran Singh wrote: > > > > > On Wed, 2020-03-18 at 18:25 +0100, Julia Lawall wrote: > > > > On Mon, 16 Mar 2020, Jaskaran Singh wrote: > > > > > > > > >

Re: [Cocci] [PATCH 01/26] parsing_cocci: Add Function Prototype token

2020-03-19 Thread Jaskaran Singh
On Thu, 2020-03-19 at 16:54 +0100, Julia Lawall wrote: > > On Thu, 19 Mar 2020, Jaskaran Singh wrote: > > > On Wed, 2020-03-18 at 18:25 +0100, Julia Lawall wrote: > > > On Mon, 16 Mar 2020, Jaskaran Singh wrote: > > > > > > > To add the types ParenType and FunctionType to the SmPL AST, a > > >

Re: [Cocci] [PATCH 01/26] parsing_cocci: Add Function Prototype token

2020-03-19 Thread Julia Lawall
On Thu, 19 Mar 2020, Jaskaran Singh wrote: > On Wed, 2020-03-18 at 18:25 +0100, Julia Lawall wrote: > > > > On Mon, 16 Mar 2020, Jaskaran Singh wrote: > > > > > To add the types ParenType and FunctionType to the SmPL AST, a > > > reduce/reduce conflict with the funproto rule of the SmPL parser

Re: [Cocci] [PATCH 01/26] parsing_cocci: Add Function Prototype token

2020-03-19 Thread Jaskaran Singh
On Wed, 2020-03-18 at 18:25 +0100, Julia Lawall wrote: > > On Mon, 16 Mar 2020, Jaskaran Singh wrote: > > > To add the types ParenType and FunctionType to the SmPL AST, a > > reduce/reduce conflict with the funproto rule of the SmPL parser > > must be resolved. This requires explicitly

Re: [Cocci] [PATCH 01/26] parsing_cocci: Add Function Prototype token

2020-03-18 Thread Julia Lawall
On Mon, 16 Mar 2020, Jaskaran Singh wrote: > To add the types ParenType and FunctionType to the SmPL AST, a > reduce/reduce conflict with the funproto rule of the SmPL parser > must be resolved. This requires explicitly identifying a function > prototype by use of a token (TFunProto). > >

Re: [Cocci] [PATCH 01/26] parsing_cocci: Add Function Prototype token

2020-03-16 Thread Markus Elfring
> Thus, a slightly hacky approach is taken to determine a function > prototype with not the best certainty but what works for most cases > in SmPL. If the identifier is preceded by any token that does not > seem to be part of a type, then it is not identified as a function > prototype. Else, it

[Cocci] [PATCH 01/26] parsing_cocci: Add Function Prototype token

2020-03-16 Thread Jaskaran Singh
To add the types ParenType and FunctionType to the SmPL AST, a reduce/reduce conflict with the funproto rule of the SmPL parser must be resolved. This requires explicitly identifying a function prototype by use of a token (TFunProto). While the correct method of identifying a function prototype