throws an exception when ref-id is not found on reference-style images #4
added keywords
number of leading spaces on regexp should be optional
verbose message (with line number) on syntax error #4