General difficulty with Flex ++

Note: someone with more than 1500 rep .. please add flex ++ and bison ++ as tags :).

It seems that people all over the Internet are getting the following errors in Flex ++:

scanner.l:1: bad character: %
scanner.l:1: unknown error processing section 1

This happens in any example that I provide Flex ++. I have a version here , and I tried the exact examples on this page, and I still get these errors. I tried Linux and Mac and completely ran out of ideas!

Flex ++ seems to be the name for the old virus, so it's especially hard to get a useful discussion!

EDIT:

Here is an example that throws the above error (the first few lines from the example taken from the link above):

%name CalcScanner
%define IOSTREAM
%define LEX_PARAM YY_CalcParser_STYPE *val, YY_CalcParser_LTYPE *loc
%define MEMBERS public: int line, column;                                                                                               
%define CONSTRUCTOR_INIT : line(1), column(1)

%header{
#include<sstream>
#include "parser.h"
%}

Any help would be more than fantastic.

2: , , 'flex'? Flex , , Flex Adobe - , . Flex- SO - Adobe (, ). :).

+5
1

? CR + LF vs NL .

+2

All Articles