pharaun / alldice

Restful interface to a dice expression eval and generator.
Apache License 2.0
0 stars 1 forks source link

Implement SubDiceParser for alternative dice syntax. #25

Open pharaun opened 10 years ago

pharaun commented 10 years ago

Should provide a simple way to parse alternative dice syntax such as roll20.net, pcgen and so forth.

Basically it would take an input string, parse then emit an equivalent instruction but in the scheme AST/Raw Scheme and feed it into the primary dice engine so that we can have a clean scheme core that is extendable with other syntax form.

I would suspect one such example uri routing could be like:

/roll/{subparser}/etc....

Then the person who is interacting with the http api can probably just issue an common call to various sub-parser such as pcgen, roll20, troll, etc... and put the dice expression into the src="" field and have it parsed and transformed into an scheme ast for execution.