[Oberon] FPGA Oberon - Definition Module Tool

thomas.kral at email.cz thomas.kral at email.cz
Mon Mar 27 13:14:02 CEST 2017


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 at pas.rochester.edu>
Komu: ETH Oberon and related systems <oberon at 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 at lists.inf.ethz.ch] on behalf of thomas.kral@
email.cz [thomas.kral at 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 at lists.inf.ethz.ch mailing list for ETH Oberon and related systems 
https://lists.inf.ethz.ch/mailman/listinfo/oberon 
"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20170327/b812ade9/attachment.html>


More information about the Oberon mailing list