Source: Stream Processing
Part 1: An input stream can contain:
groupsare delimited by{and},groupsare nestable and may containgarbageor data (objects within agroupare comma delimited)garbageis delimited by<and>,groupscannot be nested withingarbage, a!withingarbageis an escape character:!>does not end a garbage segment
The score of a single group is equal to how many times it is nested (the innermost group of
{{{}}}has score3).
The score of a stream is the sum of the scores of all groups in that stream.
What is the total score of your input?