The phrase "all the way" appears to be a modified noun. "the" is a definite article (determiner) introducing a noun. "all" is a predeterminer informing us of the quantity of the following noun. However, this noun phrase most often functions as an adverb.

As in: He ran all the way... They fought all the way... and I have not been able to include this expression in a sentence diagram. I read in one source that the expression is an idiom - which is defined there as a group of words which cannot be understood by applying standard grammar rules. This phrase, by itself, seems to be quite understandable, but its usual function seems to be ungrammatical. Can someone clear up my confusion?