vurian.blogg.se

Create a programming language
Create a programming language




Also, it will allow you to formally reason about some aspects of the language.

create a programming language

Specifying full operational semantics of your language will give you a formal language documentation and it will make you understand your language to the very details.

create a programming language

On top of this semantics you should build an actual compiler/interpreter with optimizations and so forth. That is, it (mathematically) precisely defines how programs execute. The obvious semantics to start with is operational semantics, where the meaning of a program is given in terms of how the program actually runs. That being said, in addition to lexical and syntax specification of a language, you should also define semantic specification, i.e., what does a (syntactically correct) program written in your language actually mean. A compiler/interpreter is a just a piece of an actual software that carries out that computation, and should not serve as the language specification. You can think of a programming language as a mathematical formalism used for expressing computation.






Create a programming language