Next: , Previous: , Up: Futures   [Contents][Index]


31.8 Furthest earleme values

marpa_r_furthest_earleme returns unsigned int, which is non-orthogonal with marpa_r_current_earleme. This leaves no room for an failure return value, which we deal with by not checking for failures. The only important potential failure is calling marpa_r_furthest_earleme when the furthest earleme is an indeterminate value. We eliminate this potential cause of failure by regarding furthest earleme as having been initialized when the recognizer was created, which is another non-orthogonality with marpa_r_current_earleme.

All this might be fine, if something were gained, but in fact nothing ever is gained. The furthest earleme, unless the parse fails, always becomes the current earleme, and no use cases for extremely long variable-length tokens are envisioned, so that current and furthest earleme should never be far apart. Additionally, the additional values for the furthest earleme only come into play if the length of parse causes the application to exceed the memory limit imposed by modern application environments. Summarizing, marpa_r_furthest_earleme, should return an int, like marpa_r_current_earleme, and the non-orthogonalities should be eliminated.