473,387 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Compiler in C# (.NET)

Hi.

Hello, i want doing simple compiler in C# (.NET).
I have lexer and parse file. What kind of tools should I use? And what to
do??

Thanks!
pawel

Dec 6 '05 #1
8 1470
Not sure I understand the question fully, but if you just want to compile C#
code, "csc" is the C# compiler and is part of the .NET framework (SDK maybe)
(it is not dependent on VisualStudio etc)... just search on your HDD for csc
and try csc /?
Alternatively - MSDN to the rescue:
http://msdn2.microsoft.com/en-us/library/2fdbz5xd.aspx and
http://msdn2.microsoft.com/en-us/library/78f4aasd.aspx

(apparently the path is set correctly to use CSC if you use the .NET
Framework SDK Command Prompt)

Easier option, though, is to grab e.g. an Express Edition and use that!

Marc

"Pawel" <si*******@op.pl> wrote in message news:dn**********@news.onet.pl...
Hi.

Hello, i want doing simple compiler in C# (.NET).
I have lexer and parse file. What kind of tools should I use? And what to
do??

Thanks!
pawel

Dec 6 '05 #2
Hi,
no idea if you have the same tools that C does, take a look at
http://en.wikipedia.org/wiki/Compiler-compiler you may find there what you
want

A good book of compilers will help you here, I did this LONG time ago when I
was @ school

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Pawel" <si*******@op.pl> wrote in message news:dn**********@news.onet.pl...
Hi.

Hello, i want doing simple compiler in C# (.NET).
I have lexer and parse file. What kind of tools should I use? And what to
do??

Thanks!
pawel

Dec 6 '05 #3
Pawel wrote:
Hi.

Hello, i want doing simple compiler in C# (.NET).
I have lexer and parse file. What kind of tools should I use? And what to
do??


Try the comp.compilers newsgroup.

Try http://groups.google.com/advanced_search with C# as the text search
and comp.compilers as the target newsgroup. Plenty of interesting hits
occur.

http://www.mono-project.com/CSharp_Compiler is of interest after skimming
through the google search hits. http://www.mono-project.com/Compiling_Mono
states:

"This document describes how to compile and install Mono from its source
code, the source code is available from our download page. ..."

Hmm. Why do you want to re-invent the wheel? Why not dig into the mono
project if you want to get under the hood of a C# compiler? (Rhetorical
questions.)

Doug


Dec 6 '05 #4
Pawel,

ANTLR is a compiler compiler that can work with C# code.

<http://www.antlr.org>

Brian

Pawel wrote:
Hi.

Hello, i want doing simple compiler in C# (.NET).
I have lexer and parse file. What kind of tools should I use? And what to
do??

Thanks!
pawel


Dec 6 '05 #5
Pawel,

Here is one free compiler generator.
http://www.ssw.uni-linz.ac.at/Research/Projects/Coco/

It has a version that generates c# code as well as it comes with sample
grammar file for the c# language.

I kind of dislike that they use recursive descent method (I'd rather prefer
LALR or some other LR(k)) parser, but this is the best free one that I've
found so far.

