aboutsummaryrefslogtreecommitdiffstats
path: root/src/parser.rs
AgeCommit message (Collapse)AuthorFilesLines
2025-01-06Bump dependencies.HEADmainRose Hogenson1-1/+1
2024-06-07Bring back bigint.Rose Hogenson1-7/+4
2024-05-31Add a READMERose Hogenson1-0/+4
2024-05-31Slightly simplify the lexer.Rose Hogenson1-0/+5
2024-05-30Add bytecode.Rose Hogenson1-91/+167
A recursive AST is kind of annoying to evaluate without recursion. Bytecode is cooler anyway.
2024-05-30Write tests for parser.Rose Hogenson1-137/+253
2024-05-30Use i128.Rose Hogenson1-1/+1
Why not?
2024-05-30Add arcsin, arccos, arctan.Rose Hogenson1-11/+32
2024-05-30Fix unary minus.Rose Hogenson1-1/+1
Unary minus needs to bind more closely than ^, in order to parse -2^2 correctly.
2024-05-29Allow prefix minus.Rose Hogenson1-7/+7
2024-05-29Get rid of BigInt.Rose Hogenson1-2/+1
Too much trouble, tbh. Who needs more than 64 bits anyway?
2024-05-29Use a stack for the parser.Rose Hogenson1-144/+175
I don't have much experience writing parsers with a stack, but it seems pretty straightforward: the stack just records what you've seen so far, and you simplify down some prefix of the stack whenever the precedence decreases.
2024-05-28Implement modulo.Rose Hogenson1-0/+4
2024-05-28Use num crate.Rose Hogenson1-9/+9
2024-05-27Fix order of operations.Rose Hogenson1-38/+48
PEMDAS
2024-05-27Fix backtracking in the parser.Rose Hogenson1-70/+103
2024-05-27Rewrite in Rust.Rose Hogenson1-0/+202