Commit Graph

346 Commits

Author SHA1 Message Date
45e2d5919a doc: add even more complex expressions to sample file 2024-12-02 11:00:00 +00:00
6d6adf5955 lang: ast: fix parsing of consecutive unary messages 2024-12-02 10:59:49 +00:00
d5898bb7d9 doc: add more complex expressions to sample file 2024-12-02 10:48:32 +00:00
5ec3e8fcd4 lang: ast: implement parsing of complex messages 2024-12-02 10:48:16 +00:00
1c5b23d968 lang: ast: re-write expression parser to support keyword messages
also adjust some parser state callbackss to better support sub-parsers returning
 results to their parents.
2024-12-02 07:56:27 +00:00
1c73e1d37b lang: ast: implement parsing of right-parenthesis in expressions 2024-12-01 13:56:05 +00:00
48d649a403 doc: fix mixed indentation in sample file 2024-12-01 13:26:40 +00:00
b5cb87e8df lang: fix lots of compiler warnings/errors 2024-12-01 13:25:36 +00:00
bb34e46c69 frontend: implement an ast node printer 2024-12-01 13:19:48 +00:00
c9dbc2e7e4 lang: re-arrange the operator table 2024-12-01 13:19:01 +00:00
051942e243 vim: add missing operators; fix highlighting of tokens after labels 2024-12-01 13:14:48 +00:00
624f183de8 lang: ast: fix inconsistent indentation 2024-11-29 12:06:06 +00:00
ec24e2c327 lang: ast: convert RPN expression queue to ast and replace generic EXPR node with it 2024-11-28 22:06:25 +00:00
05ced5d5fc lang: ast: define ast_node_type for some fundamental expression components 2024-11-28 22:05:37 +00:00
47c11e4c10 lang: ast: add missing #include 2024-11-28 22:04:22 +00:00
7aed34c875 lang: add some parser-internal operators 2024-11-28 22:01:31 +00:00
c3abcec05a doc: add some more complex expressions to Simple.im 2024-11-28 17:00:52 +00:00
b227b27c06 lang: ast: implement more of the expression parser 2024-11-28 17:00:37 +00:00
a37e4d23bb lang: ast: get_token_expr_type now uses the operator table to discern expression symbols 2024-11-28 16:59:04 +00:00
2a33ae44a5 lang: ast: move recipient tracking from msg handler node to selector node 2024-11-28 16:58:01 +00:00
4304b94491 lang: ast: implement single-expression message handler parsing 2024-11-28 16:57:10 +00:00
7530dd36a2 lang: ast: move block parser state to separate header file
this allows other parsers to specify what kind of token should end the
block.
2024-11-28 16:56:25 +00:00
6a765c4f2b lang: define operator arity and position 2024-11-28 16:54:48 +00:00
fc76fe6ad4 lang: ast: use fancy index manipulation to reduce the size of ast_node_type 2024-11-28 10:56:43 +00:00
f04c858d9a lang: lex: add base/limit markers around token type enums 2024-11-28 10:56:23 +00:00
811d3787c4 lang: ast: add a BLOCK ast node to hold lists of expressions 2024-11-28 10:26:53 +00:00
7f9894d8f9 lang: fix a bunch of compiler warnings 2024-11-27 22:45:34 +00:00
9df8474515 frontend: always print lex tokens when compiling file or repl input 2024-11-27 22:30:42 +00:00
101d87e09d lang: ast: implement simple identifier and operator expression parsing 2024-11-27 22:29:29 +00:00
31de937a21 lang: add operator precedence and associativity definitions 2024-11-27 22:29:01 +00:00
c7e3cea9b9 lang: lex: add definitions for some missing symbols and keywords 2024-11-27 22:28:17 +00:00
5af2692555 doc: document some additional operators in Person.im 2024-11-27 22:26:59 +00:00
a5c0606221 lang: lex: fix push_token not setting lex_prev_token 2024-11-27 12:56:39 +00:00
ad25b89af0 lang: ast: fix incorrect return types; add function to determine expression tokens 2024-11-27 12:56:10 +00:00
cd89c20beb lang: ast: implement control flags returned by parser functions 2024-11-26 21:30:40 +00:00
740df312a9 lang: ast: remove redundant parse header 2024-11-26 21:30:09 +00:00
8cf341c063 doc: add really simple source file for parser testing 2024-11-26 13:10:52 +00:00
886c0b49a4 frontend: compile: parse source files 2024-11-26 13:10:36 +00:00
25e65f2107 frontend: repl: combine repl_full and repl_lex_only 2024-11-26 13:09:57 +00:00
5f5efd8d35 lang: ast: initial implementation of msg handler and selector parsing 2024-11-26 13:08:51 +00:00
27792c43b3 lang: ast: fix compiler warnings 2024-11-25 21:31:52 +00:00
8eb7eff274 frontend: repl: print ast once all tokens in the lex buffer have been consumed 2024-11-25 16:51:29 +00:00
f9b0096dd7 lang: ast: initial implementation of class parser 2024-11-25 16:50:42 +00:00
19506a299c lang: ast: add nullptr check to ivy_ast_node_iterate 2024-11-25 16:50:12 +00:00
95321d7019 lang: ast: transparently ignore linefeeds if the current parse context doesn't handle them 2024-11-25 16:49:43 +00:00
dca0aba183 lang: ast: implement parsing 'use' statements 2024-11-25 16:49:07 +00:00
f1032f0c8e lang: ast: move unit-package parser state definition to c file 2024-11-25 16:48:03 +00:00
f603551e26 lang: ast: fix compiler warnings 2024-11-24 21:31:49 +00:00
6fa1524766 frontend: repl: print the ast after each line of input 2024-11-24 20:50:32 +00:00
1e7e73db21 lang: ast: implement ast iteration
iteration is implementing without recursion, instead using type-specific callbacks to construct a queue of nodes to iterate through. ast priting is implemented using this functionality.
2024-11-24 20:50:12 +00:00