Skip to content

dmytro-anokhin/Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calculator

This is a sample iOS app that uses ANTLR v4 to parse input text and evaluate arithmetic expressions. Like this:

let interpreter = Interpreter()
let result = interpreter.evaluate("2 + 4 × 10")

switch result {
    case .success(let value):
        print(value)
    case .failure(let error):
        print(error)        
}
42.0

And the app is in SwiftUI :)

Releases

No releases published

Packages

No packages published