# Lexer Generator Skill

Expert skill for generating and hand-writing lexers using DFA-based, table-driven, and recursive approaches for programming language implementation.

## Quick Reference

- **Category**: Compiler Frontend
- **ID**: SK-001

## Key Capabilities

- DFA-based lexer generation from regex specifications
- Maximal munch tokenization implementation
- Unicode character class handling and normalization
- Efficient keyword recognition using tries and perfect hashing
- Incremental/resumable lexing for IDE integration
- Lexer mode handling for nested contexts (string interpolation)
- Error recovery with skip-to-next strategies

## When to Use

Use this skill when implementing:
- Tokenization for a new programming language
- Incremental lexers for IDE integration
- High-performance lexical analysis
- Unicode-aware tokenizers

## Related Skills

- parser-generator (SK-002)
- grammar-design (SK-022)
- tree-sitter (SK-025)
