lp:coccinelle

Created by Nicolas Palix on 2010-12-14 and last modified on 2021-04-03
Get this branch:
bzr branch lp:coccinelle

Related bugs

Related blueprints

Branch information

Owner:
Nicolas Palix
Project:
Coccinelle
Status:
Development

Import details

Import Status: Reviewed

This branch is an import of the HEAD branch of the Git repository at git://github.com/coccinelle/coccinelle.git.

The next import is scheduled to run in 2 hours.

Last successful import was 3 hours ago.

Import started 3 hours ago on alnitak and finished 3 hours ago taking 15 seconds — see the log
Import started 9 hours ago on izar and finished 9 hours ago taking 10 seconds — see the log
Import started 15 hours ago on izar and finished 15 hours ago taking 10 seconds — see the log
Import started 21 hours ago on izar and finished 21 hours ago taking 10 seconds — see the log
Import started on 2021-04-19 on alnitak and finished on 2021-04-19 taking 15 seconds — see the log
Import started on 2021-04-19 on alnitak and finished on 2021-04-19 taking 15 seconds — see the log
Import started on 2021-04-19 on alnitak and finished on 2021-04-19 taking 15 seconds — see the log
Import started on 2021-04-19 on izar and finished on 2021-04-19 taking 10 seconds — see the log
Import started on 2021-04-18 on alnitak and finished on 2021-04-18 taking 15 seconds — see the log
Import started on 2021-04-18 on izar and finished on 2021-04-18 taking 10 seconds — see the log

Recent revisions

4993. By Keisuke Nishimura <email address hidden> on 2021-04-03

parsing_cocci: ast0: Add support for __attribute__ with one argument

This series adds support for __attribute__ with one argument.

Current Coccinelle is having a problem with attrs and endattrs in C
parser.
Here is an example of AST for C.
 #1
struct { int i;} __attr;

attrs = []
endattrs = [ __attr]

 #2
struct { int i;} __attribute__((pack));

attrs = [__attribute__((pack))]
endattrs = []

__attribute__((pack)) in #2 should be interpreted as attrs.

This problem results from the implementation of parsing_c/parser_c.mly
and parsing_c/parsing_hacks.ml.

The current implementation in parsing_hacks.ml only checks the next
couple of tokens and whether it can match some regular expressions to
replace a specific token type for another token type. (e.g. regarding
endattrs, Coccinelle will check "^__.*$" and whether the next token is
";" or "=" etc..., and replace TIdent for TMacroEndAttr).
And parser_c.mly attempt to create AST based on the token processed
by parsing_hacks.ml.

To solve this problem, the algorithm used in current parsing_hacks.ml
needs to be revised totally. Maybe we can also solve it by changing
parser_c.mly. But it requires more complex works and a lot of time.

Signed-off-by: Keisuke Nishimura <email address hidden>

4992. By Keisuke Nishimura <email address hidden> on 2021-03-18

parsing_cocci: ast0: Make Attibute in SmPL's AST more general

This patch changes the structure of 'Attribute'. In order to
support __attribute__ later, the current Attribute needs to be
refactored into a more general structure.

SmPL's ast structure(current):
__foo => Attribute( __foo) or MetaAttribute (__foo)

SmPL's ast structure(proposed):
__foo => Attribute( AttrName (__foo) ) or Attribute( MetaAttr (__foo) )

C's ast structure(current):
foo => Attribute( foo )

C's ast structure(proposed):
foo => Attribute( AttrName(foo) )

Signed-off-by: Keisuke Nishimura <email address hidden>

4991. By Julia Lawall <email address hidden> on 2021-03-06

fix typo

Reported-by: Markus Elfring <email address hidden>

4990. By Julia Lawall on 2021-03-03

format_to_string always adds a newline, so no need for one here

4989. By Julia Lawall on 2021-03-03

no format printing here so no need for format newline

4988. By Thierry Martinez <email address hidden> on 2021-03-02

Update stdcompat for OCaml 4.12

4987. By Corentin De Souza <email address hidden> on 2021-02-25

Release 1.1.0

4986. By Julia Lawall <email address hidden> on 2021-02-19

test cases for the fix allowing a dot in a function name

4985. By Jaskaran Singh <email address hidden> on 2021-02-19

parsing_cocci: parse_cocci: Add TDot to is_permissible_proto

Add TDot to the match ladder in is_permissible_proto. Fixes GitHub
issue #254.

Reported by Luca Weiss

Signed-off-by: Jaskaran Singh <email address hidden>

4984. By Julia Lawall on 2021-02-01

Simplify constraints on dots that end with an expression

There was originally an idea that a sequence of statements should not
end with an expression. But this is often useful to do, which then
required putting ... when any after the expression. This is probably
undexpected for users, so just drop the constraint.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers