Ensure parser reaches end of file
authorDaniel Schwyn <danielschwyn@gmail.com>
Wed, 10 May 2017 08:58:28 +0000 (10:58 +0200)
committerDaniel Schwyn <schwyda@student.ethz.ch>
Tue, 13 Jun 2017 12:20:22 +0000 (14:20 +0200)
Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

tools/sockeye2/SockeyeParser.hs

index ee44514..26cccf5 100644 (file)
@@ -55,6 +55,7 @@ commaSep = P.commaSep lexer
 
 sockeyeFile = do
     nodes <- many net
+    eof
     return $ AST.Net (Map.fromList $ concat nodes)
 
 net = do