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.

NOTE: This rule allows newlines inside the string.

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.

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.0.4.tar.gz (7.0 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.0.4-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for soliz-0.0.4.tar.gz
Algorithm Hash digest
SHA256 ad6ae55a29bd3be276fa621f181bbd017c573c77cb3a30460daefc8ddac82bc8
MD5 04d189f13158d940d4dfdbd8da333fac
BLAKE2b-256 5c7c438ec0def390094afafba6d43ab4f2bf8e788f13748b60e067ab8b337d4e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: soliz-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.4 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.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4fd71539bf2a185798781ddfa268c6fa6d785142be892a77da1947997cd4da05
MD5 86eb3a84bdd1a82affeba2435efbda72
BLAKE2b-256 5328653feff605752da1ebb9c751c76a69c97c64b285d65b2d9c44b45008b8fa

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