embolalia/willie — pull request #656 by Tarinaky (2014-11-08 17:03:47+00:00)
Title: New dice parser based on Mithandir's DMBot.

I don't think this is anything you guys have asked for, but I've been working on extending Willie slightly to make it a seamless replacement for an older, Delphi, bot my channel use for D&D. We needed it to support our existing dice expressions, ideally without having some !command infront of the expression... i.e. instead of '!dice 1d6' we can just call '!1d6'.

Hopefully you like the work I've done, or have some suggestions for how to improve it. I don't mind if you decide not to merge the work however as this is my first attempt at authoring a pull request: and so probably awful.

Updated readme.

Began work on a parser for dice and maths.

Added module for dmbot-style dice parser.

Removed the duplicate dmbot parser module folder.

Attempting to add series productions and dice modifiers.

Altered the tests to only check the resulting tree.

Added test for brackets.

Parser unit tests now pass. Restructured grammar of parser to do precedence differently.

Can now evaluate parse trees for dice and numeric literals.

Added evaluation of parse trees.

Fixed bug, was assuming all dice were size 6 in floating_reroll.

Added docstrings to everything.

Added an OO front-end for parser called dice.

Docstrings for Dice.

Now calling DMBot dice from willie. Needs a refactor.

Calling DMBot parser from Willie.

Minor refactor to make exist in a seperate function.

Handling whitespace as part of an expression.