The theory of parsing, translation, and compiling
The theory of parsing, translation, and compiling
PRACTICAL TRANSLATORS FOR LR(K) LANGUAGES
PRACTICAL TRANSLATORS FOR LR(K) LANGUAGES
Hi-index | 0.00 |
Practical table-driven parsers require substantial storage for the tables, so that ordinarily the tables are packed several entries per word. However, access to the individual bits of a word is a time-consuming unpacking procedure on many computers. The paper gives a general method for encoding tables so that no unpacking is required. The method is exemplified by the encoding of precedence tables for precedence parsers and the encoding of parsing action tables for LR(k) parsers. The storage required for this encoding is slightly larger than the storage required for the usual packed representation. The technique is applicable to the representation of any fixed table over a small value set.