[Gambas-user] Parsing a class or module

Martín mbelmonte at belmotek.net
Fri Mar 24 14:08:55 CET 2023


Hi,

Given a class, for example myform.class, is there any algorithm that 
reads it and then:
List all the global variables
List all variables and methods of the class.
List all public variables of other classes that myform.class accesses.
List all public methods of other classes that myform.class accesses.
The idea behind all this is to be able to copy a form from a project and 
everything it needs to work and nothing else.

That is to say, if there is an auxiliary class clac.class and in that 
class there are two methods but myform.class uses only one of them, that 
is the one that is copied.

For example Gamabs IDE can order the classes in the treeview according 
to their location in the filesystem or according to their inheritance. 
To do this kind of thing there must be some algorithm that parses each 
code file.

Best regards.

Martin.



More information about the User mailing list