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
- Regular expression - Wikipediaen.wikipedia.org
- Regular expressions library (since C++11)en.cppreference.com
- Regular expression HOWTO — Python 3.14.6 documentationdocs.python.org
- Context-free grammar - Wikipediaen.wikipedia.org
- The Regular Expression Denial of Service (ReDoS) cheat-sheet | by James Davis | Level Up Codinglevelup.gitconnected.com
- Chomsky hierarchy - Wikipediaen.wikipedia.org
- Thompson's construction - Wikipediaen.wikipedia.org
- Formal grammar - Wikipediam.wikipedia.org
- Terminal and nonterminal symbolsen.wikipedia.org
- Reading 19: Parsersweb.mit.edu
- Laurence Tratt: Which Parsing Approach?tratt.net