Tag: flex lexer

我如何成功链接本地Node插件中的Flex,Bison和Node.js?

我正在尝试使用Flex / Bison编写本地Node.jsparsing器。 插件有三个部分:词法分析器,parsing器和节点/ v8接口。 词法分析器和parsing器在开始时运行良好(我使用g ++编译词法分析器/parsing器,并包含必要的词法分析器函数,如下所示: http : //tldp.org/HOWTO/Lex-YACC-HOWTO-5.html ) 。 当我将node / v8部分添加到混音中时,我最终得到了在词法分析器代码中定义的函数缺less的符号错误。 以下是文件结构的概述: File A: Lexer file, automatically generated by flex from the lexer rules I wrote. File B: The parser file, includes the extern "C" { [lexer functions] } and a function called parse(std::string). parse() calls some yy_functions, which are defined […]