Files
gf-core/lib/doc/browse/index.html
2013-07-25 07:36:34 +00:00

171 lines
8.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html>
<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="icon.png" type="image/png">
<link rel="stylesheet" href="google-code-prettify/prettify-gf.css">
<link rel="stylesheet" href="layout-default-latest.css" />
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" type="text/css" href="http://cloud.grammaticalframework.org/syntax-editor/editor.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
<script type="text/javascript" src="jquery.layout-latest.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('body').layout({
applyDemoStyles: false,
north: {
closable: false,
resizable: false,
spacing_open: 0,
}
});
});
</script>
<script src="jquery.history.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>
</head>
<body>
<div id="loading">
<img src="ajax-loader.gif" /> Loading...
</div>
<div class="ui-layout-center">
<div id="scope" class="panel scope">
<div id="controls">
<input type="text" id="search" />
&nbsp;<span id="count">0</span> items&nbsp;
<input type="reset" id="clear" value="Clear" />
<!-- input type="checkbox" id="case_sensitive" /><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>
<table id="results"></table>
</div><!-- panel scope -->
<div id="code" class="panel code">
<pre class="prettyprint lang-gf linenums"></pre>
</div><!-- panel code -->
<div id="api" class="panel api">
Search the API by constructor name <strong>or</strong> type signature:
<div id="controls">
<input type="text" id="search" />
&nbsp;<span id="count">0</span> items&nbsp;
<input type="reset" id="clear" value="Clear" />
</div>
<table id="results"></table>
</div><!-- panel api -->
<!-- Syntax editor -->
<script type="text/javascript" src="http://cloud.grammaticalframework.org/js/grammar_manager.js"></script>
<script type="text/javascript" src="http://cloud.grammaticalframework.org/js/support.js"></script>
<script type="text/JavaScript" src="http://cloud.grammaticalframework.org/js/localstorage.js"></script>
<script type="text/javascript" src="http://cloud.grammaticalframework.org/js/pgf_online.js"></script>
<script type="text/javascript" src="http://cloud.grammaticalframework.org/syntax-editor/ast.js"></script>
<script type="text/javascript" src="http://cloud.grammaticalframework.org/syntax-editor/editor_menu.js"></script>
<script type="text/javascript" src="http://cloud.grammaticalframework.org/syntax-editor/editor.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var server = pgf_online({
grammars_url: "http://www.grammaticalframework.org/grammars/"
});
var gm = new GrammarManager(server, {
initial: {
grammar: "http://www.grammaticalframework.org/grammars/LibraryBrowser.pgf",
startcat: "Utt"
}
});
var editor = new Editor(gm, {
target: "editor",
show_grammar_menu: false
});
});
</script>
<div id="editor" class="panel editor">
</div><!-- panel editor -->
<div id="help" class="panel help">
<h3>About</h3>
<p>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.</p>
<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>Issues</h3>
<h4>Something is missing or out of date</h4>
<p>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.</p>
</div><!-- panel help -->
</div><!-- ui-layout-center -->
<div class="ui-layout-north">
<header>
<img src="../../../doc/Logos/gf0.png" alt="" />
<h1 title="...or GFRGLSB as we like to call it">GF Resource Grammar Library Source Browser</h1>
<div id="tabbar">
<span class="module">
Module: <span id="module_name">...</span>
<a class="tab scope" href="#scope">scope</a>
<a class="tab code" href="#code">code</a>
</span>
<a class="tab api" href="#api">API</a>
<a class="tab editor" href="#editor">Tree Builder</a>
<a class="tab help" href="#help">Help</a>
<a class="synopsis" href="http://www.grammaticalframework.org/lib/doc/synopsis.html" target="_blank">Synopsis</a>
</div>
</header>
<footer id="footer">
John J. Camilleri<br/><em>Updated 2013-07-23</em>
</footer>
</div><!-- ui-layout-north -->
<div class="ui-layout-west">
<div id="languages"></div>
<div id="modules"></div>
</div><!-- ui-layout-west -->
</body>
</html>