Given the limitations of the forum formatting, it is very difficult to draw diagrams.
Your sentence is parsed as follows: The (definite article associated with "dog") - very (adverb modifying "old") - old (adjective modifying "dog") - dog (noun, subject of sentence) - wandered (main verb, past tense) - aimlessly (adverb modifying "wandered").