Syntax and Semantics Flashcards

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/24

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering programming language syntax, semantics, error types, grammars, and formal language classifications from the lecture transcript.

Last updated 10:58 AM on 8/27/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

25 Terms

1
New cards

Syntax

The structure and form of valid programs; the grammar and set of rules that dictate how code must be written for a computer to understand and execute it.

2
New cards

Semantics

The meaning, logic, and behavior of syntactically correct programs and what instructions actually do when executed.

3
New cards

Concrete Syntax

The exact notation used by programmers when writing code in a programming language.

4
New cards

Abstract Syntax

A simplified structural representation of code that removes surface details such as parentheses, commas, and keywords.

5
New cards

Backus-Naur Form (BNF)

A formal grammar notation used as a tool for defining syntax.

6
New cards

Parse Trees

Structures that show how source code conforms to grammar rules and illustrate the derivation process for a string.

7
New cards

Ambiguity in Syntax

A condition that occurs when a string can be parsed in more than one way, such as the dangling else problem.

8
New cards

Operational Semantics

A type of semantics that defines program meaning by describing how a program executes on an abstract machine.

9
New cards

Denotational Semantics

A type of semantics that maps programs to mathematical functions.

10
New cards

Axiomatic Semantics

A type of semantics that uses logic, such as Hoare logic, to describe program behavior.

11
New cards

Syntax Error

An error that occurs at compile-time when code fails to follow the language's structural rules, preventing compilation or execution.

12
New cards

Semantic Error

An error that occurs when code is syntactically correct but produces unintentional results, flawed logic, or runtime crashes during execution.

13
New cards

Sentence

A string of characters over some alphabet that constitutes a legal statement in a language.

14
New cards

Language

A set of sentences, or a group of words that can be combined along with the rules for combining those words.

15
New cards

Lexeme

The lowest level syntactic unit of a language, such as *, sum, begin, for, or ==.

16
New cards

Token

The language category assigned to a set of lexemes, such as identifiers.

17
New cards

Recognizer

A device that reads input strings of a language and decides whether the input strings belong to that language.

18
New cards

Generator

A device that generates legal and meaningful sentences of a language to determine if syntax is correct by comparison.

19
New cards

Chomsky Hierarchy

A classification system that divides formal languages into four types based on the computational power required to recognize them.

20
New cards

Regular Languages

Type 3 formal languages in the Chomsky Hierarchy that are generated by regular grammars, represented by regular expressions, and accepted by finite automata.

21
New cards

Regular Grammar

A grammar that grows on only one side of the string, categorized as either Right Linear Grammar or Left Linear Grammar.

22
New cards

Context-Free Languages

Type 2 formal languages in the Chomsky Hierarchy that can be generated by Context Free Grammars and recognized by Pushdown Automata.

23
New cards

Context-Free Grammar (CFG)

A formal grammar defined by a 4-tuple G=(V,T,S,P)G = (V, T, S, P), where VV is non-terminal symbols, TT is terminal symbols, SS is the start symbol, and PP is production rules.

24
New cards

Leftmost Derivation

A derivation process in Context Free Grammar where replacement of non-terminal symbols proceeds from the left.

25
New cards

Rightmost Derivation

A derivation process in Context Free Grammar where replacement of non-terminal symbols proceeds from the right.