Work on example-based grammar writing

+ Preparations to support more target languages. Tested with Swedish.
+ Don't enable example-based editing if there is less that two concrete
  languages in the grammar.
+ Don't show the "By example" button until the required lincat has been defined.
+ Remember the chosen language for examples.
This commit is contained in:
hallgren
2011-10-21 15:43:57 +00:00
parent ed451653bd
commit 442dc95071
3 changed files with 47 additions and 20 deletions

View File

@@ -72,7 +72,9 @@ getLimit = maybe err return =<< readInput "limit"
where err = throwCGIError 400 "Missing/bad limit" []
readParsePGF cwd cache = liftIO $ readCache cache (cwd</>"ParseEngAbs.pgf")
readParsePGF cwd cache =
do parsepgf <- getInp "parser"
liftIO $ readCache cache (cwd</>parsepgf)
parseEnviron s = do state <- liftIO $ readIO s
return $ environ state