Namespace and file structure

namepace xyz;
<interface-section>
...
<implementaion-section>
....
begin
  <statement-list>
end.

OR
namepace xyz;
<interface-section>
...
<implementaion-section>
....
method F.F
begin
  <statement-list>
end;

question is both possibe?
can the code file end in
begin

end Dot
OR
a last proc/func implementtaion follwed by end semicolon?

The oxygen grammar is a bit not so clear to me, but I have to understand it in order to implement the grammar for my Txl transformator to the degree I need it.

the

begin
end.

is used to define an entry point, after which the compiler stops parsing the file (end. is the end of the file). The method one just defines a method body. Odds are if you generated multiple files, you don’t want begin/end. But all files should end with end.