顯示具有 Compiler 標籤的文章。 顯示所有文章
顯示具有 Compiler 標籤的文章。 顯示所有文章

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