Changeset 3701
- Timestamp:
- 05/23/05 02:13:17 (4 years ago)
- svk:copy_cache_prev:
- 5201
- Location:
- src/Pugs
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Help.hs
r3516 r3701 24 24 putStrLn ":h = show this help message" 25 25 putStrLn ":q = quit" 26 putStrLn ". <exp> = show the syntax tree of an expression"27 putStrLn "? <exp> = evaluate an expression in small steps"28 putStrLn "! <exp> = same, but in the interactive environment"29 putStrLn "<exp> = run a command"30 putStrLn ":i <exp> = run a command, and ugly-print the result"31 26 putStrLn ":r = reset the evaluation environment" 32 27 putStrLn ":l <filename> = load a pugs file" 28 putStrLn ":d <exp> = show syntax tree of an expression" 29 putStrLn ":D <exp> = show raw syntax tree of an expression" 30 putStrLn ":e <exp> = run a command, and ugly-print the result" 31 putStrLn ":E <exp> = same, but evaluate in small steps" 32 putStrLn "<exp> = run a command" 33 33 34 34 {- FIXME: Somebody with more UI skillz should make this nicer -} -
src/Pugs/Shell.hs
r3636 r3701 49 49 50 50 parseCommandLine :: String -> Command 51 parseCommandLine (' ?':str) = CmdRun (RunOpts True True True) str52 parseCommandLine (' !':str) = CmdRun (RunOpts True False True) str53 parseCommandLine (' .':'.':str) = CmdParseRawstr54 parseCommandLine (' .':str) = CmdParsestr51 parseCommandLine (':':'e':str) = CmdRun (RunOpts False True False) str 52 parseCommandLine (':':'E':str) = CmdRun (RunOpts True True False) str 53 parseCommandLine (':':'d':str) = CmdParse str 54 parseCommandLine (':':'D':str) = CmdParseRaw str 55 55 parseCommandLine (':':'q':_) = CmdQuit 56 56 parseCommandLine (':':'h':_) = CmdHelp 57 57 parseCommandLine (':':'r':_) = CmdReset 58 parseCommandLine (':':'i':str) = CmdRun (RunOpts False False False) str59 58 parseCommandLine (':':'l':str) = CmdLoad $ unwords (words str) 60 59 parseCommandLine str = CmdRun (RunOpts False False True) str
