mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
Syntax editor: add about.html (and a Makefile for generating it)
This commit is contained in:
2
src/www/syntax-editor/Makefile
Normal file
2
src/www/syntax-editor/Makefile
Normal file
@@ -0,0 +1,2 @@
|
||||
html:
|
||||
pandoc --from=markdown --to=html5 --parse-raw --output=about.html README.md
|
||||
@@ -1,3 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>About the syntax editor</title>
|
||||
<link rel=stylesheet type="text/css" href="../minibar/minibar.css">
|
||||
<link rel=stylesheet type="text/css" href="editor.css">
|
||||
<meta charset="UTF-8">
|
||||
</head>
|
||||
<body class="syntax-editor">
|
||||
|
||||
# GF web-based syntax editor
|
||||
|
||||
John J. Camilleri
|
||||
@@ -7,35 +17,55 @@ An improved version of the [old syntax editor][1].
|
||||
|
||||
[1]:http://www.grammaticalframework.org/~meza/restWiki/editor.html
|
||||
|
||||
## Notes
|
||||
|
||||
- Tested with latest Chrome and Firefox (only).
|
||||
|
||||
## 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|-|
|
||||
|initial.languages|Initial linearisation languages, 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 start category menu?|true|
|
||||
|show.to_menu|Show languages menu?|true|
|
||||
|show.random_button|Show random button?|true|
|
||||
|
||||
## Example usage
|
||||
|
||||
See `editor.html` and `editor_online.js`.
|
||||
|
||||
## Bugs
|
||||
## Available startup options
|
||||
|
||||
- Change startcat doesn't work when given an initial startcat
|
||||
+---------------------+--------------------------------------------------+--------+
|
||||
|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 |
|
||||
| | | |
|
||||
+---------------------+--------------------------------------------------+--------+
|
||||
|
||||
## TODO
|
||||
## Notes
|
||||
|
||||
- Tested with latest Chrome and Firefox (only).
|
||||
|
||||
## To do/feature requests
|
||||
|
||||
- Import AST from text field
|
||||
- Compatibility with grammars with dependent category types
|
||||
- Clicking on tokens to select tree node
|
||||
- Clipboard of trees
|
||||
@@ -46,3 +76,9 @@ See `editor.html` and `editor_online.js`.
|
||||
- undo/redo (or back/forward) navigation
|
||||
- structure fridge magnets more (eg newline before the magnet whose first letter is different)
|
||||
|
||||
## Known bugs
|
||||
|
||||
- Change startcat doesn't work when given an initial startcat
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
112
src/www/syntax-editor/about.html
Normal file
112
src/www/syntax-editor/about.html
Normal file
@@ -0,0 +1,112 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
About the syntax editor
|
||||
</title>
|
||||
<link rel=stylesheet type="text/css" href="../minibar/minibar.css"> <link rel=stylesheet type="text/css" href="editor.css"> <meta charset="UTF-8">
|
||||
</head>
|
||||
<body class="syntax-editor">
|
||||
|
||||
<h1 id="gf-web-based-syntax-editor">GF web-based syntax editor</h1>
|
||||
<p>John J. Camilleri<br>December 2012</p>
|
||||
<p>An improved version of the <a href="http://www.grammaticalframework.org/~meza/restWiki/editor.html">old syntax editor</a>.</p>
|
||||
<h2 id="example-usage">Example usage</h2>
|
||||
<p>See <code>editor.html</code> and <code>editor_online.js</code>.</p>
|
||||
<h2 id="available-startup-options">Available startup options</h2>
|
||||
<table>
|
||||
<col style="width: 26%" /><col style="width: 62%" /><col style="width: 10%" /><thead>
|
||||
<tr class="header">
|
||||
<th style="text-align: left;">Options</th>
|
||||
<th style="text-align: left;">Description</th>
|
||||
<th style="text-align: left;">Default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">target</td>
|
||||
<td style="text-align: left;">
|
||||
|
||||
</td>
|
||||
<td style="text-align: left;">"editor"</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">initial.grammar</td>
|
||||
<td style="text-align: left;">Initial grammar URL, e.g. <code>"http://localhost:41296/grammars/Foods.pgf"</code></td>
|
||||
<td style="text-align: left;">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">initial.startcat</td>
|
||||
<td style="text-align: left;">Initial startcat</td>
|
||||
<td style="text-align: left;">(grammar default)</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">initial.languages</td>
|
||||
<td style="text-align: left;">Initial linearisation languages, e.g. <code>["Eng","Swe","Mlt"]</code></td>
|
||||
<td style="text-align: left;">(all)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">initial.abstr</td>
|
||||
<td style="text-align: left;">Initial abstract tree (as string), e.g. <code>"Pred (That Fish) Expensive"</code></td>
|
||||
<td style="text-align: left;">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">show_grammar_menu</td>
|
||||
<td style="text-align: left;">Show grammar menu?</td>
|
||||
<td style="text-align: left;">True</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">show_startcat_menu</td>
|
||||
<td style="text-align: left;">Show startcat menu?</td>
|
||||
<td style="text-align: left;">True</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">show_to_menu</td>
|
||||
<td style="text-align: left;">Show languages menu?</td>
|
||||
<td style="text-align: left;">True</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">show_random_button</td>
|
||||
<td style="text-align: left;">Show random button?</td>
|
||||
<td style="text-align: left;">True</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">show_import</td>
|
||||
<td style="text-align: left;">Show import button/panel?</td>
|
||||
<td style="text-align: left;">True</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">show_export</td>
|
||||
<td style="text-align: left;">Show export button?</td>
|
||||
<td style="text-align: left;">True</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h2 id="notes">Notes</h2>
|
||||
<ul>
|
||||
<li>Tested with latest Chrome and Firefox (only).</li>
|
||||
</ul>
|
||||
<h2 id="to-dofeature-requests">To do/feature requests</h2>
|
||||
<ul>
|
||||
<li>Compatibility with grammars with dependent category types</li>
|
||||
<li>Clicking on tokens to select tree node</li>
|
||||
<li>Clipboard of trees</li>
|
||||
<li>Usage of printnames</li>
|
||||
<li>Enter string/float/int literals</li>
|
||||
<li>more prominence to Disamb-linearizations</li>
|
||||
<li>show all resulting linearizations/variants</li>
|
||||
<li>undo/redo (or back/forward) navigation</li>
|
||||
<li>structure fridge magnets more (eg newline before the magnet whose first letter is different)</li>
|
||||
</ul>
|
||||
<h2 id="known-bugs">Known bugs</h2>
|
||||
<ul>
|
||||
<li>Change startcat doesn't work when given an initial startcat</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user