Very basic (and broken) parsing of directives