Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Why and How to Write Your Own Compiler

Drupal Association via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn to build a custom compiler in PHP through a conference talk that demonstrates how compiler theory solves real-world problems beyond traditional regex approaches. Discover the fundamental components of compilers including lexers, parsers, and abstract syntax trees (AST) while exploring a practical case study of creating a fault-tolerant query language for site-wide search functionality. Examine how a custom PHP compiler successfully handles user input sanitization, syntax error correction, and generates storage-agnostic search queries where regular expressions fail. Understand why compiler knowledge benefits every developer through concrete examples of edge cases that traditional string manipulation cannot handle, such as malformed search queries with syntax errors like "foo**" instead of "foo*". Gain insights into lexing, parsing, and compiling processes that transform user-friendly search inputs into valid SQL queries while maintaining error tolerance. Explore the production-ready implementation that has operated bug-free for several years, supporting advanced search features including wildcards and operators like +, -, "", and *. Acquire foundational compiler theory knowledge applicable to intermediate-level PHP developers, with additional context on database management systems and full-text search being helpful but not required.

Syllabus

Why and how to write your own compiler?

Taught by

Drupal Association

Reviews

Start your review of Why and How to Write Your Own Compiler

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.