Code Monkey home page Code Monkey logo

tepl-team / tepl Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 40.59 MB

TEPL is a new programming language in development by me(TENTHER101). PLY is the tool that is being used to build this programming language. I hope to have built many of the basics by early 2025. Go to https://tepl.vercel.app/about for more information!

Home Page: https://tepl.vercel.app/

License: MIT License

Nix 0.12% Python 99.88%
custom-programming-language in-development programming-language wip replit-project tenther101 tepl good-first-issue

tepl's Introduction

TEPL - Textual Educational Programming Language

TEPL is a simple educational programming language aimed at beginners to learn basic programming concepts. It provides a user-friendly interface for practicing programming. TEPL supports basic arithmetic calculations, variable support, logic operators, booleans, math operators if statements and input statements.

Features:

  • Basic arithmetic calculations (Completed)
  • Variable support (Completed)
  • Basic logic operators (Completed)
  • Implementation of booleans (Completed)
  • Math operators and functions (e.g., sin, cos, tan) (TODO)
  • If statements (Nearly Complete)
  • Input statements (Completed)
  • List support (TODO)
  • For loops (TODO)
  • While loops (TODO)
  • Functions (TODO)

For more information and documentation, visit TEPL Docs.

Lexer can be found in the src/lexer.py file. AST nodes can be found in the src/nodes.py file. Parser can be found in the src/parser.py file. Transpiler can be found in the src/transpiler.py file.

Version History:

For the license information, check here.

Code Showcases:

Number guesser game.

PC this is a comment, and this is an example of a basic number guessing game CP

forever do
    set guess to 'Enter a number from 0 to 100: ' expecting input and num
    set secret to random num from 0 to 100
    if guess > 100 OR guess < 0 then
        output $"Error: You inputed a number that is less than or greater than 0 or 100, it was $guess!"
    elseif guess > secret OR guess < secret then
        output $"Wrong guess! The secret number was...$secret!"
    else then 
        output $"You got it right! The secret number was $secret!"
    end
    pause 1
    exit
end

tepl's People

Contributors

tenther101 avatar jrcarl624 avatar

Stargazers

 avatar Prince Rawat avatar  avatar

Watchers

 avatar

Forkers

jrcarl624

tepl's Issues

Add RANDOM Support(RAS) and better error message reporting for Parser(BEMP)

ARS

  • Currently:
set x to random num from 0 to 100 
Syntax error in input!
Traceback (most recent call last):
  File "/home/runner/TEPL-V-07375/./src/main.py", line 67, in <module>
    main()
  File "/home/runner/TEPL-V-07375/./src/main.py", line 63, in main
    interpret(result)
  File "/home/runner/TEPL-V-07375/src/interpreter.py", line 45, in interpret
    if ast[0] == 'OUTPUT':
TypeError: 'NoneType' object is not subscriptable 
  • Returns an error message.

  • TODO:
set x to random num from 0 to 100
output x
  • Returns a random integer/number from 0 to 100.

BEMP

  • Currently:
set x too 5
Syntax error in input!
Traceback (most recent call last):
  File "/home/runner/TEPL-V-07375/./src/main.py", line 67, in <module>
    main()
  File "/home/runner/TEPL-V-07375/./src/main.py", line 63, in main
    interpret(result)
  File "/home/runner/TEPL-V-07375/src/interpreter.py", line 45, in interpret
    if ast[0] == 'OUTPUT':
TypeError: 'NoneType' object is not subscriptable
  • Returns an explicit error message and continues to the interpreter even when an error has already been found.

  • TODO:
set x too 5
Syntax error at 'too', expected 'to'!
  • Returns a helpful error message and does not continue to the interpreter.

Add ELSEIF

Add support for ELSEIF statements in logical branches.

about my language rawscript

broo sorry for makign issues in your personal repo but as i can see that you have seen a lot of progamming languages which are really good and trying to solve the problem which i am trying to solve so tell me is my language is different or is it some new programming language i n the pool of custom english to progamming language interpraters plzz help and i am not able to find the documentation of your langauge how to use it wait let me download the code and see the updated code style i will put it soon
and can you contact me on discord on id 1021628209692942387
have a lot of question which can only ask on a voice massage thing plzz if you have time

Transpiler bugs

Currently:

>> set x to 5
Transpiled code: 
import random
INPUT = None
x = 5

Executed code: 
No code is executed. 


>> output x
Transpiled code: 
import random
INPUT = None
print(x)

Executed code: 
5

So yes this works, but when I run a file it doesn't.

Issue:

>> --run
Enter the file path: index.tepl
Syntax error at 'OUTPUT', on line '2'!

File contents:

SET x TO 5
OUTPUT x + 3

The python code and AST generated:
None

Note:

Though @TENTHER101(Me), is assigned to this issue anyone else can be assigned as well.

Add a while loop

Add support for while loops.

Syntax:

REPEAT 
    code
UNTIL condition

Add TYPE keyword support and data types

Edit lexer.py, parser.py, and interpreter.py in order to add support for the TYPE keyword and for the four main data types in TEPL; TEXT(TXT), NUMBER(NUM), DECIMAL(DEC), and BOOLEAN(BOOL).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.