Detecting whether a Text is a module source.
123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 To detect whether a Text is a source, my initial thought is to read, searching for the keyword MODULE. This or a similar problem must have been solved years ago. Tips? A similar calculation to adapt to this case? Thanks, ... Lyall E. -- 123456789 123456789 123456789 123456789 123456789 123456789 123456789 Tel: +1 360 639 0202 Pender Is.: +1 250 629 3757 http://easthope.ca/Peter.html Bcc: peter at easthope. ca
According to the EBNF for O7, the smallest legal module is MODULE ident; END ident. So I think you'd have to check your text for that at least. B
On 29 Jan 2017, at 16:00, "peter@easthope.ca" <peter@easthope.ca> wrote:
123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
To detect whether a Text is a source, my initial thought is to read, searching for the keyword MODULE.
This or a similar problem must have been solved years ago. Tips? A similar calculation to adapt to this case?
Thanks, ... Lyall E. --
123456789 123456789 123456789 123456789 123456789 123456789 123456789 Tel: +1 360 639 0202 Pender Is.: +1 250 629 3757 http://easthope.ca/Peter.html Bcc: peter at easthope. ca
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
asdf asdf asdf 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; 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. There should be V4 and S3 versions floating in the archives. On Sun, Jan 29, 2017 at 10:10 AM, Bob Walkden <bob@web-options.com> wrote:
According to the EBNF for O7, the smallest legal module is
MODULE ident; END ident.
So I think you'd have to check your text for that at least.
B
On 29 Jan 2017, at 16:00, "peter@easthope.ca" <peter@easthope.ca> wrote:
123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
To detect whether a Text is a source, my initial thought is to read, searching for the keyword MODULE.
This or a similar problem must have been solved years ago. Tips? A similar calculation to adapt to this case?
Thanks, ... Lyall E. --
123456789 123456789 123456789 123456789 123456789 123456789 123456789 Tel: +1 360 639 0202 Pender Is.: +1 250 629 3757 http://easthope.ca/Peter.html Bcc: peter at easthope. ca
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- Aubrey McIntosh, Ph.D. 1502 Devon Circle Austin TX 78723 (512) 348-7401
participants (3)
-
Aubrey McIntosh -
Bob Walkden -
peter@easthope.ca