Regular language

A regular language is a formal language that some finite automaton accepts, or equivalently that some regular expression denotes.

Same class, three faces: DFA, NFA / ε-NFA, and regex. Constructions convert among them. Closed under union, concatenation, Kleene star, complement, and intersection.

Not every language is regular. ${a^n b^n \mid n \geq 0}$ needs unbounded memory to match counts; finite state is not enough. Lexers and many validators stay inside the regular fragment on purpose.

← Back to CS Glossary