Finding Patterns in Protein Structures

To get you thinking about nontraditional uses of languages, let’s break out of our normal programming world. You might be surprised how many biologists (and other scientists) use parsers for pattern recognition and analysis. For example, there are DSLs for describing DNA/RNA sequences, chemical molecules, molecular formulas (such as H2O), and so on. Just as with language examples from our world, scientists want to trigger actions upon recognizing various structures.

As an example, let’s look at a DSL that molecular biologists use to describe RNA sequences. RNA sequences are chains of nucleotide units: Adenine (A), Cytosine (C), Guanine (G), or Uracil (U). You can think of those letters as the language vocabulary ...

Get Language Implementation Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.