A grammar is regular if and only if its rules are of the form X -> a or X -> aY, where X and Y are nonterminals and a is a terminal. Regular languages can be accepted by finite state automata. Regular languages may also be defined using regular expressions, which consist of sets of string over a finite alphabet under the operations of union, concatenation and Kleene closure.