← Questions

Parse nested generic type expressions

0
Applied IntuitionCodingLast asked Sep 2026

A message type is written like a generic type: a name, optionally followed by angle brackets holding one or more comma-separated child types, nested to any depth, for example Map<String, List<Pose>>, with spaces allowed between tokens. Parse such a string into a tree and print it back in a canonical form such as Map(String,List(Pose)), keeping the children in order. Write it as a recursive-descent parser and say how you would report malformed input.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding