adjust rst grammar and exit when the code has no line terminator.