Zeev -- the sort of thing you suggest can be done, in various ways.  You
can pause the parse, switch to manual parsing, and resume the input at an
input location of your choice.

As an example of this sort of thing, I recently did my own example of
delimiter handling
<http://jeffreykegler.github.io/Ocean-of-Awareness-blog/individual/2014/11/delimiter.html>
which, when it encounters a missing delimiter, supplies it.

The reason I think you see the others (and myself) preferring a direct,
rule-based, approach is that it makes for simpler, faster and more
maintainable code, when it is possible.  And what with the wide variety of
grammars that Marpa can parse, plus various tricks such as ranking rules,
it often is possible.

On Wed, Dec 31, 2014 at 4:37 AM, Zeev Atlas <[email protected]> wrote:

> As I read more and begin to grasp the complexity of Marpa solution, and
> the desire to work all issues from within the context of grammar, actions
> (evemts, etc.) I can see why you guys want to insist on using rules and
> only rules, whether positive or negative, to parse the subject.  Let me
> please givee you a counter argument:
> I am not a native English speaker.  When I learned the language, till
> today, when reading and parsing text, i may and do encounter words that I
> do not know.  Instead of going to the dictionary, I encapsulate such words
> and substitite them with either a context based approximation or with null
> and try to continue parsing.  Rarely, indeed very rarely, I cannot proceed.
> What I would want is something similar, in which Marpa would tell me that
> it have encountered such an element and allow me to advise it to substitute
> it with something else or nullify it and continue.
> I do not know how hard is that to implement, but I suspect that it should
> not be that hard.  And the practical benefits would be enormous
> ZA
>
> --
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to