About
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.
Understanding the scope information
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:
1. Local functions
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.
2. External functions
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 RGL directory structure
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
- Abstract syntaxes shared by all resource grammars
api
- The RGL API and instantiations of the API modules in all languages
common
- Resource modules common to all languages
parametric
prelude
- Common low-level functions
hindustani
- Used by Hindi, Persian, Punjabi, Urdu
romance
- Used by Catalan, French, Italian, Romanian, Spanish
scandinavian
- Used by Danish, Norwegian, Swedish
Issues
Something is missing or out of date
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.
To-Do
- Some way of browsing just the API
- The page sometimes stalls when handling large files (in particular the dictionary modules)