<div dir="ltr">asdf asdf asdf<div><br></div><div>Years ago I fed a tiny grammar into Coco to make a scanner that I used to sort modules by compilation order. That grammar was only complete enough to know when the IMPORT statement was fully processed, or missing. Two concerns that made Coco seem useful beyond hand coding were comments, particularly comments before the word MODULE, and the module name reassignment, IMPORT localname := cannonicalname;</div><div><br></div><div>I released this as module AlmGather perhaps 20 years ago. It differed from the similar Builder that Moessenbock and others released, in that his module only sorted the names that were given as parameters, and mine dug through the IMPORT lists and found everything online that needed to be compiled.</div><div><br></div><div>There should be V4 and S3 versions floating in the archives. </div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 29, 2017 at 10:10 AM, Bob Walkden <span dir="ltr"><<a href="mailto:bob@web-options.com" target="_blank">bob@web-options.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">According to the EBNF for O7, the smallest legal module is<br>
<br>
MODULE ident; END ident.<br>
<br>
So I think you'd have to check your text for that at least.<br>
<span class="HOEnZb"><font color="#888888"><br>
B<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On 29 Jan 2017, at 16:00, "<a href="mailto:peter@easthope.ca">peter@easthope.ca</a>" <<a href="mailto:peter@easthope.ca">peter@easthope.ca</a>> wrote:<br>
><br>
> 123456789 123456789 123456789 123456789 123456789 123456789 123456789<br>
> 123456789<br>
><br>
> To detect whether a Text is a source, my initial thought is to read,<br>
> searching for the keyword MODULE.<br>
><br>
> This or a similar problem must have been solved years ago. Tips? A<br>
> similar calculation to adapt to this case?<br>
><br>
> Thanks, ... Lyall E.<br>
> --<br>
><br>
> 123456789 123456789 123456789 123456789 123456789 123456789 123456789<br>
> Tel: +1 360 639 0202 Pender Is.: +1 250 629 3757<br>
> <a href="http://easthope.ca/Peter.html" rel="noreferrer" target="_blank">http://easthope.ca/Peter.html</a> Bcc: peter at easthope. ca<br>
><br>
> --<br>
> <a href="mailto:Oberon@lists.inf.ethz.ch">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related systems<br>
> <a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon" rel="noreferrer" target="_blank">https://lists.inf.ethz.ch/<wbr>mailman/listinfo/oberon</a><br>
--<br>
<a href="mailto:Oberon@lists.inf.ethz.ch">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related systems<br>
<a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon" rel="noreferrer" target="_blank">https://lists.inf.ethz.ch/<wbr>mailman/listinfo/oberon</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Aubrey McIntosh, Ph.D.<div>1502 Devon Circle</div><div>Austin TX 78723</div><div>(512) 348-7401</div><div><br></div></div></div>
</div>