473,498 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to create a c# based programming language

I would like to create a new programming language that is based on
C#. call it XC#. Where the XC# command line compiler, xcsc,
functions as a precompiler that converts the xc# source code to c# and
calls the csc compiler to compile the resulting code.

how would the source code debugger work with such a thing? Where I
would need different source code views of the code being debugged. The
XC# code the programmer coded and the C# code that was actually
compiled. I would want the debugger to show the XC# code but suspect
only the translated to C# code would appear. Does the .NET debugger
support multiple views of the code being debugged?

( on the same note, it would be neat when debugging c# code to switch
to the MSIL view of the code )

xc# would have a feature for interspersing native sql into the c#
source code:
int activityId = 5 ;
DateTime activityDate ;
Decimal activityAmt ;
/sql
select a.activityAmt, a.ActivityDate
into :activityAmt, :activityDate
from Disbursements a
where a.ActivityId = :activityId
/end

In Visual Studio I would want the source to be handled as c# code
until the /sql line is encountered. Then my addin that parses xc#
code would kick in.

Just dreaming. would be great if programming languages could inherit
from base languages just like classes can inherit from base classes.
Interested to know what is doable and what is not.

-Steve

Mar 19 '07 #1
4 1685
What you are talking about sounds a lot like what C# 3.0 will do.

"Steve Richter" wrote:
I would like to create a new programming language that is based on
C#. call it XC#. Where the XC# command line compiler, xcsc,
functions as a precompiler that converts the xc# source code to c# and
calls the csc compiler to compile the resulting code.

how would the source code debugger work with such a thing? Where I
would need different source code views of the code being debugged. The
XC# code the programmer coded and the C# code that was actually
compiled. I would want the debugger to show the XC# code but suspect
only the translated to C# code would appear. Does the .NET debugger
support multiple views of the code being debugged?

( on the same note, it would be neat when debugging c# code to switch
to the MSIL view of the code )

xc# would have a feature for interspersing native sql into the c#
source code:
int activityId = 5 ;
DateTime activityDate ;
Decimal activityAmt ;
/sql
select a.activityAmt, a.ActivityDate
into :activityAmt, :activityDate
from Disbursements a
where a.ActivityId = :activityId
/end

In Visual Studio I would want the source to be handled as c# code
until the /sql line is encountered. Then my addin that parses xc#
code would kick in.

Just dreaming. would be great if programming languages could inherit
from base languages just like classes can inherit from base classes.
Interested to know what is doable and what is not.

-Steve

Mar 19 '07 #2
Ya check out the LINQ project at http://msdn2.microsoft.com/en-us/net.../aa904594.aspx

Mar 19 '07 #3
But don't get disheartened just because MS may have beat you to it, it just
proves that you're thinking along the right lines. One day that idea might
be ahead of everyone else and make you your millions!

"james" <ja********@gmail.comwrote in message
news:11**********************@y66g2000hsf.googlegr oups.com...
Ya check out the LINQ project at
http://msdn2.microsoft.com/en-us/net.../aa904594.aspx

Mar 20 '07 #4
On Mar 20, 5:38 am, "Paul Hadfield" <non...@noone.comwrote:
But don't get disheartened just because MS may have beat you to it, it just
proves that you're thinking along the right lines. One day that idea might
be ahead of everyone else and make you your millions!
thanks. having millions some day will be wonderful.

inline sql code is just an example of what a pre compiler could do.
and it would work completely differently than LINQ. What about
switching inline from C# to HTML or XML? A precompiler could
recognize the embedded HTML code and compile it as C# Form control
equivalents.

to support such a thing you need the debugger to support the different
source code views of the executing code. Is this possible with
the .NET debugger?

The IBM AS400 has very good support for integrating the compiler pre
processor with the debugger: http://publib.boulder.ibm.com/infoce...is/debug2c.htm
( the as400 had some great software technology. IBM also has total
nitwits running the company. )


Mar 20 '07 #5

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

Similar topics

5
1666
by: Tobias Windeln | last post by:
Hi! I'm looking for suggestions on object-based inheritance in Python. Automatic forwarding (often called delegation) in Python is easy: def __getattr__(self, attr): return...
4
8053
by: MD | last post by:
I am trying to create a dynamic SQL statement to create a view. I have a stored procedure, which based on the parameters passed calls different stored procedures. Each of this sub stored procedure...
7
9662
by: Wolfgang Kreuzer | last post by:
Hello all, I have two tables - Projects and ProjectStruct Table Projects contains master records of the projects, ProjectStruct allows to define a project herarchie and contains the fields...
2
3032
by: Jake Barnes | last post by:
Using javascript closures to create singletons to ensure the survival of a reference to an HTML block when removeChild() may remove the last reference to the block and thus destory the block is...
11
1948
by: arnuld | last post by:
hello all, 1st of all, i searched last 12 years archives of comp.lang.c++ because i have some problems. i got some help but not satisfied as i did not get solution specific to my problem. In the...
4
3707
by: Paciente8159 AKA Klayman | last post by:
Hi, I have a couple of doubts reggarding a plugin based application in C++? I want to build a c++ plugin based app. I have searched alot of things in the net but I still don't know how to...
7
1708
by: =?Utf-8?B?YW5kZXJzY2g=?= | last post by:
Hi It is possible to create an .exe file at runtime with .NET 2.0? I would like to create a .exe that should include: - an encrypted file - a simple winform to decrypt the included encrypted...
13
1590
by: stefaan | last post by:
Hello, I have recently had to deal with an XML-based programming language. (The programs are generated programmatically.) XML leads to a "two-level" parsing problem: first parse the xml into...
16
2194
by: Malcolm McLean | last post by:
I want this to be a serious, fruitful thread. Sabateurs will be plonked. Table-based programming is a new paradigm, similar to object-orientation, procedural decomposition, or functional...
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7205
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...
1
6887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4590
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1419
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
291
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.