lightweight and customizable rust s-expression (s-expr) parser and printer

Related tags

Miscellaneous s-expr
Overview

s-expr

Rust library for S-expression like parsing and printing

  • parser keeps track of spans, and representation (e.g. number base)
  • number and decimal don't limit size
  • only 1 dependency on unicode-xid

S-expressions features

Extra features which are not in usual s-expressions (cannot be turned off):

  • binary and hexadecimal number, when starting a number with the prefixes respectively 0b or 0x.
  • _ characters in number, e.g. 0xfedc__1240__abcd or 100_000_000 to improve legibility

Currently unsupported:

  • symbol with spaces
  • negative literal integral and decimal, currently -123 will be tokenized as the ident - followed by number 123.
  • scientific notation for decimal numbers 6.022e23 will be parsed as decimal 6.022 then ident e, then number 23

There's lots of variant of S-expression, so the parser allow to parse various different optional features that can be enabled/disabled depending on the user wishes:

  • semi-colon line comment
  • byte string of the format : #8BADF00D#
  • braces { } and bracket [ ] group, which behave like ( ) but provide equivalent grouping balancing check and flavor of grouping
You might also like...
A stupid macro that compiles and executes Rust and spits the output directly into your Rust code

inline-rust This is a stupid macro inspired by inline-python that compiles and executes Rust and spits the output directly into your Rust code. There

A Rust proc-macro crate which derives functions to compile and parse back enums and structs to and from a bytecode representation

Bytecode A simple way to derive bytecode for you Enums and Structs. What is this This is a crate that provides a proc macro which will derive bytecode

`Debug` in rust, but only supports valid rust syntax and outputs nicely formatted using pretty-please
`Debug` in rust, but only supports valid rust syntax and outputs nicely formatted using pretty-please

dbg-pls A Debug-like trait for rust that outputs properly formatted code Showcase Take the following code: let code = r#" [ "Hello, World!

This is a Discord bot written in Rust to translate to and from the Bottom Encoding Standard using bottom-rs and Serenity.
This is a Discord bot written in Rust to translate to and from the Bottom Encoding Standard using bottom-rs and Serenity.

bottom-bot This is a Discord bot written in Rust to translate to and from the Bottom Encoding Standard using bottom-rs and Serenity. Ever had this pro

Simplify temporary email management and interaction, including message retrieval and attachment downloads, using Rust.

Tempmail The Tempmail simplifies temporary email management and interaction, including message retrieval and attachment downloads, using the Rust prog

Learn-rust - An in-depth resource to learn Rust πŸ¦€

Learning Rust πŸ¦€ Hello friend! πŸ‘‹ Welcome to my "Learning Rust" repo, a home for my notes as I'm learning Rust. I'm structuring everything into lesson

A highly modular Bitcoin Lightning library written in Rust. Its Rust-Lightning, not Rusty's Lightning!

Rust-Lightning is a Bitcoin Lightning library written in Rust. The main crate, lightning, does not handle networking, persistence, or any other I/O. Thus, it is runtime-agnostic, but users must implement basic networking logic, chain interactions, and disk storage. More information is available in the About section.

Telegram bot help you to run Rust code in Telegram via Rust playground
Telegram bot help you to run Rust code in Telegram via Rust playground

RPG_BOT (Rust Playground Bot) Telegram bot help you to run Rust code in Telegram via Rust playground Bot interface The bot supports 3 straightforward

Playing with web dev in Rust. This is a sample Rust microservice that can be deployed on Kubernetes.

Playing with web dev in Rust. This is a sample Rust microservice that can be deployed on Kubernetes.

Owner
Vincent Hanquez
Vincent Hanquez
RuES - Expression Evaluation as Service

RuES is a minimal JMES expression evaluation side-car, that uses JMESPath, and it can handle arbitrary JSON. Which effectively makes it general purpose logical expression evaluation engine, just like some Python libraries that used to evaluate logical expression. This in turn can allow you implement complex stuff like Rule engine, RBAC, or Policy engines etc.

Zohaib Sibte Hassan 14 Jan 3, 2022
An `abilists` parser crate for Rust

An `abilists` parser crate for Rust

Erich Gubler 24 Aug 28, 2022
A Modern, Lightweight HTTP Learning Tool in Rust

Toy-HTTP-rs: A Modern, Lightweight HTTP Learning Tool in Rust Welcome to toy-http-rs! This is a hands-on, educational project designed to provide an a

null 12 May 27, 2023
A cross platform forensic parser written in Rust!

artemis artemis is a powerful command line digital forensic and incident response (DFIR) tool that collects forensic data from Windows and macOS endpo

null 12 Jun 4, 2023
A lightweight Discord wrapper made in Tauri

Discord-Tauri is a work in progress lightweight wrapper for Discord.

null 104 Dec 20, 2022
Lightweight tool for simple deployment (server+client)

deploy Lightweight tool for simple deployment (server+client) Usage You first need a key value pair: deploy generate-keys Public-Key: Used on the serv

Jan-Mirko Otter 0 Dec 27, 2021
A zero-copy parser for the contents of the __unwind_info section of a mach-O binary.

A parser for Apple's Compact Unwinding Format, which is used in the __unwind_info section of mach-O binaries.

Markus Stange 10 May 31, 2022
πŸŒ‹ A very lightweight wrapper around the Vulkan Memory Allocator πŸ¦€

?? vk-mem-alloc-rs A very lightweight wrapper around the Vulkan Memory Allocator ?? [dependencies] vk-mem-alloc = "0.1.1" Simple Vulkan Memory Allocat

Project KML 13 Nov 8, 2022
Yellhole is a lightweight tumblelog which can run on e.g. fly.io for cheap.

Yellhole A Hole To Yell In Yellhole is a lightweight tumblelog which can run on e.g. fly.io for cheap. Features Runs on a single node. Use a CDN if yo

Coda Hale 8 Dec 15, 2022
First Git on Rust is reimplementation with rust in order to learn about rust, c and git.

First Git on Rust First Git on Rust is reimplementation with rust in order to learn about rust, c and git. Reference project This project refer to the

Nobkz 1 Jan 28, 2022