5

i need a n example on flex and bison , so i can learn how to build ast tree and symbol table and do semantic analysis

Radi
  • 6,548
  • 18
  • 63
  • 91
  • 2
    I just thought I'd add (a bit late) that Bison itself is written in Bison, and probably very good Bison: http://git.savannah.gnu.org/cgit/bison.git – alternative Aug 19 '10 at 18:38

2 Answers2

6

This link: Using Flex and Bison is really good. It describes how they work and afterwards explains step-by-step how to build a small programming language.

Alex Ntousias
  • 8,962
  • 8
  • 39
  • 47
5

PostgreSQL: http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/

Peter Eisentraut
  • 35,221
  • 12
  • 85
  • 90