Week 2/37
Exercises on scanners and parsers
- Implement and test
flex based scanners that:
- formats text in 80-column blocks, while removing multiple,
leading, or trailing blanks;
- removes all tags from an HTML document; and
- introduces plausible spelling errors.
- Read the
flex documentation and discuss the
full syntax for regular expressions.
- What do the following regular expressions match?
\"([^\"])*\"
http:[^?]*?
[-+]?[0-9]*\.[0-9]+([eE][-+]?[0-9]+)?
- Find out about "start conditions" in
flex .
|