Today we received our first assignment: implement a Lexical Analyzer Generator. A lexical analyzer parses through a string of characters and assigns tokens to different parts of the input. For example, a lexical analyzer for English would produce tokens for nouns, verbs, adjectives, etc. So, for example, the sentence "I drove to the store." would get tokenized as
The traditional lexical analyzer generator is lex. Our assignment is to reimplement lex (or, more accurately, it's modern incarnation flex). To better help me organize my thoughts for this assignment, I will be posting commentary on lex/flex and our own implementation, Luthor. For anyone not interested in Formal Languages or Computer Science, this might be pretty boring, but you never know.
No comments:
Post a Comment