directive parser and test