Context Free Grammar

Hi Folks,

I am trying to write a small compiler for syntax checking in C programs. I would like to attach a Context Free Grammar(CFC) to it.

Does any one know as to how I should associate or map the Grammar with the C program????

A quick help would help me a lot......

Thanks,
Nisha

I think a state table would work for that application.

What is a state table????

Thanks,
Nisha

"State Table" is a table in which the left column contains regular expressions and the right column contains actions to be executed when the expressions are recognized. Actions can be written as C program fragments.

Kindly anyone correct me if I am wrong.

yes ok... but ultimately i would like to know as to how i can write CFC and how to map it with the compiler program that i am writing???

Thanks,
Nisha