Flashcards
Semantics and Syntax Key Terms
Flashcards do conjunto (16)
- 1SyntaxThe form of its expressions, statements, and program units
- 2SemanticsThe meaning of the expressions, statements, and program units
- 3SentencesThe strings of a language.
Ex. English: a string of characters form a word, and a string of words form a sentence. - 4LexemesThe lowest-level syntactic units such as its numeric literals, operators, and special words.
- 5IdentifiersA group of lexemes
- 6TokenThe category of a group of lexemes
- 7MetalanguageA language that is used to describe another language.
- 8Backus-Naur Form (BNF)A metalanguage for programming languages. It is used to describe the syntax of programming languages.
- 9Nonterminal (Symbols)Can have two or more distinct definitions, representing two or more possible syntactic forms in language.
- 10Terminal (Symbols)The lexemes or tokens of the rules
- 11GrammarA finite nonempty collection of rules
- 12RecursionWhen a function calls upon itself.
A rule is recursive if its LHS appears in its RHS.
Ex. → identifier
| identifier,
appears on both sides. - 13Start SymbolA special nonterminal that begins the grammar.
Ex. - 14DerivationA repeated application of rules, starting with the start symbol and ending with a sentence (all terminal symbols).
- 15AmbiguousA grammar is ambiguous if and only if it generates a sentential form that has two or more distinct parse trees.
- 16—
Informações
- Descrição
- In order to understand any language, we must evaluate the grammar, syntax, and semantics of a language.
- Criado por
- Amy Dang
- Visualizações
- 53
- Tags
- Avaliação