flex-lexer
Generating output from flex generated executable
I am having trouble in using flex. I wrote a C file happy.cas int num_lines = 0, num_chars = 0; %% \\n++num_lines; ++num_chars;[详细]
2023-03-26 04:26 分类:问答Order of precedence for token matching in Flex
My apologies if the title of this thread is a little confusing.What I\'m asking about is how does Flex (the lexical analyzer) handle issues of precedence?[详细]
2023-03-20 22:22 分类:问答Regex to match lower case words but exclude certain words using Flex (The Fast Lexical Analyzer)
i want to create a regex to match any lower case words but exclude \'return\' and \'while\', is it possible to do this? i don\'t want to solve like this:[详细]
2023-03-20 16:59 分类:问答Flex C++ VTable Error
I am using Flex and Bison to create a compiler.As I am trying to create an AST (Abstract Syntax Tree) for my program, I need to port it to C++.So far I have been successful, until a encountered a rath[详细]
2023-03-19 19:04 分类:问答Flex&Bison: define main function in a separate file
I am trying to make a small interpreter using Flex and Bison. Now I 开发者_如何学编程have two files: parser.l and parser.y. Usually, main function is put in parser.y file. What I want to do is to pu[详细]
2023-03-19 17:14 分类:问答Bison throws me a segfault, assuming it has something to do with *char
I seem to be doing something very wrong in the use of *char as my YYSTYPE, I\'m pretty new and unable to figure out myself what is going on. Bison either giv开发者_JAVA百科es me a syntax error or a se[详细]
2023-03-19 05:35 分类:问答Common difficulty with Flex++
Note: Someone with over 1500 rep.. please add flex++ and bison++ as tags :). Seems like people all over the Internet have been getting the following errors with Flex++:[详细]
2023-03-18 07:52 分类:问答Lex/Flex - Scanning for the EOF character
Other people have had the following problem that I am having but I can\'t find anyone that has reported a solution.. getting Flex to spot the EOF (end of file).I need Flex to find EOF and return a tok[详细]
2023-03-17 21:04 分类:问答Problem with bison and flex calculator
I\'m working on multi function calculator from bison. I have found that if the following expression is passed into program, a wrong answer will be produced.[详细]
2023-03-17 00:36 分类:问答bison/flex: print erroneous line
I am using bison+flex to parse f开发者_如何学JAVAile. On error yyerror() is invoked. How can I get the line number or string that is violating the rules, to print it with the error message?Line number[详细]
2023-03-15 08:18 分类:问答