Handling Delimited Content in Lexical Analysis
When working with lexical analysis, clean separations between tokens are not always straightforward. Consider a language with string literals where variables are single characters:
x = "a"
y = "bc"
An initial grammar attempt might look like this:
use super::{Var, Lit, Eql};
grammar;
pub Var: Var = <r"[x-z]"&g ...
Posted on Sun, 24 May 2026 17:15:18 +0000 by mhoard8110