Lexical analysis

Updated: 04/26/2017 by Computer Hope

In computer science, lexical analysis is converting a sequence of characters into meaningful strings; these meaningful strings are called tokens. A program that performs lexical analysis is called a lexical analyzer, lexer, or tokenizer. This program is used with a software component (called a parser) that converts the string into structured data.

Where is lexical analysis used?

Lexical analysis and parsing are used by programs like compilers that use the parsed data from a programmer's code to create a compiled binary executable. They are also used by web browsers to format and display a web page using data parsed from HTML (hypertext markup language), CSS (cascading style sheets) and JavaScript.

Code, Compiler, Computer science, Executable, Programming terms