Gap represents the knowledge that there is no Symbol. In addition, some symbols represent ordered lists of other Symbols. Symbols can represent ambiguity over these complex symbols. For example, you could construct a Symbol instance that represents the codons atn. There are three Symbol interfaces.
Symbol is the most generic.
It has the methods getToken and getName so that the Symbol can be textualy represented. BasisSymbol instances can always be represented by an n'tuple of BasisSymbol instances. It adds the method getSymbols so that you can retrieve this list. AtomicSymbol instances specialize BasisSymbol by guaranteeing that getMatches returns a set containing only that instance. That is, they are indivisable.