Click here to Skip to main content
15,915,513 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: vtable Pin
CPallini21-Apr-07 11:42
mveCPallini21-Apr-07 11:42 
QuestionHow can i write/read CRecordset object into/from file? Pin
$uresh $hanmugam20-Apr-07 22:41
$uresh $hanmugam20-Apr-07 22:41 
AnswerRe: How can i write/read CRecordset object into/from file? Pin
David Crow23-Apr-07 5:46
David Crow23-Apr-07 5:46 
GeneralRe: How can i write/read CRecordset object into/from file? Pin
$uresh $hanmugam26-Apr-07 3:01
$uresh $hanmugam26-Apr-07 3:01 
Questioni want the vertical scrollbar is alway visible on CListCtrl Pin
MachineMHK20-Apr-07 21:58
MachineMHK20-Apr-07 21:58 
Questionhelp reg:dll Pin
viduran20-Apr-07 21:53
viduran20-Apr-07 21:53 
AnswerRe: help reg:dll Pin
Michael Dunn21-Apr-07 5:38
sitebuilderMichael Dunn21-Apr-07 5:38 
Questionerror in yacc... Pin
dalbhide bipin20-Apr-07 21:46
dalbhide bipin20-Apr-07 21:46 

Does any one know about lex yacc. Plz solve my prob.

=====test.y==============
%{
#include<string.h>
#include<stdio.h>
typedef struct quad
{
int id;
char name[20];
int scope;
int argument;
char type[20];
struct quad *next;
}QUAD;

struct stack
{
int items[100];
int top;1
}stk;

int Index = 0, tIndex = 0,StNo,Ind,tInd;
extern int LineNo;
extern int scope;
%}

%union
{
char var[10];
}

%token NUM VAR RELOP
%token MAIN IF ELSE WHILE TYPE
%type EXPR ASSIGNMENT DECST CONDITION IFST ELSEST WHILELOOP
%left '-' '+'
%left '*' '/'

%% /*RULE Section */

PROGRAM: MAIN BLOCK
;

BLOCK: '{' CODE '}'
;

CODE: BLOCK
| STATEMENT CODE
| STATEMENT
;

STATEMENT: DECST ';'
| ASSIGNMENT ';'
| CONDST
| WHILEST
;

DECST: TYPE VARLIST {AddQuadruple($2,scope,0,$1);}
;

VARLIST: VAR ',' VARLIST
| VAR {prinft("\n%s",$1);}
;


========================================
when i compiled this file by "yacc test.y" i got an error..
$2 of "DECST" has no declared type
$1 of "DECST" has no declared type

but i hve declared "DECST" as %type in above code.
i dont know why i m getting this error.

thanks
help me guys

or if u dont know the answer please tell me the write forum for lex yacc.



QuestionSHGetSpecialFolderLocation Pin
deeps_cute20-Apr-07 20:29
deeps_cute20-Apr-07 20:29 
AnswerRe: SHGetSpecialFolderLocation Pin
ThatsAlok20-Apr-07 21:31
ThatsAlok20-Apr-07 21:31 
QuestionHow to access command prompt ? Pin
Nikhil Trivedi20-Apr-07 20:23
Nikhil Trivedi20-Apr-07 20:23 
AnswerRe: How to access command prompt ? Pin
ThatsAlok20-Apr-07 21:29
ThatsAlok20-Apr-07 21:29 
GeneralRe: How to access command prompt ? Pin
Nikhil Trivedi20-Apr-07 21:38
Nikhil Trivedi20-Apr-07 21:38 
AnswerRe: How to access command prompt ? Pin
prasad_som22-Apr-07 20:05
prasad_som22-Apr-07 20:05 
GeneralRe: How to access command prompt ? Pin
Nikhil Trivedi23-Apr-07 2:52
Nikhil Trivedi23-Apr-07 2:52 
AnswerRe: How to access command prompt ? Pin
prasad_som23-Apr-07 19:29
prasad_som23-Apr-07 19:29 
QuestionRead This Pin
Joiner12320-Apr-07 19:35
Joiner12320-Apr-07 19:35 
AnswerDie Pin
Rajesh R Subramanian20-Apr-07 19:49
professionalRajesh R Subramanian20-Apr-07 19:49 
GeneralRe: Die Pin
ThatsAlok4-May-07 0:44
ThatsAlok4-May-07 0:44 
AnswerRe: Read This Pin
Hamid_RT20-Apr-07 20:16
Hamid_RT20-Apr-07 20:16 
GeneralRe: Read This Pin
toxcct21-Apr-07 10:21
toxcct21-Apr-07 10:21 
AnswerRe: Read This Pin
ThatsAlok20-Apr-07 21:29
ThatsAlok20-Apr-07 21:29 
QuestionUsing one thread for multiple views Pin
jagannathan thiruvengadathan20-Apr-07 18:26
jagannathan thiruvengadathan20-Apr-07 18:26 
Questioncompilation error Pin
rsanju20-Apr-07 17:41
rsanju20-Apr-07 17:41 
AnswerRe: compilation error Pin
prasad_som22-Apr-07 20:00
prasad_som22-Apr-07 20:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.