It is the larvae of some type of beetle. We get them all the time in Mesquite, Walnut, Pecan and Sycamore. I had a worm the size of my thumb before. Would go out in the shop at night and could hear them eating. Telltale sign is a small pile of dust under the wood after it has been sitting.