473,231 Members | 1,727 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,231 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 1461
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: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.