The nearest-neighbor decision rule for syntactic patterns is applied to seismic pattern classification. Each pattern is represented by a string. The string-to-string distance is used as a similarity measure. Another method using finite-state grammars inferred from the training samples and error-correcting parsers is also implemented. Both methods show equal recognition accuracy; however, the nearest-neighbor rule is much faster in computation speed. The classification results of real earthquake/explosion data are presented.