Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Pesa, Raymart K.

ACT 2D

Lesson 4 Activity (Summary)

Lesson 4 is all about the Syntax Analysis. Syntax Analysis is a portion of language
processor. It is consists of 2 parts: a low level part which is called a lexical analyzer and high
level part which is called Syntax analyzer. Syntax analyzers, or parsers, are nearly always
based on a formal description of the syntax of programs. The most commonly used syntax-
description formalism is context-free grammars, or BNF. Using BNF, as opposed to using
some informal syntax description, has at least three compelling advantages. The lexical
analyzer deals with small-scale language constructs, such as names and numeric literals. The
syntax analyzer deals with the large-scale constructs, such as expressions, statements, and
program units. A lexical analyzer is essentially a pattern matcher. A pattern matcher attempts
to find a substring of a given string of characters that matches a given character pattern. A
lexical analyzer serves as the front end of a syntax analyzer. Technically, lexical analysis is a
part of syntax analysis.

You might also like