Yes I do.
And to compile it, I do the following:
lex pascal.l && yacc -d pascal.y && gcc -o gpascal y.tab.c lex.yy.c -ll -ly
But then, when I do something like "./gpascal < some_file.pas", nothing happens.
Thanks
Main Topics
Browse All TopicsI'm in need to build a grammar interpreter for a language similar to Pascal using tools like YACC and Lex. I have found this on the internet: http://www.moorecad.com/st
The problem resides in the fact that I cannot generate any type of output even with a simple Hello World program.
Could someone help me in making this thing work?
Thank you :)
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
You need to add the code generation but it has been too long since I have done it.
There is a manual and example here
http://epaperpress.com/lex
mlmcc
Well the main problem is the grammar files you downloaded are rules without code.
The lex grammar will return tokens to the parser.
The parser will parse the tokens.
There is no code in there to print anything.
If you want to see what is happening at least add some printf() statements to some of the rules.
Example, below in the yacc grammar, do this change. Proceed with other rules.
The whole point of the rules is to allow you to build an abstract syntax tree, and then use that tree to generate code after the parse is done.
Business Accounts
Answer for Membership
by: mlmccPosted on 2009-05-31 at 13:10:41ID: 24513741
DO you have YACC and LEX?
mlmcc