+ 1
how do you develop a language like Bootstrap, Javascript, Html, etc.
How do these Companies/ people do it? How do you start?(literally step1) You obviously can't just put stuff together and call it Code We have All seen the issues while developing a page or anything else in the initial stages of development.
14 Answers
+ 1
These are all good Resources.
To write a Language isn't as hard as you would think.
https://www.quora.com/How-does-one-create-a-programming-language
https://hackernoon.com/lets-build-a-programming-language-2612349105c6
https://m.wikihow.com/Create-a-Programming-Language
https://frontendmasters.com/workshops/build-your-own-programming-language/
https://stackoverflow.com/questions/3810119/how-to-go-about-making-your-own-programming-language
https://dev.to/evantypanski/writing-a-simple-programming-language-from-scratch-part-1-54a2
+ 1
IF YOU WOULD READ THE FIRST POST IT SAYS "HOW DO YOU DEVELOP A LANGUAGE". Not a website.
+ 1
Mr. Jason Hester If you know everything then why you are asking.😂😂
+ 1
Mr. Jason Hester One more suggestions make a code or lesson on it instead of writing here because people will never come here to see it.
+ 1
Nobody answered so I had to go digging myself.
Got tired of waiting on you to answer. So I answered myself.
And if you would Look In The Badges Section of the app there is a badge (the Self Learner Badge) FOR ANSWERING YOUR OWN QUESTION AND GETTING 5 UPVOTES.
+ 1
"Nobody answered so I had to go digging myself."
It's good that you put your efforts.
"Got tired of waiting on you to answer. So I answered myself."
See, I am not only here to reply on every question. It's a open discussion on question so anybody can reply. And also it is not possible to reply on every second. So please don't depends on only single person.
0
Please clarify first. Are you talking about to develop website or language.
0
Compiled vs Interpreted
There are two major types of languages: compiled and interpreted:
A compiler figures out everything a program will do, turns it into “machine code” (a format the computer can run really fast), then saves that to be executed later.
An interpreter steps through the source code line by line, figuring out what it’s doing as it goes.
Technically any language could be compiled or interpreted, but one or the other usually makes more sense for a specific language. Generally, interpreting tends to be more flexible, while compiling tends to have higher performance. But this is only scratching the surface of a very complex topic.
A programming language is itself a program, and thus you need to write it in a language. If you are writing an interpreted language, it makes a lot of sense to write it in a compiled one (like C, C++ or Swift) because the performance lost in the language of your interpreter and the interpreter that is interpreting your interpreter will compound.
0
slower language (like Python or JavaScript) is more acceptable. Compile time may be bad, but in my opinion that isn’t nearly as big a deal as bad run time.
0
A programming language is generally structured as a pipeline. That is, it has several stages. Each stage has data formatted in a specific, well defined way. It also has functions to transform data from each stage to the next.
The first stage is a string containing the entire input source file. The final stage is something that can be run.
The first step in most programming languages is lexing, or tokenizing. ‘Lex’ is short for lexical analysis, a very fancy word for splitting a bunch of text into tokens. The word ‘tokenizer’ makes a lot more sense, but ‘lexer’ is so much fun to say that I use it anyway.
Tokens
A token is a small unit of a language. A token might be a variable or function name (AKA an identifier), an operator or a number.
Task of the Lexer
The lexer is supposed to take in a string containing an entire files worth of source code and spit out a list containing every token.
0
Future stages of the pipeline will not refer back to the original source code, so the lexer must produce all the information needed by them. The reason for this relatively strict pipeline format is that the lexer may do tasks such as removing comments or detecting if something is a number or identifier. You want to keep that logic locked inside the lexer, both so you don’t have to think about these rules when writing the rest of the language, and so you can change this type of syntax all in one place.
The predominant such tool is Flex, a program that generates lexers. You give it a file which has a special syntax to describe the language’s grammar. From that it generates a C program which lexes a string and produces the desired output.
0
The second stage of the pipeline is the parser. The parser turns a list of tokens into a tree of nodes. A tree used for storing this type of data is known as an Abstract Syntax Tree, or AST.
The parser adds structure to to the ordered list of tokens the lexer produces. To stop ambiguities, the parser must take into account parenthesis and the order of operations. Simply parsing operators isn’t terribly difficult, but as more language constructs get added, parsing can become very complex.
Bison
Again, there was a decision to make involving a third party library. The predominant parsing library is Bison. Bison works a lot like Flex. You write a file in a custom format that stores the grammar information, then Bison uses that to generate a C program that will do your parsing.
0
LLVM is a collection of compiler tools. It’s basically a library that will turn your language into a compiled executable binary. It seemed like the perfect choice, so I jumped right in. Sadly I didn’t check how deep the water was and I immediately drowned.
LLVM, while not assembly language hard, is gigantic complex library hard. It’s not impossible to use, and they have good tutorials, but I realized I would have to get some practice before I was ready to fully implement a Pinecone compiler with it.
0
AJ/AY for being a sr. software engineer I Would think you would pay attention to the details a little more or is that outside your scope.