-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed evaluation to be more object-oriented. Changed matching to be less recursive and therefore cleaner (fewer one-element matchings). Began work on trnsform (rref transformation matrix finding function).
- Loading branch information
Showing
8 changed files
with
478 additions
and
233 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
1. The input is processed into a series of tokens using regular expressions. | ||
* Calculator#_tokenize | ||
2. The tokens are turned into a tree of RuleMatches using a right-recursive pattern matching algorithm. | ||
* Calculator#_match | ||
3. The tree is fixed. Unnecessary tokens are removed, precedence issues are fixed, etc. | ||
* Ast#_fixed | ||
5. The tree is evaluated in a recursive fashion. | ||
* Ast#evaluate |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.