lex
How do I write a non-greedy match in LEX / FLEX?
I\'m trying to parse a legacy language (which is similar to \'C\') using FLEX and BISON. Everything is working nicely except for matching strings.[详细]
2023-01-25 07:38 分类:问答How can I tell if a function call is an expression or a statement while writing a parser for a Lua-like language
I\'m trying to write a parser for a Lua-like language, using lex and yacc. It is a language without a f开发者_Go百科orced statement terminator(a semicolon), and this feature made me not able to tell i[详细]
2023-01-24 12:32 分类:问答Separating reserved identifiers in flex
I have a language I am making a parser for which contains function calls. A few function names are reserved and I would like to handle them differently in my grammer. In EBNF it would look like[详细]
2023-01-24 12:16 分类:问答How to get yacc/bison and lex/flex to pause file scanning?
Im trying to parse a file using Bison/Yacc but i want to pause the parsing for a while. The reason i want to do this is that i want to process a huge file sequentially and simulate a java iterator usi[详细]
2023-01-24 04:48 分类:问答Ignoring errors in yacc/lex
I\'m new to yacc/lex and I\'m working on a parser that was written by someone else. I notice that when an undefined token is found, the parser returns an error and stops. Is there a simple way to just[详细]
2023-01-22 14:14 分类:问答Lex : line with one character but spaces
I have sentences like : \"a\" \"a\" \"a\" 开发者_如何学Go I would like to catch all this examples (with lex), but I don\'t how to say the beginning of the lineI\'m not totally sure what exactly you\[详细]
2023-01-17 01:51 分类:问答Lex : print line numbers
I have a source code and I would like to add line numbers. What I\'ve done : %{ int lines=0; %} LINE \\n %%[详细]
2023-01-16 15:09 分类:问答Calling lex/yacc from a separate program
I\'ve been reading up on lex/yacc. The books and examples are not hard to follow. In fact, the whole concept is clear as a bell. With one exception. Lex/yacc seem to generate standalone programs. What[详细]
2023-01-12 17:21 分类:问答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 分类:问答Recognize Identifiers in Chinese characters by using Lex/Yacc
How can I use Lex/Yacc to recognize identifiers in Chin开发者_运维百科ese characters?I think you mean Lex (the lexer generator). Yacc is the parser generator.[详细]
2023-01-05 10:31 分类:问答