I've been dabbling with scanners/parsers for a while and I got the hang of the basics involved in recursive descent parsing. I was thinking of implementing something more complex where I can define a proper language.
I don't use parser generators like ANTLR, SableCC, etc. which includes a token scanner and a rudimentary recursive descent parser. To this point, everything was pretty easy. Symbol table is simple a HashMap containing variable to int/string mappings. The best I could come up was Map-of-Maps to maintain hierarchy. This is inefficient and doesn't allow generic representation.
Could someone please show me how to elegantly represent a symbol table for storing type bound class hierarchies?
More precisely, I'm looking for expressing:
class MyType<A, X> extends SuperType<A, Integer> { ... }
... in a symbol table correctly.
Frankly, I'm lost; unable to even visualise how a structure to represent this would even look like.