mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
gfse and cloud service documentation update
This commit is contained in:
@@ -111,19 +111,19 @@ For documentation of GF shell commands, see:
|
||||
<dd>This command can be used to check GF source code for syntax errors.
|
||||
It also converts GF source code to the JSON representation used in
|
||||
GFSE (the cloud-based GF grammar editor).
|
||||
<dt><code>/cloud?dir=</code>...<code>&command=upload&</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&</code>...
|
||||
<dt><code>/cloud?dir=</code>...<code>&command=<strong>upload</strong>&</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&</code>...
|
||||
<dd>Upload files to be stored in the cloud.
|
||||
<dt><code>/cloud?dir=</code>...<code>&command=make&</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&</code>...
|
||||
<dt><code>/cloud?dir=</code>...<code>&command=<strong>make</strong>&</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&</code>...
|
||||
<dd>Upload grammar files and compile them into a PGF file.
|
||||
The response code is 204 if the upload was successful.
|
||||
<dt><code>/cloud?dir=</code>...<code>&command=download&file=</code><var>path</var>
|
||||
<dt><code>/cloud?dir=</code>...<code>&command=<strong>download</strong>&file=</code><var>path</var>
|
||||
<dd>Download the specified file.
|
||||
<dt><code>/cloud?dir=</code>...<code>&command=ls&ext=.pgf</code>
|
||||
<dt><code>/cloud?dir=</code>...<code>&command=<strong>ls</strong>&ext=.pgf</code>
|
||||
<dd>List files with the specified extension, e.g.
|
||||
<code class=response>["Foods.pgf","Letter.pgf"]</code>.
|
||||
<dt><code>/cloud?dir=</code>...<code>&command=rm&file=</code><var>path</var>
|
||||
<dt><code>/cloud?dir=</code>...<code>&command=<strong>rm</strong>&file=</code><var>path</var>
|
||||
<dd>Remove the specified file.
|
||||
<dt><code>/cloud?dir=</code>...<code>&command=link_directories&newdir=</code>...
|
||||
<dt><code>/cloud?dir=</code>...<code>&command=<strong>link_directories</strong>&newdir=</code>...
|
||||
<dd>Combine server directores. This is used by GFSE to share grammars
|
||||
between multiple devices.
|
||||
</dl>
|
||||
@@ -131,7 +131,7 @@ For documentation of GF shell commands, see:
|
||||
<hr>
|
||||
<address></address>
|
||||
<div class=modtime><small>
|
||||
<!-- hhmts start -->Last modified: Wed Aug 1 17:35:16 CEST 2012 <!-- hhmts end -->
|
||||
<!-- hhmts start -->Last modified: Tue Oct 2 17:26:02 CEST 2012 <!-- hhmts end -->
|
||||
</small></div>
|
||||
<address>
|
||||
<a href="http://www.cse.chalmers.se/~hallgren/">TH</a>
|
||||
|
||||
@@ -59,10 +59,11 @@ of the display to "Enable editing on touch devices" that reveals all editing
|
||||
symbols.
|
||||
|
||||
<p>
|
||||
In spite of its name, the editor runs entierly in the web
|
||||
In spite of its name, the core of the editor runs in the web
|
||||
browser, so once you have opened the web page, you can
|
||||
<strong>continue editing</strong> grammars even while you are
|
||||
<strong>offline</strong>.
|
||||
<strong>offline</strong>. Grammar compilation & testing and some
|
||||
error checking is done by the GF server and is not available while offline.
|
||||
|
||||
<h3>Current status</h3>
|
||||
|
||||
@@ -81,6 +82,7 @@ abstract syntax, and one file for each concrete syntax.
|
||||
The supported abstract syntax corresponds to context-free grammars
|
||||
(no dependent types). The definition of an abstract syntax is limited to
|
||||
<ul>
|
||||
<li>a list of inherited abstract syntaxes,
|
||||
<li>a list of <em>category names</em>,
|
||||
<var>Cat<sub>1</sub></var> ; ... ; <var>Cat<sub>n</sub></var>,
|
||||
<li>a list of <em>functions</em> of the form
|
||||
@@ -91,6 +93,7 @@ The supported abstract syntax corresponds to context-free grammars
|
||||
|
||||
Available editing operations:
|
||||
<ul>
|
||||
<li>Inherited abstract syntaxes can be added and removed.
|
||||
<li>Categories can be added, removed and renamed. When renaming a category,
|
||||
occurences of it in function types will be updated accordingly.
|
||||
<li>Functions can be added, removed and edited. Concrete syntaxes are updated
|
||||
@@ -110,9 +113,12 @@ Error checks:
|
||||
|
||||
At the moment, the concrete syntax for a language <var>L</var> is limited to
|
||||
<ul>
|
||||
<li>opening the Resource Grammar Library modules
|
||||
<li>inheriting the concrete syntax <var>G<sub>i</sub>L</var>
|
||||
for each <var>G</var> inherited by the abstract syntax.
|
||||
<li>opening a selection of the Resource Grammar Library modules
|
||||
<code>Syntax</code><var>L</var>, <code>Paradigms</code><var>L</var>,
|
||||
<code>Lexicon</code><var>L</var> and <code>Extra</code><var>L</var>,
|
||||
<code>Lexicon</code><var>L</var>, <code>Symbolic</code><var>L</var>
|
||||
and <code>Extra</code><var>L</var>,
|
||||
<li><em>linearization types</em> for the categories in the abstract syntax,
|
||||
<li><em>linearizations</em> for the functions in the abstract syntax,
|
||||
<li><em>parameter type definitions</em>,
|
||||
@@ -123,13 +129,15 @@ At the moment, the concrete syntax for a language <var>L</var> is limited to
|
||||
|
||||
Available editing operations:
|
||||
<ul>
|
||||
<li>Modules can be added and removed from the list of opened Resource Grammar
|
||||
Library modules.
|
||||
<li>The LHSs of the linearization types and linearizations are determined by
|
||||
the abstract syntax and do not need to be entered manually.
|
||||
The RHSs can
|
||||
be edited.
|
||||
<li>Parameter types can be added, removed and edited.
|
||||
<li>Operation definitons can be added, removed and edited.
|
||||
<li>Definitions can be reordered (using drag-and-drop)
|
||||
<li>Definitions can be reordered (using drag-and-drop).
|
||||
</ul>
|
||||
Also,
|
||||
|
||||
@@ -155,13 +163,31 @@ Error checks:
|
||||
semantic errors are delayed until the grammar is compiled.
|
||||
</ul>
|
||||
|
||||
<h3>Grammar views</h3>
|
||||
|
||||
The editor supports three ways to view a grammar:
|
||||
|
||||
<ul>
|
||||
<li><strong>Column view</strong>:
|
||||
this is the traditional view where you see one complete grammar module at a
|
||||
time. i.e. either the abstract syntax or one of the concrete syntaxes in the
|
||||
grammar.
|
||||
<li><strong>Matrix view</strong>:
|
||||
this presents an overview of the grammar where columns
|
||||
correspond to the abstract and concrete syntax modules and rows correspond
|
||||
to the categories and functions in the grammar.
|
||||
<li><strong>Row view</strong>:
|
||||
this view shows one function form the abstract syntax and
|
||||
the corresponding linearization functions from all the concrete syntaxes.
|
||||
</ul>
|
||||
|
||||
<h3>Compiling and testing grammars</h3>
|
||||
|
||||
When pressing the <strong>Compile</strong> button, the grammar will be compiled
|
||||
with GF, and any errors not detected by the editor will be reported.
|
||||
If the grammar is free from errors the user can then
|
||||
test the grammar by clicking on links to the online GF shell, the Minibar or
|
||||
the Translation Quiz.
|
||||
The grammar will also be compiled when pressing the <strong>Minibar</strong>
|
||||
and <strong>Quiz</strong> buttons before opening the grammar for testing
|
||||
in the Minibar or the Translation Quiz, respectively.
|
||||
|
||||
<h3><img class=right src="P/1307545089_weather_04.png" alt="">
|
||||
<img class=right src="P/1306856253_weather_06.png" alt="">Grammars in the
|
||||
@@ -207,7 +233,8 @@ This means that name changes are propagated between devices like other changes.
|
||||
|
||||
<h3>Example-based grammar writing</h3>
|
||||
|
||||
This is work in progress...
|
||||
We experimented with this in 2011. It is currently not included, but it
|
||||
might return in a future version...
|
||||
|
||||
<h3>Future work</h3>
|
||||
|
||||
@@ -234,7 +261,7 @@ suitable for multiple users developing a grammar in collaboration.
|
||||
|
||||
<hr>
|
||||
<div class=modtime><small>
|
||||
<!-- hhmts start --> Last modified: Mon Jun 11 17:25:17 CEST 2012 <!-- hhmts end -->
|
||||
<!-- hhmts start -->Last modified: Tue Oct 2 19:26:08 CEST 2012 <!-- hhmts end -->
|
||||
</small></div>
|
||||
<address>
|
||||
<a href="http://www.cse.chalmers.se/~hallgren/">TH</a>
|
||||
|
||||
@@ -67,8 +67,7 @@ function draw_grammar_list() {
|
||||
home.appendChild(node("table",{"class":"grammar_list"},rows));
|
||||
}
|
||||
|
||||
home.appendChild(
|
||||
ul([li([a(jsurl("new_grammar()"),[text("New grammar")])])]));
|
||||
home.appendChild(ul(li(a(jsurl("new_grammar()"),[text("New grammar")]))));
|
||||
//editor.appendChild(text(local.count));
|
||||
home.appendChild(empty_id("div","sharing"));
|
||||
}
|
||||
@@ -1745,9 +1744,8 @@ function touch_edit() {
|
||||
/* --- DOM Support ---------------------------------------------------------- */
|
||||
|
||||
function a(url,linked) { return node("a",{href:url},linked); }
|
||||
function ul(lis) { return node("ul",{},lis); }
|
||||
function li(xs) { return node("li",{},xs); }
|
||||
function table(rows) { return node("table",{},rows); }
|
||||
function ul(lis) { return wrap("ul",lis); }
|
||||
function table(rows) { return wrap("table",rows); }
|
||||
function td_right(cs) { return node("td",{"class":"right"},cs); }
|
||||
function td_center(cs) { return node("td",{"class":"center"},cs); }
|
||||
function jsurl(js) { return "javascript:"+js; }
|
||||
|
||||
Reference in New Issue
Block a user