waterstopper / CrateGram

Utility for PEG parsers
0 stars 0 forks source link

add formatting option #8

Open waterstopper opened 1 year ago

waterstopper commented 1 year ago

format grammar by aligning rules like that:

root    = Expr
Expr    = Sum
Sum     = Product (("+" | "-") Product)*
Product = Power (("*" | "/") Power)*
Power   = Value ("^" Power)? 
Value   = [0-9]+ | "(" Expr ")"