First, I neglected to mention in my previous post that I found Paul Cowan's blog to be a tremendous help in figuring out how build a DSL with Boo and Rhino DSL . Second, I wanted to point out that, because this is an internal DSL written in Boo, it's still possible to use familiar programming constructs in the DSL scripts. For example, I could dynamically generate the team definitions from some other datasource, like so: stats = GetData()
for row as DataRow in stats.Rows:
define row["name"]:
defense Determine.DefenseFromRanking(cast(int,row["defenseRanking"]))
pass_offense Determine.PassOffenseFromRanking(cast(int,row["passOffenseRanking"])), with_qb_type(Determine.QbTypeFromRatingAndExperience(cast(double,row["qbRating"]), cast(int,row["qbExperience"])))
run_offense Determine.RunOffenseFromRanking(cast(int,row["runOffenseRanking"]))
where GetData() returns a DataTable with multiple team statistics, and Det...
A blog about .NET development and pulling your hair out.