Hi Christopher, Thank you for useful guidelines, I will follow closely. I am also reading Oberon-07 report outlining differences to 02, also Oberon 07 at a glance giving distilled info. I have somehow managed to convert `Splines.Mod' that is referred to in Applications chapters of the project book. Many thanks Tomas ---------- Původní zpráva ---------- Od: Chris Burrows <chris@cfbsoftware.com> Komu: 'ETH Oberon and related systems' <oberon@lists.inf.ethz.ch> Datum: 28. 3. 2017 13:22:18 Předmět: Re: [Oberon] FPGA Oberon - Definition Module Tool "Hi Tomas, Note that Def.Mod is written using Oberon-2. If you want to use it on Project Oberon you will have to modify it so that it conforms to the Oberon- 07 language report. It would make a good mini-project for you to do to become more familiar with Project Oberon. Here are a couple of tips to get you started: 1. You will need to implement a function named CAP that converts characters in the range "a" to "z" to the corresponding capital letter in the range "A" to "Z". 2. You will need to refactor any code that contains RETURN statements anywhere other than the end of a function PROCEDURE. e.g. replace the following: BEGIN IF sym = eot then RETURN END; sym := none; ln := line ... ... with: BEGIN IF sym # eot THEN sym := none; ln := line ... ... 3. COPY is no longer required to copy character arrays. You can just use an assignment statement: e.g. COPY(x, v) can be written as v := x Regards, Chris Chris Burrows CFB Software http://www.astrobe.com/RISC5 From: Oberon [mailto:oberon-bounces@lists.inf.ethz.ch] On Behalf Of Treutwein Bernhard Sent: Tuesday, 28 March 2017 8:49 PM To: 'thomas.kral@email.cz' Cc: 'ETH Oberon and related systems' Subject: Re: [Oberon] FPGA Oberon - Definition Module Tool Hi Thomas, what about this one: https://sourceforge.net/p/oberon/oberonv4/ci/master/ tree/UV4/Def.Mod regards -- Bernhard From: thomas.kral@email.cz [mailto:thomas.kral@email.cz] Sent: Monday, March 27, 2017 1:14 PM To: ETH Oberon and related systems Subject: Re: [Oberon] FPGA Oberon - Definition Module Tool Hi Wojciech, I am looking in my copy of V4, does not seem to contain `Def.Mod'. Where it comes from in your version? $ tar -tzf ProjectOberon.V4.tar.gz | grep Def.Mod Many thanks Tomas ---------- Původní zpráva ---------- Od: Skulski, Wojciech <skulski@pas.rochester.edu> Komu: ETH Oberon and related systems <oberon@lists.inf.ethz.ch> Datum: 25. 3. 2017 15:53:54 Předmět: Re: [Oberon] FPGA Oberon - Definition Module Tool
I am thinking of a simple tool that could extract definition info from *. Mod
How about Def.Mod which is available under Oberon System V4? Right click on "Def.Show Def.Mod" opens a new viewer with the following: DEFINITION Def; (* CAS *) PROCEDURE Show; (* ( "*" | "^" | name ) [ "\P" ] --P option enforces plain text style *) END Def. ---------------------------------------------------------------- Def.Show Documents.Mod opens the following viewer: DEFINITION Documents; CONST profile = "Documents.Profile"; (* on startup all openers contained in this file are registered automatically *) TYPE Opener = POINTER TO RECORD pattern-, cmd-: ARRAY 32 OF CHAR; next-: Opener END; VAR openers-: Opener; PROCEDURE Open; (* ^ | name Opens the specified file with the registered opener, if no specific opener is found for the extension of the file, Edit. Open is used. *) PROCEDURE RegisterOpener (pattern, command: ARRAY OF CHAR); (* Registers the opener command for the pattern. Openers that are registered earlier can be overwritten by (more specific) openers registered later. *) PROCEDURE RegisterOpeners; (* ^ | filename Registers all the openers contained in the specified file. Their precedence is as they appear in the file. *) END Documents. ________________________________________ From: Oberon [oberon-bounces@lists.inf.ethz.ch] on behalf of thomas.kral@ email.cz [thomas.kral@email.cz] Sent: Friday, March 24, 2017 7:52 AM To: ETH Oberon and related systems Subject: [Oberon] FPGA Oberon - Definition Module Tool Hi, I am thinking of a simple tool that could extract definition info from *.Mod and produce respective *.Def file. Definition files can be quickly looked at, to remind a programmer of the interface *.Mod modules export. While on Linux one could use grep $ grep PROCEDURE\ * *.Mod.txt to obtain info at least about procedures, but how about exported types and variables? I am looking for a recommended way how to simply code such a tool, is it a good idea to use `ORP' parser somehow for the task? I prefer to code it simple, does not have to be perfect, but should carry the idea. Tomas -- 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 "