Ask coding questions

← Back to all posts
Programming Language source (simple)
jonathan111971 (0)

How can you make a programming language without doing like lexer and all that stuff? is there like already made sources i can use then like edit it and stuff so i can change the syntax and variables and function names like to set a new function you would do

function $function_name($var,$var)
$source
end

Can someone send me a source or a link where i can get one? and i would appreciate it if it was like small source or basic with like only print and variables, i don't wanna just straight up skid i wanna learn hopefully i can learn from this. Thanks

Commentshotnewtop
theangryepicbanana (852)

you can't really make a programming language without some sort of lexer

jonathan111971 (0)

@theangryepicbanana I'm asking if there is a already made lexer lol

theangryepicbanana (852)

@jonathan111971 why would you report me? just for not giving you what you want? nice

theangryepicbanana (852)

@jonathan111971 I'm sorry that you don't like my response. If you didn't instantly go to reporting me because I didn't give you the answer you wanted, I would have been more than willing to help

jonathan111971 (0)

@theangryepicbanana its a joke lol, sorry for scaring you

theangryepicbanana (852)

@jonathan111971 that isn't really something to joke about (and I didn't find it funny anyways). regarding the original question, no, there are no pre-made lexers for your language. you have to make them yourself, but tools such as parser combinators make it pretty easy.

theangryepicbanana (852)

@jonathan111971 here is a parser combinator tool for python that you may find helpful for making your lexer: https://pypi.org/project/parsita/.