Questions tagged [compiler-as-a-service]

Future managed C# and VB compiler and language services API from Microsoft

In a future release of Visual Studio, C# and Visual Basic compilers and language services will be completely rewritten from scratch in managed code, with a clean and powerful managed API.

This effort is code-named 'Roslyn', and the managed compiler + services API will be available to all consumers. Roslyn API will expose all stages of the compiler pipeline: you will be able to use the C#/VB parser to create syntax trees from text, transform trees using Visitors, get the semantic information and bind nodes to symbols, and generate IL assemblies from syntax trees and assembly references to disk or to an in-memory stream.

13 questions
27
votes
5 answers

What would you do with Compiler as a Service

Seeing that we'll probably get this feature in the next release what are some of the things you either think you'll be able to do or things you would like to use this feature to do? Personally, during code generation (say in a MSBuild task) I…
Shiv Kumar
  • 9,284
  • 2
  • 33
  • 37
25
votes
5 answers

what is the state of the "C# compiler as a service "

Back at the PDC in 2008, in the C# futures talk by Anders Hejlsberg he talked about rewriting the C# compiler and providing a "compiler as a service" I certainly got the impression at the time that they were targeting the C# 4.0 timeframe for…
Tim Jarvis
  • 17,081
  • 9
  • 52
  • 91
24
votes
4 answers

What are the benefits of using Roslyn - compiler as a service

What is CaaS (Compiler As A Service) in regards to the Roslyn project? How does using the Roslyn feature improve the performance of a C# application over the current C# 4.0 compiler? What are the known limitations/issues in the Roslyn-CTP?
VSS
  • 7,676
  • 3
  • 32
  • 61
16
votes
2 answers

Can I use Roslyn for compile time code rewriting?

For example I have class Foo: INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; public int Bar {get;set;} } Can I get the Foo class AST and rewrite Bar, in compile time, to public string Bar { …
dotneter
  • 1,677
  • 2
  • 13
  • 24
10
votes
4 answers

What are the benefits of Compiler as a Service

In Anders Hejlsberg's .NET 4.0 presentation he discussed in NET 5.0 ("or some future release") they are working on a "Compiler as a Service" model. Anders Hejlsberg's states: [source][1] "We want to open up our compiler so it becomes an API you can…
Larry Hipp
  • 5,945
  • 3
  • 24
  • 29
9
votes
3 answers

Compiler as a service: How to build Refactoring tools?

Lisa Feigenbaum from Microsoft talks here about "Compiler as a service". I have read this would make it easier to build refactoring tools. How? Mono's CAAS is great but if Microsoft version is similar I don't see how this specific use case is done.
Yaron Naveh
  • 21,660
  • 31
  • 97
  • 151
8
votes
2 answers

What are the differences between Boo vs Nemerle?

It looks like both of these languages are dubbed as "what C# should have been", with hygenic macros, REPL, Compiler as a Serivce (CaaS), static + duck typing (way before C# had it). Are there any major difference between these two languages, or are…
Dax Fohl
  • 10,006
  • 5
  • 40
  • 82
5
votes
1 answer

What's the relationship between Mono Cecil and NRefactory and how to compare them to Roslyn?

I understand that Microsoft's Compiler as a Service or Roslyn project was inspired by Mono Cecil. But what's the relationship between Mono Cecil and NRefactory? Does one use the other? Or are they alternative technologies that do the same thing? It…
Water Cooler v2
  • 29,006
  • 41
  • 139
  • 286
4
votes
2 answers

Is it possible to call C# lexical/syntactic analyzers without compilation?

Considering this question of SO, where whole C# in-memory compiler is being called. When only lexical and syntactic analyzing is required: parse text as a stream of lexemes, check them and exit. Is it possible in current version of…
abatishchev
  • 92,232
  • 78
  • 284
  • 421
4
votes
2 answers

C# Compiler-as-a-Service: Mono.CSharp vs Microsoft.CSharp

I am looking to replace certain reflection-based parts of our code with ones that perform better using dynamic runtime compilation. Looking around I saw that both Mono and Microsoft have separate Compiler-as-a-Service solutions: Mono.CSharp and…
Amir Abiri
  • 7,074
  • 7
  • 37
  • 49
1
vote
1 answer

Accessing GCC on a cloud for compilation

We are building a cloud service to provide"Compilation As A Service". We have an Ubuntu 12.04 VM on Azure. We managed to install GCC on the VM as well. Now we are building the frontend on Visual Studio. In that we have a text box which would hold…
1
vote
1 answer

GCC compilation on Azure using a GUI

As a part of a college project we are implementing Compiler as a Service. For this we are planning to use a Virtual Machine on Azure preferably Ubuntu or CentOS. The problem is we have no leads. How do you get the GCC compiler onto the VM in the…
1
vote
2 answers

Mono.CSharp (Compiler as a Service) changes in version 2.10

I am running Mono version 2.10 on Ubuntu 11.10. I am trying to run the sample provided on http://blog.davidebbo.com/2012/02/quick-fun-with-monos-csharp-compiler-as.html ,but it seems to target a different version of mono. For instance Compile is a…
kristianp
  • 4,574
  • 27
  • 52