[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
flex++ vs. flex
From: |
Timm Coerrens |
Subject: |
flex++ vs. flex |
Date: |
Tue, 19 Nov 2002 09:17:55 +0100 |
Hi anyone,
I generated a scanner with flex, that works well. Now i want to integrate the
scanner in my c++-application. Therefore i want my given input-file to be
compiled with flex_pp, because i want the scanner to be a class. It fails on
line 1 with this stupid 'premature EOF' error. The file works well with flex,
that is the point!
Here is the content of the file:
%{
#define NODE 1000
#define ATTRIBUTE 1001
#define HIDE 1002
#define SHOW 1003
#define VALUE 1004
#define TEXT 1005
#define BTN 1006
#define ID 1007
#define TEXTID 1008
%}
/* regular definitions */
blank [" "]
ws {blank}+
delimf ["{"]
delimb ["}"]
delimp [":"]
letter [A-Za-z]
digit [0-9]
id ({letter}|{digit})({letter}|{digit}|[_]|[-]|{ws})*
%%
MMText {/*install_text();*/return(TEXT);}
MMBtn {/*install_btn();*/return(BTN);}
TEXT= {/*install_value();*/return(VALUE);}
TEXTID= {return(TEXTID);}
HIDDEN=ja {/*install_hide();*/return(HIDE);}
HIDDEN=nein {/*install_show();*/return(SHOW);}
{id} {/*install_id();*/return(ID);}
{delimf} {/*do nothing*/}
{delimb} {/*do nothing*/}
{delimp} {/*do nothing*/}
%%
That is all. Can anybody help me with this error? Thank you so much,
yours truly
Timmy
______________________________________________________________________________
E-Mails sehen immer gleich aus? Aber nicht bei WEB.DE FreeMail!
http://freemail.web.de/features?mc=021138
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- flex++ vs. flex,
Timm Coerrens <=