Thread: plz help

  1. #1
    plz help
    Guest

    plz help

    hi i had a go at implementing a symbol table,
    is this valid?

    char Table[MAX][MIN]= {"unsigned", "int", "unsigned", "char",
    "void","void";};

    and also..does anyone know what the identifiers are for the reserved words in c?

    thanks

  2. #2
    C > C++ duders ggs's Avatar
    Join Date
    Aug 2001
    Posts
    435
    Code:
    enum types { UNSIGNED };
    
    typedef struct t_sym symtbl;
    struct t_sym {
    	char *ident;
    	uint type;
    };
    
    symtbl ctok {
    	"unsigned",	UNSIGNED
    	NULL,		-1
    };
    a symbol table should look like the above. assuming you are the same poster as last time asking about how the compiler works, you'll probably want to use another structure such as a hash table to store all the identifiers you collect.
    .sect signature

  3. #3
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005

    Re: plz help

    >and also..does anyone know what the identifiers are for the reserved words in c?

    Here is a list of keywords. Here is a list of reserved identifiers.

  4. #4
    :(:(:(:(
    Guest
    does anyone know of any websites that show you how to create a symbol table step by step...i cant get my head round it...i've been trying for 10 hours straight my assignments due in next week if i dont get this right i fail the course i got no access to any lecturers either.....plz help all i need is some basic instuction on how to implement a symbol table and compare stuff to them....plz anyone????

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. can any1 plz make this assignment
    By jean in forum C Programming
    Replies: 17
    Last Post: 05-13-2009, 09:19 PM
  2. plz help me...
    By sweetchakri in forum C Programming
    Replies: 1
    Last Post: 03-03-2009, 11:50 PM
  3. [Request] Need Help Plz
    By TylerD in forum Tech Board
    Replies: 4
    Last Post: 01-03-2009, 09:54 AM
  4. Anyone plz help me
    By Rose_Flowers in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 09-17-2003, 12:01 PM
  5. help plz plz
    By nsssn73 in forum C++ Programming
    Replies: 2
    Last Post: 06-03-2002, 08:44 AM