Patent Document ID: 20110313993
Application ID: 13221227
Patent Flag: 0

Claim One:
1. A method for compressing a grammar, the method comprising: receiving a grammar 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; identifying, from the set of token classes within each 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 duplicates within the set of unimportant token classes; merging the set of unimportant token classes to generate a merged token class by removing duplicates within the set of unimportant token classes; and substituting the merged token class in the grammar for the set of unimportant token classes to generate a compressed grammar.