7.1: Intro to Session 7: Context-Free Grammar – Programming with Text

This video introduces Session 7: Context-Free Grammar from the ITP course “Programming from A to Z”. A Context-Free Grammar is a set of recursive “replacement” rules to generate text. In this session, I discuss two JavaScript libraries: Tracery and RiTa.js for working with context-free grammars. Finally, I code from scratch basic context-free grammar system.

Next video:

Course url:

Support this channel on Patreon:

Send me your questions and coding challenges!:


GitHub Repo with all the info for Programming from A to Z:

Links discussed in this video:
Kate Compton’s Tracery:
Matt Might’s The Language of Languages:
Chomsky Hierarchy on Wikipedia:
Allison Parrish’s Reading and Writing Electronic Text:
Interruption Junction:
Jeffrey Thompson’s Art Assignment Bot:

Source Code for the all Video Lessons:


For More Programming from A to Z videos:

For More Coding Challenges:

Help us caption & translate this video!






9 responses to “7.1: Intro to Session 7: Context-Free Grammar – Programming with Text”

  1. Juan Ruelas Avatar

    WOW, I am taking a class in Formal Languages at UC Riverside and I didn't really think this was applicable immediately but this got me excited to learn more about it! Thanks!

  2. Samuel Coelho Avatar

    Why do some webpages you go on say local host:8000 ?

  3. Forrest Baer Avatar

    Very cool, thank you!

  4. Misty Mega2000 Avatar

    such great stuff. really reminds me why i like cs

  5. BinaryReader Avatar

    awesome video, nice one

  6. walkac Avatar

    The plural is syntaxes.

  7. Nathan Richan Avatar

    Every time I get interested in something on my own, you post a video about it like the very next day. It's amazing!

  8. angelsilva54 Avatar

    are you going to make a compiler?

  9. ebol08 Avatar

    Man! I'm currently studyng this at university. The subject is called "Sintaxis y semántica de los lenguajes", Syntax and semantics of the languages. So nice to see it around here. Greetings from Tucumán, Argentina 😀

Leave a Reply

Your email address will not be published. Required fields are marked *