summaryrefslogtreecommitdiff
path: root/src/example-based/ExampleService.hs
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2011-10-21 15:43:57 +0000
committerhallgren <hallgren@chalmers.se>2011-10-21 15:43:57 +0000
commit442dc95071dc9a9a71a93b190c5b67493b286695 (patch)
tree90f2c3996f4933fb690299a167b357a695af5acd /src/example-based/ExampleService.hs
parented451653bd9fa4d835cb263c06d0ecb9133b9935 (diff)
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.
Diffstat (limited to 'src/example-based/ExampleService.hs')
-rw-r--r--src/example-based/ExampleService.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/example-based/ExampleService.hs b/src/example-based/ExampleService.hs
index ecead5425..0065fd4dd 100644
--- a/src/example-based/ExampleService.hs
+++ b/src/example-based/ExampleService.hs
@@ -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