Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

5/10/2020 Reading 3 Summary | Reading 3: Regular Expressions & Grammars | 6.005.

2x Courseware | edX

Course  Readings  Readin…  Readin…

Reading 3 Summary
Summary
Machine-processed textual languages are ubiquitous in computer science. Grammars
are the most popular formalism for describing such languages, and regular
expressions are an important subclass of grammars that can be expressed without
recursion.

The topics of today's reading connect to our three properties of good software as
follows:

Safe from bugs. Grammars and regular expressions are declarative speci cations
for strings and streams, which can be used directly by libraries and tools. These
speci cations are often simpler, more direct, and less likely to be buggy then parsing
code written by hand.

Easy to understand. A grammar captures the shape of a sequence in a form that is


easier to understand than hand-written parsing code. Regular expressions, alas, are
often not easy to understand, because they are a one-line reduced form of what
might have been a more understandable regular grammar.

Ready for change. A grammar can be easily edited, but regular expressions,
unfortunately, are much harder to change, because a complex regular expression is
cryptic and hard to understand.

This reading was collaboratively authored with contributions from: Saman


Amarasinghe, Adam Chlipala, Srini Devadas, Michael Ernst, Max Goldman, John Guttag,
Daniel Jackson, Rob Miller, Martin Rinard, and Armando Solar-Lezama. This work is
licensed under CC BY-SA 4.0.

https://courses.edx.org/courses/course-v1:MITx+6.005.2x+1T2017/courseware/Readings/03-Regular-Expressions-Grammars/?child=first 1/2
5/10/2020 Reading 3 Summary | Reading 3: Regular Expressions & Grammars | 6.005.2x Courseware | edX

Discussion Hide Discussion


Topic: Reading 3 / Reading 3 Summary

Show all posts by recent activity

 I need sample program working correctly.I cannot understand how to make


program grammars implemented. 1
This course teach me many grammars. But this course does not show me how to implement gra…

 The summary would make a great introduction 1


> *Machine-processed textual languages are ubiquitous in computer science. Grammars are the …

© All Rights Reserved

https://courses.edx.org/courses/course-v1:MITx+6.005.2x+1T2017/courseware/Readings/03-Regular-Expressions-Grammars/?child=first 2/2

You might also like