help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: Visual C++


From: Olav Groehn
Subject: AW: Visual C++
Date: Thu, 25 Oct 2001 16:25:48 +0200

You have to include some header files:
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <MALLOC.h>

(or just some of them)

and to declare yylex, yyparse and yyerror like:
int yyparse();
void yyerror(char *s);

the rest of the messages are just C syntax errors in your Bison input file...

Lots of fun

Olav


-----Ursprüngliche Nachricht-----
Von: address@hidden [mailto:address@hidden
Auftrag von Stark Mathews
Gesendet: Donnerstag, 25. Oktober 2001 16:14
An: address@hidden
Betreff: Visual C++


I'm trying to use the parser file generated by bison in a Visual C++
program, but I get a group of errors that I don't understand, so can't
rememedy.

This is the report from the compiler:

bison.simple(317) : error C2065: 'yyerror' : undeclared identifier
bison.simple(323) : error C2065: 'alloca' : undeclared identifier
bison.simple(377) : error C2065: 'yylex' : undeclared identifier
parser.y(22) : warning C4244: '=' : conversion from 'double' to 'int',
possible loss of data
c:\code\ambiguitymoo\structures.h(7) : error C2059: syntax error :
'constant'
c:\code\ambiguitymoo\structures.h(8) : error C2143: syntax error : missing
';' before '}'
c:\code\ambiguitymoo\structures.h(8) : error C2143: syntax error : missing
';' before '}'
parser.y(32) : error C2373: 'yylex' : redefinition; different type modifiers
parser.y(47) : error C2373: 'yyerror' : redefinition; different type
modifiers
parser.y(49) : warning C4508: 'yyerror' : function should return a value;
'void' return type assumed

Is it not possible to use the bison output with a Visual C++ application or
am I just missing something basic?


_______________________________________________
Help-bison mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/help-bison




reply via email to

[Prev in Thread] Current Thread [Next in Thread]