Fix some comments concerning LR(0) versus LALR(1).

Stop equating LR(0) with nondeterminism and LALR(1) with
determinism.  That is, if all states are consistent, then LR(0)
tables are deterministic.  On the other hand, LALR(1) tables
might be nondeterministic before conflict resolution, and GLR
permits LALR(1) tables to remain nondeterministic.
* src/LR0.c, src/LR0.h: Here.
* src/lalr.c, src/lalr.h: Here.
* src/main.c (main): Here.
* src/state.c, src/state.h: Here.

* src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
parser tables.
This commit is contained in:
Joel E. Denny
2010-01-04 14:13:43 -05:00
parent 1462fcee1e
commit 1c4ad777cb
9 changed files with 32 additions and 17 deletions

View File

@@ -26,8 +26,8 @@
/**
* \pre
* - \c ::states is of size \c ::nstates and defines an LALR(1) parser for
* the users's grammar.
* - \c ::states is of size \c ::nstates and defines an LR(0) parser
* for the users's grammar.
* - \c ::ntokens is the number of tokens in the grammar.
* \post
* - \c ::states is of size \c ::nstates (which might be greater than