Coding in haskell, parser, interpreter, scanner and type checker
module JavaishParser where import JavaishScanner data Operator = Plus | Minus | Times | Divide | OGt | OLt | OEq | ONe deriving ( Eq, Show ) data Type = TInt | TBool deriving ( Show, Eq ) data Expression = ExpInt Integer | ExpBool Bool | ExpBin Expression Operator Expression | ExpBang Expression deriving Show parseC :: [ TokenPos ] -> ( Expression, [ TokenPos, Integer ] ) parseC tokens = uncurry parseC2 $ parseE tokens
Get Free Quote!
347 Experts Online