Next we examine a simple system for reading input called a finite state automaton , which --- as we'll find out later --- is closely related to regular expressions . Later we'll explore the idea of grammars , another kind of formal language that can deal with more complicated forms of input.