摘要 |
A parser (11) for parsing computer programs in a compiler has parsing tables arranged as linear vectors. In a reduction portion (71) of the parser, a production table (72) and a lookahead set table (73) have paired entries (20, 22) at identical address offsets such that a one-to-one relationship exists between each lookahead set (0, 91, 93) in the lookahead set table (73) and the representation of the lookahead set in the lookahead set table. In a read transition portion of the parser, an entrance symbol table (102) has entries paired with transition state representations and each pair being at an identical address offset in the respective tables. For a reduction or read transition operation, the lookahead set table (73) or the entrance symbol table (102) is scanned to find the appropriate entry. Once the appropriate entry is found, the production table (72) or the transition state table (103) is addressed using the offset of the appropriate entry found during the scanning process. |