djspiewak/gll-combinators — pull request #19 by b-studios (2013-05-18 13:43:51+00:00)
Title: Computation of the FIRST set for ?-combinator

There has been a problem using the ?-combinator inside the +-combinator, since the FIRST set of ? was always empty and thus the +-combinator has not been applied multiple times.

The parser
~~~
("-".? ~ "1").+
~~~

did recognize strings like `11` and `1-1` but *not* `-11`, `-1-1` and `1-1-1`.

After fixing the computation of the FIRST-set all strings are recognized.