Flexible compiler pipeline definitions

I am developing a compiler platform for .NET and want a flexible way to define pipelines. I considered the following options:

  • WWF
  • XML XML Pipeline Description
  • Custom pipeline description in code (using Nemerle macros to determine the syntax for it)
  • Other code based description

Requirements:

  • You should not depend on functionality only in later versions of .NET (3+), since it is designed for cross-platform use on top of managed kernels, which means limited limited .NET functionality.
  • Must allow the construction of a conditional pipeline, so you can specify that certain command line parameters will correspond to certain elements and orders.

WWF will be pleasant, but not in line with the first requirement. Others will work, but less optimal due to work.

Does anyone know of a solution that will meet these goals without any change?

+3
source share
2 answers

If you know Ruby, then the solution is to write a simple internal DSL that can generate whatever types of pipeline data and read / write code you need. Creating XML is a quick way to get started. You can always change the DSL to generate a different format if necessary.

You can also look at the Microsoft Phoenix compiler for inspiration.

+1
source

Boo, , , , .

0

Source: https://habr.com/ru/post/1696858/


All Articles