mgriebling/expressionparser
The **ExpressionParser** package parses and evaluates mathematical expressions
Usage
In your project's Package.swift file add a dependency like
dependencies: [
.package(url: "https://github.com/mgriebling/ExpressionParser.git", from: "0.1.0"),
]Theory
ExpressionParser contains two source files, Parser.swift and Scanner.swift. They were produced by the Coco compiler [https://github.com/mgriebling/Coco] translating an input ATG (Attributed Grammar) file (exp.atg) that describes the operations to be scanned and parsed in a compact text format. The Coco compiler generator also requires some .frame files into which sections of code are inserted to produce the final swift parser and scanner files. An Abstract Syntax Tree representation (AST) is built up using the AST.swift data type. This tree is then evaluated to generate the LaTeX translation and evaluates a result. For more details about Coco refer to the https://ssw.jku.at/Research/Projects/Coco/ web site.
Package Metadata
Repository: mgriebling/expressionparser
Default branch: main
README: README.md