Consider writing scanners by hand
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2k
- Forks
- 691
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 1
Description
Currently we generate a number of scanners from regexes using re2c.
This has two advantages:
- It is easy to see at a glance what the scanners do, and easy to modify them.
- The scanners generated are DFAs and should perform well. Since re2c is well tested, this also lowers testing burden.
Disadvantage: Either we require re2c as a build dependency, or we have to ship a gigantic scanners.c file.
Should we simply hand-write the scanners and dispense with re2c and scanners.re?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading scanners.re, the generated scanners.c, and the build configuration that invokes re2c. Compare the generated scanner behavior and build tradeoffs with a hand-written alternative. Done means reaching and documenting a project decision about whether to remove re2c and how scanner sources should be maintained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100