compiler front end

V

vaib

hi all ,

I am willing to write a compiler front-end for my semester
project . I am studying compilers in my present semester and I am
following the Dragon Book for the theory and Allen I. Holub's Compiler
Design in C for the _actual stuff_ .
.. Although I must admit that as of now I am not able to make out
much out of Holub's book since I am not through with the theory yet
but I have come to understand that it would be much easier to go
through it once I complete the theory . As of now I am almost done
with the front-end theory and so I want to design a compiler front-end
( lexer and parser ) .
Now there are certain issues that i am facing . First of all,
I need to have a grammar so that I would know what all terminals
( tokens ) I have to use . This would be required for the design of
the lexer . Having the grammar would also solve many issues regarding
the parser too .
Can anyone suggest me a simple context-free grammar ? I'd
highly appreciate it . I would also stick to this thread for any other
issues that I face while designing the front-end .
Thanking in anticipation . Vaib .
 
B

Bartc

vaib said:
hi all ,

I am willing to write a compiler front-end for my semester
project .
First of all,
I need to have a grammar so that I would know what all terminals
( tokens ) I have to use . This would be required for the design of
the lexer . Having the grammar would also solve many issues regarding
the parser too .
Can anyone suggest me a simple context-free grammar ? I'd
highly appreciate it .

Try posting to comp.compilers where someone might know what you're on about.
 
G

Gene

hi all ,

         I am willing to write a compiler front-end for my semester
project . I am studying compilers in my present semester and I am
following the Dragon Book for the theory and Allen I. Holub's Compiler
Design in C for the _actual stuff_ .
.       Although I must admit that as of now I am not able to make out
much out of Holub's book since I am not through with the theory yet
but I have come to understand that it would be much easier to go
through it once I complete the theory . As of now I am almost done
with the front-end theory and so I want to design a compiler front-end
( lexer and parser ) .
        Now there are certain issues that i am facing . First of all,
I need to have a grammar so that I would know what all terminals
( tokens ) I have to use . This would be required for the design of
the lexer . Having the grammar would also solve many issues regarding
the parser too .
        Can anyone suggest me a simple context-free grammar ? I'd
highly appreciate it . I would also stick to this thread for any other
issues that I face while designing the front-end .
                       Thanking in anticipation . Vaib .

There is a small grammar that's nice for learning in the appendix of
this text:
http://www.cs.sjsu.edu/~louden/cmptext/

There is also one in Wirth's old book:
http://www.amazon.com/Algorithms-Structures-Prentice-Hall-Automatic-Computation/dp/0130224189

You will get more help at comp.compilers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,120
Latest member
ShelaWalli
Top