Monday, January 03, 2011

For Loop

Last year I spent a considerable amount of time thinking about, designing, and building an interpreter for a small programming language called the Content Type Rule Language (Ctrl). The language itself is tiny, consisting of little more than if-then-else statements. The Ctrl turned into a special purpose programming language or Domain Specific Language that includes expressions specific to our rule engine's problem space.

In the next iteration, the Ctrl will be extended to include several new features including variable declaration, variable assignment, and a for-loop. A for-loop is needed in order to execute blocks of code repeatedly, and to support rules that are triggered by a counter. Because a counter in the Ctrl will be declared as a variable, the language needs variables too.

My goal in the next few blog posts is to explain how I intend to add these new features to the language. 

No comments:

Post a Comment