Read input for Lexer from file
This commit is contained in:
parent
34bad5af43
commit
b51be83eff
2 changed files with 6 additions and 1 deletions
|
|
@ -1,4 +1,8 @@
|
||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
|
import qualified Lexer
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = putStrLn "Hello, Haskell!"
|
main = do
|
||||||
|
source <- readFile "arithmetic.txt"
|
||||||
|
putStr $ show (Lexer.lex source)
|
||||||
|
|
|
||||||
1
arithmetic.txt
Normal file
1
arithmetic.txt
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
1 + 22 * (3 - 4)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue