Author Topic: Mozilla's Pork  (Read 9605 times)

Offline drac

  • Multiple posting newcomer
  • *
  • Posts: 27
Mozilla's Pork
« on: June 04, 2009, 06:43:58 pm »
Hi,

A quick search after "Pork" returned no results, so I thought I might post about it here:

Quote
Pork is a C++ parsing and rewriting tool chain. The core of Pork is a C++ parser that provides exact character positions for the start and end of every AST node, as well as the set of macro expansions that contain any location. This information allows C++ to be automatically rewritten in a precise way. The inputs driving the rewriting would normally be provided by a program-analysis system outside of Pork. (See Dehydra, Treehydra).

Pork is based on the Elkhound/Elsa/Oink tool chain, and the MCPP preprocessor.


http://blog.mozilla.com/tglek/ is also interesting.

Having refactoring in Code::Blocks would be very, very nice.

Cheers!

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Mozilla's Pork
« Reply #1 on: June 04, 2009, 07:24:16 pm »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.