Solved

Compiling in visual C++ 2005 express edition

Posted on 2009-04-12
5
329 Views
Last Modified: 2013-12-14
I am using yacc for parser generator it has in it include folder which has all the header files required to compile my program which has been generated by yacc itself.Since I do not know how to include the path the error Now i am getting is
Cannot open include file: 'yyglobal.h': No such file or directory

Please help me how to solve this
0
Comment
Question by:majinharish
  • 3
  • 2
5 Comments
 
LVL 19

Accepted Solution

by:
alb66 earned 500 total points
ID: 24135853
From the menù Project click on Properties.
Then select "Configuration properties|C/C++|General" and add the folder where "yyglobal.h" is to "Additional Include Directories"


include.JPG
0
 

Author Comment

by:majinharish
ID: 24139188
Thanks i did just what you said now I am getting a different error
fatal error C1083: Cannot open include file: '.\cac.h': No such file or directory

Actually i am trying to compile the C code generated from YACC

My lex code is this




%{

#include <ctype.h>

%}

%%

%token DIGIT

ine: expr '\n'  { printf("%d\n",$1}

;

expr: expr'+'term {$$=$1+$3;}

|term

;

term:term'*'factor {$$=$1+$3;}

|factor

;

factor: '('expr')' {$$=$2;}

|DIGIT

;

%%

yylex(){

int c;

c=getchar();

if(isdigit(c)){

yyval=c-'0';

return DIGIT;

}

return c;

}

Open in new window

0
 

Author Comment

by:majinharish
ID: 24144821
Could anyone say what is wrong in what i am doing
0
 
LVL 19

Expert Comment

by:alb66
ID: 24145305
Search for cac.h in your file system and add the folder to the project as I shown you in my previous comment
0
 

Author Comment

by:majinharish
ID: 24147240
1>cac.cpp(90) : error C2653: 'YYPARSERNAME' : is not a class or namespace name
1>cac.cpp(93) : error C2065: 'yyvalptr' : undeclared identifier
1>cac.cpp(93) : error C2065: 'yyattributestackptr' : undeclared identifier
1>cac.cpp(96) : error C2653: 'YYPARSERNAME' : is not a class or namespace name
1>cac.cpp(102) : error C2653: 'YYPARSERNAME' : is not a class or namespace name
1>cac.cpp(104) : error C2065: 'yylvalptr' : undeclared identifier
1>cac.cpp(107) : error C2653: 'YYPARSERNAME' : is not a class or namespace name
1>cac.cpp(112) : error C2653: 'YYPARSERNAME' : is not a class or namespace name
1>cac.cpp(118) : error C2653: 'YYPARSERNAME' : is not a class or namespace name

These are some of the errors I am getting
Could you please check the following lex code with a Parser generator
Actually I use This   http://www.bumblebeesoftware.com/downloads.htm

Actually I have to use yacc parser.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

747 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now