REVIEW QUESTION
11. Describe the parsing problem for a bottom-up parser.
Answer :bottom up parser only can identifies and processes the text's lowest-level details before processes middle level structures and leaving the highest level overall structure to last
12. Explain why compilers use parsing algorithms that work on only a subset of all grammars.
Answer :because compiler can use one parsing compiler that work on only subset of all grammars
13. Why are named constants used, rather than numbers, for token codes?
Answer :
- for the sake of readability of lexical and syntax analyzers.
14. Describe how a recursive-descent parsing subprogram is written for a rule with a single RHS.
Answer :
-A recursive-descent subprogram for a rule with a single RHS is relatively
simple. For each terminal symbol in the RHS, that terminal symbol is compared
with nextToken. If they do not match, it is a syntax error. If they match,
the lexical analyzer is called to get the next input token. For each non terminal,
the parsing subprogram for that nonterminal is called.
15. Explain the two grammar characteristics that prohibit them from being used as the basis for a top-down parser.
Answer : Two grammar characteristics that prohibit top-down parsing:
Direct or indirect Left Recursion.
Langganan:
Posting Komentar (Atom)
Entri Populer
-
Ada hal yang pengen gua ceritain disini . Hal yang pasti semua orang rasain juga, beda sikap antara orang yang bener-bener suka sama ya...
-
Sebulan yang lalu gua masuk UI, dan ternyata murah sekali masuk UI itu . Hanya seribu rupiah bisa masuk ke salah 1 dari 10 Universitas terb...
-
Programming Language Chapter 5 ASSIGNMENT 5 30 Oct 2014 REVIEW QUESTION 11. Q: What are the advantages and disadvantages of dynamic ty...
-
Diliat dari data dan fakta dilapangan, gua sebenernya ngiri sama supir angkot, semua orang membutuhkan dia, apalagi cewek, yang biasa...
-
hmmm gue mau ngereview tentang buku yang 1 bulan lalu yang gue beli di gramedia. yaitu buku Kelakar Tanpa Batas karya Om Sammy @notaslimboy....
-
JAKARTA - Pemandangan serupa kala demam AFF Suzuki Cup 2010 tampak di Lapangan C Gelora Bung Karno, Senayan, Jakarta, Jumat (7/1/2011) pagi...
-
Oke, ini cerita yg uda lumayan lama. Kejaidannya itu waktu gue masih Kelas 3 SMP. Chekidot! Namanya Siti Rahma Hamidah (gue samar...
-
Ni gan bagi yang suka Owl city ai kasih tau sejarahnya buat yang suka owl city ini sejarah nya cekibrottt Owl City. Musik elec...
-
11. What primitive control statement is used to build more complicated control statements in languages that lack them? -> Pemilihan P...
-
Kemampuan menulis materi stand up comedy adalah hal paling dasar yang harus dimiliki seorang stand up comedian, materi inilah nantinya ya...
Tidak ada komentar:
Posting Komentar