CSE 15 Study Guide - Quiz Guide: Bloom Filter, Hash Table, Makefile

75 views7 pages
19 May 2017
School
Course
Professor

Document Summary

In this assignment, break files or text input from user into words. Setting up your assignment: creating bloom filter and hash table, you get a file that has all ungood" words, bloom filter if you hash it, and it returns a 0, it"s a good word. Program walkthrough: bloom filter #1 0 clear. 1: bloom filter #2 0 false positive. Lex: one is stuff we put in makefile the lex. # include int yylex(void); extern char *yytext; setting up string extern file *yykex int main(void) yyin = stdin; yyin = fopen(badwords); int tokenid = yylex(); printf( word %d \n , tokenid, yylex()); Flex words. l create a lex. yy. c thousands of lines long. Cc o run run. o lexy. yy. o lfl: read boris"s tutorial, might have to put a while loop (while tokenid != 1, take in some other file. You want to have an explicit fail case.