I learned (an academic expression of) German grammar at university, in computational linguistics. There was a class „Syntax I“, and it had us break down phrases and sentences in a graphs, a (constituent) C structure and a (functional) F structure.
Best class I ever had!
I too enjoy mentally putting parentheses around parts of speech.