diff --git a/modules/Dice.py b/modules/Dice.py index ef47e2a..aced73f 100644 --- a/modules/Dice.py +++ b/modules/Dice.py @@ -138,7 +138,7 @@ class Dice(Module): return output def p_roll_r(self, p): - """Chain rolls together.""" + # Chain rolls together. # General idea I had when creating this grammar: A roll string is a chain # of modifiers, which may be repeated for a certain number of trials. It can @@ -151,7 +151,7 @@ class Dice(Module): output = p[0] def p_roll(self, p): - """Parse a basic roll string.""" + # Parse a basic roll string. 'roll : trial modifier comment' global output @@ -164,7 +164,7 @@ class Dice(Module): output = p[0] def p_roll_no_trials(self, p): - """Parse a roll string without trials.""" + # Parse a roll string without trials. 'roll : modifier comment' global output @@ -177,7 +177,7 @@ class Dice(Module): output = p[0] def p_comment(self, p): - """Parse a comment.""" + # Parse a comment. '''comment : TEXT |''' @@ -187,7 +187,7 @@ class Dice(Module): p[0] = None def p_modifier(self, p): - """Parse a modifier on a roll string.""" + # Parse a modifier on a roll string. '''modifier : modifier "+" modifier | modifier "-" modifier''' @@ -204,7 +204,7 @@ class Dice(Module): p[0] = [p[1], p[2], p[3]] def p_die(self, p): - """Return the left side before the "d", and the number of faces.""" + # Return the left side before the "d", and the number of faces. 'modifier : left NUMBER' p[0] = (p[1], p[2]) @@ -214,7 +214,7 @@ class Dice(Module): p[0] = p[1] def p_left(self, p): - """Parse the number of dice we are rolling, and how many we are keeping.""" + # Parse the number of dice we are rolling, and how many we are keeping. 'left : keep dice' if p[1] == None: p[0] = [None, p[2]] @@ -252,7 +252,7 @@ class Dice(Module): p[0] = 1 def p_error(self, p): - """Provide the user with something (albeit not much) when the roll can't be parsed.""" + # Provide the user with something (albeit not much) when the roll can't be parsed. global output output = "Unable to parse roll"