Add -k option which allows users to specify maximum LL(k) search depth.
commitde14d8c15f7233e08a83a061f1a6463cb4ea22d6
authorJoshua Haberman <joshua@reverberate.org>
Wed, 6 Aug 2008 18:58:55 +0000 (6 11:58 -0700)
committerJoshua Haberman <joshua@reverberate.org>
Wed, 6 Aug 2008 18:58:55 +0000 (6 11:58 -0700)
tree23b148380ce88e601e49618e5afe79b3db22ad6c
parent45d56ebaf720cef362ef909183ab4ec34a925c3b
Add -k option which allows users to specify maximum LL(k) search depth.
Normally we use a heuristic to guess when a grammar is not LL(k),
but this heuristic can fail in some cases and falsely claim a grammar
is not LL(k) when in fact it is.  With the -k option, we will always
generate correct lookahead if indeed the grammar is LL(k) for the
user-specified k.
compiler/fa.lua
compiler/gzlc
compiler/ll.lua
tests/test_ll.lua