Context free grammar

I have a project to do about context free grammars and hashtables. My professor wants us to read in this text:

<Start> : <Sentence> ;
<Sentence> : The <Noun> <Verb> the <Noun> | The <Person> believes that <Sentence> ;
<Noun> : <Person> | <Adjective> <Noun> ;
<Verb> : <Adverb> <Verb> | kicked | chased | kissed | smiled at | fell in love with | played with | thought about ;
<Person> : girl | boy | postman | movie star | priest | fireman | vampire | teacher | husband | wife | librarian | accountant | governor ;
<Adjective> : very <Adjective> | slightly <Adjective> | hungry | green | red | lovely | handsome | rich | poor | ugly | kind | angry | happy | blue | yellow | hardy | crazy | vapid | tanned ;
<Adverb> : quickly | slowly | energetically | hopefully | happily | greedily | kindly | stupidly | distasterously ;


from a text file and store it all in a hashtable. I'm semi-familiar with hashtables and know how to insert, remove, and search. However, I don't know how to start and store everything in there. It's confusing for me..

Any ideas?
Topic archived. No new replies allowed.