I'll appreciate if someone else in the group that knows other parser
generator tools that generates c# post some links.
--
HTH
Stoitcho Goutsev (100) [C# MVP]

"Pawel" <si*******@op.pl> wrote in message news:dn**********@news.onet.pl...
Hi.

Hello, i want doing simple compiler in C# (.NET).
I have lexer and parse file. What kind of tools should I use? And what to
do??

Thanks!
pawel

Dec 6 '05 #6
Stoitcho Goutsev (100) [C# MVP] wrote:
Pawel,

Here is one free compiler generator.
http://www.ssw.uni-linz.ac.at/Research/Projects/Coco/

It has a version that generates c# code as well as it comes with sample
grammar file for the c# language.

I kind of dislike that they use recursive descent method (I'd rather prefer
LALR or some other LR(k)) parser, but this is the best free one that I've
found so far.

I'll appreciate if someone else in the group that knows other parser
generator tools that generates c# post some links.


I have managed to adapt flex/bison output for use in C# quite easily. I
am using it for over three years now and it works just fine, not
requiring you to use any extra runtime libraries (like ANTLR etc.). I'll
try to put it together and post it soon. Just watch my sourceforge
project at http://sourceforge.net/projects/nscript

(I know nothing is there yet, but I promise it's in the works, I just
haven't had too much time/mood lately)

Stefan
Dec 6 '05 #7
Stefan,

That would be great.
I believe the whole community can benefit from it

Thanks
Stoitcho Goutsev (100) [C# MVP]
"Stefan Simek" <no****@nospam.nospam> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
Stoitcho Goutsev (100) [C# MVP] wrote:
Pawel,

Here is one free compiler generator.
http://www.ssw.uni-linz.ac.at/Research/Projects/Coco/

It has a version that generates c# code as well as it comes with sample
grammar file for the c# language.

I kind of dislike that they use recursive descent method (I'd rather
prefer LALR or some other LR(k)) parser, but this is the best free one
that I've found so far.

I'll appreciate if someone else in the group that knows other parser
generator tools that generates c# post some links.


I have managed to adapt flex/bison output for use in C# quite easily. I am
using it for over three years now and it works just fine, not requiring
you to use any extra runtime libraries (like ANTLR etc.). I'll try to put
it together and post it soon. Just watch my sourceforge project at
http://sourceforge.net/projects/nscript

(I know nothing is there yet, but I promise it's in the works, I just
haven't had too much time/mood lately)

Stefan

Dec 6 '05 #8

Stefan Simek wrote:
I have managed to adapt flex/bison output for use in C# quite easily. I
am using it for over three years now and it works just fine, not
requiring you to use any extra runtime libraries (like ANTLR etc.). I'll
try to put it together and post it soon. Just watch my sourceforge
project at http://sourceforge.net/projects/nscript

Great. That's one thing I disliked about ANTLR.
(I know nothing is there yet, but I promise it's in the works, I just
haven't had too much time/mood lately)

Stefan


Dec 6 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: | last post by:
I first thought I had some compiler setting wrong in VC# 2003 but it turns out that it has something to do with .NET framework v1.1 itself. If I understand correctly, .NET installer also installs a...
2
by: Mike Fisher | last post by:
I'm seeing an error when I try to run/debug a web service. Although it doesn't happen every time, it does occur more than half of the times I hit F5. It appears to be returned by the the JIT...
2
by: Scott Moore | last post by:
I am considering targeting .net with my existing compiler. I am new to both jvm and .net targets. I have no preference. This is not designed to start an argument, I would just like the...
8
by: Spar-Q | last post by:
I was wondering if it is possible to code in original C in VS.NET, instead of being limited to Managed C++. I was told at a conference by a MS guy that .NET can handle any language you want, so I'm...
3
by: Mark Rockman | last post by:
------ Build started: Project: USDAver2, Configuration: Debug .NET ------ Preparing resources... Updating references... Performing main compilation... error CS0583: Internal Compiler Error...
4
by: Patrick Olurotimi Ige | last post by:
http://www.php-compiler.net/ - some people have written a PHP implementation built on top of the .NET platform. What's more shocking? *** Sent via Developersdex http://www.developersdex.com...
2
by: mudge | last post by:
Hi, I'm getting some very strange problems with some C# code. We're running an ASP.NET application on a local server in a DMZ. If I access it using the internal address, the application works...
0
by: shamirza | last post by:
· When was .NET announced? Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET 'vision'. The July 2000 PDC had a number of sessions on .NET technology, and...
5
by: bz | last post by:
Hi, Can someone reccomend a good freeware IDE for PHP (with auto-complete, integrated debugger, etc) I'm experienced with VS.NET, and I thought to use Eclipse, but I just read some reviews and...
3
by: =?Utf-8?B?Ukxvc2tp?= | last post by:
Our site currently authenticates people using a php page on our IIS 6 site. Basically this page takes their login information (user name and password) to see if they are in our Active Directory....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.