the compiler can now boot and load an .ngf file

This commit is contained in:
krangelov
2021-09-17 13:15:58 +02:00
parent b583faa042
commit 348c348e14
4 changed files with 27 additions and 2 deletions

View File

@@ -152,6 +152,7 @@ data Flags = Flags {
optVerbosity :: Verbosity,
optShowCPUTime :: Bool,
optOutputFormats :: [OutputFormat],
optLinkTargets :: (Bool,Bool), -- pgf,ngf files
optSISR :: Maybe SISRFormat,
optHaskellOptions :: Set HaskellOption,
optLexicalCats :: Set String,
@@ -262,6 +263,7 @@ defaultFlags = Flags {
optVerbosity = Normal,
optShowCPUTime = False,
optOutputFormats = [],
optLinkTargets = (True,False),
optSISR = Nothing,
optHaskellOptions = Set.empty,
optLiteralCats = Set.fromList [cString,cInt,cFloat,cVar],
@@ -320,6 +322,8 @@ optDescr =
Option ['C'] [] (NoArg (phase Convert)) "Stop after conversion to .gf.",
Option ['c'] [] (NoArg (phase Compile)) "Stop after compiling to .gfo (default) .",
Option [] ["make"] (NoArg (liftM2 addOptions (mode ModeCompiler) (phase Link))) "Build .pgf file and other output files and exit.",
Option [] ["boot"] (NoArg (set $ \o -> o {optLinkTargets = (True,True)})) "Boot an .ngf database for fast grammar reloading",
Option [] ["boot-only"] (NoArg (set $ \o -> o {optLinkTargets = (False,True)})) "Boot the .ngf database and don't write a .pgf file",
Option [] ["cpu"] (NoArg (cpu True)) "Show compilation CPU time statistics.",
Option [] ["no-cpu"] (NoArg (cpu False)) "Don't show compilation CPU time statistics (default).",
-- Option ['t'] ["trace"] (NoArg (trace True)) "Trace computations",