[Flex-help] How do you get FlexLexer.h to output?
flex is a tool for generating scanners
Brought to you by:
wlestes
From: Arthur S. <asc...@at...> - 2014-01-09 22:56:18
|
The header file for the C++ class is not generated. I don't know why and I've run out of imagination to try more guesses. Does anyone know what I'm doing wrong? In a similar vein, %option prefix works as advertised for C generated scanners but for C++ generated scanners most yy<variables>, yy<methods> retain their yy prefix. Probably because they are internal to the scanner? %option yyclass doesn't seem to do anything. All class scopes seem to be 'yyFlexLexer::'. Have I misunderstood what the %option does? I've tried to run the example by Timo Bingmann on generating a simple C++ scanner for a calculator. "flex scanner.ll" generates the file "lex.Examples.cc" but not the header file(s). My flex options are given below (some taken from Timo Bingman's scanner example. thanks art %option noyywrap %option prefix="Slip" /* %option c++ */ %option prefix="Slip" /* the manual says "somewhat more optimized" */ %option batch %option nounistd %option yyclass="SlipFlex" /* --header-file generates a C header file */ /* --noline is used because %option noline generates an error */ /* flex --header-file="SlipLex.h" --noline Slip.lex */ |