What is the abstract syntax?

Abstract syntax is a way to map the programmers of the program structure they want to create without fearing the actual code needed to implement it. It allows the programmer to focus on what the program must do before focusing on how to get a computer to actually perform the desired functions. Abstract syntax outlines the specific tasks of the program, such as adding two numbers together, and shows what types of data can be used in this program. Once the abstract mapping is completed, the abstract syntax tree is drawn that corresponds to abstract concepts with a particular syntax - the actual symbols that the programmer needs must enter to start the program it creates.

The idea of ​​abstract syntax is to focus on data types and their relationships without getting into details of how to coded them. The computer code is much different from the human language ASIt is difficult to think about these terms. Instead, programmers create a list of steps that the program must complete, and then use a specific syntax to match abstract conditions with the conditions of the computer code that take these steps. The programmer will often include data types in their abstract marking to show what types of data - whether numbers, letters or decimal places - the program can work. However, at this stage of programming, specific data types are not required, and the programmer may decide to use abstract data types that are purely theoretical and will be replaced by specific data types when the program is written.

This kind of abstract idea of ​​programming is often used in the theory of the compiler. Computers can only understand two values: 1s and 0s. This is known as a binary code. In order for the computer to understand the program written in the programming language, it must compile or translate words and letters into a current of 1 and 0s. The compilers are complex to crjest and mAPPEARING VAGLICS OR ABSULTIVE ASSIGNMENTS WHAT MUST MUST HELP THE PROGERATOR Plan a flawless code.

When a programmer wants to map abstract syntax for specific syntax and start encoding a program or compiler, the tree creates an abstract syntax. This is simply a list of all the abstract instructions she has written, for example "add 2 variables", with a line drawn from each abstract term to a specific line of code required to perform this instruction. The programmer can use any abstract terms it wants, but it is more common to use familiar code terms such as "var" for variable and "int" for the whole number.

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?