From c78328fd86fe7add65bc8fa8e1b216a86b04cfdf Mon Sep 17 00:00:00 2001 From: hallgren Date: Fri, 29 Jul 2011 15:44:19 +0000 Subject: [PATCH] gfse: some correctness checks for concrete syntax The editor now calls the GF server to check the syntax of expressions that are part of concrete syntax (except for parameter types). This is currently done by using the cc command of the GF shell, which puts some unnecessary restricitons on operation definitions... --- src/editor/simple/about.html | 23 ++++++++++-------- src/editor/simple/cloud.js | 9 ++++++-- src/editor/simple/editor.js | 45 ++++++++++++++++++++++-------------- src/editor/simple/upload.cgi | 7 ++++++ 4 files changed, 55 insertions(+), 29 deletions(-) diff --git a/src/editor/simple/about.html b/src/editor/simple/about.html index 050812ca3..a488c6e56 100644 --- a/src/editor/simple/about.html +++ b/src/editor/simple/about.html @@ -116,7 +116,8 @@ At the moment, the concrete syntax for a language L is limited to
  • linearizations for the functions in the abstract syntax,
  • parameter type definitions, P = C1 | ... |Cn, -
  • and operation definitions, op = expr. +
  • and operation definitions, op = expr, + op : type = expr, Available editing operations: @@ -146,8 +147,11 @@ Also, Error checks:

    Compiling and testing grammars

    @@ -164,7 +168,7 @@ cloud While the editor normally stores grammars locally in the browser, it is also possible to store grammars in the cloud. Grammars can be stored in the cloud -just for backup, or to accessed them from multiple devices. +just for backup, or to make them accessible from multiple devices.

    There is no automatic synchronization between local grammars and the cloud. @@ -197,14 +201,13 @@ devices, but not recommended for sharing grammars between multiple users.

    Also note that each grammar is assigned a unique identity -when it is created. Renaming a grammar does not change its identity. This means -that name changes are propagated between devices like other changes. +when it is first created. Renaming a grammar does not change its identity. +This means that name changes are propagated between devices like other changes.

    Future work

    This prototype gives an idea of how a web based GF grammar editor could work. -While this editor is implemented in JavaScript and runs entirely in the -web browser, +While this editor is implemented in JavaScript and runs in the web browser, we do not expect to create a full implementation of GF that runs in the web browser, but let the editor communicate with a server running GF.

    @@ -214,7 +217,7 @@ to do proper error checking and make more of the existing GF shell functionality accessible directly from the editor.

    The current grammar cloud service is very primitive. In particular, it is not -suitable for multiple users developing a grammar in collaboration. +suitable for multiple users developing a grammar in collaboration.

    Related documents