Design a Lexer and Parser for a Customer Query Language
Overview
What this challenge is about.
Design a Lexer and Parser for a Customer Query Language. Intermediate challenge in design. Designing real products under real constraints, earn a blockchain-...
The Brief
What you'll do, and what you'll demonstrate.
Replace a brittle regex-based query parser with a cleanly designed lexer and recursive-descent parser that accepts the real customer query corpus and produces a typed Abstract Syntax Tree with useful error messages.
This is not a design exercise. It is the work a product designer does between a brief and a shipped interface. That distinction matters to every hiring manager who has seen candidates redesign Spotify's homepage and none who have worked under real product constraints.
When you finish, you will have something most graduates do not: a real-world deliverable, verified by Ewance, that you can show to a hiring manager and say "I did this. Here is the proof."
Earning criteria — what you'll demonstrate
- Design a table-driven lexer that preserves source positions for every token.
- Specify a recursive-descent parser whose grammar covers a real operator set and parenthesized expressions without ambiguity.
- Define a typed Abstract Syntax Tree that matches an external contract a downstream evaluator already depends on.
- Design error messages that localize failures to a line, column, and caret a customer can act on.
- Justify a design against real corpus coverage and adversarial edge cases rather than assertion.
Program Fit
Where this fits in your program.
Sharpens the same skills your degree expects you to demonstrate.
Aligned coursework coming soon.
Skills
Skills you'll demonstrate.
Each one shows up on your verified credential.
- Lexing
Apply lexing to solve real industry problems and demonstrate production-level capability.
- Recursive Descent Parsing
Apply recursive descent parsing to solve real industry problems and demonstrate production-level capability.
- Abstract Syntax Trees
Apply abstract syntax trees to solve real industry problems and demonstrate production-level capability.
- Error Reporting
Apply error reporting to solve real industry problems and demonstrate production-level capability.
- Grammar Design
Apply grammar design to solve real industry problems and demonstrate production-level capability.
- Unit Testing
Apply unit testing to solve real industry problems and demonstrate production-level capability.
Careers
Career paths this challenge builds toward
Completing this challenge demonstrates skills that transfer directly to these roles:
Software Engineer (Language Tooling)
Building a lexer, recursive-descent parser, and typed tree against a real evaluator contract is the core of compiler and interpreter work, preparing you to own query languages, configuration languages, and template engines in production systems.
This challenge sharpens
- lexing
- recursive-descent-parsing
- abstract-syntax-trees
Developer Experience Engineer
Designing caret-precise diagnostics and a clear grammar maps directly to building tooling, linters, and editor integrations where actionable error messages and well-specified syntax are the product, not an afterthought.
This challenge sharpens
- error-reporting
- grammar-design
- unit-testing
Backend Platform Engineer
Replacing a brittle component that breaks on 4 percent of traffic with a tested, typed front end is platform reliability work, bridging you to roles that harden critical request paths for many internal and external consumers.
This challenge sharpens
- abstract-syntax-trees
- unit-testing
- recursive-descent-parsing