A Gherkin Lexer

Learn about how to implement text indentation and a Gherkin lexer.

A lexer is an interesting topic when parsing text because it can often be confused with the parser itself. If we look at the Gherkin example in the code snippet below, we can see that there are a lot of individual characters and words, and it might be difficult to even figure out where we should start parsing this:

Get hands-on with 1200+ tech skills courses.