writing.exchange is one of the many independent Mastodon servers you can use to participate in the fediverse.
A small, intentional community for poets, authors, and every kind of writer.

Administered by:

Server stats:

339
active users

#parser

1 post1 participant0 posts today

To the #Rust #rustlang community: I once started to write a #compiler / #parser with #nom #crate. However I had some struggles with it of how to provide **multiple** errors with line+column indicators for a parsed context.
Now I read a tiny bit about #syn and #chumsky 👀
Are they the right crates for me? Are there others?
I do not parse rust-code, but a completely custom language (similar to pugjs)

(Boost for reach 🙏)

I just released pyparsing 3.2.1 with a very cool addition to the railroad diagrams that pyparsing generates for its parsers - non-terminal diagram elements now link to their definitions elsewhere in the diagram! This is pretty handy when the diagram is for a complex parser, as in this demo of a parser/evaluator for time references like "3 weeks from today" or "0800 two days from now" or "in exactly twenty-four hours". #pyparsing #python #parser #railroaddiagram

Currently dallying with a simple embedded, statically typed scripting language. The magic is an extensible lexer and parser, with the hosting application able to do something like

VM_addCommand(vm, KEYWORD(“open”), KEYWORD(“file”), TYPE(STRING), KEYWORD(“as”), REFERENCE, END);

to allow something like

open file “foo.txt” as myFile

It’s obviously been done before, but it’s fun to play with. I haven’t done enough #compiler or #parser work lately.

OK enough dragging my feet. I've made a little library for defining grammars in a way that theoretically:

- Has fast and robust enough error recovery to power, say, an LSP server
- Lets you define syntax highlighting inline with the grammar definition, so you don't need to write your grammar twice
- Can automatically derive a Wadler-style pretty printer from the grammar, so you DON'T NEED TO WRITE YOUR GRAMMAR TWICE

friendlyhedgehog.com/dingus

friendlyhedgehog.comDingus

today, on let's make IF...

topexpert.blog/2024/10/28/lets

The to-do list for this project is getting shorter:

- handling responses for parser errors
- handling responses for standard rules verbs
- limiting the parser to keep focus on the main four commands

I may write something about playtesting next week, since I've gotten lots of questions about it (both for testers and authors).

top expert · let’s make IF #15: disabling unwanted commandsSince only four commands are meant to do anything, how much time do we want to spend on commands like *PUT LIGHT IN YELLOW*?
Replied in thread

@notgull

Maybe these resources are interesting to you as well 🤓

Introduction to Compilers and Language Design - by Douglas Thain (haven't read yet)

compilerbook.org/

Strumenta (<-- an absolute gem!)

tomassetti.me/

e.g. these articles

A #Guide to #Parsing: #Algorithms and Terminology:

tomassetti.me/guide-parsing-al

A #tutorial on how to write a #compiler using #LLVM:

tomassetti.me/a-tutorial-on-ho

Firing up #Inform7 on my #Mac to write another #interactiveFiction #game. Getting stuck into the prologue. This will be a much bigger game than I've written before, including 7 main sections in the #code. It is going to take some time. So best get on with it sooner rather than later! Excited to be back #coding. There's something magical about using this #declarative / #naturalLanguage / #objectOriented #programming language and IDE. #GameDev #IndieGame #TextGames #Parser #TextAdventure #Inform

Continued thread

Dans "Le miroir d'Ozivior", @stormi nous propose de relever le défi imposé par notre ami Ozivior de l'académie de magie.

Dans ce jeu, on doit s'échapper de la chambre d'Ozivior. Enfin, de la presque chambre d'Ozivior, car on dirait que les choses sont un peu différentes…

samuel-v2.itch.io/le-miroir-do

itch.ioLe miroir d'Ozivior by samuel_v2Relevez le défi imposé par votre ami Ozivior de l'académie de magie dans cette fiction interactive.