随笔分类 - Flex_Bison
Flex and GNU Bison
摘要:expr_1: IDENT /*yystack index 2*/ "=" /*yystack index 1*/ expr_1 /*yystack index 0*/ { $$ = new VarAssignAst($1, token::EQ, $3); }
阅读全文
摘要:words demo lexer.l: %option noyywrap noline %{ #include <iostream> #include "parser.h" #define YY_DECL yy::parser::symbol_type yylex() #define yytermi
阅读全文
摘要:#include <iostream> #include "lexer.h" #define yylex aaslex #define yy_scan_string aas_scan_string #define yy_delete_buffer aas_delete_buffer extern c
阅读全文
摘要:#include <iostream> #include "lexer.h" #define yylex aaslex #define yy_scan_string aas_scan_string #define yy_delete_buffer aas_delete_buffer int main
阅读全文
摘要:tasks.json { // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [
阅读全文
摘要:test.l: %option noyywrap noline %{ #include <iostream> %} %x textSpan str %% "$" { BEGIN(textSpan); } \" { printf("string:"); BEGIN(str); } <textSpan>
阅读全文
摘要:新建c++控制台项目 添加筛选器文件夹 "FlexBison"和"Generator Files" 在"FlexBison"下创建"lexer.l"和"parser.y"文件 右键"lexer.l"属性 命令行: win_flex --wincompat -o %(Filename).cc %(Id
阅读全文
posted @ 2021-05-17 15:52
Ajanuw