glex

Glex is a simple SRE-based lexer/tokenizer designed to be a good match for the acetone parser.

Glex is a macro. As arguments, you give it any amount of pairs of SRE and tags. The macro returns a procedure that can take a single rope, any amount of strings (they’ll be concatenated), or nothing (in case it’ll read from the current input port.)

You can use two-element lists, or pairs, it doesn’t matter which:

You can use any SRE:

You don’t need to worry about PCRE grawlix mucking things up:

You can not use variables and stuff, it doesn’t compose very well (your only recourse if you want some regexes containing other regexes is to construct the glex call itself from another macro). It’s not a parser, it’s just a tokenizer.

For a repo,

A simple parser

rope

Proxied content from gemini://idiomdrottning.org/glex (external content)

Gemini request details:

Original URL
gemini://idiomdrottning.org/glex
Status code
Success
Meta
text/gemini; lang=en
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.