Added support for cf and ebnf formats

This commit is contained in:
aarne
2004-03-31 12:30:34 +00:00
parent 6719aedde3
commit 3f9b4e7855
17 changed files with 280 additions and 31 deletions

View File

@@ -39,7 +39,11 @@ shellStateFromFiles :: Options -> ShellState -> FilePath -> IOE ShellState
shellStateFromFiles opts st file = case fileSuffix file of
"gfcm" -> do
(_,_,cgr) <- compileOne opts (compileEnvShSt st []) file
ioeErr $ updateShellState opts st (cgr,(emptyMGrammar,[]))
ioeErr $ updateShellState opts st (cgr,(emptyMGrammar,[]))
s | elem s ["cf","ebnf"] -> do
let osb = addOptions (options [beVerbose]) opts
grts <- compileModule osb st file
ioeErr $ updateShellState opts st grts
_ -> do
let osb = if oElem showOld opts
then addOptions (options [beVerbose]) opts -- for old, no emit