I need an idea how to express a statement like the following:
Int<Double<Float>>
So, in an abstract form we should have:
1.(easiest case): a<b>
2. case: a<a<b>>
3. case: a<a<a<b>>>
4. ....and so on...
The thing is that I should enable the possibility to embed a statement of the form a < b >
within the < .. > - signs such that I have a nested statement. In other words: I should replace the b with a< b >
.
The 2nd thing is that the number of the opening and closed <>-signs should be equal.
How can I do that in ANTLR ?