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.1.0.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.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: soliz-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 cc5e846db4784688b78d3c11559d19ab4c7712541d05df7a7506a1f0e16fc8bb
MD5 b25608d48ea6c85fcb3500bfc9abdb96
BLAKE2b-256 2b0ee41f9f9dbe401df38b75252f0795ad72ab2e0c02322bcaa3e89a74cc9e91

See more details on using hashes here.

File details

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

File metadata

  • Download URL: soliz-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f30face79b5b57759dca83c724078549ba2e315c6d57b93c5b7fb1eed20e81c9
MD5 9bfd68b970ee1a80e41415b2dd4f834b
BLAKE2b-256 1859220a9b93943b945b453ec2538d2dfac22fa2b13d7e4b2716628d2f2153f2

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