lox

module
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2025 License: MIT

README

Lox

Lox is a lexer and parser generator for Go.

Documentation

For comprehensive documentation, examples, and tutorials, visit dcaiafa.github.io/lox.

Community translation

Quick Start

# Install
# Download the latest release from https://github.com/dcaiafa/lox/releases/latest

# Generate parser from grammar
lox .

Example Grammar

@lexer
NUM = [0-9]+
ADD = '+'

@parser
@start expr
expr = expr ADD expr  @left(1)
     | NUM

Features

  • Self-hosted parser generator
  • LR(1) parser generation
  • DFA-based lexer generation
  • Type-safe Go code generation
  • Comprehensive error reporting

License

MIT

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL