I've created a tiny compiler that scans, parses and evaluates math expressions.
Example:
Evaluator.Expression = "Sin(rad(x)) / abs(x)"
For i = 1 To 10
Console.WriteLine(Evaluator.Evaluate(i))
Next
The evaluator is written in VB .NET and it is a good place to start if you want to easily learn compilers!

Source:
https://github.com/VBAndCs/sVB-Small...rary/Evaluater