Member Avatar for [NOPE]FOREVER

how are programming languages written?

Recommended Answers

All 2 Replies

Overly simplified, but first the language is designed, a grammar is devised, and then a compiler is written in another language.

A common way to test a new language is to write a bootstrapping compiler (ie. a compiler written in the language itself). But the first compiler basically must be written in another language.

Well, as deceptikon answered, you need to set all the standards first, decide on whether the language is procedural or object-oriented, the keywords and other "atomic"(indivisible) entities. Using these atomic entities a grammar is built, e.g. Backus-Naur Form(BNF). Also See this.

This grammar can be used to design and code the compiler. The compiler should also follow the standards decided in the first step.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.