Unit 1-REGULAR LANGUAGES
Unit 1-REGULAR LANGUAGES
Chapter 3
LEXICAL ANALYSIS
LEXICAL ANALYSIS
Role of lexical analyzer / Interaction between lexer & Parser
bytes)
If there are less than N characters in the input file, a special
symbols
empty string : denoted by ε
Prefix, suffix, substring, proper prefix, subsequence of
Ex: L={A,B,…..Z,a,b,….z}
D={0,1,…..9}
LUD= 62 strings of length 1 (total of alphabet and digit)
LD=520 strings of length 2 (52*10=520)
L*=? D2= set of 2 digit numbers
L+=?
Regular Expressions
ε is a regular expression, the set containing empty string is a
regular expression.
a is a regular expression.