Marpa as a front end to [the regular expression engine of your choice]?
Yes, It's quite doable and something I'd like to see written.
Whether or not a BNF grammar describes a regular expression is
decidable, and not terribly hard to determine in fact. Ironically, a
Marpa grammar might be a way of making parsing with big regular
expressions more feasible, by making them more readable and maintainable.
Marpa parsing as itself would still have the advantage in error
reporting, however. But some apps would lend themselves to a dual approach.
1.) Have Marpa write a regex, which will run faster than the Marpa
Earley engine on success.
2.) But on failure, reparse with Marpa's own engine to pinpoint the
exact problem.
-- jeffrey
On 10/09/2014 03:24 AM, Ed Avis wrote:
If the grammar is regular, could Marpa spit out a regular expression that
generates the same strings?
--
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.