Cobalt BASIC is a simple, dynamically typed, interpreted programming language with syntax inspired by python and javascript with an aim for readability and understandablility. It is not the fastest langauge ever because it is interpreted by python, but it will get the job done for simple tasks
- Contains the shell for running programs in my programming language
- imports basic.py
- Contains all the code the actual programming language, including the
lexer
,parser
, andinterpreter
- imports string_with_arrows.py, Token.py, Nodes.py, Lexer.py, Errors.py, and Parser.py
- Contains a single method called
string_with_arrows
, for inserting^
characters where an error appears in the code
- Contains the Token class and all token type constants used in the language
- Contains all global variable for the interpreter
Contains all these classes
- Symbol Table
- Context
- Value and subclass
- RunTime Result
- Interpreter
- Contains the Lexer
Contians all these classes
- Parse Result
- Parser
- Contains all Node classes
- Contains the position class
- Contains the Error class and all subclasses
Python 3.6 or greater
Currently this project can be run from any python environmment with no special installations, all you need to do is
- clone this repo
- cd into the directory for the repo
- run
main.py
from your preffered python executor
- add functions
- add strings
- add lists
- fix variable reassignment
- add built in functions
- add multi-line code compatability
- add return statement
- add iterative for loops
- add default arguments to functions
- add *args functions
- improve anonymous functions
- add try/except
- improve lists
- allow custom object creation
- add operator overloading to custom objects
The base of this code was written while following this tutorial series on youtube. I have added some of my own features and syntax. I plan to go beyond this tutorial series and add even more features as I learn more about this topic.