Kind Of A Kaleidoscope

Vincent | Gauthier | Anas | Valentin

LLVM Binding

Monadic Parser Combinator

<digit> ::= '0'-'9'

<number> ::= ('-' / '+')? <digit>+
digit :: Parser Char
digit = sat isDigit

number :: Parser Integer
number = do
          o <- string "+" <|> string "-" <|> return []
          s <- some digit
          return $ value o s
          where
            value "+" s = read (s)::Integer
            value o s = read (o++s)::Integer

Precedence Climbing

LLVM Binding

Feedback

Questions

Kind Of A Kaleidoscope

By googo

Kind Of A Kaleidoscope

  • 435