Final project for 6.945, implementing Thompson NFA's for pattern matching