Some rules in Blab stdlib have ended up using things like A = B | (C | D) to
control expansion probabilities, for example in cases where B is a terminal and
C and D are not, or where C and D are more complex things which may more likely
break some semantics or rules.
This would probably be more easily addressed by changing the grammar to a PCFG
with initial even distribution, but allowing optionally set the weights. The
main problem is that I haven't figured out a good syntax for it yet :)
Current plan:
A =,2 B <- P(B) = 1/2
|,1 C
|,1 D
==
A = B,2 | C | D
Original issue reported on code.google.com by aohelin on 15 Dec 2011 at 7:03
Original issue reported on code.google.com by
aohelin
on 15 Dec 2011 at 7:03