This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -module(exp_parser). | |
| -export([parse/1]). | |
| % Parse simple math expressions. | |
| % Currently works (for certain definitions of "works") | |
| % for addition, subtraction and multiplication. | |
| % Eventually it should handle a unary negation operator (~) | |
| % The goal is to do the following: | |
| % parse("(2 + 3)") => {plus, {num, 2}, {num, 3}} |
NewerOlder