This one should be fairly easy. If we "downsize" a purple worm to Large, we get the following...
Large Magical Beast
Hit Dice: 9d10+27 (76 hp)
Initiative: –1
Speed: 20 ft. (4 squares), burrow 20 ft., swim 10 ft.
Armor Class: 16 (–1 size, –1 Dex, +8 natural), touch 8, flat-footed 16
Base Attack/Grapple: +9/+17
Attack: Bite +12 melee (1d8+4)
Full Attack: Bite +12 melee (1d8+4) and sting +7 melee (1d6+2 plus poison)
Space/Reach: 10 ft./5 ft.
Special Attacks: Improved grab, swallow whole, poison
Special Qualities: Tremorsense 60 ft.
Saves: Fort +9, Ref +5, Will +3
Abilities: Str 19, Dex 8, Con 17, Int 1, Wis 8, Cha 8
Skills: Listen +11, Swim +12
Feats: Cleave, Improved Bull Rush, Power Attack, Weapon Focus (bite), Weapon Focus (sting) [It must lose one of these]
Environment: Underground
Organization: Solitary
Challenge Rating: X
Treasure: No coins, 50% goods (stone only), no items
Alignment: Always neutral
Advancement: 10–27 HD (Huge)
Level Adjustment: --
Improved Grab (Ex): To use this ability, a chomper must hit with its bite attack. It can then attempt to start a grapple as a free action without provoking an attack of opportunity. If it wins the grapple check, it establishes a hold and can attempt to swallow the foe the following round.
Poison (Ex): Injury, Fortitude DC 17, initial damage paralysis for X, secondary damage paralysis for X. The save DC is Constitution-based. [2-12 turns was a long time]
Swallow Whole (Ex): A chomper can try to swallow a grabbed opponent of a smaller size than itself by making a successful grapple check. Once inside, the opponent takes 1d8+4 points of crushing damage plus 8 points of acid damage per round from the worm’s gizzard. A swallowed creature can cut its way out by using a light slashing or piercing weapon to deal 25 points of damage to the gizzard (AC 14). Once the creature exits, muscular action closes the hole; another swallowed opponent must cut its own way out. A Large chomper's interior can hold 2 Small, 8 Tiny, or 32 Diminutive or smaller opponents. [We should probably lessen the acid damage and the amount of damage to cut out]
Skills: A chomper has a +8 racial bonus on any Swim check to perform some special action or avoid a hazard. It can always choose to take 10 on a Swim check, even if distracted or endangered. It can use the run action while swimming, provided it swims in a straight line.