适用于ANTLR项目的Java还是C#? [英] Java or C# for ANTLR project?

查看:82
本文介绍了适用于ANTLR项目的Java还是C#?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

希望你们能提供帮助.我目前的任务是开发一个相对简单的基于结构化文本的解析工具.不幸的是,我无法提供大量细节,但总体思路是根据一组规则传递结构化文本文件并将其拆分为较小的文件,并使用一个补充工具来逆转此过程,即将较小的文件重新组合为结构化文本的工具文件.

我目前正在使用ANTLR(http://www.antlr.org/)开发该工具的解析器侧元素.

但是,我有一个约束,那就是必须使用Java或C#开发整个工具.我对这两种语言都非常满意,对选择哪种语言几乎一无所知.我知道它们在语法上非常相似,但不知道在我要实现的目标方面是否提供巨大优势.

其他可能有助于决策过程的因素
•我有一个性能常数,即工具运行的越快越好
•该工具将仅部署到Windows O/S

如果有人有任何意见或想法,将不胜感激.

Hey all,

Hope you guys can help. I am currently tasked with developing a relatively simple structured text based parsing tool. Unfortunately I cannot provide massive detail but the general idea is passing in a file of structured text and splitting it into smaller files dependant on a set of rules and a complementary tool to reverse this process i.e. a tool to recombine the smaller files into a structured text file.

I am currently developing the parser side element of the tool using ANTLR (http://www.antlr.org/).

However I have a constraint that the overall tool must be developed in Java or C#. I am a self confessed n00b to both of these languages and have little idea of which to select for development. I am aware that they are very similar syntactically but don’t know if one offers a huge advantage in what I am trying to achieve.

Other factors that may help in the decision making process
• I have a performance constant i.e. the faster the tool runs the better
• The tool will only be deployed to the Windows O/S

If anyone has any comments or thoughts then they would be greatly appreciated.

推荐答案

如果使用ANTLR,我建议您使用Java. Terrance Parr [ ^ ]是用Java开发的,而ANTLR的C#端口由 ^ ].

不过,可以说出C#的一点是,现在有Visual Studio扩展可用,其中包括语法高亮显示的语法等.因此,您可能应该使用同行使用的东西.如果您的公司主要从事与Java相关的开发,那么请使用C#.

问候,

—MRB
If you are doing this with ANTLR I would advise you to use Java. Terrance Parr[^] who is the head behind ANTLR developed it in Java and the C# ports of ANTLR are managed by Sam Harwell[^].

A point that would speak for C# though is that there are now Visual Studio extensions available with syntax highlighting for grammars etc.. So you should probably go with what your peers are using. If your company does mainly Java related development stick with that else go for C#.

Regards,

—MRB


如果您对这两种语言都没有丰富的经验,我会选择C#-仅仅是因为它不需要安装Java Runtime.并在您转过身时进行更新.
If you have no significant experience in either language, I would chose C# - simply because it does not require the Java Runtime to be installed. And updated every time you turn round.


同意OriginalGriff. C#和Java都是编程世界中公认的语言.

考虑到以下原因,我还建议使用C#.
1)在我看来,您是初级程序员.
2)该工具将仅部署到Windows O/S.

下面的链接可以帮助您开始使用C#.

http://msdn.microsoft.com/en-us/library/aa288436%28v = vs.71%29.aspx

http://msdn.microsoft.com/en-us/library/a72418yk%28v = vs.80%29.aspx
Agree with OriginalGriff. Both C# and Java are proven languages in programming world.

I also suggest to go with C# considering below reasons.
1) It seems to me you are beginner programmer.
2) The tool will only be deployed to the Windows O/S.

Below links may help you to start with C#.

http://msdn.microsoft.com/en-us/library/aa288436%28v=vs.71%29.aspx

http://msdn.microsoft.com/en-us/library/a72418yk%28v=vs.80%29.aspx


这篇关于适用于ANTLR项目的Java还是C#?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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