ficus

所属分类:编程语言基础
开发工具:C
文件大小:0KB
下载次数:0
上传日期:2023-06-04 21:24:40
上 传 者sh-1993
说明:  编程语言Ficus
(The programming language Ficus)

文件列表:
.editorconfig (455, 2023-08-19)
.merlin (19, 2023-08-19)
AUTHORS (262, 2023-08-19)
GNUmakefile (3668, 2023-08-19)
LICENSE (11357, 2023-08-19)
Makefile (1921, 2023-08-19)
compiler/ (0, 2023-08-19)
compiler/Ast.fx (55893, 2023-08-19)
compiler/Ast_pp.fx (25385, 2023-08-19)
compiler/Ast_typecheck.fx (187594, 2023-08-19)
compiler/C_form.fx (39963, 2023-08-19)
compiler/C_gen_code.fx (203138, 2023-08-19)
compiler/C_gen_fdecls.fx (19770, 2023-08-19)
compiler/C_gen_std.fx (8550, 2023-08-19)
compiler/C_gen_types.fx (45189, 2023-08-19)
compiler/C_post_adjust_decls.fx (2753, 2023-08-19)
compiler/C_post_rename_locals.fx (3770, 2023-08-19)
compiler/C_pp.fx (21848, 2023-08-19)
compiler/Compiler.fx (26317, 2023-08-19)
compiler/K_annotate.fx (13118, 2023-08-19)
compiler/K_cfold_dealias.fx (27552, 2023-08-19)
compiler/K_copy_n_skip.fx (14774, 2023-08-19)
compiler/K_declosure.fx (6213, 2023-08-19)
compiler/K_fast_idx.fx (37228, 2023-08-19)
compiler/K_flatten.fx (3836, 2023-08-19)
compiler/K_form.fx (50745, 2023-08-19)
compiler/K_freevars.fx (11670, 2023-08-19)
compiler/K_fuse_loops.fx (8018, 2023-08-19)
compiler/K_inline.fx (20629, 2023-08-19)
compiler/K_lift.fx (33094, 2023-08-19)
compiler/K_lift_simple.fx (6301, 2023-08-19)
compiler/K_loop_inv.fx (4748, 2023-08-19)
compiler/K_mangle.fx (26504, 2023-08-19)
compiler/K_normalize.fx (81352, 2023-08-19)
compiler/K_nothrow_wrappers.fx (3629, 2023-08-19)
compiler/K_optim_matop.fx (15718, 2023-08-19)
compiler/K_pp.fx (20746, 2023-08-19)
compiler/K_remove_unused.fx (17165, 2023-08-19)
compiler/K_tailrec.fx (8707, 2023-08-19)
... ...

# Ficus This is a new functional language with the first-class array support that also supports imperative and object-oriented programming paradigms. `ficus` compiler generates a portable C/C++ code out of .fx files. ## License The code is distributed under Apache 2 license, see the [LICENSE](https://github.com/vpisarev/ficus/blob/master/LICENSE) ## How to build The compiler is written in Ficus itself and needs C/C++ compiler and make utility. ### **Unix (Linux, macOS, BSD, WSL, ...)** ``` cd make -j8 bin/ficus -run test/test_all.fx # run unit tests bin/ficus -run -O3 examples/fst.fx # run some examples, e.g. fst.fx, # optionally specify optimization level ``` ### **Windows (native)** Install Visual Studio, for example Visual Studio 2019 Community Edition, open "Developer PowerShell for VS2019" from the Windows menu and type: ``` cd nmake bin/ficus -run -O3 examples/fst.fx # the usage is the same as on Unix ``` ### **Set environment variables** You can add `/bin` to the `PATH`. You can also customize ficus compiler behaviour by setting the following environment variables: * `FICUS_PATH` can point to the standard library (`/lib`), though ficus attempts to find the standard library even without `FICUS_PATH`. It can also contain other directories separated by `:` on Unix and `;` on Windows. The directories with imported modules can also be provided via one or more command-line options `-I `. Note that if a compiled module imports other modules from the directory where it resides then that directory does not need to be explicitly specified. * `FICUS_CFLAGS` is used by C/C++ compiler to build the produced .c/.cpp files. Alternative way to pass extra flags to C/C++ compiler is via `-cflags ""` command-line option, e.g. `-cflags "-ffast-math -mavx2"`. * `FICUS_LINK_LIBRARIES` contains the linker flags and the extra linked libraries. Alternative way to pass the extra linker flags to C/C++ compiler is via `-clibs ""` command-line option. ## How to use (run `ficus --help` to get more detailed up-to-date information about command line parameters) Here is a brief description with some most common options: ``` ficus [-app|-run|...] [-O0|-O1|-O3] [-verbose] [-I ]* [-o ] [--