[J3] Compiler prototype for conditional expressions

Ondřej Čertík ondrej at certik.us
Tue Oct 13 01:33:28 EDT 2020


Hi,

I finally got to implement a compiler prototype for the conditional expressions in LFortran:

https://gitlab.com/lfortran/lfortran/-/merge_requests/645/

Example notebook:

https://nbviewer.jupyter.org/urls/gitlab.com/lfortran/lfortran/-/raw/477cac615ca420377c7582f16294d05461bf7b8d/share/lfortran/nb/Conditional%20Expressions.ipynb

It doesn't implement the whole proposal, but it implements enough to be able to play with it. This took about 1h of work. It can parse it and compile to machine code, both binary and interactively. I only implemented the "keyword" syntax.

Ondrej


More information about the J3 mailing list