Click here to Skip to main content
15,893,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Updated 19-Oct-11 1:45am
v2

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
 
Share this answer
 
v3
Comments
Nagy Vilmos 19-Oct-11 8:35am    
A researched answer! Who'd a thunk it. ;)
Manfred Rudolf Bihy 19-Oct-11 8:56am    
Yeah, I tend to do that from time to time. :)
It wasn't nescessary here though since I know of ANTLR since 4 years. Today I did discover that the C# port now has much better support than before. I must dig into the Visual Studio extensions and try them out.
BillWoodruff 19-Oct-11 9:10am    
Excellent answer, Manfred +5
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.
 
Share this answer
 
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
 
Share this answer
 
v2
As with the others, the two languages are much of a muchness so choose the one that will be better for you.
If you think you'll be going down the Windows path for more development then invest the time in C#, otherwise I'd say go Java.
 
Share this answer
 
Choose what you feel most comfortable with because:
It looks like from what you describe you will need to make use of regular expressions.
Both Java and C# will allow you to implement regular expressions.

I would choose C# because I have a little bit of experience in it - if you really are a n00b to both languages I would however go for Java as Manfred explains above it is developed in Java.

But this is purely based on opinion and not direct experience of ANTLR.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900