Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Samenvatting

Summary spcc viva question for engineering

Beoordeling
-
Verkocht
-
Pagina's
36
Geüpload op
31-08-2022
Geschreven in
2022/2023

a study guide of viva question for engineering

Instelling
Vak

Voorbeeld van de inhoud

lOMoARcPSD|16248954




SPCC Viva Answers:
Annotated parse tree
AN ANNOTATED PARSE TREE is a parse tree showing the values of the attributes
at each node. The process of computing the attribute values at the nodes is called
annotating or decorating the parse tree.

Lexical error
During the lexical analysis phase this type of error can be detected.

Lexical error is a sequence of characters that does not match the pattern of any
token. Lexical phase error is found during the execution of the program.




Imp diagram for parser




1. Macro def table (MDT)

, lOMoARcPSD|16248954




2. What is literal, symbol




Symbols- A symbol has a value and a symbol type, each of which is
either specified explicitly by an assignment statement or implicitly from
context.


3. Lexical, Syntax Analysers
Lexical Analyser:
First phase of a compiler. It is also called a scanner.
Main task: read the input characters and produce as output a sequence of tokens.
Input: program as a single string of characters. Collects characters into logical
groupings and assigns internal codes to the groupings according to their structure.
Groupings: lexemes
Internal codes: tokens
Syntax Analyser:
The syntax analyzer or parser must determine the structure of the sequence of
tokens provided to it by the scanner. Check the input program to determine whether it
is syntactically correct. Produce either a complete parse tree of at least trace the
structure of the complete parse tree .
Two categories of parsers :
Top-down: produce the parse tree, beginning at the root down to the leaves.
Bottom-up: produce the parse tree, beginning at the leaves upward to the root.
4. Operator precedence Parser

, lOMoARcPSD|16248954




5. What is 1 in LL1?
The number of instructions in its look ahead that are required for parsing.

6. What is LR parser
Pg 5-119 tech knowledge
A bottom up parser which parses the grammar from left to right using rightmost
derivation in reverse direction. If LR(0) then has 0 look ahead symbols

7. What is code generation




8. What is Context Free Grammar?




9. What is an assembler?




10. What is one pass and 2 pass assembler?

, lOMoARcPSD|16248954




11. What is semantic analysis?
A parser constructs parse trees in the syntax analysis phase. The plain parse-tree
constructed in that phase is generally of no use for a compiler, as it does not carry
any information of how to evaluate the tree. The productions of context-free
grammar, which makes the rules of the language, do not accommodate how to
interpret them. Semantic analysis ensures that the declarations and statements of a
program are semantically correct, i.e their meaning is clear and consistent with the
way in which control structures and data types are supposed to be used. Semantic
analyzer takes the output of syntax analyzer and produces another tree.
The semantic analyzer produces an annotated syntax tree as an output.

12. Which tables are used in pass1 and pass2 of an assembler? Databases for
pass 1 and 2

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
31 augustus 2022
Aantal pagina's
36
Geschreven in
2022/2023
Type
SAMENVATTING

Onderwerpen

$8.49
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
bakATD

Maak kennis met de verkoper

Seller avatar
bakATD Chamberlain College Of Nursing
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
4
Lid sinds
3 jaar
Aantal volgers
1
Documenten
1099
Laatst verkocht
1 maand geleden

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen