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

Uploaded Python 3

File details

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

File metadata

  • Download URL: soliz-0.1.7.tar.gz
  • Upload date:
  • Size: 7.8 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.7.tar.gz
Algorithm Hash digest
SHA256 2b1665c71cf832bc95e89b6984e9926c8bb002a52a6a07d450393fda9fe9278a
MD5 345e28bc2b404540fc234f99b2359cc2
BLAKE2b-256 39d81edc63651ab31899892771d8b9d257dbac77540f32587d724e0f571fa58a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: soliz-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 8.2 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f97341b5d9c010a11be041f69d717e3218d27a8b3733ab8879fdb9b43716e64f
MD5 6d92830713800d367c8456601a94e1a1
BLAKE2b-256 0cc734fcd8f936b7611f66a0594bceb4cc8811210229d9e927577745308d9b64

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