Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hexaredecimal/falcon
https://github.com/hexaredecimal/falcon
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/hexaredecimal/falcon
- Owner: hexaredecimal
- License: mit
- Created: 2023-02-27T11:40:02.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-27T11:42:27.000Z (almost 2 years ago)
- Last Synced: 2024-11-06T03:48:18.057Z (3 months ago)
- Language: Python
- Size: 549 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Falcon
=======Falcon is a Python-like programming language compiler and transpiler.
The project contains:
- Regular expression based lexer
- Top-down recursive descent parser
- AST-walking codegen
- REPL
- CPP transpiler
- CPP compilation and linkage (debug symbols included)
- Static typing (missing a type checker)
- Dinamic typing (using auto, not generics)
- Built-in stdlib (no imports for Built-in functions and symbols)
- Inline C++Still missing:
- Type checking
- Type based errors
- Include files (make proper use of include files)
- Inline assemblyFalcon doesn't require any third-party libraries.
What the language looks like:
.. code-block::
func main() -> i32:
let fp: file = open("./loops.flc", "r")
let buffer: string = readfile(fp)
print(buffer)
closefile(fp)return 0
.. code-block::
func dup(x: string, count: i32) -> string:
let result: string = ""
for i in 1 .. count:
result = result + xreturn result
func main() -> i32:
println(dup("-", 50))for i in 1 .. 5:
for j in 1 .. i:
print("*")
println("")You can find more examples in ``tests`` directory.
How to try it:
Requirements:
- Python 3.x.x
- GCC (with -std=c++20 support)
.. code-block::
git clone https://github.com/vulture/falcon.git
cd falcon
make all tests
./test/array
...