On this page <http://krautkanal.com/prog/9781>, I came across a very nice 
summary of Marpa in German. Following it, I've pasted the Google 
translation, which reads quite nicely.

First the German:

Marpa ist der beste Parsingalgorithmus seit Jahrzehnten, Implementierung 
mit demselben Namen liegt in C vor.

https://jeffreykegler.github.io/Marpa-web-site/

* Marpa gibt vernünftige Fehlermeldungen aus, wenn Nonterminals nicht 
erreichbar oder reifizierbar sind, wenn die Grammatik Zyklen enthält oder 
nicht null-nicht-ambiguierbar ist. (LALR versagt hier.)
* Marpa geht sinnvoll mit Mehrdeutigkeit um und liefert alle möglichen 
Parsebäume. (PEG versagt hier.)
* Marpa schert sich nicht um First Set Clash oder Shift-Reduce Conflict; 
alle kontext-freien Grammatiken werden akzeptiert und in höchstens O(n**3) 
geparst. (yacc versagt hier.)
* Marpa parst alle LR-regulären Grammatiken in linearer Zeit. Wenn deine 
Grammatik mittels Recursive Descent geparst werden kann, dann trifft das 
zu. Marpa enthält ein Informatikabhandlung mit Beweisen der Korrektheit und 
Komplexitätsaussagen.
* Marpa weiß jederzeit, wo genau der Parsevorgang fehlschlug und aus 
welchem Grund, an welchen Regeln schon gearbeitet wurde und wie weit in 
jeder hinein, und liefert konkrete und korrekte Fehlermeldungen. Falls der 
Lexer ein ungültiges Token übergibt, kann Marpa Aussagen treffen, welches 
akzeptable Token an dieser Stelle sind. Marpa kann den Lexer auch darüber 
informieren, und so ein passendes Token einfach aus der Luft greifen oder 
die Regeln zur Laufzeit anpassen, um den Parsevorgang fortzusetzen, als ob 
der Fehler nicht aufgetreten wäre.

Now the Google translation, slightly cleaned up:

Marpa is the best parsing algorithm for decades, implemented under that 
same name is in C.

* Marpa provides reasonable error messages when nonterminals are not 
reachable or productive; if the grammar contains cycles; or is not 
unambiguous. (LALR fails here.)
* Marpa deals meaningfully with ambiguity and supplies all possible parse 
trees. (PEG fails here.)
* Marpa does not care about First Set Clash or Shift-Reduce Conflict; All 
context-free grammars are accepted and parsed in at most O(n ** 3). (Yacc 
fails here.)
* Marpa parses all LR-regular grammars in linear time. If your grammar can 
be parsed using Recursive Descent, then that applies. Marpa has a computer 
science write-up with proofs of correctness and complexity.
* Marpa knows at any time exactly where the parse process failed and for 
what reason, which rules have already been worked on and how far in each 
one, and provides concrete and correct error messages. If the lexer passes 
an invalid token, Marpa can make statements which are acceptable tokens at 
this point. Marpa can also inform the lexer about this, and simply take a 
suitable token out of the air or adjust the rules at runtime to continue 
the parse process as if the error had not occurred

-- 
You received this message because you are subscribed to the Google Groups 
"marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to marpa-parser+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to