Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 902 Bytes

File metadata and controls

23 lines (18 loc) · 902 Bytes

🔎 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.