blob: 62c7e32cdb0faa78d6d143e29a85c574c9082b9d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# GF web-based syntax editor
John J. Camilleri
November 2012
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
var editor_options = {
target: "editor",
initial: {
grammar: "http://localhost:41296/grammars/Foods.pgf",
startcat: "Kind",
languages: ["Eng","Swe","Mlt"],
abstr: "Pred (That Fish) Expensive"
},
show: {
grammar_menu: true,
startcat_menu: true,
to_menu: true,
random_button: true
}
}
## TODO
- Wrap a subtree
- Compatibility with grammars with dependent category types
- Clicking on tokens to select tree node
- try to retain subtree when replacing node
- Use local caching
- Clipboard of trees
- Usage of printnames
- Enter string/float/int literals
- more prominence to Disamb-linearizations
- ambiguity: (optionally) parse all the resulting linearizations/variants and point out those which are ambiguous
- add undo/redo (or back/forward) navigation
- structure fridge magnets some more (eg newline before the magnet whose first letter is different)
|