mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 13:09:33 -06:00
gfse: supply information about what's defined in the exampe language to the server functions for example-based grammar writing
This commit is contained in:
@@ -22,12 +22,16 @@ cgiMain' root cwd cache =
|
||||
do command <- getInp "command"
|
||||
environ <- parseEnviron =<< getInp "state"
|
||||
case command of
|
||||
"possibilities" -> outputJSONP (E.getNext environ)
|
||||
"provide_example" -> doProvideExample root cwd cache environ
|
||||
"possibilities" -> doPossibilities environ
|
||||
"provide_example" -> doProvideExample root cwd cache environ
|
||||
"abstract_example" -> doAbstractExample cwd cache environ
|
||||
"test_function" -> doTestFunction cwd cache environ
|
||||
"test_function" -> doTestFunction cwd cache environ
|
||||
_ -> throwCGIError 400 ("Unknown command: "++command) []
|
||||
|
||||
doPossibilities environ =
|
||||
do example_environ <- parseEnviron =<< getInp "example_state"
|
||||
outputJSONP (E.getNext environ example_environ)
|
||||
|
||||
doProvideExample root cwd cache environ =
|
||||
do Just lang <- readInput "lang"
|
||||
fun <- getCId "fun"
|
||||
|
||||
Reference in New Issue
Block a user