Skip to main content

Zayne's Extremely Simple Language

Project description

Zayne's Extremely Simple Language

Inspired by Tom's Obvious Minimal Language (TOML) and YAML

This project isn't serious btw; This was just a side project 👀. ZESL won't be getting regularly scheduled updates.

Grammar

ZESL uses the BNF grammar format. It's grammar is as follows:

<program> ::= <statement>

<statement> ::= <key>
| <comment>

<letter> ::= "A" | "B" | "C" | "D" | "E" | "F" | "G"
       | "H" | "I" | "J" | "K" | "L" | "M" | "N"
       | "O" | "P" | "Q" | "R" | "S" | "T" | "U"
       | "V" | "W" | "X" | "Y" | "Z" | "a" | "b"
       | "c" | "d" | "e" | "f" | "g" | "h" | "i"
       | "j" | "k" | "l" | "m" | "n" | "o" | "p"
       | "q" | "r" | "s" | "t" | "u" | "v" | "w"
       | "x" | "y" | "z" 

<digit> ::= "0" | "1" | "2" | "3" | "4" | "5"
	   | "6" | "7" | "8" | "9"

<symbol> ::=  "|" | " " | "!" | "#" | "$" | "%" | "&" | "(" | ")" | "*" | "+" | "," | "-" | "." | "/" | ":" | ";" | ">" | "=" | "<" | "?" | "@" | "[" | "\\" | "]" | "^" | "_" | "`" | "{" | "}" | "~"

<comment> ::= ">" " "* (<digit> | <letter> | " " | <symbol>)+
<value> ::= "\"" (<digit> | <letter> | " " | <symbol>)* "\"" | <digit>+ | "."* <digit>+ "."* <digit>*
<key> ::= <letter>+ "=" <value> " "* <comment>*

Syntax

ZESL supports strings, integers, and floats. ZESL also support usage of comments.

> This is a comment.
city="Salt Lake City, Utah"
area=801
precipitation=50.0

There are multiple ways to type a value, however there're some big no-no(s).


The correct way to enclose an string in ZESL would be in double quotes. Attempting to use single quotes will result in an error.

quote='Do not fear mistakes. There are none. (Miles Davis)' > Wrong way to write strings.
quote="Do not fear mistakes. There are none. (Miles Davis)" > Correct way to write strings. Note the double quotes.

Goals

If I do decide to at least dedicate SOME of my time to this project, here's what I would do.

  • Improve BNF grammar. Adding double-quotes and/or back-ticks for string would be nice. Make context a bit more loose.
  • Add [] and {}, allows for defining dicts and/or lists.
  • Syntax sugar!?

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

zesl-0.1.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zesl-0.1.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zesl-0.1.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.6 Linux/5.15.0-56-generic

File hashes

Hashes for zesl-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4f4f4cc09445ff7ed8e2d1ac2f045171fe72f9fe9c8a24e112c5aae9082dc1d5
MD5 20d8f5736d06d21afd66f014dcce7b3a
BLAKE2b-256 7fb32e4b71218ef79978f119a3fd27bcbe770129cbc262dcc80e26e369d5ba9a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zesl-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.6 Linux/5.15.0-56-generic

File hashes

Hashes for zesl-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28ac4a728c2d758e82d57659b7d216969c9c8745441de9670cef7f71dc559279
MD5 ff5a465391e0b89af6c4edbdd90d5ee8
BLAKE2b-256 22904c078e44388f4458ebf0534a223c17019c3e4c7b12f0573c50f93fa1d1c1

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