Hello! This post is the first of a series of short posts going through what I learn as I research how compilers work. This is to help me write my Volq programming language, although last year I could’ve taken a module at university about compilers but I chose other modules instead, so now I’m researching it on my own.
What is lexical analysis?
Lexical analysis is the procedure of analysing a statement of a certain language, whether that be code or a spoken language like English or Spanish, to break it down into small fragments called lexemes. These lexemes consist of not only the words in the statement, but also any symbols or grammar, such as commas and full stops.

I work in the Cyber Security team at National Highways in the UK, I’m enjoying it and everything is going great. However, working for a business that’s responsible for critical national infrastructure brings some unexpected benefits, including interesting site visits and experiences!