Copyright | (c) Jorge Santiago Alvarez Cuadros, 2016 |
---|---|
License | GPL-3 |
Maintainer | sanjorgek@ciencias.unam.mx |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Extensions |
|
Math.Model.Automaton.Stack
Description
Stack Automaton
Documentation
type Delta a = (:->:) a (Symbol, Symbol) [Symbol] Source
Delta for stack machine, takes a state, a symbol in string input and a symbol in stack head and returns next state and update stack
liftD :: Ord a => [(a, Symbol, Symbol, a, [Symbol])] -> Delta a Source
Takes a list of tuples and lift a Delta
>>>
let delta = liftD [(0,'1','A',1,[AA]),(0,'0',blank,0,[A])]
Stack machine only needs a delta and a init state