This wasn't exactly my field, but I've seen enough of this stuff to draw some conclusions.
It starts with the name of the thing. That's usually a noun with maybe some descriptive words floowing. Like "CANNON, 20 MM" then there is a colon.
Then there is either an M which means the thing is standard or an XM which means it hasn't been accepted for production.
After that there is a number. The numbers seem to be random, but for the most part they are in sequential order. Sometimes they can cycle back to 1.
Finally there is an alpha numeric designation. A letter followed by a number. These designate modifications to the thing. "A" means it's an official modification. E means the modification is experimental. The number following is how many modifications have been done.
For example, the Army's first assault rifle was the Rifle, 5.56 MM: M16. When they first started to fix it, it became the Rifle, 5.56MM: M16E1 and when the fix was official, it was the Rifle, 5.56MM: M16A1. The next version with the heavier barrel, improved sights etc was the Rifle, 5.56MM M16A2.
The Grenade Launcher you are talking about is a seperate item. It goes on (actually under the barrel) of an M16 (there is another version for the M4) and I think it's officially and GRENADE LAUNCHER, 40MM: M203. It isn't a rifle - although the barrel is rifled. It might be LAUNCHER, GRENDADE, 40MM. I'm not sure. I think they try to lead with the noun so you know how to find it in a list.
When you see things that don't follow this, it's usually because it wasn't the Army alone that developed it. For example a MACHINE GUN, 40 MM: MK19 is a Navy designation. You'll also see AN (like AN PVS 14) which I think is the result of a Joint Army Navy effort.
Like I said, this wasn't my field. You probably need to ask logistics type person. But I think I'm pretty close.