forked from GitHub/gf-core
98 lines
5.3 KiB
HTML
98 lines
5.3 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<title>RGL Source Browser</title>
|
|
<meta name="description" content="">
|
|
<meta name="viewport" content="width=device-width">
|
|
<link rel="shortcut icon" href="http://cdn.dustball.com/book_next.png" type="image/png">
|
|
<link rel="stylesheet" href="http://www.grammaticalframework.org/css/style.css">
|
|
<link rel="stylesheet" href="style.css">
|
|
<link rel="stylesheet" href="google-code-prettify/prettify-gf.css">
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1>RGL Source Browser</h1>
|
|
</header>
|
|
<div id="loading">
|
|
<img src="ajax-loader.gif" /> loading...
|
|
</div>
|
|
<div role="main">
|
|
<div class="pane left">
|
|
<div id="languages"></div>
|
|
<div id="modules" class="maxheight scroll-y"></div>
|
|
</div>
|
|
<div class="pane right">
|
|
<div id="tabbar">
|
|
<h2>...</h2>
|
|
<a href="http://www.grammaticalframework.org/lib/doc/synopsis.html" title="RGL Synopsis">Synopsis...</a>
|
|
</div>
|
|
<div id="scope" class="panel scope maxheight">
|
|
<input type="text" id="search" />
|
|
<span id="scope_count">0</span> items
|
|
<input type="submit" id="submit" value="Filter" />
|
|
<input type="reset" id="clear" value="Clear" />
|
|
<input type="checkbox" id="case_sensitive" checked="checked" /><label for="case_sensitive">Case sensitive?</label>
|
|
<input type="radio" name="show" id="show_all" checked="checked" /><label for="show_all">Show all</label>
|
|
<input type="radio" name="show" id="show_local" /><label for="show_local">Local only</label>
|
|
<div class="maxheight scroll-y">
|
|
<table id="scope_list"></table>
|
|
</div>
|
|
</div>
|
|
<div id="code" class="panel code maxheight">
|
|
<pre class="prettyprint lang-gf linenums maxheight scroll-y"></pre>
|
|
</div>
|
|
<div id="help" class="panel help maxheight scroll-y">
|
|
|
|
<h3>Understanding the scope information</h3>
|
|
<p>The scope information shown by this tool is basically the output of running GF with the <code>--tags</code> flag. This lists all the functions visible in the scope of a module, one per line. Each line can have two possible forms:</p>
|
|
|
|
|
|
<h4>1. Local functions</h4>
|
|
<pre>mkPrep oper-type /lib/src/english/ParadigmsEng.gf:204 Str -> {s : Str; lock_Prep : {}}</pre>
|
|
<p>For locally defined functions, the second column <code>oper-type</code> indicates the judgement type, followed by the location in the souce file and its type information.</p>
|
|
|
|
<h4>2. External functions</h4>
|
|
<pre>Number indir ResEng R /lib/doc/browse/tags/ParamX.gf-tags</pre>
|
|
<p>The <code>indir</code> indicates this function is defined in an external module (note that no distinction is made between functions from opened modules and inherited ones.) <code>ResEng</code> is the name of the opened or inherited module, while <code>R</code> 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 <code>ResEng</code> module, it is actually originally defined in <code>ParamX</code>.</p>
|
|
|
|
<h3>The RGL directory structure</h3>
|
|
<p>The drop-down at the top left lists all child directories under <code><a href="http://www.grammaticalframework.org/lib/src/">/lib/src</a></code> in the GF source code repository. Most directories represent individual languages, however many have special functions:</p>
|
|
<dl>
|
|
<dt><code>abstract</code></dt><dd>Abstract syntaxes shared by all resource grammars</dd>
|
|
<dt><code>api</code></dt><dd>The RGL API and instantiations of the API modules in all languages</dd>
|
|
<dt><code>common</code></dt><dd>Resource modules common to all languages</dd>
|
|
<dt><code>parametric</code></dt><dd></dd>
|
|
<dt><code>prelude</code></dt><dd>Common low-level functions</dd>
|
|
</dl>
|
|
|
|
In addition, the following directories are not individual languages but language functors, shared by resource grammars for related language families:
|
|
<dl>
|
|
<dt><code>hindustani</code></dt><dd>Used by Hindi, Persian, Punjabi, Urdu</dd>
|
|
<dt><code>romance</code></dt><dd>Used by Catalan, French, Italian, Romanian, Spanish</dd>
|
|
<dt><code>scandinavian</code></dt><dd>Used by Danish, Norwegian, Swedish</dd>
|
|
</dl>
|
|
|
|
<h3>About</h3>
|
|
<p>A basic tool for looking up module scopes and quickly looking at module sources, created out of necessity. It is experimental and is known to hang when handling large files. All feedback is welcome.</p>
|
|
|
|
<h3>Known issues and To-do</h3>
|
|
<ul>
|
|
<li>Some way of browsing just the API</li>
|
|
<li>Better visual cues for functions in scope</li>
|
|
<li>The page sometimes stalls when handling large files (in particular the dictionary modules)</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<br style="clear:both" />
|
|
</div>
|
|
<footer id="footer">
|
|
John J. Camilleri. <em>Updated 2012-05-16.</em>
|
|
</footer>
|
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
|
|
<script src="google-code-prettify/prettify.js"></script>
|
|
<script src="google-code-prettify/lang-gf.js"></script>
|
|
<script src="script.js"></script>
|
|
</body>
|
|
</html> |