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": qas}
        ^
Occurs at: 1:9-9

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.2.tar.gz (6.8 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: soliz-0.0.2.tar.gz
  • Upload date:
  • Size: 6.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.0.2.tar.gz
Algorithm Hash digest
SHA256 e562a9dd46e7950583013345204ab1c7789c9d5d0bb146456e56cf9cc362c971
MD5 88a2b36a33f57d3857e5a96b4bba9474
BLAKE2b-256 8dec2d8d748d1d55682a1132e3a5b46dded04068a433b19122ee0b6e5f6cd634

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