diff --git a/Main.hs b/Main.hs index fb09d4a..5fa0bde 100644 --- a/Main.hs +++ b/Main.hs @@ -29,10 +29,10 @@ runProgram :: (LexerWriter lang, ParserWriter parser lang) => Proxy lang -> Proxy parser -> MainProgram runProgram lang parserMethod debugLexer parserName baseFileName inputFile = do input <- decodeUtf8 <$> BS.readFile inputFile - let (lexicRaw, grammarLines) = second (drop 1) . break ((=="%%") . T.filter (/='\r')) $ T.lines input + let (lexicRaw, grammarLines) = second (drop 1) . break (=="%%") $ T.lines $ T.filter (/='\r') input rootdir = takeDirectory inputFile grammar = T.unlines grammarLines - lexic = filter (not . T.null) lexicRaw + lexic = filter (not . T.null . T.strip) lexicRaw setCurrentDirectory rootdir runInIO $ do writeFiles =<< makeLexer lang debugLexer lexic diff --git a/alpaca-parser-generator.cabal b/alpaca-parser-generator.cabal index 2103e89..78e42eb 100644 --- a/alpaca-parser-generator.cabal +++ b/alpaca-parser-generator.cabal @@ -5,7 +5,7 @@ cabal-version: 1.12 -- see: https://github.com/sol/hpack name: alpaca-parser-generator -version: 0.3.0.1 +version: 0.3.0.2 author: Nikolay Yakimov maintainer: root@livid.pp.ru license: MIT diff --git a/package.yaml b/package.yaml index 122a071..459054f 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: alpaca-parser-generator -version: '0.3.0.1' +version: '0.3.0.2' author: Nikolay Yakimov maintainer: root@livid.pp.ru license: MIT