1
0
forked from GitHub/gf-core

use parser combinators to parse the shell commands. simplified CommandLine type

This commit is contained in:
kr.angelov
2008-06-05 07:33:42 +00:00
parent 0b1a157222
commit 4803fb8052
15 changed files with 164 additions and 1478 deletions

View File

@@ -0,0 +1,28 @@
module GF.Command.Abstract where
import PGF.Data
type Ident = String
type CommandLine = [Pipe]
type Pipe = [Command]
data Command
= Command Ident [Option] Argument
deriving (Eq,Ord,Show)
data Option
= OOpt Ident
| OFlag Ident Value
deriving (Eq,Ord,Show)
data Value
= VId Ident
| VInt Integer
deriving (Eq,Ord,Show)
data Argument
= AExp Exp
| ANoArg
deriving (Eq,Ord,Show)