module Main where

import Lexer2
import TokenTypes
import System.FilePath
import System.Environment
import System.IO

main = do
	args <- getArgs
	let file = head args
	contents <- readFile file
	let lex = execParseTokens contents

	putStrLn . show . snd $ lex

module Main where

import Lexer2
import TokenTypes
import System.FilePath
import System.Environment
import System.IO
import Control.Monad

main = do
    args <- getArgs
    let file = head args
    contents <- readFile file
    let lex = execParseTokens contents
    let newcontents = concatMap show $ fst lex
    --putStrLn newcontents

    unless (null $ snd lex) $
        print . snd $ lex

    when (newcontents /= contents) $
        putStrLn $ "NOT the same! " ++ file

Test case: check whether printed lexed files are equal to the original
Test case: check whether printed lexed files are equal to the original
