Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rpg = rpg "+" rpg1
- | rpg "-" rpg1
- | rpg1
- ;
- rpg1 = rpg1 "*" rpg2
- | rpg1 "/" rpg2
- | rpg2
- ;
- rpg2 = rpg2 "^" alldice
- | alldice
- ;
- alldice = [loop] "d" loop
- | gdice
- ;
- gdice = [loop] "d" loop "g" [loop]
- | ldice
- ;
- ldice = [loop] "d" loop "l" [loop]
- | loop
- ;
- loop = num
- | "(" rpg ")"
- ;
- num = digit [num] ;
- digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement