A basic tool for looking through scopes and quickly jumping to code within GF's resource grammar library (RGL), created out of necessity. All feedback is welcome.
The scope information shown by this tool is basically the output of running GF with the --tags
flag. This lists all the functions visible in the scope of a module, one per line. Each line can have two possible forms:
mkPrep oper-type /lib/src/english/ParadigmsEng.gf:204 Str -> {s : Str; lock_Prep : {}}
For locally defined functions, the second column oper-type
indicates the judgement type, followed by the location in the souce file and its type information.
Number indir ResEng R /lib/doc/browse/tags/ParamX.gf-tags
The indir
indicates this function is defined in an external module (note that no distinction is made between functions from opened modules and inherited ones.) ResEng
is the name of the opened or inherited module, while R
is the alias under which it was opened. The final column points to another tags file where the type information for this function can be found. Note that though the function is available in the given context via the ResEng
module, it is actually originally defined in ParamX
.
The drop-down at the top left lists all child directories under /lib/src
in the GF source code repository. Most directories represent individual languages, however many have special functions:
abstract
api
common
parametric
prelude
hindustani
romance
scandinavian
All the scoping information shown is not read directly from the RGL on-demand. There is an in-between processing stage which must be run, so if something seems out of date just let me know and I can udpate things manually.