Skip to content

1.3.0

Compare
Choose a tag to compare
@nylki nylki released this 22 Jan 18:57
  • New object-based productions: allows context sensitivity:
setProduction('F', {leftCtx: 'A+BC', rightCtx: 'YZ', successor: 'FF'}

stochastic productions:

setProduction('F', {successor: [{successor: 'F-', weight: 25}, {successor: 'F+', weight: 75}]

and conditions:

setProduction('F', {successor: 'FF', condition: () => foo() === 'bar']

in more streamlined way than defining your own function for those very common use cases.