lexical-analysis
Matching multiple regex groups and removing them
I have been given a file that I would like to extract the useful data from. The format of the file goes something like this:[详细]
2022-12-12 22:30 分类:问答Why Use Lexical Analyzers?
I\'m building my own language using Flex, but I want to know some things: Why should I use lexical analyzers?[详细]
2022-12-12 17:22 分类:问答My flex/yacc program compiles differently on two different linux machines
One one machine, everything compiles fine.On another machine, it complai开发者_运维百科ns about the -ly option when I use gcc to create the output file.If I remove the -ly option, then it makes the pr[详细]
2022-12-12 06:37 分类:问答Using the regular expression [\[\];] in flex
If I have the following in my flex file, wha开发者_如何学Got does it do? [\\\\[\\\\];]{ return yytext[0]; }[详细]
2022-12-11 21:31 分类:问答How to return literals from flex to yacc?
In my yacc file I have things like the following: var_declaration : type_specifier ID \';\' type_specifier ID \'[\' NUM \']\' \';\' ;[详细]
2022-12-11 21:25 分类:问答Does this program grammar only recognize variables with the name 'ID'?
I need to make a scanner in lex/flex to find tokens and a parser in yacc/bison to process those tokens based on the following grammar.When I was in the middle of making the scanner, it appeared to me[详细]
2022-12-11 09:59 分类:问答What's wrong with this lex file?
I have a Makefile so that when I type make the following commands run: yacc -d parser.y gcc -c y.tab.c flex calclexer.l[详细]
2022-12-11 07:04 分类:问答Generate C++ code for BNF grammar [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.[详细]
2022-12-10 06:10 分类:问答Elimination left recursion for E := EE+|EE-|id
How to eliminate left recursion for the following grammar? E := EE+|EE-|id Using the common procedure: A := Aa|b[详细]
2022-12-09 04:01 分类:问答How to run Python file in another python file?
I\'m trying to 开发者_运维技巧run another python file within this lexical analyzer, but it\'s not working. Can anyone help me?[详细]
2022-12-07 21:38 分类:问答