flex-lexer
flex/bison fixing memory leaks with unexpected tokens
I have a flex bison application.For a few of my tokens, I copy out the yytext from flex using strdup.This works great except when there is an error of an unexpected token.[详细]
2023-01-08 14:41 分类:问答Compilation error with flex file
I\'m trying to build a simple lexical analyzer to go along with a simple input output library for (scientific) C programs.When compiling with autotools, including automake, libtool, and autoconf, I ge[详细]
2023-01-08 05:54 分类:问答Why does Flex say this is an "unrecognized rule"?
In the following: space([ \\t\\f\\r])+ opt_space([ \\t\\f\\r])* cpp^{opt_space}#{opt_space} word[A-Za-z_][A-Za-z_0-9]*[详细]
2023-01-06 21:17 分类:问答Is there a way to localize error messages from bison/flex?
Do bison and flex allow user to natively localize error messages? For example, I would like to translate following message: syntax error, unexpected NUMBER, expecting开发者_StackOverflow中文版 $end to[详细]
2023-01-05 08:55 分类:问答Building Lisp/Scheme-like parse tree with flex/bison
I was trying to parse simple Lisp/scheme-like code E.g. (func a (b c d) ) and build a tree from it, I could do the parsing in C without usin开发者_运维知识库g bison (i.e, using only[详细]
2023-01-05 00:36 分类:问答Simple XML parser in bison/flex
I would like to create simple xml parser using bison/flex. I don\'t need validation, comments, arguments, only <tag>value</tag>, where value can be number, string or other <tag>value[详细]
2023-01-04 23:51 分类:问答MinGW gcc error: "undefined reference to `yylloc'"
Where can I find yylloc? I have included libfl.a (-lfl) in gcc command line, added GnuWin32/bin and GnuWin32/lib directories to system variable LIB, searched through all files in GnuWin32 - neither I[详细]
2023-01-03 20:28 分类:问答Creating simple calculator with bison & flex in C++ (not C)
I would like to create simple C++ calculator using bi开发者_如何学Pythonson and flex. Please note I\'m new to the creating parsers. I already found few examples in bison/flex but they were all written[详细]
2023-01-02 10:22 分类:问答Recognizing Tail-recursive functions with Flex+Bison and convert code to an Iterative form
I\'m writing开发者_如何学C a calculator with an ability to accept new function definitions. Being aware of the need of newbies to try recursive functions such as Fibonacci, I would like my calculator[详细]
2022-12-27 20:00 分类:问答How do I get yacc/bison and/or lex/flex to restart scanning after something like token substitution?
Is there a way to force bison and/or flex to restart scanning after I replace some token with something else?[详细]
2022-12-27 13:29 分类:问答