module Main where
+import Text.ParserCombinators.Parsec hiding (spaces)
import System.Environment
+data LispVal = Atom String
+ | List [LispVal]
+ | DottedList [LispVal] LispVal
+ | Number Integer
+ | String String
+ | Bool Bool
+
+symbol :: Parser Char
+symbol = oneOf "!#$%&|*+-/:<=>?@^_~"
+
+spaces :: Parser ()
+spaces = skipMany space
+
+readExpr :: String -> String
+readExpr input = case parse (spaces >> symbol) "lisp" input of
+ Left err -> "No match: " ++ show err
+ Right val -> "Found value"
+
main :: IO ()
main = do
- args <- getArgs
- putStrLn (show (read (args !! 0) + read (args !! 1)))
+ args <- getLine
+ putStrLn (readExpr args)