> If you opt to go with ANTLR, you'll have to choose whether to 'compile'
> directly to MSIL code, or to emit, let's say, intermediate C# generated
> stuff which then to pass on to the c# command line compiler (ships with
> each
> .net runtime install). As someone who's been there, done that, I'd
> recommend
> that you go for the 'emit C#' path.

Some of my initial efforts were along the code generation lines.  Nearly all
my rules, and all of those I sought to formalise, were regarding field
validations, so I expressed each rule as:

Field
Condition
Requirement

This seemed (I never made it past initial design phase before leaving the
company) quite easy to transform into C# through templates, as both the
condition and requirement were expressed as conditional expressions, with
<,>, =, with the help of an in() function.  My first strategy was to
generate C# code for incorporation into the regular builds.  It has the
advantage that it can be checked and debugged with the regular code as if it
was written by a developer.

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to