** Language:
authorCoccinelle <cocci@diku.dk>
Sat, 13 Aug 2011 10:52:25 +0000 (12:52 +0200)
committerRene Rydhof Hansen <rrh@cs.aau.dk>
Sat, 13 Aug 2011 10:52:25 +0000 (12:52 +0200)
commit993936c04d73e4c97d0dc0910dbbef5f2c684c15
treeab2dfc0706fd3f44473e32080f6fec4de98c6919
parent5427db06e325c3c7c572e2e1ebe88a2fd211641c
** Language:
- Addition of initializer list metavariables.  Thanks to Michael Stefaniuc
  for noticing the need for them.
- Allow multiple position variables per token
- ++ can now be associated with - code
- Allow /* */ comments as smpl comments, not only as + code
- Add support for && (label addresses)
- local idexpression metavariable no longer matches static local x
- Consider using to be a comment in C++ code.  Patch submitted by Jani Monoses.
- Command line cocci
- print_main etc for ocaml Coccilib

** Features:
- Preserve spacing before // comments when not at the beginning of a line
- Adjusted parsing of endif to put it after jump code
- Improve warning message when using -use_cache
- More helpful initial value for exported variables in python
- Support - on expression nests
- Better handling of the case of a matched declaration that should only
  be replaced by other top level things.
- Allow a semantic patch beginning and ending with braces to match the
  complete body of a function if the braces are not removed and if nothing
  is added before the first brace or after the last one.
- Add -cache_prefix option, to specify where to put cached files.
- Allow module_init(foo); to match module_init(foo) (or likewise for any
  declarer), when no transformation is specified on the semicolon.
- Add Coccilib.exit() for ocaml code and cocci.exit() for python code,
  to abort the treatment of the current file.
- Don't multiply print the same patch for the same file
- Drop date in diff
- Don't repeat smpl type warnings
- -sp_file/-cocci_file are now optional.  If not present an argument that
  ends in .cocci is assumed to be the name of the file containing the
  semantic patch.

** Bugfix:
- Corrected parsing of script strings delimited by a single quote.  Thanks
  to Eugeniy Meshcheryakov for reporting the problem.
- Improved indentation of added ifdefs.
- Allow added comments and #ifdefs to precede other added code.  Thanks to
  Jani Monoses for noticing the problem.
- Corrected failure to due missing ocamlfind. Thanks to Derek M. Jones for
  reporting the problem.
- Allow fake nodes to be - in the allminus case, to drop tokens related to
  a function definition or forward declaration but before the first code
  mentioned in the semantic patch.
- Drop __init etc when deleting a whole function.
- Cause appropriate newlines to be preserved when multiple matches (trees)
  contain adjacent modifications derived from the same SmPL code.
- check_meta takes into account fresh identifier seed information.
- Types for worth-trying optimization should not be followed by space
- Improved filtering of result of matching atomic patterns
- Drop positions before creating function prototype rules
- Adjust position of { introduced by adding multiple statements in a
  single-statement position
- Drop newline after function call ( when all arguments on that line are
  eliminated
- Accept removal of a single declaration, replaced by arbitrary,
  non-declaration code
- smpl_spacing takes into account newlines, indentation
- Improved prevention of transformations on toplevel { ... } from causing
  changes outside function boundaries; also outside ifs, whiles, etc.
  Changes are still allowed on { ... } present for other reasons.
- Fix bug in include_match that caused everything to halt when all matches
  were discarded
- Don't call Insert_plus on rules that cannot be evaluated due to failed
  dependencies.
- Allow variable declaration right after a case in switch.
- The top of a loop is also after the body of a loop, for ... in loop body
- Do not anchor Str regexp at the beginning of the string to check
- Type annotation for C code uses most recent env for typedefs when
  possible.  Thanks to Andrea Canciani for pointing out the problem.
- Pretty print pointer types without a trailing space.  Thanks to Michael
  Stefaniuc for pointing out the problem.
64 files changed:
Makefile
changes.txt
cocci.ml
commons/Makefile
commons/common.ml
configure
demos/pcre.c [new file with mode: 0644]
demos/pcre.cocci [new file with mode: 0644]
demos/pcre2.c [new file with mode: 0644]
demos/pcre2.cocci [new file with mode: 0644]
demos/regexp.cocci
demos/sgrep/run.sh
docs/Coccilib.3cocci
docs/manual/cocci_syntax.tex
docs/manual/macros.tex
docs/manual/main_grammar.pdf
docs/manual/manual.pdf
docs/manual/options.pdf
docs/manual/spatch_options.tex
engine/asttoctl2.ml
engine/cocci_vs_c.ml
engine/transformation_c.ml
flag_cocci.ml
globals/Makefile
globals/config.ml.in
globals/regexp.ml [new symlink]
globals/regexp_pcre.ml [new file with mode: 0644]
globals/regexp_str.ml [new file with mode: 0644]
main.ml
ocaml/Makefile
ocaml/Makefile.doc [new file with mode: 0644]
ocaml/coccilib.ml
ocaml/coccilib.mli
ocaml/yes_prepare_ocamlcocci.ml
parsing_c/cpp_analysis_c.ml
parsing_c/cpp_token_c.ml
parsing_c/lib_parsing_c.ml
parsing_c/parse_c.ml
parsing_c/parser_c.mly
parsing_c/parsing_hacks.ml
parsing_c/type_annoter_c.ml
parsing_c/unparse_c.ml
parsing_c/unparse_cocci.ml
parsing_c/unparse_cocci.mli
parsing_c/unparse_hrule.ml
parsing_cocci/Makefile
parsing_cocci/ast0_cocci.ml
parsing_cocci/ast_cocci.ml
parsing_cocci/ast_cocci.mli
parsing_cocci/command_line.ml [new file with mode: 0644]
parsing_cocci/command_line.mli [new file with mode: 0644]
parsing_cocci/context_neg.ml
parsing_cocci/flag_parsing_cocci.ml
parsing_cocci/lexer_cli.mll [new file with mode: 0644]
parsing_cocci/parse_cocci.ml
parsing_cocci/parser_cocci_menhir.ml
parsing_cocci/parser_cocci_menhir.mly
python/coccilib/org.py
tests/SCORE_expected.sexp
tests/SCORE_expected_orig.sexp
tests/regexp.cocci
tests/starprint.c [new file with mode: 0644]
tests/starprint.cocci [new file with mode: 0644]
tests/starprint.res [new file with mode: 0644]