Skip to content

ForgeRoot/DutchScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo DutchScript

DutchScript is a fun programming language dedicated to an assignment from my study at Hogeschool Utrecht.
Explore the docs »

View Demo · Report Bug · Request Feature

Contributors Forks Stargazers Issues LinkedIn

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Requirements
  6. Contributing
  7. License
  8. Contact
  9. Acknowledgments

About The Project

This project is a practical part of the class Advanced Technical Programming at my study: Technical Informatics at the Hogeschool Utrecht. The main goal of the project is: to create an interpreter and compiler that is made with the functional programming paradigm. Both the interpreter and the compiler are made with Python.

(back to top)

Built With

Python Vim Neovim Arduino

(back to top)

Getting Started

Installation

  1. Clone the repo
    git clone https://github.com/howtoprogrambirds/Dutchscript.git

(back to top)

Usage

To run the code, you would have to run the cli.py file. Here by running the cli.py file, you can pass the source file and the values of the arguments of your "Begin" function.

As an example, I have created double recursion functions (in the examples folder with other examples, if you want to make your own just add a new file to the example folder. For more information about the DutchScript language itself, explore the docs). See below:

Bekijk de evenheidstest 'een n':
	als een n kleiner 0 :
	    als een n hetzelfde 0 :
	        Geef waarheid .
	    !
	    anders :
	        Geef leugen .
	    !
	!
	anders :
		Geef de evenheidstest 'een n - 2 '.
	!
!

Bekijk de onevenheidstest met 'een m':
	als een m kleiner 1 :
		als een m hetzelfde 1 :
	        Geef waarheid .
	    !
	    anders :
	        Geef leugen .
	    !
	!
	anders :
		Geef de onevenheidstest 'een m - 2 '.
	!
!


Bekijk het Begin'een n, een m':
    de resultaatEen is Roep een evenheidstest 'een n'.
    Zeg "resultaat 1 terug: ", de resultaatEen.

    de resultaatTwee is Roep een onevenheidstest 'een m'.
    Zeg "resultaat 2 terug: ", de resultaatTwee.
    Geef de resultaatTwee.
!

To run this code, you would run this command in the terminal. For this example, argument values 2 and 3 are given (if there are more or less, you have to add the "--arguments" flag to it). You can, of course, change these values.

[your desktop path]/src/CommandLineInterface$ python3 cli.py --filename="double_recursive" --arguments=2 --arguments=3

Which will give this output:

resultaat 1 terug: waarheid
resultaat 2 terug: waarheid
waarheid

(back to top)

Roadmap

  • Lexer
  • Parser (can't parse classes)
  • Interpreter (can't interpret classes)

See the open issues for a full list of proposed features (and known issues).

(back to top)

Requirements

Interpreter-functionality

  • One or more functies per file
  • Function arguments pass through function call
  • Recursive Function
  • Function can call other functions
  • Return value can be printed out

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

I used the rules of functional programming with this exercise, and I'm still learning!
So if you have any comments on my code. Please let me know!

Dylan van Eck - dylananne_v_eck@gmail.com

Project Link: https://github.com/howtoprogrambirds/Dutchscript

(back to top)

Acknowledgments

Machine-learning icons (logo) created by Smashicons - Flaticon

(back to top)

About

DutchScript is a fun programming language dedicated to an assignment from my study.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages