Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

C grammer for YACC

Posted on 2000-02-23
4
Medium Priority
?
290 Views
Last Modified: 2010-04-15
I need C grammer for YACC. It would be better if I also have code for a parser for it (which I can interface with a lexer).
What I am trying to do is to make a C to Pascal converter. I have made the lexer. Next I want to make the parser. And then the unparser. I am keen on keeping all these stages isolated. So I want a clean grammer code for YACC.
Thanks
0
Comment
Question by:pankajgupta
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 2552249
You can download the source code to GCC, the GNU C compiler from many places.  It uses YACC (actually bison) and is a good example that is readily available.
0
 
LVL 5

Accepted Solution

by:
laeuchli earned 800 total points
ID: 2552514
0
 

Author Comment

by:pankajgupta
ID: 2557962
Thanks!
Though I also need to know what exactly should be done in the parser phase of the compiler except just parsing the language! I mean like handling the symbol table and stuff like that. But this was helpful!
0
 

Author Comment

by:pankajgupta
ID: 2557963
Thanks!
Though I also need to know what exactly should be done in the parser phase of the compiler except just parsing the language! I mean like handling the symbol table and stuff like that. But this was helpful!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question