Implemented a programming language called FELIX. Felix has all the basic features such as operators , data types such as double , string, bool. It supports loops and functions which makes it a Turing Complete language.
For more details about the language you can see Language description page
Here are some Sample Programs implemented in Felix
- FELIX is a simple toy programming language. A person familiar with javascipt will find it to be a subset of it.
- Our aim is to provide an interpreter for FELIX.
- FELIX supports basic constructs of if-else, definition-declaration, conditional loops, and simple data types of double, string and boolean.
- The interpreter supports input as well as repl inputs.
- For more information, see the github wiki.
- Atharva Sarage C17BTECH11005
- Yash Khasbage CS17BTECH11044
- Rushikesh Tammewar CS17BTECH11041
- Maulikkumar Ravat CS17BTECH11031
- FELIX-docs
- docs/ directory (offline)
- language tutorial is also given in WIKI!!!
- install ghc and cabal(project has only been tested on ubuntu 18.* and 16.* )
sudo apt install ghc cabal-install
- clone repository
git clone https://github.com/IITH-SBJoshi/haskell-3.git
- move into haskell-3 and install dependencies
cabal install parsers
cabal install parsec
cabal install text
cabal install HUnit
cabal configure -v --enable-tests
or simply run
bash install_dependencies.sh
- build app
cabal build
- run:
- to simply get parse-tree as output
cabal run --verbose=0 -- -P <filepath>
- to actually run code
cabal run --verbose=0 <filepath>
- for those who have to run multiple times, it is better to do
alias felix='cabal run --verbose=0 '
Now, simply do
felix <filepath>
everytime. Note that alias remains only for single bash session.
We expect traditional ways of contribution. Few preferences we choose are:
- always branch from dev branch and merge into dev branch. This dev branch will then be merged with master depending on build status and other criteria.
- Always create test cases for every new feature.
- Minor ways of testing involve writing tests in test/ directory. This involves testing of small routines.
- The major, difficult and important way of testing is creating felix programs in test/ directory. The parser output and runtime output of test case should be included in testanswers directory. Parser output and runtime output are to be named as .trueparse and .trueout. Similarly, testfile should be named .felix .
- running test:
bash runtests.sh
- once you have added a new .felix testfile, the testname should be appended in FileNameArray list of runtests.sh
Note: There are no special error repoting or strong semantic checking routines. So if your code is wrong, there is a probablility that it will run yielding every result as
- parsers
- parsec
- text
- HUnit(for testing only)