i an new to c . can any one suggest me material for easy understanding "symbol tables" in c
i an new to c . can any one suggest me material for easy understanding "symbol tables" in c
A symbol table can just be an array of structs, eg.
"literal" would be the actual representation, eg, "2+2" or "myfunc(arg)". "value" in that case would be "4" or whatever myfunc(arg) does.Code:typedef struct { char *literal; int value; } token;
However, if you are new to C, why is it you need to know about symbol tables? AFAIK they are used in parsing, which is usually not a trivial task.
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
More often than not they are hash tables on *nix systems, so Google 'em but if you are new to C you are starting at the wrong end.