paint-brush
Writing a Parser for a Simplistic Dice Expression Using Nearleyby@wunderdev
150 reads

Writing a Parser for a Simplistic Dice Expression Using Nearley

by Marcus7mFebruary 9th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

I got the urge to write a parser for table top gaming. For example 4d6+1 meaning roll 4 6 sided dices, sum it all up and add 1 to the result. A pretty simple task, that could probably be done by just looking at the string and doing some splits or substrings. But I want to do it with nearley, because that sound like fun to me.
featured image - Writing a Parser for a Simplistic Dice Expression Using Nearley
Marcus HackerNoon profile picture
Marcus

Marcus

@wunderdev

Exploring the world one commit at a time

0-item

STORY’S CREDIBILITY

Code License

Code License

The code in this story is for educational purposes. The readers are solely responsible for whatever they build with it.

L O A D I N G
. . . comments & more!

About Author

Marcus HackerNoon profile picture
Marcus@wunderdev
Exploring the world one commit at a time

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite