Deck 6: Syntax

ملء الشاشة (f)
exit full mode
سؤال
In a regular expression,curly braces are used to indicate a range of characters.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Most modern languages are in a completely fixed format.
سؤال
Derivation is the process that replaces left-hand sides by choices of right-hand sides appearing in prior rules.
سؤال
Abstract syntax trees abstract the essential structure of the parse tree.
سؤال
Productions are in Backus-Naur form if they are given using only the metasymbols "<" and ">".
سؤال
Reserved words,or keywords,are not considered to be a typical token category.
سؤال
In extended Backus-Naur form,square brackets [ ] indicate optional parts of the syntax.
سؤال
Backus-Naur forms are used to describe the syntax of programming languages such as Algol60.
سؤال
Regular expressions can be used to describe tokens.
سؤال
The description of simple integer arithmetic expressions with addition and multiplication cannot be represented by a context-free grammar.
سؤال
The curly bracket { } notation used in extended Backus-Naur form stands for "at least one or more repetitions of."
سؤال
The lexical structure of a programming language is the structure of its tokens,or words.
سؤال
The start symbol is used to identify the start of the grammar.
سؤال
A recognizer is a program that accepts or rejects strings based on whether they have occurred before.
سؤال
White space is an example of a token delimiter.
سؤال
A grammar for which two distinct parse trees are possible for the same string is considered to be ambiguous.
سؤال
Words or tokens are called terminals,since they cannot be broken down further.
سؤال
The process of associating the semantics of a construct to its syntactic structure is called syntax-directed semantics.
سؤال
Ordinary syntax is sometimes called concrete syntax to distinguish it from abstract syntax.
سؤال
A left-recursive rule for an operation causes it to left-associate.
سؤال
Recursive-descent parsers turn the nonterminals into a group of mutually recursive procedures whose actions are based on the right-hand side of the BNFs.
سؤال
Shift-reduce parsers shift tokens onto a stack before reducing strings to nonterminals.
سؤال
____ are symbols used to distinguish between parts of a rule.

A) Distinguishers
B) Identifiers
C) Metasymbols
D) Abstract characters
سؤال
In a regular expression,repetition is indicated by ____.

A) an exclamation mark
B) a vertical bar
C) a hyphen
D) an asterisk
سؤال
A language is considered to be ____ when format has no effect on the program structure (other than to satisfy the principle of longest substring).

A) open-format
B) free-format
C) loose-format
D) fixed format
سؤال
Grammar rules are also called ____.

A) productions
B) compilations
C) instructions
D) documentation
سؤال
____ are phrase structures that are broken down into further phrase structures.

A) Nonterminals
B) Complex grammars
C) Compressed structures
D) Terminals
سؤال
Which of the following is not considered to be a token category?

A) reserved word
B) identifier
C) literal
D) white space
سؤال
____ languages require all tokens to occur in prespecified locations on the page.

A) Free-format
B) Precise-format
C) Fixed-format
D) Specified-format
سؤال
Predictive parsing allows tokens that begin optional parts of the syntax to also appear after the optional part.
سؤال
During its ____ phase,a translator collects sequences of characters from the input program and forms them into tokens.

A) parsing
B) analyzing
C) generating
D) scanning
سؤال
The lexical structure of a programming language is the structure of its ____.

A) variables
B) tokens
C) comments
D) references
سؤال
A context-free grammar consists of a series of ____.

A) grammar rules
B) positional rules
C) semantic rules
D) algebraic expressions
سؤال
A conflict between syntax and semantics arises when languages require certain strings to be predefined identifiers rather than reserved words.
سؤال
____ have been given an initial meaning for all programs in the language but are capable of being redefined.

A) Predefined identifiers
B) Keywords
C) Global literals
D) Constants
سؤال
____ are descriptions of patterns of characters.

A) Syntax diagrams
B) Regular expressions
C) Canonical diagrams
D) Variable expressions
سؤال
The principle of ____ takes the longest possible string of nonblank characters into a single token.

A) greatest aggregate
B) maximized grouping
C) longest substring
D) multipass parsing
سؤال
During the ____ phase,the translator processes the tokens,determining the program's syntactic structure.

A) generation
B) parsing
C) implementation
D) scanning
سؤال
A context-free grammar has a special nonterminal called the ____ symbol which stands for the entire top-level phrase being defined.

A) initial
B) start
C) forward
D) abstract
سؤال
A bottom-up parser constructs derivations and parse trees from the leaves to the root.
سؤال
The use of a single token to direct a parse is called single-symbol ____.

A) interpretation
B) prediction
C) directives
D) lookahead
سؤال
The purpose of a(n)____ is to apply grammar rules to a source program and report syntax or lexical errors,without performing any additional analysis.

A) parsing shell
B) interpreter
C) verifying shells
D) reducing shells
سؤال
____ automatically translate a BNF description into a parser.

A) Shift-reduce parsers
B) Scanners
C) Parser generators
D) Syntax generators
سؤال
A grammar is considered to be context-free if ____.

A) each terminal can be replaced by any right-hand side choice, no matter where it appears
B) each nonterminal can be replaced by any right-hand side choice, no matter where it appears
C) context strings appear on the left-hand sides of grammar rules
D) the grammar also expresses the semantics of the language
سؤال
A ____ is the standard graphical depiction of syntax-directed semantics.

A) flow chart
B) UML diagram
C) chained list
D) parse tree
سؤال
A parser that commits itself to a particular action based only on a lookahead is called a(n)____ parser.

A) foresight
B) insightful
C) predictive
D) exhaustive
سؤال
The simplest form of a parser is a(n)____.

A) recognizer
B) translator
C) compiler
D) interpreter
سؤال
A requirement that a sentence must start with a capitalized letter is an example of a ____.

A) terminal
B) nonterminal
C) grammar rule
D) positional property
سؤال
A ____ rule must be stated to overcome ambiguous grammars.

A) clarifying
B) disambiguating
C) specifying
D) overriding
سؤال
The processing of white space is generally handled by a ____.

A) parser
B) scanner
C) predictive parser
D) parser generator
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 6: Syntax
1
In a regular expression,curly braces are used to indicate a range of characters.
False
2
Most modern languages are in a completely fixed format.
False
3
Derivation is the process that replaces left-hand sides by choices of right-hand sides appearing in prior rules.
True
4
Abstract syntax trees abstract the essential structure of the parse tree.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
Productions are in Backus-Naur form if they are given using only the metasymbols "<" and ">".
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
Reserved words,or keywords,are not considered to be a typical token category.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
In extended Backus-Naur form,square brackets [ ] indicate optional parts of the syntax.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
Backus-Naur forms are used to describe the syntax of programming languages such as Algol60.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
Regular expressions can be used to describe tokens.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
The description of simple integer arithmetic expressions with addition and multiplication cannot be represented by a context-free grammar.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
The curly bracket { } notation used in extended Backus-Naur form stands for "at least one or more repetitions of."
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
The lexical structure of a programming language is the structure of its tokens,or words.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
The start symbol is used to identify the start of the grammar.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
A recognizer is a program that accepts or rejects strings based on whether they have occurred before.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
White space is an example of a token delimiter.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
A grammar for which two distinct parse trees are possible for the same string is considered to be ambiguous.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
Words or tokens are called terminals,since they cannot be broken down further.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
The process of associating the semantics of a construct to its syntactic structure is called syntax-directed semantics.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
Ordinary syntax is sometimes called concrete syntax to distinguish it from abstract syntax.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
A left-recursive rule for an operation causes it to left-associate.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
Recursive-descent parsers turn the nonterminals into a group of mutually recursive procedures whose actions are based on the right-hand side of the BNFs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
Shift-reduce parsers shift tokens onto a stack before reducing strings to nonterminals.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
____ are symbols used to distinguish between parts of a rule.

