C# Preprocessor

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Christopher Ireland

    C# Preprocessor

    Hello,

    I'm looking for a C# Preprocessor (shareware with source, if possible)
    which has the functionality of preprocessors which already exist in
    other languages, e.g.



    DIPP is a Pascal Preprocessor. The purpose of DIPP is to manipulate
    Pascal source code files.

    DIPP can

    * remove comments
    * process compiler directives and switches
    * remove compiler conditionals by wild card masks
    * remove compiler directives by wild card masks
    * insert, read, or skip include files by wild card masks
    * extract units' interface sections

    Such a tool would be very useful for parsing C# source files before
    making them available to third parties. Can anybody suggest such a tool
    to me please?

    --
    Christopher Ireland
    Posted with XanaNews version 1.17.6.6

    "... the question of whether Machines Can Think ... is about as
    relevant
    as the question of whether Submarines Can Swim."
    Edsger Wybe Dijkstra
  • Frans Bouma [C# MVP]

    #2
    Re: C# Preprocessor

    Christopher Ireland wrote:
    [color=blue]
    > Hello,
    >
    > I'm looking for a C# Preprocessor (shareware with source, if possible)
    > which has the functionality of preprocessors which already exist in
    > other languages, e.g.
    >
    > http://www.zeitungsjunge.de/delphi/dipp/
    >
    > DIPP is a Pascal Preprocessor. The purpose of DIPP is to manipulate
    > Pascal source code files.
    >
    > DIPP can
    >
    > * remove comments
    > * process compiler directives and switches
    > * remove compiler conditionals by wild card masks
    > * remove compiler directives by wild card masks
    > * insert, read, or skip include files by wild card masks
    > * extract units' interface sections
    >
    > Such a tool would be very useful for parsing C# source files before
    > making them available to third parties. Can anybody suggest such a
    > tool to me please?[/color]

    I'm not aware of such a preprocessor for C# as the usage for such a
    tool isn't that common. I've written a comment stripper once, see this
    blogpost:


    It's not 100% perfect, but as the source comes with it, you can tweak
    it further. It's easily upgradable for doing other things as well, just
    add more regexp's :)

    FB

    --
    ------------------------------------------------------------------------
    Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
    My .NET blog: http://weblogs.asp.net/fbouma
    Microsoft MVP (C#)
    ------------------------------------------------------------------------

    Comment

    • Christopher Ireland

      #3
      Re: C# Preprocessor

      Frans Bouma [C# MVP] wrote:
      [color=blue]
      > Christopher Ireland wrote:[color=green]
      > > Such a tool would be very useful for parsing C# source files before
      > > making them available to third parties. Can anybody suggest such a
      > > tool to me please?[/color]
      >
      > I'm not aware of such a preprocessor for C# as the usage for such a
      > tool isn't that common. I've written a comment stripper once, see this
      > blogpost:
      > http://weblogs.asp.net/fbouma/archiv...19/423047.aspx
      >
      > It's not 100% perfect, but as the source comes with it, you can tweak
      > it further. It's easily upgradable for doing other things as well,
      > just add more regexp's :)
      >
      > FB[/color]

      Thanks Frans!

      --
      Christopher Ireland
      Posted with XanaNews version 1.17.6.6

      "... the question of whether Machines Can Think ... is about as
      relevant
      as the question of whether Submarines Can Swim."
      Edsger Wybe Dijkstra

      Comment

      Working...