Re: Symbol Table for Lex
24 Feb 2003 13:49:52 -0500

          From comp.compilers

Related articles
Symbol Table for Lex (2003-02-21)
Re: Symbol Table for Lex (2003-02-24)
| List of all articles for this month |

Newsgroups: comp.compilers
Date: 24 Feb 2003 13:49:52 -0500
References: 03-02-116
Keywords: symbols
Posted-Date: 24 Feb 2003 13:49:52 EST (techtess) wrote in

> I built the Lex and the Parser using YACC , I am yet to build the
> symbol table. I wanted advise on where to start in order to build a
> symbol table.
> Thank You
> [Most compiler texts describe symbol tables. -John]

      The symbol table is a very important part of a compiler. It's
require a considerably amount of time, but, it depends on what type of
compiler you are writing. If you are writing a language with one
scope, variables of one type, and without declaration, the symbol
table could be managed by the lexical analizer. Add a new symbol when
an identifier or a constant is recognized (check first if the symbol
doesn't exist).
      If the language have diferent scopes, different types, etc. What I
described above would be called String Table, and the Symbol table
should be managed by the syntax analizer.
      There are a many web sites of Universities Course that offer
material about compilers and its components.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.