Implementation of trie and trie parser