The Theory of Parsing, Translation, and Compiling
The Theory of Parsing, Translation, and Compiling
Efficient algorithms for automatic construction and compactification of parsing
ACM Transactions on Programming Languages and Systems (TOPLAS)
Lower Bounds and Reductions Between Grammar Problems
Journal of the ACM (JACM)
The Complexity of LALR(k) Testing
Journal of the ACM (JACM)
Automatic generation of near-optimal linear-time translators for non-circular attribute grammars
POPL '79 Proceedings of the 6th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
LR(k) Testing is Average Case Complete
CCC '97 Proceedings of the 12th Annual IEEE Conference on Computational Complexity
LALR(k) testing is PSPACE-complete
STOC '81 Proceedings of the thirteenth annual ACM symposium on Theory of computing
Complexity metatheorems for context-free grammar problems
Journal of Computer and System Sciences
Shift-Resolve parsing: simple, unbounded lookahead, linear time
CIAA'06 Proceedings of the 11th international conference on Implementation and Application of Automata
Conservative ambiguity detection in context-free grammars
ICALP'07 Proceedings of the 34th international conference on Automata, Languages and Programming
Hi-index | 48.22 |
The problem of determining whether an arbitrary context-free grammar is a member of some easily parsed subclass of grammars such as the LR(k) grammars is considered. The time complexity of this problem is analyzed both when k is considered to be a fixed integer and when k is considered to be a parameter of the test. In the first case, it is shown that for every k there exists an O(nk+2) algorithm for testing the LR(k) property, where n is the size of the grammar in question. On the other hand, if both k and the subject grammar are problem parameters, then the complexity of the problem depends very strongly on the representation chosen for k. More specifically, it is shown that this problem is NP-complete when k is expressed in unary. When k is expressed in binary the problem is complete for nondeterministic exponential time. These results carry over to many other parameterized classes of grammars, such as the LL(k), strong LL(k), SLR(k), LC(k), and strong LC(k) grammars.