Context Free Grammar


 
Thread Tools Search this Thread
Top Forums Programming Context Free Grammar
# 1  
Old 08-09-2002
MySQL 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
# 2  
Old 08-09-2002
Re: Context Free Grammar

Quote:
Originally posted by Nisha
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.
# 3  
Old 08-12-2002
Lightbulb

What is a state table????

Thanks,
Nisha
# 4  
Old 08-13-2002
"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.
# 5  
Old 08-13-2002
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
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Questions related to if in awk context and if without awk context

I wrote this code, questions follow #! /bin/bash -f # Purpose - to show how if syntax is used within an awk clear; ls -l; echo "This will print out the first two columns of the inputted file in this directory"; echo "Enter filename found in this directory"; read input; ... (11 Replies)
Discussion started by: Seth
11 Replies

2. Shell Programming and Scripting

Shell grammar question: logical OR in test

Hi, I am trying to check if two input files exist before the rest of the scripts is run. Following is the code that I have but it gives me syntax error. if then echo "File not found" else echo "File found" fi (3 Replies)
Discussion started by: nua7
3 Replies

3. Homework & Coursework Questions

My Context Free Grammar (CFG)

I don't know how to delete this thread. Admin/Mod, Please delete this thread. Thanks. (0 Replies)
Discussion started by: Cyansnow
0 Replies
Login or Register to Ask a Question