Skip to content

An open source interpreted programming language with a C style syntax made in C#

License

Notifications You must be signed in to change notification settings

CowNation/CowSpeak

Repository files navigation

version License: MIT Run on Repl.it

CowSpeak

Ever wish for an interpreted programming language with a C style syntax? Here's your solution! CowSpeak is an open source interpreted programming language made in C# with a C style syntax

Info

This project's sole developer is a high school student and this is simply a hobby. This language uses CowConfig and isn't thread safe. To see CowConfig go to https://github.com/CowNation/CowConfig

Features

  • Data types: object, boolean, integer, integer64, character, string, and decimal
  • Arrays
  • Most standard C# operators (+, -, *, /, =, %, =, &&, ||, &, |)
  • Single line comments
  • Conditionals (if, else, loop, while)
  • Custom C# modules
  • Interact with native C# types in code
  • Language defined functions
  • OS specific API functions
  • User defined functions
  • Methods
  • Detailed error throwing
  • Simple per-line token debugging
  • Scopes & manual variable deletion
  • Easily modifiable syntax (even at runtime)
  • Full support for hexadecimal numbers

Modules

  • Generated Documentation
  • This contains various API functions and predefined Windows enums as definitions.
  • This will be loaded automatically on first call to CowSpeak.Execute if you are using CowSpeak on a Windows PC and CowSpeak.UseOSSpecificModules is true.
  • This is simply a placeholder module with no definitions or functions because I don't use linux
  • Contributions to this would be greatly appreciated
  • Generated Documentation
  • This module is for those who dislike how CowSpeak's defult type names are so long
  • The existing CowSpeak type names will still work as well
  • Function names will still refer to the types as their defualt CowSpeak type names (Ex: myInt.ToCharacter())
  • Exceptions will still also refer to the standard CowSpeak type names
  • This will probably cause several bugs whenever using this module's short type names

Significant Versions

v1 (Initial release on May 17, 2019)

v2 (Recode of line evaluations on September 5, 2019)

v3 (Recoded in C# on September 25, 2019)

v4 (Added support for different variable types on September 30, 2019)

v5 (Added support for parameters and conditional statements on October 8, 2019)

v6 (Added support for user defined functions and recoded function system on November 20, 2019)

v6.5 (Added support for FunctionChains and major bug fixes and improvements February 24, 2020)

v7 (Added arrays, rewrote StaticFunctions, major bug fixes, and major improvements March 6, 2020)

v7.2 (Major bug fixes, improvements, and changed some literals to be stored as Base64 April 12, 2020)

v7.4 (Major bug fixes, improvements, and changed evaluate method for all types of expessions to DynamicExpresso.Eval April 13, 2020)

v7.8 (Bug fixes, major optimizations, API changes May 8, 2020)

v8 (Added new module system, added byte and ByteArray types, major bug fixes, optimizations, and improvements June 5, 2020)

v8.2 (Embedded DynamicExpresso into the solution, rewrote Any class, and made it possible to interface with native C# types from CowSpeak code July 22, 2020)

v9 (Rewrote lexer to be not dependent on spaces, major optimizations when calling StaticFunctions, bug fixes October 18, 2020)

Current Version:

v9.2 (Added user defined structures, changes to modules, bug fixes August 31, 2021)

About

An open source interpreted programming language with a C style syntax made in C#

Resources

License

Stars

Watchers

Forks

Packages

No packages published