Here's a complete Parrying system:
Parrying:
Parry [Attack-equivalent action, AoO: No]
    To use the Parry action, the character simply picks an opponent and chooses to Parry instead of making any attack to which he might otherwise be entitled to make against that opponent. The Parrying character makes a normal attack roll - if the result is higher than his AC, that opponent's next attack must go against the higher AC. You can roll several parries against the same opponent (if you are entitled to multiple attacks) if you are afraid he'll make multiple attacks before your next action, or you can use some attacks offensively and others to Parry. The Parry only affects an attack made before your initiative, next round.
    Parrying requires that you have a weapon in hand (or, if unarmed, are facing an unarmed opponent, or have Improved Unarmed Strike) or a shield. If you use a Shield to parry, add it's AC bonus to your Parry check, instead of to your normal AC.
    Parrying while Fighting Defensively, using Total Defense, Dodging, or using Expertise: If you use any of the above options on a round that you Parry, you can add the AC bonus to either your AC or your Parry rolls that round. You may not use the Fighting Defensively or Expertise modifiers unless you make at least one offensive attack roll that round.
Related Feats:
Improved Parry:
    You are skilled at fencing, swordplay and shield use and can keep opponents from hitting you - as often.
    Prerequisites: INT 13+, BAB 1+
    Benefits: When you perform a Parry, the improved AC counts for all attacks the designated opponent makes for the balance of the round.
    Normally: A successful Parry only replaces AC against the next attack that opponent makes.
    Special: Improved Parry can replace Expertise as a prerequisite for other Feats.
Improved Shield Parry
    You are good at blocking attacks with a shield, while keeping your shield close enough to protect you from other attacks.
    Prerequisites: Shield Proficiency
    Benefits: When you Parry with a shield, you do not lose the shield's bonus to your normal AC.
    Normally: Your shield's bonus does not add to your normal AC on a round that you use it to Parry.
Reflexive Parry
    With luck and skill you can knock aside a blow that would otherwise have struck home.
    Prerequisites: DEX 15+, BAB 4+, plus either Improved Parry or Combat Reflexes
    Benefits: You can make a Parry attempt /after/ an attack has hit you. If the result is higher than the AC hit by the attack, it misses after all. Subsequent attacks that round are not affected, even if you have Improved Parry or Multiple Circle Parry. The Reflexive Parry counts as your attack of opportunity for the round.
    Special: If you have Combat Reflexes, the Reflexive Parry counts as one of your AoOs for the round - so you cannot make an AoO (including Riposte or another Reflexive Parry) against the same opponent that round.
Multiple Circle Parry
    You are skilled in making spectacular sweeping parries with which you contemptuously knock aside the blades of lesser foes.
    Prerequisite: Improved Parry, Dodge, Mobility, BAB 6+
    Benefits: When you attempt a Parry, the result of the check can substitute for your AC vs all opponents who attack you in melee that round.
    Normally: Each Parry check applies to only one opponent.
Riposte:
    You can follow up on the slightest opening left by an opponent whose attacks you parry.
    Prerequisites: Expertise or Improved Parry
    Benefits: When an opponent misses your Parry AC, or misses you because of your AC bonus from Expertise or Fighting Defensively, you may make an attack of opportunity. Attackers who are Fighting Defensively or using Expertise, themselves, do not provoke Ripostes.
    Special: A Riposte counts as your Attack of Opportunity for the round in which it is used. Remember that you cannot make two AoO's on the same target, on the same round, even if you have Combat Reflexes.