Skip to content

This tool breaks your code into small parts (tokens) like keywords, numbers, strings, and symbols.You can see each tokens type and value in the scrollable result box.

Notifications You must be signed in to change notification settings

M-RaeesDev/Lexical-Analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”Ž JavaScript Lexer Project

πŸ“Œ Introduction

This project is a simple JavaScript Lexer (Lexical Analyzer) built with HTML, CSS, and JavaScript.
It scans the input JavaScript code and breaks it into tokens (small meaningful units).

πŸ‘‰ In real-world compilers and tools (like VS Code, Babel, TypeScript Compiler), a Lexer is the first phase of the compiler.
It runs before parsing and converts raw source code into tokens which are then used for syntax analysis and highlighting.


πŸš€ Features

  • Converts code into tokens such as:
    • Keywords (e.g., let, function)
    • Identifiers (e.g., variable names)
    • Numbers (e.g., 123, 45.6)
    • Strings (e.g., "Hello")
    • Operators (e.g., +, ==, =)
    • Separators (e.g., ;, {, })
  • Clear button to reset input and output.
  • Very simple and easy-to-use interface.

About

This tool breaks your code into small parts (tokens) like keywords, numbers, strings, and symbols.You can see each tokens type and value in the scrollable result box.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published