The rules for forming programs in a programming language. A parser checks and structures text according to these rules; an abstract syntax tree records the resulting constructs.
A language construct defined by expansion into other constructs. Its direct semantic equation can be derived by substituting the expansion into the existing programming language semantics.
Recognition of lexical tokens in program text before or during parsing.
A categorized piece of program text, such as a program identifier, a numeral denoting a literal value, or an operator symbol. Its spelling and category help a parser recognize the larger construct.
A parser recognizes how text fits a programming language syntax and can construct a parse tree or abstract syntax tree.
The recognition process performed by a parser, producing a structural description of text according to a programming language syntax.
A name used by a program, such as
x in a variable assignment. An abstract syntax tree can record the name without determining which value it denotes.A value written directly in program text, such as an integer numeral or a quoted string, rather than obtained through a program identifier. Distinct spellings can denote the same value.
A program construct that is evaluated to obtain a value, potentially with side effects or failure. An arithmetic mathematical expression is one example; its abstract syntax tree records how operands and operations nest.
The syntactic priority that resolves grouping when different operators occur together without parentheses. It determines the abstract syntax tree shape before evaluation.
The syntactic grouping convention for successive operators of the same precedence. Left grouping of subtraction makes
a-b-c mean (a-b)-c; it does not make subtraction an associative operation.A program action that associates a value with a target name. For Python
x=2+3*4, evaluate the right-hand program expression and bind x to its result. [ref]https://docs.python.org/3.14/reference/simple_stmts.html#assignment-statements. Python language reference, section 7.2: assignment to an identifier and evaluation of the right-hand side
For an update , compute from , the values before any mutation. Stable snapshots ensure self-addition doubles the old value and self-subtraction produces zero. Building a replacement representation privately and committing it once can additionally preserve the receiver if validation or checked arithmetic fails. This makes the meaning of an update independent of iteration order and aliasing between its operands.
Articles by others on the same topic
Programming language syntax refers to the set of rules that define the structure and format of statements and expressions in a programming language. It describes how to correctly write code so that the programming language interpreter or compiler can understand it. Here are some key aspects of programming language syntax: 1. **Keywords**: Reserved words in the language that have special meaning, such as `if`, `else`, `while`, `for`, `function`, etc. They cannot be used as identifiers (like variable names).