CS241 : 08F_CS_241FallDec16.doc
Document Summary
Earlier in the course, we talked about the formal definition of a language: first, you need to be able to create an alphabet, which is a finite set of. , the english alphabet: second, you need to be able to create a word, which is a finite sequence cba of symbols from an alphabet. Now we can define a language as any set (possibly infinite) of words from a given alphabet. Given one or more words, we want to be able to determine if they belong to a language or not. We can do this by using regular expressions, dfas, nfas, or epsilon-nfas. When compiling a program, we use a scanner (often implemented as a dfa) to break up the input into words, verify that the words belong to the language, and change them into tokens. It"s not enough to simply break up the input into tokens.