Groovy founder Guillaume Laforge built on top of the Java standard proposal for type safe Units of Measurements, JSR-275 with his case study of a Domain-Specific Language for unit manipulations some while ago.
Based on Unit-API the successor to JSR-275, and its leading Open Source implementation Eclipse UOMo together with Xtext/TS we'll see, how a similar DSL for unit manipulations could be created with Xtext. As well as other languages including Groovy or Scala.
25. Links
Eclipse – Project UOMo
http://www.eclipse.org/uomo/
Units of Measurement API
http://www.unitsofmeasurement.org
UCUM
http://www.unitsofmeasure.org