Commit Graph

25 Commits

Author SHA1 Message Date
greg
0da7f7e3a1 Fully fixed binop parsing 2017-09-19 22:10:53 -07:00
greg
19a344fa77 Fixed precedent-less binop parsing 2017-09-19 22:10:53 -07:00
greg
626a7f3861 Working on binop parsing 2017-09-19 22:10:53 -07:00
greg
6ddea790c0 Beginning of variable lookup
everything is null
2017-09-19 22:10:53 -07:00
greg
d2108f0f97 First pass at evaluation
Very incomplete
2017-09-19 22:10:52 -07:00
greg
2989ac338c Implemented binop parsing
Uses Operator-precedence parsing algorithm, which I don't fully
understand.
2017-09-19 22:10:52 -07:00
greg
8b6d54aec2 Fix let clause parsing
let a = x, x should be expression not just simple expression
2017-09-19 22:10:52 -07:00
greg
cdb47bb3b9 Add paren parsing 2017-09-19 22:10:52 -07:00
greg
8f9bfbc5bd Rename rhs to simple_expression 2017-09-19 22:10:52 -07:00
greg
c9fdd5e83c Simplified statements-parsing
Still a little wonky wrt extraneous Separators, need to adjust grammar
to fix I think
2017-09-19 22:10:52 -07:00
greg
30eddf7737 while statements 2017-09-19 22:10:52 -07:00
greg
42719dc2f2 Change 'input' to 'tokens'
just to be consistent
2017-09-19 22:10:52 -07:00
greg
8fcc850d77 Added else clause to if parsing 2017-09-19 22:10:52 -07:00
greg
f421918945 basic if expression 2017-09-19 22:10:52 -07:00
greg
edf100b583 Starting to do if statement parsing 2017-09-19 22:10:52 -07:00
greg
46999beabf Added skeleton of expression() parser 2017-09-19 22:10:52 -07:00
greg
05238bced3 rhs production 2017-09-19 22:10:52 -07:00
greg
a97cce184c Empty program is valid too 2017-09-19 22:10:52 -07:00
greg
329c521964 Parsing statement blocks works 2017-09-19 22:10:52 -07:00
greg
bfa16fd6fb Added Keyword lexical class 2017-09-19 22:10:52 -07:00
greg
25f5188d8c Move definition around 2017-09-19 22:10:52 -07:00
greg
5213dd327f Change type to peekable 2017-09-19 22:10:52 -07:00
greg
cea29094cd type alias for Tokens 2017-09-19 22:10:52 -07:00
greg
67eafba97a Put expect into early return macro 2017-09-19 22:10:52 -07:00
greg
1059a88ee6 Separate parsing into module 2017-09-19 22:10:52 -07:00