1
1
mirror of https://github.com/github/semantic.git synced 2024-12-19 21:01:35 +03:00

Revert "Compute the first sets of alternations."

This reverts commit 43644d1d591ed23c434fac120df27c985148523f.
This commit is contained in:
Rob Rix 2017-08-03 15:38:15 -04:00
parent 02f847674c
commit c656ddede7

View File

@ -170,9 +170,8 @@ while predicate step = many $ do
--
-- In general, first sets can be computed for committed choices, repetitions of committed choices, and so on.
firstSet :: Enum grammar => Assignment ast grammar a -> Maybe [grammar]
firstSet = iterFreer (\ assignment yield -> case assignment of
firstSet = iterFreer (\ assignment _ -> case assignment of
Choose choices _ -> Just (toEnum <$> IntMap.keys choices)
Alt a b -> yield a <> yield b
_ -> Nothing) . (Nothing <$)