Qt 4.4.0, Suse-Linux 11.0 flex++ und bison++ Problem

Dein Thema passt einfach in kein Forum? Dann probiers mal hier.
Antworten
uwe_kornnagel
Beiträge: 5
Registriert: 10. September 2008 14:13
Wohnort: 64291 Darmstadt
Kontaktdaten:

Qt 4.4.0, Suse-Linux 11.0 flex++ und bison++ Problem

Beitrag von uwe_kornnagel »

Hallo,
ich möchte in einem qmake-Projekt einen Scanner (flex) und einen Parser (bison) einbinden.

Code: Alles auswählen

SOURCES += mathparser.cpp \
           main.cpp \
 tparser.cpp \
 TFncLib.cpp
HEADERS += mathparser.h \
 tparser.h \
 TFncLib.h
TEMPLATE = app
CONFIG += warn_on \
	  thread \
          qt \
 debug
TARGET = ../bin/mathparser
RESOURCES = application.qrc
FORMS += NumWindow.ui

CONFIG -= release

LEXSOURCES += rechner.ll
YACCSOURCES += rechner.yy
Bei dem Parser ehalte ich folgende Fehlermeldung:
rechner.yy:39.1-2: syntax error, unexpected %%

die Quelldatei rechner.yy ist z.Z. noch leer

Code: Alles auswählen

/*
 *
 * Use options
 *
 *    %name-prefix="foo"
 *    %yacc
 *
 * to create multiple parsers in one project.
 *
 */

%{

%}

%debug

%%

%%
Beim Scanner erhalte ich folgende Fehlermeldung:
rechner.c:1016: undefined reference to `rechnerwrap'

die Quelldatei rechner.ll ist z.Z. noch leer

Code: Alles auswählen

/*
 *
 * Use options
 *
 * 	%option prefix="foo"
 * 	%option outfile="lex.yy.c"
 *
 * to create multiple flex scanner in one project.
 *
 *
 * To create scanner class:
 *
 *	%option c++
 *
 * (see '%option yyclass' also!)
 *
 */

%{


%}

%option debug

%%

%%
Uwe Kornnagel, Darmstadt
Antworten