In linguistics, lists can represent parse trees:
[ sentence, [ noun_phrase, [ determiner, [the] ], [ noun, [dog] ] ], [ verb_phrase, [ verb, [hates] ] ], [ noun_phrase, [ noun, [cats] ] ] ]We can use the same representation when parsing formal languages, such as programming languages.