never executed always true always false
1 module HelVM.HelMA.Automata.Zot.Parser (
2 parse,
3 ) where
4
5 import HelVM.HelMA.Automata.Zot.Expression
6
7 import qualified Data.Text.Lazy as LT
8
9 parse :: LT.Text -> ExpressionList
10 parse = concatMap parseLine . LT.lines
11
12 parseLine :: LT.Text -> ExpressionList
13 parseLine = readExpressionList . filter01 . LT.takeWhile (/= '#')
14
15 filter01 :: LT.Text -> LT.Text
16 filter01 = LT.filter is01
17
18 is01 :: Char -> Bool
19 is01 c = c == '0' || c == '1'