1. A method for compressing a grammar, the method comprising: receiving a grammar to be compressed by using a computer, the grammar comprising a set of rules, each rule comprising a set of token classes, wherein a token class is a logical grouping of tokens, and a token is a string of one or more characters; parsing the grammar to identify the set of rules within the grammar and the set of token classes within each rule; eliminating, from the grammar, all but one of any duplicate rules identified from parsing the grammar, wherein duplicate rules include rules having the same token classes in the same order; identifying, from the set of token classes within each remaining rule, a set of unimportant token classes separate from a set of important token classes, where the set of unimportant token classes are eligible for compression; analyzing the set of unimportant token classes to identify two or more token classes within the set of unimportant token classes that are similar; merging the two or more token classes within the set of unimportant token classes identified from the currently received grammar to generate a merged token class by removing duplicate tokens and combining remaining tokens from the two or more token classes; and substituting the merged token class in the grammar for the two or more token classes that were merged to generate the merged token class to generate a compressed grammar.
5. The method of claim 1 , wherein the token class is identified as being important or unimportant based on user input.