Having tried parsing grammars, I would suggest you don't write the symbol table at all. Find a tool like lex or flex (try the GNU website to download them, or get Fedora Linux on your PC and it includes lex and flex) or
JFlex for scanning. I prefer JFlex.
Get a parsing tool, eg yacc, BYacc, bison, BYacc/J,
CUP (all the previous tools are LALR) or
ANTLR, which is top-down.
If you wish to know about symbol tables, see if you can get your hands on J P Bennett
Introduction to Compiling Techniques. A first course using ANSI C lex and yacc Hemel Hempstead: McGraw-Hill 1996, or any of the other standard compiler design books (Aho or Grune are two examples). Bennett uses an array, but collisions in the array are handled by putting the symbols into a linked list.
In my opinion the more modern tools written in OO languages (Java) are more elegant and easier to use than the old tools written in C. Also in Java one doesn't have to know how to write one's own data structures, only how to write "import java.util.*;"
[edit]"Aho" misspelt.[/edit]
[ April 26, 2007: Message edited by: Campbell Ritchie ]