- Renamed ShiftOrReduce to ParserStatePositionGraphAction, and added the Accept case to it.
- Modified the Shift case of ParserStatePositionGraphAction so it contains the terminal (token) being shifted onto the stack instead of the parser state it's shifting into; however, this may need to be changed back once we actually implement the code to create the Parser State Position Graphs.
- Implemented a function to compute the Parser State Position Graph of an LR(0) state; it seems to work correctly based on a few small tests.
- Removed the Accept case from ParserStatePositionGraphAction; instead, we'll just make sure to recognize that (Reduce Start) represents the Accept action.
- Moved the PSPG-computing function into a new FreePositions module, since it was being calculuated separately anyway (instead of integrating the computation into the LR(0) closure computation).
- Modified the table-generating functions so they operate on a grammar which has already been augmented instead of augmenting within the function; this will help avoid unnecessarily re-computing the augmented grammar and certain analyses since we'll be able to just pass them into the functions as needed.
- Removed the StartSymbol field from the Grammar record; now that the table-generating functions operate on augmented grammars, we don't need to explicitly specify the start symbol (it'll always be Start); the Grammar.Augment method now takes an additional parameter to specify the symbol to begin parsing with.
- Reordered some types in Grammar.fs -- moved the Symbol type below AugmentedNonterminal and AugmentedTerminal since we use Symbol much more frequently and it avoids the need to use the FQN everywhere.
- Created the AugmentedPatterns module, containing a couple of active patterns to simplify matching on symbols of augmented grammars.
- Created a type alias, AugmentedSymbol, which we'll use to clean up some type annotations elsewhere in the code.
- In the LrParserTable and LrTableGenState records, split the Table field into the separate ACTION and GOTO tables used by most LR/LALR parser-generator algorithms.
- Modified LrParsingTable to include the parser states themselves (instead of just the number of parser states).
- Moved the ParserStatePositionGraph type (and related types) down near the FreePositions module.
- Removed the LeftCornerItem module -- it was only a stub, and it's not needed any longer.
- Implemented most of the functionality for computing free positions -- a couple of graph algorithms still need to be implemented.
- Treat warning FS0025 as an error to avoid any incomplete pattern matches.
- Imported the LabeledSparseDigraph type from an early version of fsharplex and modified the code which creates the Parser State Position Graphs to use it instead of just a simple edge-set; this'll make it easier to implement the necessary graph algorithms.
- Modified LabeledSparseDigraph to remove the edge-labelings -- they aren't needed for ParserStatePositionGraphs. Renamed the type to VertexLabeledSparseDigraph.
- Implemented Warshall's algorithm for computing reachability.
- Implemented the "naive" algorithm for computing dominators. The state graphs are fairly small so there's not much to gain by using a more advanced algorithm.