Shared Flashcard Set

Details

CS424 Chapter 3
Chapter 3: Concepts of Programming Languages by Sebesta
15
Computer Science
Undergraduate 3
06/17/2024

Additional Computer Science Flashcards

 


 

Cards

Term
The study of languages can be broken down into _______ and ______
Definition
syntax, semantics
Term
What is syntax?
Definition
The syntax of a programming language is the form of its expressions, statements, and program units
Term
What is semantics?
Definition
The semantics is the meaning behind those expressions, statements, and programming units
Term
What are sentences?
Definition
They are the strings of a languge
Term
What are lexemes?
Definition
They are the lowest syntactical units of a language
Term
What are grammars?
Definition
Formal language-generation mechanisms
Term
What is the Bakus-Naur form?
Definition
It is the most popular form of describing a programming languages syntax
Term
What is a metalanguage and give an example of
Definition
Metalanguage is language used to describe another language. An example of this is the Backus-Naur Form (BNF)
Term
What is the left-hand side of the BNF?
Definition
It is the abstraction being defined
Term
What is the right-hand side of the BNF?
Definition
It consists of some mixture of tokens, lexemes, and references to other abstractions. Altogether, the definition us called a rule or production
Term
A rule is recursive if its ____ appears on its ____
Definition
LHS, RHS
Term
What does it mean if a grammar is ambiguous?
Definition
It means that the grammar has two or more distinct parse trees
Term
What are attribute grammars?
Definition
It's a device used to describe more of the structure of a programming language than can be described with context-free grammar. The extension allows certain language rules to be conveniently described, such as static semantics (typically type constraints)
Term
What is a token?
Definition
This is part of the lexical analyzer, which collects characters into logical groupings (lexemes) and assigns them internal codes (tokens)
Term
What is parsing?
Definition
it is the part of the process of analyzing syntax that is referred to as syntax analysis
Supporting users have an ad free experience!