Skip to content
Go back

Regular Expressions, Part 2

Published:  at  03:07 PM

More notes I’ve synthesized from Chapter 3: Scanning in Thain 2e (2020); and the classic Dragon Book 2e (2006) by Aho, Lam, Sethi, and Ullman.

Aho 2006: 3.3.1, p. 117


Interlude on Hierarchy

Simple hierarchy

Level 0 - Alphabet

Level 1 - Symbols

Level 2 - Strings

Level 3 - Languages

Level 4 - Regex


Rules that define regular expressions

Basis

Induction


registers

lowercase epsilon 𝜖 Union symbol ∪ Upper case sigma Σ

“ep = 𝜖 “up = ∪ “sp = Σ

“lp = L “dp = D “mp = element of; ∈


macros

@e = turn exactly one character bold