Skip to content
#

lexical-analysis

A grammar describes the syntax of a programming language, and might be defined in Backus-Naur form (BNF). A lexer performs lexical analysis, turning text into tokens. A parser takes tokens and builds a data structure like an abstract syntax tree (AST). The parser is concerned with context: does the sequence of tokens fit the grammar? A compiler is a combined lexer and parser, built for a specific grammar.

Here are 737 public repositories matching this topic...

This project is a simple JavaScript compiler that allows users to input JavaScript code and see the output of various compilation phases, including lexical analysis, syntax analysis, semantic analysis, intermediate representation generation, optimization, and code generation. The project is designed to help users understand the inner workings

  • Updated Jun 27, 2025
  • JavaScript

End-to-end compiler for MiniPascal, a simplified Pascal language. Built with C++, Flex, and Bison, it parses, semantically analyzes, and generates assembly for a custom stack-based VM.

  • Updated Jun 19, 2025
  • C++