Lexer: meaning, definitions and examples
💻
lexer
[ ˈlɛksər ]
computer programming
A lexer is a software tool used for breaking input into pieces called tokens. It is an essential component of a compiler or interpreter, responsible for analyzing the source code and converting it into a stream of tokens for further processing.
Synonyms
lexical analyzer, scanner, tokenizer
Examples of usage
- The lexer scans the source code and identifies keywords, operators, and identifiers.
- After tokenizing the input, the lexer passes the tokens to the parser for syntax analysis.
Translations
Translations of the word "lexer" in other languages:
🇵🇹 analisador léxico
🇮🇳 लेक्सर
🇩🇪 Lexer
🇮🇩 lexer
🇺🇦 лексер
🇵🇱 lekser
🇯🇵 字句解析器 (じくかいせきき)
🇫🇷 analyseur lexical
🇪🇸 analizador léxico
🇹🇷 leksik analizör
🇰🇷 렉서
🇸🇦 محلل لغوي
🇨🇿 lexikální analyzátor
🇸🇰 lexikálny analyzátor
🇨🇳 词法分析器 (cí fǎ fēn xī qì)
🇸🇮 leksikalni analizator
🇮🇸 lexíkönnunarforrit
🇰🇿 лексикалық талдаушы
🇬🇪 ლექსიკური ანალიზატორი
🇦🇿 leksik analizator
🇲🇽 analizador léxico
Word origin
The term 'lexer' is a short form of 'lexical analyzer,' which dates back to the early days of compiler design in the 1950s. Lexers were introduced to separate the concerns of lexical analysis from other parsing tasks, leading to more modular and efficient compiler implementations.