60 likes | 149 Views
Regular Expressions & BNF. This lesson we, looking at the syntax of a language, will be. Yes, hmmm. Formal Language. Is defined using: A set alphabet Rules of syntax for constructing the language. Tasks. A formal language is used for car licence plates.
E N D
This lesson we, looking at the syntax of a language, will be. Yes, hmmm.
Formal Language • Is defined using: • A set alphabet • Rules of syntax for constructing the language
Tasks • A formal language is used for car licence plates. • Define the alphabet for this language • Construct a string for a licence plate.
Regular Language • A regular language is any string that can be created using a Finite State Machine. • Eg: a(a|b)* Or is signified by | One or more is signified by *
Tasks • A web address uses a regular language • Define a web address using a Regular Expression