On this page:
7.1 Rubular tutorial
7.2 Slides
7.3 Practice Problems
6.10.1

7 Week 7: REs, CFGs, and FORTH

We now begin our transition from learning about langauge features to discussing aspects of langauge implementation. First we focus on regular expressions, which allow us to recognize and capture textual patterns. Next, we move to context-free grammars. Context-free grammars form the basis for the syntax of most modern programming languages. The goal of this week is to explain the core components of CFGs so that next week we can understanding how parsing works. Last, because parsing will take a while to understand, we’ll learn about a langauge we can implement right now: FORTH. FORTH is a stack-based language that will build on the material we’ve already covered in previous labs.

7.1 Rubular tutorial

Rubular is a nice interactive tool that helps you develop and debug regular expressions. I highly recommend it. Please check out my video on using Rubular and Dave’s notes on using Rubular

7.2 Slides
7.3 Practice Problems

Also consider using: https://regex101.com/

Problems from Monday / Wednesday: