"COMPUTER POWER TO THE PEOPLE! DOWN WITH CYBERCRUD!" - Theodor Nelson
Saturday, September 10, 2005
Domain Specific Languages
I still see old world flat file specifications like the following:
I thought I would do something different implement the parser as if I was a Lisper. So, here's what I came up with:
And what does the code look like to parse it? It's even simpler than I thought:
WOW! I now have a method that shows the record layout that could be parsed for creating test records as well. I could even show it to a non-Smalltalker and they would know what's going on. I love the flexibility of Smalltalk! I love adding new tricks to my bag.