Two syntactic methods for the recognition of seismic waveforms are presented in this paper. The seismic waveforms are represented by strings of primitives. Primitive extraction is based on cluster analysis. Finite-state grammars are inferred from the training samples. The nearest-neighbor decision rule and error-correcting finite-state parsers are used for pattern classification. While both show equal recognition performance, the nearest-neighbor rule is much faster in computation speed. The classification of real data for earthquake/explosion is presented as an application example.