ed4f49311c
syntactic_ast: unwrapped the central GADT into several related types. core_ast: related to the above, reorganized core_ast to use the new syntactic ast
Emin Arslan2026-02-02 20:32:15 +03:00
d41d8e5fbe
core_ast: add initial draft for the core ast, and a conversion function from the syntactic ast
Emin Arslan2026-01-07 20:02:10 +03:00
ec56d76fb3
syntactic_ast: modify the phantom types to have concrete constructors, as the ocaml compiler cannot prove them distinct otherwise
Emin Arslan2026-01-07 20:00:11 +03:00
be81061895
syntactic_ast: fix issue in set! parsing, add set! to the test case.
Emin Arslan2026-01-07 18:18:38 +03:00
0d731f29b3
syntactic_ast: added a node for set! expressions
Emin Arslan2026-01-07 18:13:55 +03:00
54c48ddf0e
syntactic_ast: add node for if expressions
Emin Arslan2026-01-07 18:03:28 +03:00
edc9d8b9e6
syntactic_ast: added parsing and pretty printing for cond expressions
Emin Arslan2026-01-04 21:38:04 +03:00
e95a115acf
syntactic_ast: Added proper handling for Let and Letrec
Emin Arslan2026-01-03 21:35:27 +03:00
9fb29afc3e
syntactic_ast: Modified letrec forms to also accept a body
Emin Arslan2026-01-03 20:49:17 +03:00
17e533dbb8
Modified the GADT to distinguish bodies
Emin Arslan2026-01-03 20:43:11 +03:00
6d95977324
ast: improved the implementation of syntactic_ast debug: added debug functions for the syntactic_ast module Modified the compiler executable to test a little bit.
Emin Arslan2026-01-03 18:30:47 +03:00
cb94372f29
new ast: added a new syntactic_ast module that provides a more structured AST as a GADT
haxala1r2026-01-03 16:44:00 +03:00
bc7ca0fa2d
new library: added containers as a dependency.
haxala1r2026-01-01 13:36:09 +03:00
6b54db3fa6
Added more math operations, generalized and simplified existing math operations, added some list operations for the lisp lists
haxala1r2025-11-06 23:02:16 +03:00
724aeefc0f
Reorganized the standard library a little more, moved the initialization code for the standard environment into a function. Making way for more organization changes to come
haxala1r2025-11-05 23:55:21 +03:00
bafa9bdfbe
Added type annotations for the environment module to make things clearer, switched bind_args implementation with a simpler one.
haxala1r2025-11-03 23:00:46 +03:00
e372691b16
Changed the addition and subtraction functions to be clearer
Emin Arslan
2025-10-16 22:28:11 +03:00
471fac4906
Added def, changed naming, and added if expressions
Emin Arslan
2025-10-16 17:15:04 +03:00
17fd8f2d83
Evaluation is now performed properly, mimicking Common Lisp, and basic defun and defmacro definitions are provided (automatically executed on startup)
Emin Arslan
2025-10-14 22:26:00 +03:00
7ea1bcdb5a
Added dot syntax for lists, and proper quote syntax. LQuoted is now unused
Emin Arslan
2025-10-14 22:24:57 +03:00
8f46107e1e
Improved the repl to return to evaluation upon error. Also added an exit command
Emin Arslan
2025-10-14 21:06:11 +03:00
9097ddd5c1
Added builtin special forms, lambda forms and bind-symbol. got rid of bind-function, as it is now unnecessary. it is now possible to create functions!
Emin Arslan
2025-10-14 21:05:10 +03:00
55bf17cf47
Re-organized a lot of code, changed functions so that functions capture the surrounding environment and execute in that environment
Emin Arslan
2025-10-14 20:21:29 +03:00
4a1d27b01e
General style changes, nothing major
Emin Arslan
2025-10-14 19:01:29 +03:00
2e4a0f6f83
Added bind-function primitive that allows us to define functions, also changed evaluation to allow for a persistent environment
Emin Arslan
2025-10-12 21:58:54 +03:00
d80caadc85
Added gensym, and phases in the desugar module for logical and & or
haxala1r2025-12-27 16:41:22 +03:00
be0d479665
Added desugar steps to add (begin) wrappers around long lambda bodies, and rewrite internal (define) forms into letrec forms
haxala1r2025-12-26 22:13:30 +03:00
4f1ad54596
Started work on the compiler, with a desugar phase
haxala1r2025-12-26 20:42:03 +03:00
e10124498e
Reorganize flake again, it should be good now
haxala1r2025-12-09 19:44:30 +03:00
64e52cd0cf
Added more math operations, generalized and simplified existing math operations, added some list operations for the lisp lists
haxala1r2025-11-06 23:02:16 +03:00
2f9501450f
Reorganized the standard library a little more, moved the initialization code for the standard environment into a function. Making way for more organization changes to come
haxala1r2025-11-05 23:55:21 +03:00
a45918d203
Added type annotations for the environment module to make things clearer, switched bind_args implementation with a simpler one.
haxala1r2025-11-03 23:00:46 +03:00
d0accebf73
Changed the addition and subtraction functions to be clearer
Emin Arslan
2025-10-16 22:28:11 +03:00
9b20547e84
Added def, changed naming, and added if expressions
Emin Arslan
2025-10-16 17:15:04 +03:00
dec68856f3
Evaluation is now performed properly, mimicking Common Lisp, and basic defun and defmacro definitions are provided (automatically executed on startup)
Emin Arslan
2025-10-14 22:26:00 +03:00
365595a345
Added dot syntax for lists, and proper quote syntax. LQuoted is now unused
Emin Arslan
2025-10-14 22:24:57 +03:00
df0b3178f0
Improved the repl to return to evaluation upon error. Also added an exit command
Emin Arslan
2025-10-14 21:06:11 +03:00
bb0ec74ee7
Added builtin special forms, lambda forms and bind-symbol. got rid of bind-function, as it is now unnecessary. it is now possible to create functions!
Emin Arslan
2025-10-14 21:05:10 +03:00