Creating a trie for symbol lookup