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 80 public repositories matching this topic...

This repository hosts two Python tools for the Pascal programming language: a lexical analyzer and a formatter. The lexical analyzer reads Pascal source code, identifies tokens, and reports lexical errors, while the formatter indents and cleans the source code to improve readability and structure.

  • Updated May 4, 2024
  • Python