The lexer is just breaking down an input string in to a series of tokens. It's the parser’s job to interpret those tokens. Today we’re going to look at a few tricks for speeding up a very basic lexer.
Table of contents
A very basic lexerStringScanner contextSpeeding up this lexerThinking BiggerPunctuation Lookup TablePerfect Hashes and GraphQL KeywordsIntegrating the Perfect Hash in to the LexerOne more hackConclusionSort: