Subversion

Galculator

?curdirlinks? -

Blame information for rev 1

Line No. Rev Author Line
1 1 paulosilva  
2 {-# LANGUAGE GADTs #-}
3 {-# OPTIONS_GHC -Wall #-}
4  
5 -------------------------------------------------------------------------------
6  
7 {- |
8 Module      :  Language.Combinator.Syntax
9 Description :  Abstract representation of strategic rewriting combinators.
10 Copyright   :  (c) Paulo Silva
11 License     :  LGPL
12  
13 Maintainer  :  paufil@di.uminho.pt
14 Stability   :  experimental
15 Portability :  portable
16  
17 -}
18  
19 -------------------------------------------------------------------------------
20  
21 module Language.Combinator.Syntax (
22   Combinator(..),
23   combinators
24  ) where
25  
26 import Language.Derivation.Syntax
27  
28 -------------------------------------------------------------------------------
29  
30 data Combinator where
31   Nop         :: Combinator
32   Fail        :: Combinator
33   Seq         :: Combinator -> Combinator -> Combinator
34   Choice      :: Combinator -> Combinator -> Combinator
35   LChoice     :: Combinator -> Combinator -> Combinator
36   Many        :: Combinator -> Combinator
37   Many1       :: Combinator -> Combinator
38   Try         :: Combinator -> Combinator
39   Once        :: Combinator -> Combinator
40   Everywhere  :: Combinator -> Combinator
41   Everywhere' :: Combinator -> Combinator
42   Innermost   :: Combinator -> Combinator
43   All         :: Combinator -> Combinator
44   One         :: Combinator -> Combinator
45   Rule        :: Derivation -> Combinator
46   deriving Show
47  
48 -------------------------------------------------------------------------------
49  
50 combinators :: [String]
51 combinators = [
52   "nop", "fail", "seq", "choice", "lchoice", "many", "many1", "try", "once",
53   "everywhere", "everywhere'", "innermost", "all", "one"
54  ]
55  
56 -------------------------------------------------------------------------------

Theme by Vikram Singh | Powered by WebSVN v2.3.3