forked from GitHub/gf-core
More work on make_fa.
This commit is contained in:
@@ -5,9 +5,9 @@
|
|||||||
-- Stability : (stable)
|
-- Stability : (stable)
|
||||||
-- Portability : (portable)
|
-- Portability : (portable)
|
||||||
--
|
--
|
||||||
-- > CVS $Date: 2005/09/08 15:40:49 $
|
-- > CVS $Date: 2005/09/08 15:45:17 $
|
||||||
-- > CVS $Author: bringert $
|
-- > CVS $Author: bringert $
|
||||||
-- > CVS $Revision: 1.18 $
|
-- > CVS $Revision: 1.19 $
|
||||||
--
|
--
|
||||||
-- This module does some useful transformations on CFGs.
|
-- This module does some useful transformations on CFGs.
|
||||||
--
|
--
|
||||||
@@ -150,6 +150,11 @@ make_fa q0 a q1 g fa =
|
|||||||
case a of
|
case a of
|
||||||
[] -> newTrans q0 q1 Nothing fa
|
[] -> newTrans q0 q1 Nothing fa
|
||||||
[Tok t] -> newTrans q0 q1 (Just t) fa
|
[Tok t] -> newTrans q0 q1 (Just t) fa
|
||||||
|
[Cat c] -> undefined
|
||||||
|
(x:beta) -> let (fa',q) = newState () fa
|
||||||
|
fa'' = make_fa q0 [x] q g fa'
|
||||||
|
fa''' = make_fa q beta q1 g fa''
|
||||||
|
in fa'''
|
||||||
|
|
||||||
--
|
--
|
||||||
-- * CFG rule utilities
|
-- * CFG rule utilities
|
||||||
|
|||||||
Reference in New Issue
Block a user