UGRD-CS6207 Programming Languages With Compiler
UGRD-CS6207 Programming Languages With Compiler
Select one:
a.
Hand-made Scanner
b.
NOTA
c.
Regular Expressions
d.
Scanner
Select one:
The process of identifying tokens from the raw text source code of a program.
Are words in the language structure itself, like while or class or true.
Are literal character sequences that must be clearly distinguished from keywords or
identifiers.
NOTA
What are the category on most languages have tokens?
Select one:
identifiers
numbers
Keywords
Part of production rule that represents one way to form strings in the language of the
variable of the head.
Select one:
Select one:
polarity
terminals
Numeric
variables
Kind of symbols which behave like variables ranging over strings of terminals.
Select one:
variables
non-terminals
polarity
Numeric
Select one:
Select one:
Select one:
True
False
Finite Automation (FA) is an abstract machine that can be used to certain forms of analysis.
Select one:
True
False
If the scanner encounters (!) that couldn't represent logical-not operation by itself or
couldn't be the first character.
Select one:
True
False
Context-free grammar consists of a finite set of grammar rules.
Select one:
True
False
Parsers is sometimes called lexical analyzer or lexers.
Select one:
True
False
Recursive analysis and derivation are equivalent.
Select one:
True
False
A grammar in Chomsky Normal Form have no rules of the form.
Select one:
True
False
An important consequence of the Greibach Normal Form is that every non terminal is
not right recursive.
Select one:
True
False
Previous page
A parser is a compiler or interpreter component that breaks data into smaller elements for
easy translation into another language.
Select one:
True
False
A parser takes output in the form of a sequence of tokens or program instructions and
usually builds a data structure in the form of a parse tree or an abstract syntax tree.
Select one:
True
False
In the compiler model, the parser obtains a string of tokens from the lexical analyzer, and
verifies that the string can be generated by the grammar for the source language.
Select one:
True
False
The parser does not return any syntax error for the source language.
Select one:
True
False
The parser collects sufficient number of tokens and builds a parse tree.
Select one:
True
False
A bottom-up parser uses a stack to store both state and sentential forms.
Select one:
True
False
The scanner returns TOKEN NOT and will consume the put-back character on the next call
to scan token.
Select one:
True
False
Previous page
In CFG, grammars are used to generate recognize strings, rather than strings.
Select one:
True
False
A hand-made scanner basic approach is to ready one or more characters at a time.
Select one:
True
False
A top-down parser is that a parse tree created by bottom to top.
Select one:
True
False
Another approach in parsing that starts with the string and reduce it to the start symbol by
applying the productions backwards
Select one:
a.
Top-Down
b.
Bottom-down
c.
Bottom-up Parsing
d.
Middle-up
Bottom-down and Top-up are the two major parsing approaches in parsing.
Select one:
True
False
Placing some restrictions on how to process the input is done in creating a parser for a
compiler.
Select one:
True
False
These are seen in order appearance in the token stream.
Select one:
a.
None of the above
b.
Segments
c.
Terminal
d.
Leaves
e.
Nodes
It’s a way to implement a non-backtracking top-down parser.
Select one:
a.
Historical Parser
b.
Predictive Parser
c.
Analytical Parser
d.
Comparative Parser
a. Comparative Parser
e.
None of the Above
It is characterized by its ability to choose the production to apply solely on the basis of the
next input symbol and the current non-terminal being processed.
Select one:
a.
Historical Parser
b.
Analytical Parser
c.
Predictive Parser
d.
None of the above
e.
Comparative Parser
It is the next symbol coming up in the input.
Select one:
a.
Lookahead
b.
None of the above
c.
Successor
d.
Predecessor
An approach in parsing that starts with the start symbol and apply the productions until it
arrives at the desired string.
Select one:
a.
Bottom-down
b.
Bottom-up Parsing
c.
None of the Above
d.
Middle-up
e.
Top-Down
The lexical analysis phase of a compiler verifies that the sequence of tokens extracted by the
scanner represents a valid sentence in the grammar of the programming language
Select one:
True
False
Previous page