On Thu, 2 Mar 2006, Frank Heckenbach wrote:
Pascal Viandier wrote:
By "garbage" I mean something that is not Pascal code.
[..]
I don't think it says you can put garbage after the `end.', but only useless, i.e. unused, modules, as Waldek said. In fact the syntax rules above this paragraph say:
program = programblock . programblock = programcomponent { programcomponent } . programcomponent = mainprogramdeclaration `.' | moduledeclaration `.' .
Nothing about garbage there.
suggestion for a solution: after the "end." then skip comments, if any then if the next word is not program | module | unit: terminate reading.
Russ