< and > are like opening and closing braces, and [*] tells no. of childs in the list. Only a list can have childs. other elements like U4 are stand alone and can not have childs(Thats why closing ">" for U4 is in sequence with opening "<").
I need to validate above string, If a L is specified it should have only one child, like in above example.
One wrong syntaxt is: <L  <U4  85000> >
This is wrong as L specifies 2 childs, but there is only one child into it.
I want to write recursive code for above validations....