News for hackers. Stuff that matters.
Re:Strategies for Fast Lexers by viega on Tuesday July 15, 2025 @09:58AM (#44571239)
The computational complexity for lexing C++ is linear, but for parsing C++ it's super-linear, as will be many analyses. In practice, the lexing is in the noise for almost all compliers.
Re:Strategies for Fast Lexers by adev_ on Wednesday July 16, 2025 @02:04AM (#44579186)
Even the lexing is not strictly linear.

Good luck to naively differentiate if '>' is effectively a chevron operator or a shift operator '>>' in a random nested template expression like : 'set<vector<int>>'.