我需要词法分析C ++代码 [英] i need a lexical analysis c++ code

查看:80
本文介绍了我需要词法分析C ++代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我需要一个词法分析C ++代码.:rose:

hello, i need a lexical analysis c++ code please.:rose:

推荐答案

词法分析"不只是任何人都可以给您的方法.最重要的是,您将无法理解会发生什么.您需要了解词法分析器的过程,并且需要了解自动机理论和词法分析器算法的基础知识.我建议您阅读一本好的Automata和编译器设计书,以便您了解该过程.

如果您能理解,那您肯定可以为其编写代码.试一下 !!!祝你好运. :)
"Lexical analysis" is not like just a method that any one can give you. Above all you would not be able to understand what happens. You need to understand the process of lexical analyser and for that you need to have knowledge of Theory of Automata and basics of lexical analyser algorothm. I would rather suggest you to go through good Automata and compiler design book so that you understand the process.

If you can understand then no other than you can write the code for it for sure. Give a try !!! Good luck. :)


在对词法分析器进行编码(或要求使用工具为您完成)之前,您应先定义一个语法.
既然您似乎忽略了这个简单的条件,那么我建议您像其他人一样研究一本关于编译器构造的好书.
:)
Before coding a lexical analyzer (or ask a tool to do it for you), you should first define a grammar.
Since it looks like you''re ignoring this simple requisite, I advice you to study, as other people already did, a good book on compiler construction.
:)


这篇关于我需要词法分析C ++代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