Skip to main content

A lexer creation tool

Project description

Soliz - A lexer creation tool

Features

  • Provides basic implementations for: strings, integers, floats, operators, symbols
  • Soliz's abstract design allows quick and easily understandable development
  • Pretty error printing

Errors look like:

Error: Unexpected character
{"key": 4.4.}
           ^
Expected: 'digit', found '.'
Occurs at: 1:12-12

WARNING: Order of the rules may matter depending on the implementation.

Builtins

Builtin rules can be located in soliz/impls.py

StringRule

This rule allows escape sequences and parses quoted strings.
Errors on invalid escape sequences.

NumberRule

This rule parses integers and floats, positive or negative.

OperatorRule

Parses the following operators: +, -, *, /, ==, ^, **, %

SymbolRule

Parses the following symbols: (, ), =, . as individual token types without value.

IdentifierRule

Parses identifiers that start with _ or alphabetic characters, and continue with alphanumeric or _ characters.

EolRule

Parses newline characters and updates the lexer context.

SpaceRule

Parses sequences of space and optionally tab characters.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

soliz-0.1.1.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

soliz-0.1.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file soliz-0.1.1.tar.gz.

File metadata

  • Download URL: soliz-0.1.1.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for soliz-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b9911b6735acfa79cc2560fb9de28facce15034e03ff787a546f8f5a5c92447a
MD5 6d741a2b13fe3b1b5eeb8951ca66876f
BLAKE2b-256 d8f7a751813869bd03eb26fc0e966957eda4f7604a39d7711b9e6f2941b7c7b8

See more details on using hashes here.

File details

Details for the file soliz-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: soliz-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for soliz-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5308b083b3b30224152725e3605d34f58bdc3b31cbb0c499e0b5c3ad6db1a971
MD5 97c7ecf932bd3a19072b54803d54d3c0
BLAKE2b-256 aa56a7d4f8fc9577702fcbdd046e5ada5ef43e94cf1eba3663c5c055cef9e539

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page