2013年4月9日 星期二

parser - Flex & Bison

  1. 加入 %option c++在xxx.l檔的第一行
  2. 實作yyFlexLexer::yywrap()在xxx.l的c++ code 區
  3. 產生lex.yy.cc而非lex.yy.c,且指令變成flex -+ xxx.l
  4. 在main.cpp #include "FlexLexer.h"
  5. 之後就使用class yyFlexLexer

沒有留言:

張貼留言