[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
how to make a programming language?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 15
Thread images: 2
File: 1444125483552.png (1 MB, 500x643) Image search: [Google]
1444125483552.png
1 MB, 500x643
Hey /g/, i wanna make my own language. Can you point me in the right direction?
>>
school
>>
>>53544244
As in for fun or a real one? Because you can't make a real one, Anon.
>>
>>53544431
Just for fun really. Or a scripting language really.
>>
First you have to make a good logo, anyone have any ideas?
>>
>>53544480
Alright, the basic process depends on what sort of language you want to make.

For a compiled language, learn assembly for your target CPU architecture, and decide what you want to abstract into your language. Then write a compiler that reads in your abstractions and spits out assembly instructions and links them into an executable.

For an interpreted language, you need to write a virtual memory and executable model in your host language, then write an interpreter that reads your language and manipulates the internal model accordingly.

None of this is conceptually very difficult, you could write a simple stack-based interpreted language in an afternoon.
>>
>>53544362
This

But the basic steps are:
1. Learn at least one language (C is probably most useful)
2. Design your language
3. Write a compiler (language doesn't really matter) that compiles your language to an existing language (again probably C) and runs it
>>
>>53544559
>just write a compiler

Lol
>>
Flex bison

Or

PEG
>>
>>53544244
Start learning some automata theory first
>>
>>53544480
Do you understand discrete maths, compiling basics, compiling interaction to the machine?

Only smart retards make languages. Since you are asking /g/ how to make one, you're nor smart and not retarded.
>>
>>53544542
Thanks :)
>>
>>53544620
Underrated post.
>>
>>53544620
Flex, Bison and LLVM for an actual compiler
>>
>>53544587
Bison, Flex.

Ragel.
Thread replies: 15
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.