summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2012-10-02 17:32:52 +0000
committerhallgren <hallgren@chalmers.se>2012-10-02 17:32:52 +0000
commita47d2da44811601c70a662892a8ee2480235ceee (patch)
tree206392c8c81d8aa98297df17672cc9c1488dabd9 /src
parent92acb3691b5f19da54b0e4b7e05f3b6797133ada (diff)
gfse and cloud service documentation update
Diffstat (limited to 'src')
-rw-r--r--src/www/gf-cloud-api.html14
-rw-r--r--src/www/gfse/about.html47
-rw-r--r--src/www/gfse/editor.js8
3 files changed, 47 insertions, 22 deletions
diff --git a/src/www/gf-cloud-api.html b/src/www/gf-cloud-api.html
index 906b583b5..698bda510 100644
--- a/src/www/gf-cloud-api.html
+++ b/src/www/gf-cloud-api.html
@@ -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>&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.
- <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.
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.
- <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.
<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.
- <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
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>
diff --git a/src/www/gfse/about.html b/src/www/gfse/about.html
index 11b66b380..b57242675 100644
--- a/src/www/gfse/about.html
+++ b/src/www/gfse/about.html
@@ -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 &amp; 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>
diff --git a/src/www/gfse/editor.js b/src/www/gfse/editor.js
index a52474934..adfa1b086 100644
--- a/src/www/gfse/editor.js
+++ b/src/www/gfse/editor.js
@@ -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; }