c#.net编译器可以识别诸如int,else,if,double之类的关键字 [英] c#.net compiler to recognize the keywords such as int,else,if,double

查看:99
本文介绍了c#.net编译器可以识别诸如int,else,if,double之类的关键字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI
我已经在c#.net中编写了一个编译器,但是如果我们删除其中的任何字母,它都不会发现或识别诸如int,if,return,double语句之类的错误.
例如在int中,如果我删除了i,那么nt就在那里,当我们进行编译时,它应该显示错误.
但我无法得到.

请提供代码以识别诸如
之类的关键字

HI
i have written an compiler in c#.net but it is not finding or recognizing the errors such as int, if,return,double statements, if we remove any letter of them.
for example in int if i remove i then nt will be there and when we compile then it should show errors.
but i couldnt get.

please provide the code to recognize the keywords like
int,double if, else by the compiler.

推荐答案

这不是一项家庭作业服务;没有人会为您做您的工作.

不要问请提供代码给...",因为这表明您不是在试图帮助自己.您将获得的所有收入都将被忽略,滥用或被告知尝试使用rentacoder(它们使您为软件付费).

如果您有特定问题,请询问.人们会尽力提供帮助.

如果您确实需要帮助来识别关键字,请向我们展示您所拥有内容的一小部分相关部分(通过代码块"小部件包含在< pre> ...</pre>标签中,以保留格式)解释你的问题是什么.不要发布整个应用程序-没有人会阅读它!
This is not a homework service; no-one here will do your work for you.

Do not ask "Please provide the code to ..." as it shows your are not trying to help yourself. All you will get is ignored, abused, or told to try rentacoder (where they make you pay for software).

If you have a specific problem, ask about it. People will try to help.

If you actually want help to recognize the keywords, show us a small, relevant section of what you have (enclosed in <pre>...</pre> tags via the "code block" widget to preserve the formatting) and explain what your problem is. Do not post your whole app - nobody will read it!


p.saikrishna写道:
p.saikrishna wrote:

我有用c#.net


编写了一个编译器
真的吗?如果是这样,那么恭喜您.
但是,您剩下的问题以某种方式使我有些怀疑.我看不到如何在无法识别关键字的情况下编写编译器...

:)



really? if so, congratulations are in order.
But somehow the remainder of your question makes me doubt that a little; I don''t see how you could write a compiler while not being able to recognize keywords...

:)


这篇关于c#.net编译器可以识别诸如int,else,if,double之类的关键字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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