Common difficulty with Flex++
Note: Someone with over 1500 rep.. please add flex++ and bison++ as tags :).
Seems like people all over the Internet have been getting the following errors with Flex++:
scanner.l:1: bad character: %
scanner.l:1: unknown error processing section 1
This happens on any example I give Flex++. The version I have is from here and I have tried the exact examples on that page and I still get these errors. I've tried on Linux and Mac and have completely run out of ideas!
Seems like Flex++ is a name for an old virus out there too so it's particularly hard getting useful discussion!
EDIT:
Here's an example that produces the above error (first few lines from 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.
EDIT 2: Please can people not edit this post by putting the 'flex' tag in? Flex would be what I would use to tag but Flex is also an Adobe technology - it's NOT the tool I am using. The flex tag on SO is for the Adobe product (hence the logo on the tag). Thank you :).
Check your line-endings? CR+LF vs NL might make a difference here.
链接地址: http://www.djcxy.com/p/57868.html上一篇: 重复一组字符
下一篇: Flex ++的常见困难