how to create a c# based programming language

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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

.



Relevant Pages

  • Re: MVP Award...
    ... XP box source code across the LAN: ... These times are too small to matter, and the source example is too small to matter. ... Yes, I understand VC8+ compiler has higher overhead, its definitely a better "lint" and the VS2005 IDE debugger is better! ...
    (microsoft.public.vc.mfc)
  • Adding practical (runtime) facts to a program
    ... the compiler and the debugger are researched and ... about a program's practical requirements to the source code of this ... program (or the debugger could also automatically collect such ...
    (comp.theory)
  • Re: FC4 good new tech, bad legacy support
    ... Often programmers abuse weaknesses in the strictness of how a ... >compiler implements a programming language. ... because an older compiler version seems to accept source code ... >which it should not accept according to programming language standards. ...
    (Fedora)
  • Re: Zero Optimization and Sign Optimization???
    ... I am talking about source code; ... mentioning a programming language or that a compiler would be ... I was thinking of the sort of optimization ...
    (comp.lang.c)
  • Re: Zero Optimization and Sign Optimization???
    ... I am talking about source code; I am not even mentioning a ... programming language or that a compiler would be used. ... optimizes by diddling source code. ...
    (comp.lang.c)