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.
[ Parent
| on HN ]
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>>'.