Next: , Previous: , Up: Parse location   [Contents][Index]


7.1.2 Earlemes and Earley set IDs

Libmarpa’s idea of parse location, is the earleme, but Libmarpa also tracks Earley sets by ordinal number. In Libmarpa’s basic input models, the earleme of an Earley set is always equal to the ordinal of the Earley set, so the distinction between Earley set ordinal and earleme is pedantic. But Libmarpa’s advanced input models allow sparse input and, when sparse input is in use, an Earley set’s ordinal and its earleme may differ. See The fully general input model.

The earlemes are assigned consecutive non-negative integers, starting at 0. The highest valued earleme is called the furthest earleme. See The furthest earleme. The other important earleme values are the latest earleme (see The latest earleme) and the current earleme (see The current earleme). Latest, current and furthest earleme, when they have specified values, obey a lexical order in this sense: The latest earleme is always at or before the current earleme, and the current earleme is always at or before the furthest earleme.

The Earley set ordinal is also known as the ID of the Earley set, or Earley set ID. Earley set IDs are consecutive non-negative integers, starting at 0. The highest valued Earley set ID is that of the latest Earley set. See The latest Earley set