Lexer.x: Change the parser monad type P to allow the remaining input to
be returned after a partial parse. Add function
runPartial :: P t -> String -> Either (Posn, String) (String, t)
Parser.y: Add a partial parser pTerm for nonterminal Exp1.
Re-export runPartial.
The automake package contains aclocal, which is needed when running
autoreconf -i.
I never needed to install automake explicitly on Linux, presumably because it
got installed anyway because of some other dependency, but apparently you
can't take this for granted.
Because of the "heurisitc factor", the results returned by the parser might
not be in strict probability order. To compensate, a sorting pass has been
added to find and show the translation with the highest probability among the
10 first translations.
However, this means that the translation demo now immediately has to ask for
10 translations of every segment. Before, it initially asked for only one
translation of every segment, and then 9 more translations for a segment
when/if the user clicked on it. This change can slow down translation
noticeably (e.g. from 15s 30s to load an example with fiction in English).
"File/Open In Wide Coverage Translation Demo" stopped working when support
for using different grammars in the Wide Coverage Translation Demo was added
On September 2.
This is implemented as a simple post-processing step after partial evaluation
to try compute pre{...} tokens in token sequences. Nothing is done to deal
with intervening free variants.
This was done in response to a query from René T on the gf-dev mailing list.
The matchPrefix function is used in str2strings and the partial evaluator to
compute pre{...} tokens. But unlike the description in the GF book and
the implementation in the run-time system, matchPrefix looked at
the concatenation(!) of all following tokens and not just the next token
when deciding how to compute a pre{...} token.
This is a backwards incompatible change, but it is subtle and probably won't
cause any problems. In particular, the example grammars are unaffected.