Starting with Spirit V2 we added a module for generating code aimed at the lexical analysis of the input: Spirit.Lex (a lexer module, also called scanner). Lexical analysis is the process of preprocessing the stream of input characters and separating it into strings called tokens, most of the time delimited by whitespace. Most compiler texts start here, and devote several chapters to discussing various ways to build scanners. Spirit.Lex is a library built to take care of the complexities of creating a lexer for your grammar.
We know the documentation of Spirit.Lex is not complete yet. So I will write more about it here from now on to fill in the missing pieces and to show a couple of tricks demonstrating its best usage.
Continue reading »
GD Star Rating
loading...
Recent Comments