From a47d2da44811601c70a662892a8ee2480235ceee Mon Sep 17 00:00:00 2001 From: hallgren Date: Tue, 2 Oct 2012 17:32:52 +0000 Subject: [PATCH] gfse and cloud service documentation update --- src/www/gf-cloud-api.html | 14 ++++++------ src/www/gfse/about.html | 47 ++++++++++++++++++++++++++++++--------- src/www/gfse/editor.js | 8 +++---- 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:
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). -
/cloud?dir=...&command=upload&path1=source1&path2=source2&... +
/cloud?dir=...&command=upload&path1=source1&path2=source2&...
Upload files to be stored in the cloud. -
/cloud?dir=...&command=make&path1=source1&path2=source2&... +
/cloud?dir=...&command=make&path1=source1&path2=source2&...
Upload grammar files and compile them into a PGF file. The response code is 204 if the upload was successful. -
/cloud?dir=...&command=download&file=path +
/cloud?dir=...&command=download&file=path
Download the specified file. -
/cloud?dir=...&command=ls&ext=.pgf +
/cloud?dir=...&command=ls&ext=.pgf
List files with the specified extension, e.g. ["Foods.pgf","Letter.pgf"]. -
/cloud?dir=...&command=rm&file=path +
/cloud?dir=...&command=rm&file=path
Remove the specified file. -
/cloud?dir=...&command=link_directories&newdir=... +
/cloud?dir=...&command=link_directories&newdir=...
Combine server directores. This is used by GFSE to share grammars between multiple devices. @@ -131,7 +131,7 @@ For documentation of GF shell commands, see:
-Last modified: Wed Aug 1 17:35:16 CEST 2012 +Last modified: Tue Oct 2 17:26:02 CEST 2012
TH 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.

-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 continue editing grammars even while you are -offline. +offline. Grammar compilation & testing and some +error checking is done by the GF server and is not available while offline.

Current status

@@ -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
    +
  • a list of inherited abstract syntaxes,
  • a list of category names, Cat1 ; ... ; Catn,
  • a list of functions of the form @@ -91,6 +93,7 @@ The supported abstract syntax corresponds to context-free grammars Available editing operations:
      +
    • Inherited abstract syntaxes can be added and removed.
    • Categories can be added, removed and renamed. When renaming a category, occurences of it in function types will be updated accordingly.
    • 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 L is limited to
        -
      • opening the Resource Grammar Library modules +
      • inheriting the concrete syntax GiL + for each G inherited by the abstract syntax. +
      • opening a selection of the Resource Grammar Library modules SyntaxL, ParadigmsL, - LexiconL and ExtraL, + LexiconL, SymbolicL + and ExtraL,
      • linearization types for the categories in the abstract syntax,
      • linearizations for the functions in the abstract syntax,
      • parameter type definitions, @@ -123,13 +129,15 @@ At the moment, the concrete syntax for a language L is limited to Available editing operations:
          +
        • Modules can be added and removed from the list of opened Resource Grammar + Library modules.
        • 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.
        • Parameter types can be added, removed and edited.
        • Operation definitons can be added, removed and edited. -
        • Definitions can be reordered (using drag-and-drop) +
        • Definitions can be reordered (using drag-and-drop).
        Also, @@ -155,13 +163,31 @@ Error checks: semantic errors are delayed until the grammar is compiled.
      +

      Grammar views

      + +The editor supports three ways to view a grammar: + +
        +
      • Column view: + 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. +
      • Matrix view: + 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. +
      • Row view: + this view shows one function form the abstract syntax and + the corresponding linearization functions from all the concrete syntaxes. +
      +

      Compiling and testing grammars

      When pressing the Compile 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 Minibar +and Quiz buttons before opening the grammar for testing +in the Minibar or the Translation Quiz, respectively.

      Grammars in the @@ -207,7 +233,8 @@ This means that name changes are propagated between devices like other changes.

      Example-based grammar writing

      -This is work in progress... +We experimented with this in 2011. It is currently not included, but it +might return in a future version...

      Future work

      @@ -234,7 +261,7 @@ suitable for multiple users developing a grammar in collaboration.
      - Last modified: Mon Jun 11 17:25:17 CEST 2012 +Last modified: Tue Oct 2 19:26:08 CEST 2012
      TH 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; }