Siliko and Silikego are libraries for mathematical expression parsing and evaluation that I developed as a teaching aid. Siliko is written in C, and Silikego is written in C++. The source tree includes command-line and GUI frontends for Linux, Macintosh OS X, and Windows. The goal is to show a fully working programming project without being overly contrived like a “hello world” project.
What do they do?
Siliko and Silikego expose functionality to build parsers. They include modules to handle the different parts of a parser:
- Lexical analyzer to separate tokens
- Syntax tree with various leaf nodes for values and errors, and a branch node for functions and operators
- Function handler that the branch node in the syntax tree use to evaluate operations functions
- Working infix parser as an example
Source Code
The projects are almost ready for release. Until release, their source-code repositories are available on GitHub.