$npx skillfedfor your agent

sly

"SLY - Sly Lex Yacc"

SkipPyPI Build ToolsReleased Oct 20225.1M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — sly-0.5-py3-none-any.whl
v0.5 · released 2022-10-25

No—do not install for new projects. The project is formally retired as of December 21, 2025 with no planned maintenance. While the code is stable and license-permissive, the maintainer explicitly recommends considering alternatives. Install only if you are maintaining existing code that already depends on SLY, or if you are willing to fork and maintain it yourself.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.6 or greater.
  • Installation is frictionless with no runtime dependencies.
  • However, the project was formally retired on December 21, 2025, with the maintainer stating no further maintenance is expected.

License · maintenance · safety

MIT (permissive) — SLY is licensed under the MIT License (permissive), meaning you can use, modify, and distribute it freely with minimal restrictions, though you must include the license notice.

last release 2022-10-25 (1389 days) · last repo commit 2025-12-21 · 862 stars · archived

0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,083,867 downloads/mo, #2,172 on PyPI

Verify before relying

from sly import Lexer, Parser

class MyLexer(Lexer):
    tokens = { NAME, NUMBER }
    NAME = r'[a-zA-Z_][a-zA-Z0-9_]*'
    NUMBER = r'\d+'

class MyParser(Parser):
    tokens = MyLexer.tokens
    @_('NUMBER')
    def expr(self, p):
        return int(p.NUMBER)

lexer = MyLexer()
parser = MyParser()
result = parser.parse(lexer.tokenize('text'))
  • Whether the archived repository will accept security patches or critical bug fixes despite the retirement notice.
  • Performance characteristics when parsing large or complex grammars in production settings.
  • Compatibility with recent Python versions given the last release was October 2022.
Same gist for agents: .md · .json

What it is and what it does

SLY is a pure-Python lexer and parser generator based on the LALR(1) algorithm, designed for building compilers and domain-specific language parsers without requiring a separate code generation step. You define lexer and parser rules as Python classes with decorators, and SLY handles tokenization and syntax analysis directly at runtime.

The library was originally developed for instructional purposes and emphasizes extensive error reporting to help users identify common mistakes. It supports empty productions, error recovery, precedence rules, and moderately ambiguous grammars. While not optimized for speed due to its Python implementation, it can handle grammars with several hundred rules. However, the project was retired on December 21, 2025, and no further maintenance is planned.

Use it for

  • Building a domain-specific language (DSL) interpreter or compiler without external code generation tools.
  • Parsing configuration files or domain-specific syntax with custom error messages for invalid input.
  • Educational projects where understanding parser construction and LALR theory is part of the goal.
  • Prototyping language features or grammar designs before committing to a production parser generator.
  • Embedding a simple expression evaluator into a Python application.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Skip

No—do not install for new projects.

The project is formally retired as of December 21, 2025 with no planned maintenance. While the code is stable and license-permissive, the maintainer explicitly recommends considering alternatives. Install only if you are maintaining existing code that already depends on SLY, or if you are willing to fork and maintain it yourself.

Install

sly on PyPI

Before you install

Installation is frictionless with no runtime dependencies. However, the project was formally retired on December 21, 2025, with the maintainer stating no further maintenance is expected. The repository is archived. Users should be aware they are adopting a library that will not receive updates or bug fixes.

Requires Python 3.6 or greater.

License in practice

SLY is licensed under the MIT License (permissive), meaning you can use, modify, and distribute it freely with minimal restrictions, though you must include the license notice.

Quickstart

from sly import Lexer, Parser

class MyLexer(Lexer):
    tokens = { NAME, NUMBER }
    NAME = r'[a-zA-Z_][a-zA-Z0-9_]*'
    NUMBER = r'\d+'

class MyParser(Parser):
    tokens = MyLexer.tokens
    @_('NUMBER')
    def expr(self, p):
        return int(p.NUMBER)

lexer = MyLexer()
parser = MyParser()
result = parser.parse(lexer.tokenize('text'))

Verify before relying

  • Whether the archived repository will accept security patches or critical bug fixes despite the retirement notice.
  • Performance characteristics when parsing large or complex grammars in production settings.
  • Compatibility with recent Python versions given the last release was October 2022.

Package facts

LicenseMIT permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAbandoned 1,389 days since the last release
Last repo commit repository archived
First released
Downloads5,083,867 / month, #2,172 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT License

Evidence: sly-0.5-py3-none-any.whl

Tags

Capabilities
python parser generatorlex yacc implementationlalr parser librarylexer tokenizer pythoncompiler construction toolsgrammar parsing frameworkrecursive descent alternative
Topics
parser-generatorarchivededucational

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “lex yacc implementation”

  • slySLY is a pure-Python implementation of lex and yacc for building…
  • plyPLY is a lexer and parser generator for Python that implements lex…
  • rplyRPLY is a pure Python parser generator that creates lexers and…

Give your agent the search over MCP, or paste the wish link into any chat.

More Build Tools packages

packaging Worth it
PyPI · Build Tools · released Aug 2026

Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.

Apache-2.0 OR BSD-2-Clausepure Python · 3.9+
2.2Bdownloads / mo
tqdm Worth it
PyPI · Libraries · released Jul 2026

Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.

copyleftpure Python · 3.8+
648.6Mdownloads / mo
pip Worth it
PyPI · Build Tools · released Aug 2026

pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.

MITpure Python · 3.10+
617.5Mdownloads / mo
hatchling Worth it
PyPI · Python Modules · released Aug 2026

Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.

MITpure Python · 3.10+
484.2Mdownloads / mo
grpcio-tools Worth it
PyPI · Build Tools · released Jul 2026

Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.

Apache-2.0compiled wheel · 3.10+
278.2Mdownloads / mo
pre-commit Worth it
PyPI · Build Tools · released Aug 2026

pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.

Install it if your team needs consistent, automated validation at commit time.

permissive licensepure Python · 3.10+
179.9Mdownloads / mo

See also funcparserlib · ply · rply · phply · pygmars · lark-parser · javalang · Parsley · PyMeta3 · pyparsing