Noob Leg Lock Question

I have very little experience with leg locks and rarely expect them (which is a mistake) so I have what I imagine is a relativly noobish question to ask of you with more experience. I was rolling (nogi) the other day and I was playing guard and my opponent managed to break my guard and stand (i did not have control of an arm or yeah anything.....). He went for an achilles lock and as he sat back I hooked his head and came up standing and he had his feet triangled around the leg he was attacking and i endup up tapping which was I was unhappy about for a variety of reasons.......but more to the point what are the best ways for me to escape this position. I feel like I need to attack the triangle around my legs?
Thnx

Thats me on the bottom (my kingdom for a heel hook, toe hold, or kneebar. Stupid rules). I was unable to get the proper leverage due to the guy on top keeping his foot flat on the ground and his base stable. An anckle lock works by extending the foot past it's normal range of motion, causing the ligaments and tendons to stretch and/or tear and possibly dislocating or breaking the ankle.

If you can keep your foot flexed and the blade of his forearm away from your lower ankle then you've got some time to get out and in a better position. If in the same situation again keep your foot flat and base yourself so you don't get swept. Using one hand grab a hold behind his head or his lapel. This keeps him from geting the proper leverage to submit you. With your other hand try to unravel his triangle on your leg or attack them for your own leglock.

The position requires a little more description. The 'figure 4' that he had on - The 'crossing' part of his lock - did it come from the outside to the inside. Because if it did, and he had his OTHER leg going under you you did the right thing by tapping. Your **** could have gotten wrecked.

But if the 'crossing leg' went from the inside to the outside you could have simply unfolded his legs and stepped out or sat down on him.