lex和yacc语法来识别c ++函数调用 [英] lex and yacc grammar to identify c++ function calls
本文介绍了lex和yacc语法来识别c ++函数调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我需要识别C ++文件中的所有函数调用.我已经知道,可以使用lex和yacc语法.但是我不知道编写适当的语法文件来正确识别所有函数调用.
我该如何移动?
解决方案
您应该了解一些理论并阅读一些教程.
起点可能是"LEX&YACC页面" [使用Flex和Bison进行编译器构造" [ ^ ]非常有趣. /blockquote>
hi all,
i need to identify all the function calls in a c++ file.i have seen that,it is possible with lex and yacc grammar.but i dont know to write appropriate grammar file to identify all the function calls correctly.
how can i move with this?
thank you in advance..解决方案You should know a bit of theory and read some tutorials.
A starting point might be "The LEX & YACC Page"[^].
I found this (available for free) book: "Compiler Construction using Flex and Bison"[^] pretty interesting.
这篇关于lex和yacc语法来识别c ++函数调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文