[20110219] pfffについて

3,944 views

Published on

Python Hackathon 2011.02で発表したpfffの紹介。この時点ではまだバグが多いですが有用なツールだと思います。

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,944
On SlideShare
0
From Embeds
0
Number of Embeds
984
Actions
Shares
0
Downloads
6
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

[20110219] pfffについて

  1. 1. 1  
  2. 2. • • •  – •  – 
  3. 3.  
  4. 4. • • • 
  5. 5. • • • • • 
  6. 6. •  • •  • •  • •  • •  • •  • •  • •  • 
  7. 7. •  • •  • •  • •  • •  • •  • •  • •  • 
  8. 8. •  • •  • •  • •  • •  • •  • •  • •  • 
  9. 9. • • • • • • • 
  10. 10. • •  $ pfff -parse_php <dir or file>  
  11. 11. • •  $ sgrep -e ‘strstr(...) == false’ *.php   $ find . name *.php | xargs grep ‘strstr(...) == false’    
  12. 12. •  $ sgrep -e ‘foo(.*, 1, .*)’ *.php   $hoge  =  $a-­‐>foo($spam,  1,  $egg) //       $hoge  =  $a-­‐>foo($spam,                                    //   OK                                                                1,                                                                $egg)  
  13. 13. • •  //remove_second_arg_foo.spatch foo(X -  ,Y ) //  remove_second_arg_foo_alt.spatch   -­‐        foo(X,Y)   +      foo(X)  
  14. 14. •  $ spatch -c <patch> *.php  
  15. 15. • • 
  16. 16. •  function foo($avar) { return $avarr; } $  scheck  test.php   demos/scheck.php:4:9:  CHECK:  use  of  undefined  variable  $avarr   demos/scheck.php:3:13:  CHECK:  unused  Param  variable  $avar  
  17. 17. • • •  – 
  18. 18. Linux  2.6  
  19. 19. Android  
  20. 20. • •  – 
  21. 21. • •  –  lang_xxx/parsing/lexer_xxx.mll•  –  lang_xxx/parsing/ast_xxx.ml•  –  lang_xxx/parsing/ast_xxx.ml
  22. 22. • • • • 

×