Reading 18: Regular Expressions & Grammars
Some program modules take input or produce output in the form of a sequence of bytes or a sequence of characters, which is called a string when it’s simply stored in memory, or a stream when it flows into or out of a module. In today’s reading, we talk about how to write a specification for such a sequence. Concretely, a sequence of bytes or characters might be:
Reading 18: Regular Expressions & Grammars Reading 18: Regular Expressions & Grammars Software in 6.031 Safe from bugs Easy to understand Ready for change Correct today and correct in the unknown future. Communicating clearly with future programmers, including future you. Designed to accommodate change without rewriting. Objectives After today’s class, you should: Understand the ideas of grammar productions and regular expression operators Be able to read a grammar or regular expression and determine whether it matches a sequence of characters Be able to write a grammar or regular expression t
related reading
- Reading 12: Regular Expressions & Grammarsweb.mit.edu
- Parsing Expressions · Crafting Interpreterscraftinginterpreters.com
- Regular expressions library (since C++11)en.cppreference.com
- Context-free grammar - Wikipediaen.wikipedia.org
- Reading 19: Parsersweb.mit.edu
- Scanning · Crafting Interpreterscraftinginterpreters.com
- Regular expression - Wikipediaen.wikipedia.org
- Reading 19: Little Languagesweb.mit.edu
- Regular expression HOWTO — Python 3.14.6 documentationdocs.python.org
- Formal grammar - Wikipediam.wikipedia.org
- Terminal and nonterminal symbolsen.wikipedia.org
- Reading 13: Map, Filter, Reduceweb.mit.edu