attached is a patch that implements a style filter to convert country names to the 3 character ISO code which is used in e.g. the address rules.
It also changes two rules in inc/address to use this filter and adds a simple check to ValueBuilder to report the case when a filter is expected but not recognized because of parser or syntax errors like in the case reported here: http://gis.19327.n5.nabble.com/Substring-returns-full-string-tp5825603.html