diff --git a/src/www/syntax-editor/Makefile b/src/www/syntax-editor/Makefile index 6f2ccc26b..af10826f4 100644 --- a/src/www/syntax-editor/Makefile +++ b/src/www/syntax-editor/Makefile @@ -1,2 +1,2 @@ html: - pandoc --from=markdown --to=html5 --parse-raw --output=about.html README.md + pandoc --from=markdown+pipe_tables --to=html --output=about.html README.md diff --git a/src/www/syntax-editor/README.md b/src/www/syntax-editor/README.md index 1a029f9b5..6b03caddb 100644 --- a/src/www/syntax-editor/README.md +++ b/src/www/syntax-editor/README.md @@ -6,59 +6,51 @@ -
+ # GF web-based syntax editor John J. Camilleri -December 2012 +January 2013 -An improved version of the [old syntax editor][1]. +A tool for building and manipulating abstract syntax trees in GF. +This is meant as improved replacement of the [old syntax editor][old]. -[1]:http://www.grammaticalframework.org/~meza/restWiki/editor.html +[old]:http://www.grammaticalframework.org/~meza/restWiki/editor.html ## Example usage -See `editor.html` and `editor_online.js`. +If you want to use the tool in your own application, everything you need in the source +files `editor.html` and `editor_online.js`. Contact the [GF developer mailing list][gf-dev] +if you have any problems. + +[gf-dev]:http://groups.google.com/group/gf-dev ## Available startup options -+---------------------+--------------------------------------------------+--------+ -|Options |Description |Default | -+=====================+==================================================+========+ -|target | |"editor"| -| | | | -+---------------------+--------------------------------------------------+--------+ -|initial.grammar |Initial grammar URL, | | -| |e.g. `"http://localhost:41296/grammars/Foods.pgf"`| | -+---------------------+--------------------------------------------------+--------+ -|initial.startcat |Initial startcat |(grammar| -| | |default)| -+---------------------+--------------------------------------------------+--------+ -|initial.languages |Initial linearisation languages, |(all) | -| |e.g. `["Eng","Swe","Mlt"]` | | -+---------------------+--------------------------------------------------+--------+ -|initial.abstr |Initial abstract tree (as string), e.g. `"Pred | | -| |(That Fish) Expensive"` | | -+---------------------+--------------------------------------------------+--------+ -|show_grammar_menu |Show grammar menu? |True | -| | | | -+---------------------+--------------------------------------------------+--------+ -|show_startcat_menu |Show startcat menu? |True | -| | | | -+---------------------+--------------------------------------------------+--------+ -|show_to_menu |Show languages menu? |True | -| | | | -+---------------------+--------------------------------------------------+--------+ -|show_random_button |Show random button? |True | -| | | | -+---------------------+--------------------------------------------------+--------+ -|show_import |Show import button/panel? |True | -| | | | -+---------------------+--------------------------------------------------+--------+ -|show_export |Show export button? |True | -| | | | -+---------------------+--------------------------------------------------+--------+ +### Grammar Manager + +| Options | Description | Default | +|---------------------+-------------------------------------------------------------------------+-------------------| +| `initial.grammar` | Initial grammar URL, e.g. `"http://localhost:41296/grammars/Foods.pgf"` | | +| `initial.startcat` | Initial startcat | (grammar default) | +| `initial.languages` | Initial linearisation languages, e.g. `["Eng","Swe","Mlt"]` | (all) | + + +### Editor + +| Options | Description | Default | +|----------------------+---------------------------------------------------------------------------------+----------| +| `target` | | "editor" | +| `initial.abstr` | Initial abstract tree (as string), e.g. `"Pred (That Fish) Expensive"` | | +| `lin_action` | Function called when clicking on the language button beside each linearisation. | | +| `lin_action_tooltip` | Tooltip for the button beside each linearisation. | | +| `show_grammar_menu` | Show grammar menu? | True | +| `show_startcat_menu` | Show startcat menu? | True | +| `show_to_menu` | Show languages menu? | True | +| `show_random_button` | Show random button? | True | +| `show_import` | Show import button/panel? | True | +| `show_export` | Show export button? | True | ## Notes @@ -72,7 +64,7 @@ See `editor.html` and `editor_online.js`. - Usage of printnames - Enter string/float/int literals - more prominence to Disamb-linearizations -- show all resulting linearizations/variants +- show all resulting linearization variants - undo/redo (or back/forward) navigation - structure fridge magnets more (eg newline before the magnet whose first letter is different) diff --git a/src/www/syntax-editor/about.html b/src/www/syntax-editor/about.html index a05d1dd20..8f9e561f1 100644 --- a/src/www/syntax-editor/about.html +++ b/src/www/syntax-editor/about.html @@ -6,83 +6,100 @@ About the syntax editor - +John J. Camilleri
December 2012
An improved version of the old syntax editor.
+John J. Camilleri
January 2013
A tool for building and manipulating abstract syntax trees in GF. This is meant as improved replacement of the old syntax editor.
See editor.html and editor_online.js.
If you want to use the tool in your own application, everything you need in the source files editor.html and editor_online.js. Contact the GF developer mailing list if you have any problems.
| Options | -Description | -Default | +Options | +Description | +Default |
|---|---|---|---|---|---|
| target | -- - | -"editor" | +initial.grammar |
+Initial grammar URL, e.g. "http://localhost:41296/grammars/Foods.pgf" |
+|
| initial.grammar | -Initial grammar URL, e.g. "http://localhost:41296/grammars/Foods.pgf" |
-- - | +initial.startcat |
+Initial startcat | +(grammar default) |
| initial.startcat | -Initial startcat | -(grammar default) | +initial.languages |
+Initial linearisation languages, e.g. ["Eng","Swe","Mlt"] |
+(all) | +
| Options | +Description | +Default | +|||
|---|---|---|---|---|---|
target |
++ | "editor" | |||
| initial.languages | -Initial linearisation languages, e.g. ["Eng","Swe","Mlt"] |
-(all) | +initial.abstr |
+Initial abstract tree (as string), e.g. "Pred (That Fish) Expensive" |
+|
| initial.abstr | -Initial abstract tree (as string), e.g. "Pred (That Fish) Expensive" |
-- - | +lin_action |
+Function called when clicking on the language button beside each linearisation. | +|
| show_grammar_menu | -Show grammar menu? | -True | +lin_action_tooltip |
+Tooltip for the button beside each linearisation. | +|
| show_startcat_menu | -Show startcat menu? | -True | +show_grammar_menu |
+Show grammar menu? | +True |
| show_to_menu | -Show languages menu? | -True | +show_startcat_menu |
+Show startcat menu? | +True |
| show_random_button | -Show random button? | -True | +show_to_menu |
+Show languages menu? | +True |
| show_import | -Show import button/panel? | -True | +show_random_button |
+Show random button? | +True |
| show_export | -Show export button? | -True | +show_import |
+Show import button/panel? | +True | +
show_export |
+Show export button? | +True |