{"id":6512,"date":"2025-12-27T11:03:39","date_gmt":"2025-12-27T05:33:39","guid":{"rendered":"https:\/\/study.madeeasy.in\/?p=6512"},"modified":"2025-12-29T11:26:09","modified_gmt":"2025-12-29T05:56:09","slug":"syntax-analysis-parser","status":"publish","type":"post","link":"https:\/\/www.madeeasy.in\/study\/cs-it\/syntax-analysis-parser","title":{"rendered":"Syntax Analysis Parser"},"content":{"rendered":"<ul>\n<li style=\"text-align: justify;\">In the syntax analysis phase, a compiler verifies whether or not the tokens generated by the lexical analyzer are grouped according to the syntactic rules of the language. Syntax analysis is done by the parser.<\/li>\n<li style=\"text-align: justify;\">Syntactic rules of a language are generated by the grammar.<\/li>\n<li style=\"text-align: justify;\">The parser obtains a string of tokens from the lexical analyzer, as shown in figure below, and verifies that the string can be generated by the grammar for the source language.<\/li>\n<li style=\"text-align: justify;\">It detects and reports any syntax errors and produces a parse tree from which intermediate code can be generated. In other words, it determines the syntactic structure of a sentence in some language.<\/li>\n<li style=\"text-align: justify;\">The syntax of a programming language is described by a context-free grammar or BNF (Backus-Naur Form). A grammar gives a precise syntactic specification of a language.<\/li>\n<\/ul>\n<p><strong>Types of Parser<\/strong><\/p>\n<p>There are two types of parser.<\/p>\n<p>(1) Top-down parser<br \/>\n(2) Bottom-up parser<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6515 size-full\" src=\"https:\/\/study.madeeasy.in\/wp-content\/uploads\/2025\/12\/parser.jpg\" alt=\"Parser\" width=\"735\" height=\"276\" srcset=\"https:\/\/www.madeeasy.in\/study\/wp-content\/uploads\/2025\/12\/parser.jpg 735w, https:\/\/www.madeeasy.in\/study\/wp-content\/uploads\/2025\/12\/parser-300x113.jpg 300w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the syntax analysis phase, a compiler verifies whether or not the tokens generated by the lexical analyzer are grouped<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1908,3],"tags":[1925,1914,1924,1923],"class_list":["post-6512","post","type-post","status-publish","format-standard","hentry","category-compiler","category-cs-it","tag-bottom-up-parser","tag-syntax-analysis","tag-top-down-parser","tag-types-of-parser"],"_links":{"self":[{"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/posts\/6512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/comments?post=6512"}],"version-history":[{"count":0,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/posts\/6512\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/media?parent=6512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/categories?post=6512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/tags?post=6512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}