gfse and cloud service documentation update

This commit is contained in:
hallgren
2012-10-02 17:32:52 +00:00
parent 92acb3691b
commit a47d2da448
3 changed files with 47 additions and 22 deletions

View File

@@ -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. <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 It also converts GF source code to the JSON representation used in
GFSE (the cloud-based GF grammar editor). GFSE (the cloud-based GF grammar editor).
<dt><code>/cloud?dir=</code>...<code>&amp;command=upload&amp;</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&amp;</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&amp;</code>... <dt><code>/cloud?dir=</code>...<code>&amp;command=<strong>upload</strong>&amp;</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&amp;</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&amp;</code>...
<dd>Upload files to be stored in the cloud. <dd>Upload files to be stored in the cloud.
<dt><code>/cloud?dir=</code>...<code>&amp;command=make&amp;</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&amp;</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&amp;</code>... <dt><code>/cloud?dir=</code>...<code>&amp;command=<strong>make</strong>&amp;</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&amp;</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&amp;</code>...
<dd>Upload grammar files and compile them into a PGF file. <dd>Upload grammar files and compile them into a PGF file.
The response code is 204 if the upload was successful. The response code is 204 if the upload was successful.
<dt><code>/cloud?dir=</code>...<code>&amp;command=download&amp;file=</code><var>path</var> <dt><code>/cloud?dir=</code>...<code>&amp;command=<strong>download</strong>&amp;file=</code><var>path</var>
<dd>Download the specified file. <dd>Download the specified file.
<dt><code>/cloud?dir=</code>...<code>&amp;command=ls&ext=.pgf</code> <dt><code>/cloud?dir=</code>...<code>&amp;command=<strong>ls</strong>&amp;ext=.pgf</code>
<dd>List files with the specified extension, e.g. <dd>List files with the specified extension, e.g.
<code class=response>["Foods.pgf","Letter.pgf"]</code>. <code class=response>["Foods.pgf","Letter.pgf"]</code>.
<dt><code>/cloud?dir=</code>...<code>&amp;command=rm&amp;file=</code><var>path</var> <dt><code>/cloud?dir=</code>...<code>&amp;command=<strong>rm</strong>&amp;file=</code><var>path</var>
<dd>Remove the specified file. <dd>Remove the specified file.
<dt><code>/cloud?dir=</code>...<code>&amp;command=link_directories&newdir=</code>... <dt><code>/cloud?dir=</code>...<code>&amp;command=<strong>link_directories</strong>&newdir=</code>...
<dd>Combine server directores. This is used by GFSE to share grammars <dd>Combine server directores. This is used by GFSE to share grammars
between multiple devices. between multiple devices.
</dl> </dl>
@@ -131,7 +131,7 @@ For documentation of GF shell commands, see:
<hr> <hr>
<address></address> <address></address>
<div class=modtime><small> <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> </small></div>
<address> <address>
<a href="http://www.cse.chalmers.se/~hallgren/">TH</a> <a href="http://www.cse.chalmers.se/~hallgren/">TH</a>

View File

@@ -59,10 +59,11 @@ of the display to "Enable editing on touch devices" that reveals all editing
symbols. symbols.
<p> <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 browser, so once you have opened the web page, you can
<strong>continue editing</strong> grammars even while you are <strong>continue editing</strong> grammars even while you are
<strong>offline</strong>. <strong>offline</strong>. Grammar compilation &amp; testing and some
error checking is done by the GF server and is not available while offline.
<h3>Current status</h3> <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 The supported abstract syntax corresponds to context-free grammars
(no dependent types). The definition of an abstract syntax is limited to (no dependent types). The definition of an abstract syntax is limited to
<ul> <ul>
<li>a list of inherited abstract syntaxes,
<li>a list of <em>category names</em>, <li>a list of <em>category names</em>,
<var>Cat<sub>1</sub></var> ; ... ; <var>Cat<sub>n</sub></var>, <var>Cat<sub>1</sub></var> ; ... ; <var>Cat<sub>n</sub></var>,
<li>a list of <em>functions</em> of the form <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: Available editing operations:
<ul> <ul>
<li>Inherited abstract syntaxes can be added and removed.
<li>Categories can be added, removed and renamed. When renaming a category, <li>Categories can be added, removed and renamed. When renaming a category,
occurences of it in function types will be updated accordingly. occurences of it in function types will be updated accordingly.
<li>Functions can be added, removed and edited. Concrete syntaxes are updated <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 At the moment, the concrete syntax for a language <var>L</var> is limited to
<ul> <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>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>linearization types</em> for the categories in the abstract syntax,
<li><em>linearizations</em> for the functions in the abstract syntax, <li><em>linearizations</em> for the functions in the abstract syntax,
<li><em>parameter type definitions</em>, <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: Available editing operations:
<ul> <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 <li>The LHSs of the linearization types and linearizations are determined by
the abstract syntax and do not need to be entered manually. the abstract syntax and do not need to be entered manually.
The RHSs can The RHSs can
be edited. be edited.
<li>Parameter types can be added, removed and edited. <li>Parameter types can be added, removed and edited.
<li>Operation definitons 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> </ul>
Also, Also,
@@ -155,13 +163,31 @@ Error checks:
semantic errors are delayed until the grammar is compiled. semantic errors are delayed until the grammar is compiled.
</ul> </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> <h3>Compiling and testing grammars</h3>
When pressing the <strong>Compile</strong> button, the grammar will be compiled 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. with GF, and any errors not detected by the editor will be reported.
If the grammar is free from errors the user can then The grammar will also be compiled when pressing the <strong>Minibar</strong>
test the grammar by clicking on links to the online GF shell, the Minibar or and <strong>Quiz</strong> buttons before opening the grammar for testing
the Translation Quiz. in the Minibar or the Translation Quiz, respectively.
<h3><img class=right src="P/1307545089_weather_04.png" alt=""> <h3><img class=right src="P/1307545089_weather_04.png" alt="">
<img class=right src="P/1306856253_weather_06.png" alt="">Grammars in the <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> <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> <h3>Future work</h3>
@@ -234,7 +261,7 @@ suitable for multiple users developing a grammar in collaboration.
<hr> <hr>
<div class=modtime><small> <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> </small></div>
<address> <address>
<a href="http://www.cse.chalmers.se/~hallgren/">TH</a> <a href="http://www.cse.chalmers.se/~hallgren/">TH</a>

View File

@@ -67,8 +67,7 @@ function draw_grammar_list() {
home.appendChild(node("table",{"class":"grammar_list"},rows)); home.appendChild(node("table",{"class":"grammar_list"},rows));
} }
home.appendChild( home.appendChild(ul(li(a(jsurl("new_grammar()"),[text("New grammar")]))));
ul([li([a(jsurl("new_grammar()"),[text("New grammar")])])]));
//editor.appendChild(text(local.count)); //editor.appendChild(text(local.count));
home.appendChild(empty_id("div","sharing")); home.appendChild(empty_id("div","sharing"));
} }
@@ -1745,9 +1744,8 @@ function touch_edit() {
/* --- DOM Support ---------------------------------------------------------- */ /* --- DOM Support ---------------------------------------------------------- */
function a(url,linked) { return node("a",{href:url},linked); } function a(url,linked) { return node("a",{href:url},linked); }
function ul(lis) { return node("ul",{},lis); } function ul(lis) { return wrap("ul",lis); }
function li(xs) { return node("li",{},xs); } function table(rows) { return wrap("table",rows); }
function table(rows) { return node("table",{},rows); }
function td_right(cs) { return node("td",{"class":"right"},cs); } function td_right(cs) { return node("td",{"class":"right"},cs); }
function td_center(cs) { return node("td",{"class":"center"},cs); } function td_center(cs) { return node("td",{"class":"center"},cs); }
function jsurl(js) { return "javascript:"+js; } function jsurl(js) { return "javascript:"+js; }