You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Correct the example outputs for the LR(1) automaton calculation. These actually had the output of the LALR(1) automaton calculation, which takes as input the LR(1) automaton, and incorrectly overwrites parts of it. This bug is fixed in a later commit.
4
+
5
+
* Clean up tests, and add test cases (beyond the example outputs) for several calculations.
6
+
7
+
* Introduce the `calculations` property on `Grammar` instances. This replaces the `getCalculation` method, which took a string identifying a calculation and dispatched to the correct calculation function, memoizing the result. The new property returns an object with individual memoized properties, which can be destructured in calculation functions, like this:
This avoids passing the grammar instance to calculation functions, which aren't really supposed to modify it or depend on it other than asking for calculations, and removes the dotted calculation names like "grammar.terminals".
0 commit comments