A) Distinguishers
B) Identifiers
C) Metasymbols
D) Abstract characters
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
In a regular expression,repetition is indicated by ____.

A) an exclamation mark
B) a vertical bar
C) a hyphen
D) an asterisk
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
A language is considered to be ____ when format has no effect on the program structure (other than to satisfy the principle of longest substring).

A) open-format
B) free-format
C) loose-format
D) fixed format
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
Grammar rules are also called ____.

A) productions
B) compilations
C) instructions
D) documentation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
____ are phrase structures that are broken down into further phrase structures.

A) Nonterminals
B) Complex grammars
C) Compressed structures
D) Terminals
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
Which of the following is not considered to be a token category?

A) reserved word
B) identifier
C) literal
D) white space
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
____ languages require all tokens to occur in prespecified locations on the page.

A) Free-format
B) Precise-format
C) Fixed-format
D) Specified-format
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
Predictive parsing allows tokens that begin optional parts of the syntax to also appear after the optional part.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
During its ____ phase,a translator collects sequences of characters from the input program and forms them into tokens.

A) parsing
B) analyzing
C) generating
D) scanning
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
The lexical structure of a programming language is the structure of its ____.

A) variables
B) tokens
C) comments
D) references
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
A context-free grammar consists of a series of ____.

A) grammar rules
B) positional rules
C) semantic rules
D) algebraic expressions
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
A conflict between syntax and semantics arises when languages require certain strings to be predefined identifiers rather than reserved words.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
____ have been given an initial meaning for all programs in the language but are capable of being redefined.

A) Predefined identifiers
B) Keywords
C) Global literals
D) Constants
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
____ are descriptions of patterns of characters.

A) Syntax diagrams
B) Regular expressions
C) Canonical diagrams
D) Variable expressions
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
The principle of ____ takes the longest possible string of nonblank characters into a single token.

A) greatest aggregate
B) maximized grouping
C) longest substring
D) multipass parsing
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
During the ____ phase,the translator processes the tokens,determining the program's syntactic structure.

A) generation
B) parsing
C) implementation
D) scanning
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
A context-free grammar has a special nonterminal called the ____ symbol which stands for the entire top-level phrase being defined.

A) initial
B) start
C) forward
D) abstract
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
A bottom-up parser constructs derivations and parse trees from the leaves to the root.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
The use of a single token to direct a parse is called single-symbol ____.

A) interpretation
B) prediction
C) directives
D) lookahead
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
The purpose of a(n)____ is to apply grammar rules to a source program and report syntax or lexical errors,without performing any additional analysis.

A) parsing shell
B) interpreter
C) verifying shells
D) reducing shells
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
____ automatically translate a BNF description into a parser.

A) Shift-reduce parsers
B) Scanners
C) Parser generators
D) Syntax generators
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
A grammar is considered to be context-free if ____.

A) each terminal can be replaced by any right-hand side choice, no matter where it appears
B) each nonterminal can be replaced by any right-hand side choice, no matter where it appears
C) context strings appear on the left-hand sides of grammar rules
D) the grammar also expresses the semantics of the language
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
A ____ is the standard graphical depiction of syntax-directed semantics.

A) flow chart
B) UML diagram
C) chained list
D) parse tree
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
A parser that commits itself to a particular action based only on a lookahead is called a(n)____ parser.

A) foresight
B) insightful
C) predictive
D) exhaustive
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
The simplest form of a parser is a(n)____.

A) recognizer
B) translator
C) compiler
D) interpreter
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
A requirement that a sentence must start with a capitalized letter is an example of a ____.

A) terminal
B) nonterminal
C) grammar rule
D) positional property
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
A ____ rule must be stated to overcome ambiguous grammars.

A) clarifying
B) disambiguating
C) specifying
D) overriding
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
The processing of white space is generally handled by a ____.

A) parser
B) scanner
C) predictive parser
D) parser generator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.